You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <var...@us...> - 2014-10-15 09:10:57
|
Revision: 9262 http://sourceforge.net/p/phpwiki/code/9262 Author: vargenau Date: 2014-10-15 09:10:49 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Better test uploads directory Modified Paths: -------------- trunk/lib/config.php trunk/lib/plugin/UpLoad.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2014-10-14 16:44:38 UTC (rev 9261) +++ trunk/lib/config.php 2014-10-15 09:10:49 UTC (rev 9262) @@ -60,8 +60,10 @@ if (strstr($agent, "Mozilla/4.0 (compatible; MSIE")) return (float)substr($agent, 30); elseif (strstr($agent, "Mozilla/5.0 (compatible; Konqueror/")) - return (float)substr($agent, 36); elseif (strstr($agent, "AppleWebKit/")) - return (float)substr($agent, strpos($agent, "AppleWebKit/") + 12); else + return (float)substr($agent, 36); + elseif (strstr($agent, "AppleWebKit/")) + return (float)substr($agent, strpos($agent, "AppleWebKit/") + 12); + else return (float)substr($agent, 8); } @@ -75,7 +77,8 @@ // http://sourceforge.net/tracker/index.php?func=detail&aid=945154&group_id=6121&atid=106121 function isBrowserKonqueror($version = false) { - if ($version) return browserDetect('Konqueror/') and browserVersion() >= $version; + if ($version) + return browserDetect('Konqueror/') and browserVersion() >= $version; return browserDetect('Konqueror/'); } @@ -85,13 +88,15 @@ { $found = browserDetect('Spoofer/'); $found = browserDetect('AppleWebKit/') or $found; - if ($version) return $found and browserVersion() >= $version; + if ($version) + return $found and browserVersion() >= $version; return $found; } function isBrowserOpera($version = false) { - if ($version) return browserDetect('Opera/') and browserVersion() >= $version; + if ($version) + return browserDetect('Opera/') and browserVersion() >= $version; return browserDetect('Opera/'); } @@ -188,8 +193,10 @@ // do the reverse: return the detected locale collapsed to our LANG $locale = setlocale($category, ''); if ($locale) { - if (strstr($locale, '_')) list ($lang) = explode('_', $locale); - else $lang = $locale; + if (strstr($locale, '_')) + list ($lang) = explode('_', $locale); + else + $lang = $locale; if (strlen($lang) > 2) { foreach ($alt as $try => $locs) { if (in_array($locale, $locs) or in_array($lang, $locs)) { @@ -314,10 +321,6 @@ { if (defined('UPLOAD_FILE_PATH')) { - // Force creation of the returned directory if it does not exist. - if (!file_exists(UPLOAD_FILE_PATH)) { - mkdir(UPLOAD_FILE_PATH, 0775, true); - } if (string_ends_with(UPLOAD_FILE_PATH, "/") or string_ends_with(UPLOAD_FILE_PATH, "\\") ) { Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2014-10-14 16:44:38 UTC (rev 9261) +++ trunk/lib/plugin/UpLoad.php 2014-10-15 09:10:49 UTC (rev 9262) @@ -52,7 +52,6 @@ // end of the page (or current page) 'autolink' => true, 'page' => '[pagename]', - 'size' => 50, 'mode' => 'actionpage', // or edit ); } @@ -81,7 +80,7 @@ extract($args); $file_dir = getUploadFilePath(); - $file_dir .= "/"; + $form = HTML::form(array('action' => $request->getPostURL(), 'enctype' => 'multipart/form-data', 'method' => 'post')); @@ -90,8 +89,8 @@ 'name' => 'MAX_FILE_SIZE', 'value' => MAX_UPLOAD_SIZE))); $contents->pushContent(HTML::input(array('name' => 'userfile', - 'type' => 'file', - 'size' => $size))); + 'required' => 'required', + 'type' => 'file'))); if ($mode == 'edit') { $contents->pushContent(HTML::input(array('name' => 'action', 'type' => 'hidden', @@ -122,13 +121,10 @@ ) )); } else { - $message->pushContent(HTML::div(array('class' => 'error'), - HTML::p(_("ACCESS DENIED: You must log in to upload files.")))); + $message->pushContent(HTML::p(array('class' => 'error'), + _("ACCESS DENIED: You must log in to upload files."))); } - $result = HTML(); - $result->pushContent($form); - $result->pushContent($message); - return $result; + return HTML($message, $form); } } @@ -138,20 +134,30 @@ $userfile_name = trim(basename($userfile_name)); if (UPLOAD_USERDIR) { $file_dir .= $request->_user->_userid; - if (!file_exists($file_dir)) - mkdir($file_dir, 0775); $file_dir .= "/"; $u_userfile = $request->_user->_userid . "/" . $userfile_name; } else { $u_userfile = $userfile_name; } + $trimmed_file_dir = rtrim($file_dir, '/'); + + if (file_exists($trimmed_file_dir) && !is_dir($trimmed_file_dir)) { + $message->pushContent(HTML::p(array('class' => 'error'), fmt("Cannot upload, “%s” is not a directory.", $trimmed_file_dir))); + return HTML($message, $form); + } + if (!file_exists($trimmed_file_dir) && !@mkdir($file_dir, 0775)) { + $message->pushContent(HTML::p(array('class' => 'error'), fmt("Cannot create upload directory “%s”.", $file_dir))); + return HTML($message, $form); + } + if (!is_writable($trimmed_file_dir)) { + $message->pushContent(HTML::p(array('class' => 'error'), fmt("Cannot upload, “%s” is not writable.", $file_dir))); + return HTML($message, $form); + } + $u_userfile = preg_replace("/ /", "%20", $u_userfile); $userfile_tmpname = $userfile->getTmpName(); - $err_header = HTML::div(array('class' => 'error'), - HTML::p(fmt("Error uploading “%s”", $userfile_name))); - if (preg_match("/(\." . join("|\.", $this->disallowed_extensions) . ")(\.|\$)/i", - $userfile_name) - ) { + $err_header = HTML::div(array('class' => 'error'), HTML::p(fmt("Error uploading “%s”", $userfile_name))); + if (preg_match("/(\." . join("|\.", $this->disallowed_extensions) . ")(\.|\$)/i", $userfile_name)) { $err_header->pushContent(HTML::p(fmt("Files with extension %s are not allowed.", join(", ", $this->disallowed_extensions)))); $message->pushContent($err_header); @@ -202,15 +208,9 @@ $err_header->pushContent(HTML::p(_("Uploading failed."))); $message->pushContent($err_header); } - } else { - $message->pushContent(HTML::br(), _("No file selected. Please select one."), HTML::br()); } - //$result = HTML::div( array( 'class' => 'wikiaction' ) ); - $result = HTML(); - $result->pushContent($form); - $result->pushContent($message); - return $result; + return HTML($message, $form); } function log($userfile, $upload_log, &$message) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 16:44:46
|
Revision: 9261 http://sourceforge.net/p/phpwiki/code/9261 Author: vargenau Date: 2014-10-14 16:44:38 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Remove border Modified Paths: -------------- trunk/themes/Sidebar/templates/navbar.tmpl Modified: trunk/themes/Sidebar/templates/navbar.tmpl =================================================================== --- trunk/themes/Sidebar/templates/navbar.tmpl 2014-10-14 16:28:30 UTC (rev 9260) +++ trunk/themes/Sidebar/templates/navbar.tmpl 2014-10-14 16:44:38 UTC (rev 9261) @@ -56,7 +56,7 @@ // Do not display the pdf icon $btn = new Button(_("Display as Pdf"), WikiURL($page->getName(), array('action' => 'pdf')), 'wikiaction'); ?> - <li><?php echo $btn ?> <?php echo WikiLink("Help/Display as Pdf","",HTML::img(array('src'=>$WikiTheme->_findData('images/mini_help.png'),'border'=>0,'width'=>12,'height'=>13,'alt'=>'pdf-help','title'=>"How to generate multi-page PDFs"))) ?></li> + <li><?php echo $btn ?> <?php echo WikiLink("Help:PDF","",HTML::img(array('src'=>$WikiTheme->_findData('images/mini_help.png'),'width'=>12,'height'=>13,'alt'=>'PDF help','title'=>'PDF help'))) ?></li> <?php } ?> <li><?php echo WikiLink(_("AllPages")) ?></li> <?php if (!empty($user) && $user->isAdmin()) { ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 16:28:33
|
Revision: 9260 http://sourceforge.net/p/phpwiki/code/9260 Author: vargenau Date: 2014-10-14 16:28:30 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Remove size argument Modified Paths: -------------- trunk/pgsrc/Help%2FUpLoadPlugin Modified: trunk/pgsrc/Help%2FUpLoadPlugin =================================================================== --- trunk/pgsrc/Help%2FUpLoadPlugin 2014-10-14 12:20:10 UTC (rev 9259) +++ trunk/pgsrc/Help%2FUpLoadPlugin 2014-10-14 16:28:30 UTC (rev 9260) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 18:26:49 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FUpLoadPlugin; @@ -38,10 +38,6 @@ | The page where the uploaded files are publicly listed, if autolink is true. | Current page |- -| **size** -| Size of file input box. -| 50 -|- | **mode** | 'actionpage' or 'edit' | actionpage This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 12:20:14
|
Revision: 9259 http://sourceforge.net/p/phpwiki/code/9259 Author: vargenau Date: 2014-10-14 12:20:10 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Add private Modified Paths: -------------- trunk/lib/Request.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-10-14 12:14:19 UTC (rev 9258) +++ trunk/lib/Request.php 2014-10-14 12:20:10 UTC (rev 9259) @@ -539,7 +539,7 @@ return Request_UploadedFile::getUploadedFile($key); } - function _stripslashes(&$var) + private function _stripslashes(&$var) { if (is_array($var)) { foreach ($var as $key => $val) @@ -548,13 +548,13 @@ $var = stripslashes($var); } - function _fix_multipart_form_data() + private function _fix_multipart_form_data() { if (preg_match('|^multipart/form-data|', $this->get('CONTENT_TYPE'))) $this->_strip_leading_nl($GLOBALS['HTTP_POST_VARS']); } - function _strip_leading_nl(&$var) + private function _strip_leading_nl(&$var) { if (is_array($var)) { foreach ($var as $key => $val) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 12:14:27
|
Revision: 9258 http://sourceforge.net/p/phpwiki/code/9258 Author: vargenau Date: 2014-10-14 12:14:19 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Remove get_magic_quotes_gpc Modified Paths: -------------- trunk/lib/Request.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-10-14 10:28:21 UTC (rev 9257) +++ trunk/lib/Request.php 2014-10-14 12:14:19 UTC (rev 9258) @@ -26,7 +26,6 @@ function __construct() { - $this->_fix_magic_quotes_gpc(); $this->_fix_multipart_form_data(); switch ($this->get('REQUEST_METHOD')) { @@ -540,21 +539,6 @@ return Request_UploadedFile::getUploadedFile($key); } - function _fix_magic_quotes_gpc() - { - $needs_fix = array('HTTP_POST_VARS', - 'HTTP_GET_VARS', - 'HTTP_COOKIE_VARS', - 'HTTP_SERVER_VARS', - 'HTTP_POST_FILES'); - - // Fix magic quotes. - if (get_magic_quotes_gpc()) { - foreach ($needs_fix as $vars) - $this->_stripslashes($GLOBALS[$vars]); - } - } - function _stripslashes(&$var) { if (is_array($var)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 10:28:25
|
Revision: 9257 http://sourceforge.net/p/phpwiki/code/9257 Author: vargenau Date: 2014-10-14 10:28:21 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Use smart quotes Modified Paths: -------------- trunk/pgsrc/CategoryCategory trunk/pgsrc/Help%2FAddCommentPlugin trunk/pgsrc/Help%2FBackLinksPlugin trunk/pgsrc/Help%2FCalendarListPlugin trunk/pgsrc/Help%2FCalendarPlugin trunk/pgsrc/Help%2FCategories trunk/pgsrc/Help%2FDynamicIncludePagePlugin trunk/pgsrc/Help%2FExternalSearchPlugin trunk/pgsrc/UpLoad Modified: trunk/pgsrc/CategoryCategory =================================================================== --- trunk/pgsrc/CategoryCategory 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/CategoryCategory 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=CategoryCategory; @@ -22,6 +22,6 @@ == Create a new Category == -To create a new category, enter its name (starting with "Category") and hit button. +To create a new category, enter its name (starting with “Category”) and hit button. <?plugin-form CreatePage s=CategoryBla template=Template/Category ?> Modified: trunk/pgsrc/Help%2FAddCommentPlugin =================================================================== --- trunk/pgsrc/Help%2FAddCommentPlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FAddCommentPlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FAddCommentPlugin; @@ -36,7 +36,7 @@ | add,show |- | **noheader** -| Boolean if the "Comments" header should be omitted. +| Boolean if the “Comments” header should be omitted. | 0 |- | **pagename** Modified: trunk/pgsrc/Help%2FBackLinksPlugin =================================================================== --- trunk/pgsrc/Help%2FBackLinksPlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FBackLinksPlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FBackLinksPlugin; @@ -9,8 +9,8 @@ The **~BackLinks** [[Help:WikiPlugin|plugin]] lists all pages which link to a given page. The contents of all pages are searched to find links to the current -page. The ~BackLinks function also answers the question: "Which pages -contain the title of this page?". +page. The ~BackLinks function also answers the question: “Which pages +contain the title of this page?”. To display the list of pages which all contain multiple links use a pagelist as page argument. For example {{{<<BackLinks page=Milk,Honey>>}}} would display all pages which Modified: trunk/pgsrc/Help%2FCalendarListPlugin =================================================================== --- trunk/pgsrc/Help%2FCalendarListPlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FCalendarListPlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FCalendarListPlugin; @@ -55,7 +55,7 @@ | %Y-%m-%d |- | **order** -| Report sequence: "normal" or "reverse". "reverse" displays newest dates first. +| Report sequence: “normal” or “reverse”. “reverse” displays newest dates first. | PLUGIN_CALENDARLIST_ORDER |- | **month_offset** Modified: trunk/pgsrc/Help%2FCalendarPlugin =================================================================== --- trunk/pgsrc/Help%2FCalendarPlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FCalendarPlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FCalendarPlugin; @@ -10,7 +10,7 @@ wiki page. It's handy for personal wikis. Individual dates in the calendar link to specially named wiki pages. -The names for the "day pages" are by default formed by appending the +The names for the “day pages” are by default formed by appending the date to the pagename on which the calendar appears. == Usage == @@ -44,14 +44,14 @@ | Added to //month//. Can be used to include several months worth of calendars on a single wiki page. | 0 |- -| colspan="3" class="align-center" | **"Day Page" Names** +| colspan="3" class="align-center" | **“Day Page” Names** |- | **date_format** -| [[php-function:strftime|strftime]] style format string used to generate page names for the "day pages." +| [[php-function:strftime|strftime]] style format string used to generate page names for the “day pages.” | The default value is =%Y-%m-%d=. |- | **prefix** -| Prepended to the date (formatted per //date_format//) to generate the "day page" names. +| Prepended to the date (formatted per //date_format//) to generate the “day page” names. | The default value is =~[pagename]/=. |- | colspan="3" class="align-center" | **Appearance** Modified: trunk/pgsrc/Help%2FCategories =================================================================== --- trunk/pgsrc/Help%2FCategories 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FCategories 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FCategories; @@ -10,15 +10,15 @@ They provide an easy way to browse the wiki. In Phpwiki, categories are not stored in a separate namespace like in Mediawiki for -instance. A category is a page with a name that begins with "Category" and contains -a call the the [[Help:BackLinksPlugin|BackLinks plugin]]. +instance. A category is a page with a name that begins with “Category” and contains +a call to the [[Help:BackLinksPlugin|BackLinks plugin]]. == Creating a new category == The simplest way to create a new category is to to go the [[:CategoryCategory|CategoryCategory]] page. -Enter its name (starting with "Category") and hit "CreatePage" button. +Enter its name (starting with “Category”) and hit “CreatePage” button. This will automatically insert the necessary plugins calls. @@ -32,8 +32,8 @@ }}} By default, the new category is created as a subcategory of -[[:CategoryCategory|CategoryCategory]] (the "root" category). -You might want to change this (see below "Category hierarchies"). +[[:CategoryCategory|CategoryCategory]] (the “root” category). +You might want to change this (see below “Category hierarchies”). == Putting a page in a category == @@ -52,7 +52,7 @@ == Category hierarchies == -The simplest way to use categories is to use "flat" categories. But you +The simplest way to use categories is to use “flat” categories. But you can also build a hierarchy of categories by putting categories themselves in categories. Modified: trunk/pgsrc/Help%2FDynamicIncludePagePlugin =================================================================== --- trunk/pgsrc/Help%2FDynamicIncludePagePlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FDynamicIncludePagePlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FDynamicIncludePagePlugin; @@ -6,7 +6,7 @@ charset=UTF-8 Content-Transfer-Encoding: binary -The **~DynamicIncludePage** [[Help:WikiPlugin|plugin]] will asynchronously "include" other pages in this wiki. +The **~DynamicIncludePage** [[Help:WikiPlugin|plugin]] will asynchronously “include” other pages in this wiki. == Usage == {{{ Modified: trunk/pgsrc/Help%2FExternalSearchPlugin =================================================================== --- trunk/pgsrc/Help%2FExternalSearchPlugin 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/Help%2FExternalSearchPlugin 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FExternalSearchPlugin; @@ -34,7 +34,7 @@ |- | **name** | Text to display in the submit button. -| For ~InterWiki sites the default is the wiki name, for other urls the default is the text "External Search". +| For ~InterWiki sites the default is the wiki name, for other urls the default is the text “External Search”. |- | **formsize** | Specify the input area size. Modified: trunk/pgsrc/UpLoad =================================================================== --- trunk/pgsrc/UpLoad 2014-10-14 08:56:00 UTC (rev 9256) +++ trunk/pgsrc/UpLoad 2014-10-14 10:28:21 UTC (rev 9257) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Tue, 14 Oct 2014 12:26:06 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=UpLoad; @@ -6,7 +6,7 @@ charset=UTF-8 Content-Transfer-Encoding: binary -**Upload a file which will be accessible by prefixing the filename with "Upload~:".** +**Upload a file which will be accessible by prefixing the filename with “Upload~:”.** ---- <<UpLoad>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 08:56:03
|
Revision: 9256 http://sourceforge.net/p/phpwiki/code/9256 Author: vargenau Date: 2014-10-14 08:56:00 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Fix syntax Modified Paths: -------------- trunk/lib/plugin/UpLoad.php Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2014-10-14 08:44:25 UTC (rev 9255) +++ trunk/lib/plugin/UpLoad.php 2014-10-14 08:56:00 UTC (rev 9256) @@ -68,7 +68,7 @@ { $this->allowed_extensions = explode(",", "7z,avi,bmp,bz2,c,cfg,diff,doc,docx,flv,gif,h,ics,ini,". - "jpeg,jpg,kmz,mp3,odg,odp,ods,odt,ogg,patch,pdf,png,ppt," + "jpeg,jpg,kmz,mp3,odg,odp,ods,odt,ogg,patch,pdf,png,ppt,". "pptx,rar,svg,tar,tar.gz,txt,xls,xlsx,xml,xsd,zip"); $this->disallowed_extensions = explode(",", "ad[ep],asd,ba[st],chm,cmd,com,cgi,cpl,crt,dll,eml,exe,". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 08:44:27
|
Revision: 9255 http://sourceforge.net/p/phpwiki/code/9255 Author: vargenau Date: 2014-10-14 08:44:25 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Indent Modified Paths: -------------- trunk/lib/PagePerm.php Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2014-10-14 08:42:22 UTC (rev 9254) +++ trunk/lib/PagePerm.php 2014-10-14 08:44:25 UTC (rev 9255) @@ -117,7 +117,8 @@ if ($type == 'page') return HTML::samp(HTML::strong($perm->asRwxString($owner, $group))); elseif ($type == 'default') - return HTML::samp($perm->asRwxString($owner, $group)); elseif ($type == 'inherited') { + return HTML::samp($perm->asRwxString($owner, $group)); + elseif ($type == 'inherited') { return HTML::samp(array('class' => 'inherited', 'style' => 'color:#aaa;'), $perm->asRwxString($owner, $group)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-14 08:42:26
|
Revision: 9254 http://sourceforge.net/p/phpwiki/code/9254 Author: vargenau Date: 2014-10-14 08:42:22 +0000 (Tue, 14 Oct 2014) Log Message: ----------- Better use comma as separator (more readable) Modified Paths: -------------- trunk/lib/plugin/UpLoad.php Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2014-10-13 16:45:39 UTC (rev 9253) +++ trunk/lib/plugin/UpLoad.php 2014-10-14 08:42:22 UTC (rev 9254) @@ -66,82 +66,15 @@ */ function run($dbi, $argstr, &$request, $basepage) { - $this->allowed_extensions = explode("\n", - "7z -avi -bmp -bz2 -c -cfg -diff -doc -docx -flv -gif -h -ics -ini -jpeg -jpg -kmz -mp3 -odg -odp -ods -odt -ogg -patch -pdf -png -ppt -pptx -rar -svg -tar -tar.gz -txt -xls -xlsx -xml -xsd -zip"); - $this->disallowed_extensions = explode("\n", - "ad[ep] -asd -ba[st] -chm -cmd -com -cgi -cpl -crt -dll -eml -exe -hlp -hta -in[fs] -isp -jse? -lnk -md[betw] -ms[cipt] -nws -ocx -ops -pcd -p[ir]f -php\d? -phtml -pl -py -reg -sc[frt] -sh[bsm]? -url -vb[esx]? -vxd -ws[cfh]"); + $this->allowed_extensions = explode(",", + "7z,avi,bmp,bz2,c,cfg,diff,doc,docx,flv,gif,h,ics,ini,". + "jpeg,jpg,kmz,mp3,odg,odp,ods,odt,ogg,patch,pdf,png,ppt," + "pptx,rar,svg,tar,tar.gz,txt,xls,xlsx,xml,xsd,zip"); + $this->disallowed_extensions = explode(",", + "ad[ep],asd,ba[st],chm,cmd,com,cgi,cpl,crt,dll,eml,exe,". + "hlp,hta,in[fs],isp,jse?,lnk,md[betw],ms[cipt],nws,ocx,". + "ops,pcd,p[ir]f,php\d?,phtml,pl,py,reg,sc[frt],sh[bsm]?,". + "url,vb[esx]?,vxd,ws[cfh]"); //removed "\{[[:xdigit:]]{8}(?:-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}\}" $args = $this->getArgs($argstr, $request); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-13 16:45:50
|
Revision: 9253 http://sourceforge.net/p/phpwiki/code/9253 Author: vargenau Date: 2014-10-13 16:45:39 +0000 (Mon, 13 Oct 2014) Log Message: ----------- Remove PageType_pdf Modified Paths: -------------- trunk/lib/PageType.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-10-13 13:30:30 UTC (rev 9252) +++ trunk/lib/PageType.php 2014-10-13 16:45:39 UTC (rev 9253) @@ -124,10 +124,6 @@ { } -class PageType_pdf extends PageType -{ -} - class PageType_wikiblog extends PageType { } @@ -211,7 +207,7 @@ global $request; include_once 'lib/config.php'; $url = getUploadFilePath(); - // calculate to a relative local path to /uploads for pdf images. + // calculate to a relative local path to /uploads for PDF images. $doc_root = $request->get("DOCUMENT_ROOT"); $ldir = NormalizeLocalFileName($url); $wikiroot = NormalizeLocalFileName(''); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-13 13:30:32
|
Revision: 9252 http://sourceforge.net/p/phpwiki/code/9252 Author: vargenau Date: 2014-10-13 13:30:30 +0000 (Mon, 13 Oct 2014) Log Message: ----------- Use __construct, private, protected, abstract Modified Paths: -------------- trunk/lib/PageType.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-10-13 13:14:33 UTC (rev 9251) +++ trunk/lib/PageType.php 2014-10-13 13:30:30 UTC (rev 9252) @@ -66,7 +66,7 @@ * as of the cached marked-up page, it is important that the PageType classes * not have large amounts of class data. (No class data is even better.) */ -class PageType +abstract class PageType { /** * Get a page type descriptor. @@ -155,7 +155,7 @@ class PageType_interwikimap extends PageType { - function PageType_interwikimap($pagetext = false) + function __construct($pagetext = false) { if (!$pagetext) { $dbi = $GLOBALS['request']->getDbh(); @@ -260,7 +260,7 @@ return $link; } - function _parseMap($text) + private function _parseMap($text) { if (!preg_match_all("/^\s*(\S+)\s+(.+)$/m", $text, $matches, PREG_SET_ORDER) @@ -320,7 +320,7 @@ return $map; } - function _getMapFromWikiText($pagetext) + private function _getMapFromWikiText($pagetext) { if (preg_match('|^<verbatim>\n(.*)^</verbatim>|ms', $pagetext, $m)) { return $m[1]; @@ -328,7 +328,7 @@ return false; } - function _getMapFromFile($filename) + private function _getMapFromFile($filename) { if (defined('WARN_NONPUBLIC_INTERWIKIMAP') and WARN_NONPUBLIC_INTERWIKIMAP) { $error_html = sprintf(_("Loading InterWikiMap from external file %s."), @@ -346,7 +346,7 @@ return $data; } - function _getRegexp() + private function _getRegexp() { if (!$this->_map) return '(?:(?!a)a)'; // Never matches. @@ -405,23 +405,23 @@ $this->_transform($this->_getFooter($text))); } - function _getHeader($text) + protected function _getHeader($text) { return preg_replace('/<verbatim>.*/s', '', $text); } - function _getFooter($text) + protected function _getFooter($text) { return preg_replace('@.*?(</verbatim>|\Z)@s', '', $text, 1); } - function _getMap($pagetext) + protected function _getMap($pagetext) { $map = getInterwikiMap($pagetext, 'force'); return $map->_map; } - function _formatMap($pagetext) + protected function _formatMap($pagetext) { $map = $this->_getMap($pagetext); if (!$map) @@ -446,7 +446,7 @@ class FakePageRevision { - function FakePageRevision($meta) + function __construct($meta) { $this->_meta = $meta; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-13 13:14:42
|
Revision: 9251 http://sourceforge.net/p/phpwiki/code/9251 Author: vargenau Date: 2014-10-13 13:14:33 +0000 (Mon, 13 Oct 2014) Log Message: ----------- Use lower case Modified Paths: -------------- trunk/lib/WysiwygEdit.php Modified: trunk/lib/WysiwygEdit.php =================================================================== --- trunk/lib/WysiwygEdit.php 2014-10-13 12:59:27 UTC (rev 9250) +++ trunk/lib/WysiwygEdit.php 2014-10-13 13:14:33 UTC (rev 9251) @@ -51,7 +51,7 @@ /** * FIXME: Handler to convert the HTML formatting back to wiki formatting. * Derived from InlineParser, but returning wiki text instead of HtmlElement objects. - * '<b>text<b>' => '<SPAN style="FONT-WEIGHT: bold">text</SPAN>' => '*text*' + * '<b>text<b>' => '<span style="font-weight: bold">text</span>' => '*text*' * * TODO: Switch over to HtmlParser */ @@ -109,10 +109,10 @@ } } -//'<SPAN style="FONT-WEIGHT: bold">text</SPAN>' => '*text*' +//'<span style="font-weight: bold">text</span>' => '*text*' class Markup_html_spanbold extends BalancedMarkup { - public $_start_regexp = "<(?:span|SPAN) style=\"FONT-WEIGHT: bold\">"; + public $_start_regexp = "<(?:span|SPAN) style=\"font-weight: bold\">"; function getEndRegexp($match) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-13 12:59:35
|
Revision: 9250 http://sourceforge.net/p/phpwiki/code/9250 Author: vargenau Date: 2014-10-13 12:59:27 +0000 (Mon, 13 Oct 2014) Log Message: ----------- Remove commented code Modified Paths: -------------- trunk/lib/plugin/InterWikiSearch.php Modified: trunk/lib/plugin/InterWikiSearch.php =================================================================== --- trunk/lib/plugin/InterWikiSearch.php 2014-10-13 08:15:28 UTC (rev 9249) +++ trunk/lib/plugin/InterWikiSearch.php 2014-10-13 12:59:27 UTC (rev 9250) @@ -57,11 +57,6 @@ $page = $dbi->getPage($request->getArg('pagename')); return new TransformedText($page, __('InterWikiMap'), array(), 'searchableInterWikiMap'); - /* - return new PageType($pagerevisionhandle, - $pagename = __('InterWikiMap'), - $overridePageType = 'PageType_searchableInterWikiMap'); - */ } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-13 08:15:38
|
Revision: 9249 http://sourceforge.net/p/phpwiki/code/9249 Author: vargenau Date: 2014-10-13 08:15:28 +0000 (Mon, 13 Oct 2014) Log Message: ----------- http://crdo.up.univ-aix.fr/phpwiki/ Modified Paths: -------------- trunk/pgsrc/Help%2FWikisUsingPhpWiki Modified: trunk/pgsrc/Help%2FWikisUsingPhpWiki =================================================================== --- trunk/pgsrc/Help%2FWikisUsingPhpWiki 2014-10-10 17:02:26 UTC (rev 9248) +++ trunk/pgsrc/Help%2FWikisUsingPhpWiki 2014-10-13 08:15:28 UTC (rev 9249) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 13 Oct 2014 10:14:41 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FWikisUsingPhpWiki @@ -11,6 +11,7 @@ |= URL |= ~PhpWiki release | http://bayernprovider.info/ | 1.4.0RC1 | http://bh.hallikainen.org/ | 1.4.0 +| http://crdo.up.univ-aix.fr/phpwiki/ | 1.3.14 | http://danm.ucsc.edu/web/ | 1.3.14 | http://dev.cmeerw.org/HomePage | 1.5.0 | http://esk.uz | 1.3.14 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 17:02:28
|
Revision: 9248 http://sourceforge.net/p/phpwiki/code/9248 Author: vargenau Date: 2014-10-10 17:02:26 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Remove FPDF Modified Paths: -------------- trunk/config/config-dist.ini trunk/doc/CREDITS trunk/locale/update-makefile.sh Removed Paths: ------------- trunk/doc/README.fpdf trunk/lib/fpdf.php Modified: trunk/config/config-dist.ini =================================================================== --- trunk/config/config-dist.ini 2014-10-10 16:45:38 UTC (rev 9247) +++ trunk/config/config-dist.ini 2014-10-10 17:02:26 UTC (rev 9248) @@ -1220,7 +1220,7 @@ ; http://www.google.com/apis/maps/signup.html ;GOOGLE_LICENSE_KEY = "..." -; On action=pdf or format=pdf: If enabled don't use the internal fpdf library. +; On action=pdf or format=pdf ; External PDF executable, %s is the xhtml filename ;USE_EXTERNAL_HTML2PDF = "htmldoc --quiet --format pdf14 --no-toc --no-title %s" Modified: trunk/doc/CREDITS =================================================================== --- trunk/doc/CREDITS 2014-10-10 16:45:38 UTC (rev 9247) +++ trunk/doc/CREDITS 2014-10-10 17:02:26 UTC (rev 9248) @@ -204,7 +204,6 @@ ! External credits: <pre> -Olivier PLATHEY for fpdf, Don Sebà for fpdf Mircho Mirev for acdropdown (livesearch) Peter Jipsen, Kee-Lin Steven Chan for AsciiMath Simon Willison for HttpClient (RssFeed) Deleted: trunk/doc/README.fpdf =================================================================== --- trunk/doc/README.fpdf 2014-10-10 16:45:38 UTC (rev 9247) +++ trunk/doc/README.fpdf 2014-10-10 17:02:26 UTC (rev 9248) @@ -1,4 +0,0 @@ -The official site for fdpf is http://www.fpdf.org/ - -fpdf.php and the fonts were taken from the phpMyAdmin distribution, -which took some files from the fpdf 1.51 distribution. Deleted: trunk/lib/fpdf.php =================================================================== --- trunk/lib/fpdf.php 2014-10-10 16:45:38 UTC (rev 9247) +++ trunk/lib/fpdf.php 2014-10-10 17:02:26 UTC (rev 9248) @@ -1,1804 +0,0 @@ -<?php -/******************************************************************************* -* FPDF * -* * -* Version: 1.7 * -* Date: 2011-06-18 * -* Author: Olivier PLATHEY * -*******************************************************************************/ - -define('FPDF_VERSION','1.7'); - -class FPDF -{ -var $page; // current page number -var $n; // current object number -var $offsets; // array of object offsets -var $buffer; // buffer holding in-memory PDF -var $pages; // array containing pages -var $state; // current document state -var $compress; // compression flag -var $k; // scale factor (number of points in user unit) -var $DefOrientation; // default orientation -var $CurOrientation; // current orientation -var $StdPageSizes; // standard page sizes -var $DefPageSize; // default page size -var $CurPageSize; // current page size -var $PageSizes; // used for pages with non default sizes or orientations -var $wPt, $hPt; // dimensions of current page in points -var $w, $h; // dimensions of current page in user unit -var $lMargin; // left margin -var $tMargin; // top margin -var $rMargin; // right margin -var $bMargin; // page break margin -var $cMargin; // cell margin -var $x, $y; // current position in user unit -var $lasth; // height of last printed cell -var $LineWidth; // line width in user unit -var $fontpath; // path containing fonts -var $CoreFonts; // array of core font names -var $fonts; // array of used fonts -var $FontFiles; // array of font files -var $diffs; // array of encoding differences -var $FontFamily; // current font family -var $FontStyle; // current font style -var $underline; // underlining flag -var $CurrentFont; // current font info -var $FontSizePt; // current font size in points -var $FontSize; // current font size in user unit -var $DrawColor; // commands for drawing color -var $FillColor; // commands for filling color -var $TextColor; // commands for text color -var $ColorFlag; // indicates whether fill and text colors are different -var $ws; // word spacing -var $images; // array of used images -var $PageLinks; // array of links in pages -var $links; // array of internal links -var $AutoPageBreak; // automatic page breaking -var $PageBreakTrigger; // threshold used to trigger page breaks -var $InHeader; // flag set when processing header -var $InFooter; // flag set when processing footer -var $ZoomMode; // zoom display mode -var $LayoutMode; // layout display mode -var $title; // title -var $subject; // subject -var $author; // author -var $keywords; // keywords -var $creator; // creator -var $AliasNbPages; // alias for total number of pages -var $PDFVersion; // PDF version number - -/******************************************************************************* -* * -* Public methods * -* * -*******************************************************************************/ -function FPDF($orientation='P', $unit='mm', $size='A4') -{ - // Some checks - $this->_dochecks(); - // Initialization of properties - $this->page = 0; - $this->n = 2; - $this->buffer = ''; - $this->pages = array(); - $this->PageSizes = array(); - $this->state = 0; - $this->fonts = array(); - $this->FontFiles = array(); - $this->diffs = array(); - $this->images = array(); - $this->links = array(); - $this->InHeader = false; - $this->InFooter = false; - $this->lasth = 0; - $this->FontFamily = ''; - $this->FontStyle = ''; - $this->FontSizePt = 12; - $this->underline = false; - $this->DrawColor = '0 G'; - $this->FillColor = '0 g'; - $this->TextColor = '0 g'; - $this->ColorFlag = false; - $this->ws = 0; - // Font path - if(defined('FPDF_FONTPATH')) - { - $this->fontpath = FPDF_FONTPATH; - if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\') - $this->fontpath .= '/'; - } - elseif(is_dir(dirname(__FILE__).'/font')) - $this->fontpath = dirname(__FILE__).'/font/'; - else - $this->fontpath = ''; - // Core fonts - $this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats'); - // Scale factor - if($unit=='pt') - $this->k = 1; - elseif($unit=='mm') - $this->k = 72/25.4; - elseif($unit=='cm') - $this->k = 72/2.54; - elseif($unit=='in') - $this->k = 72; - else - $this->Error('Incorrect unit: '.$unit); - // Page sizes - $this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), - 'letter'=>array(612,792), 'legal'=>array(612,1008)); - $size = $this->_getpagesize($size); - $this->DefPageSize = $size; - $this->CurPageSize = $size; - // Page orientation - $orientation = strtolower($orientation); - if($orientation=='p' || $orientation=='portrait') - { - $this->DefOrientation = 'P'; - $this->w = $size[0]; - $this->h = $size[1]; - } - elseif($orientation=='l' || $orientation=='landscape') - { - $this->DefOrientation = 'L'; - $this->w = $size[1]; - $this->h = $size[0]; - } - else - $this->Error('Incorrect orientation: '.$orientation); - $this->CurOrientation = $this->DefOrientation; - $this->wPt = $this->w*$this->k; - $this->hPt = $this->h*$this->k; - // Page margins (1 cm) - $margin = 28.35/$this->k; - $this->SetMargins($margin,$margin); - // Interior cell margin (1 mm) - $this->cMargin = $margin/10; - // Line width (0.2 mm) - $this->LineWidth = .567/$this->k; - // Automatic page break - $this->SetAutoPageBreak(true,2*$margin); - // Default display mode - $this->SetDisplayMode('default'); - // Enable compression - $this->SetCompression(true); - // Set default PDF version number - $this->PDFVersion = '1.3'; -} - -function SetMargins($left, $top, $right=null) -{ - // Set left, top and right margins - $this->lMargin = $left; - $this->tMargin = $top; - if($right===null) - $right = $left; - $this->rMargin = $right; -} - -function SetLeftMargin($margin) -{ - // Set left margin - $this->lMargin = $margin; - if($this->page>0 && $this->x<$margin) - $this->x = $margin; -} - -function SetTopMargin($margin) -{ - // Set top margin - $this->tMargin = $margin; -} - -function SetRightMargin($margin) -{ - // Set right margin - $this->rMargin = $margin; -} - -function SetAutoPageBreak($auto, $margin=0) -{ - // Set auto page break mode and triggering margin - $this->AutoPageBreak = $auto; - $this->bMargin = $margin; - $this->PageBreakTrigger = $this->h-$margin; -} - -function SetDisplayMode($zoom, $layout='default') -{ - // Set display mode in viewer - if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) - $this->ZoomMode = $zoom; - else - $this->Error('Incorrect zoom display mode: '.$zoom); - if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') - $this->LayoutMode = $layout; - else - $this->Error('Incorrect layout display mode: '.$layout); -} - -function SetCompression($compress) -{ - // Set page compression - if(function_exists('gzcompress')) - $this->compress = $compress; - else - $this->compress = false; -} - -function SetTitle($title, $isUTF8=false) -{ - // Title of document - if($isUTF8) - $title = $this->_UTF8toUTF16($title); - $this->title = $title; -} - -function SetSubject($subject, $isUTF8=false) -{ - // Subject of document - if($isUTF8) - $subject = $this->_UTF8toUTF16($subject); - $this->subject = $subject; -} - -function SetAuthor($author, $isUTF8=false) -{ - // Author of document - if($isUTF8) - $author = $this->_UTF8toUTF16($author); - $this->author = $author; -} - -function SetKeywords($keywords, $isUTF8=false) -{ - // Keywords of document - if($isUTF8) - $keywords = $this->_UTF8toUTF16($keywords); - $this->keywords = $keywords; -} - -function SetCreator($creator, $isUTF8=false) -{ - // Creator of document - if($isUTF8) - $creator = $this->_UTF8toUTF16($creator); - $this->creator = $creator; -} - -function AliasNbPages($alias='{nb}') -{ - // Define an alias for total number of pages - $this->AliasNbPages = $alias; -} - -function Error($msg) -{ - // Fatal error - die('<b>FPDF error:</b> '.$msg); -} - -function Open() -{ - // Begin document - $this->state = 1; -} - -function Close() -{ - // Terminate document - if($this->state==3) - return; - if($this->page==0) - $this->AddPage(); - // Page footer - $this->InFooter = true; - $this->Footer(); - $this->InFooter = false; - // Close page - $this->_endpage(); - // Close document - $this->_enddoc(); -} - -function AddPage($orientation='', $size='') -{ - // Start a new page - if($this->state==0) - $this->Open(); - $family = $this->FontFamily; - $style = $this->FontStyle.($this->underline ? 'U' : ''); - $fontsize = $this->FontSizePt; - $lw = $this->LineWidth; - $dc = $this->DrawColor; - $fc = $this->FillColor; - $tc = $this->TextColor; - $cf = $this->ColorFlag; - if($this->page>0) - { - // Page footer - $this->InFooter = true; - $this->Footer(); - $this->InFooter = false; - // Close page - $this->_endpage(); - } - // Start new page - $this->_beginpage($orientation,$size); - // Set line cap style to square - $this->_out('2 J'); - // Set line width - $this->LineWidth = $lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - // Set font - if($family) - $this->SetFont($family,$style,$fontsize); - // Set colors - $this->DrawColor = $dc; - if($dc!='0 G') - $this->_out($dc); - $this->FillColor = $fc; - if($fc!='0 g') - $this->_out($fc); - $this->TextColor = $tc; - $this->ColorFlag = $cf; - // Page header - $this->InHeader = true; - $this->Header(); - $this->InHeader = false; - // Restore line width - if($this->LineWidth!=$lw) - { - $this->LineWidth = $lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - } - // Restore font - if($family) - $this->SetFont($family,$style,$fontsize); - // Restore colors - if($this->DrawColor!=$dc) - { - $this->DrawColor = $dc; - $this->_out($dc); - } - if($this->FillColor!=$fc) - { - $this->FillColor = $fc; - $this->_out($fc); - } - $this->TextColor = $tc; - $this->ColorFlag = $cf; -} - -function Header() -{ - // To be implemented in your own inherited class -} - -function Footer() -{ - // To be implemented in your own inherited class -} - -function PageNo() -{ - // Get current page number - return $this->page; -} - -function SetDrawColor($r, $g=null, $b=null) -{ - // Set color for all stroking operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->DrawColor = sprintf('%.3F G',$r/255); - else - $this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); - if($this->page>0) - $this->_out($this->DrawColor); -} - -function SetFillColor($r, $g=null, $b=null) -{ - // Set color for all filling operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->FillColor = sprintf('%.3F g',$r/255); - else - $this->FillColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag = ($this->FillColor!=$this->TextColor); - if($this->page>0) - $this->_out($this->FillColor); -} - -function SetTextColor($r, $g=null, $b=null) -{ - // Set color for text - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->TextColor = sprintf('%.3F g',$r/255); - else - $this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag = ($this->FillColor!=$this->TextColor); -} - -function GetStringWidth($s) -{ - // Get width of a string in the current font - $s = (string)$s; - $cw = &$this->CurrentFont['cw']; - $w = 0; - $l = strlen($s); - for($i=0;$i<$l;$i++) - $w += $cw[$s[$i]]; - return $w*$this->FontSize/1000; -} - -function SetLineWidth($width) -{ - // Set line width - $this->LineWidth = $width; - if($this->page>0) - $this->_out(sprintf('%.2F w',$width*$this->k)); -} - -function Line($x1, $y1, $x2, $y2) -{ - // Draw a line - $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); -} - -function Rect($x, $y, $w, $h, $style='') -{ - // Draw a rectangle - if($style=='F') - $op = 'f'; - elseif($style=='FD' || $style=='DF') - $op = 'B'; - else - $op = 'S'; - $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); -} - -function AddFont($family, $style='', $file='') -{ - // Add a TrueType, OpenType or Type1 font - $family = strtolower($family); - if($file=='') - $file = str_replace(' ','',$family).strtolower($style).'.php'; - $style = strtoupper($style); - if($style=='IB') - $style = 'BI'; - $fontkey = $family.$style; - if(isset($this->fonts[$fontkey])) - return; - $info = $this->_loadfont($file); - $info['i'] = count($this->fonts)+1; - if(!empty($info['diff'])) - { - // Search existing encodings - $n = array_search($info['diff'],$this->diffs); - if(!$n) - { - $n = count($this->diffs)+1; - $this->diffs[$n] = $info['diff']; - } - $info['diffn'] = $n; - } - if(!empty($info['file'])) - { - // Embedded font - if($info['type']=='TrueType') - $this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']); - else - $this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']); - } - $this->fonts[$fontkey] = $info; -} - -function SetFont($family, $style='', $size=0) -{ - // Select a font; size given in points - if($family=='') - $family = $this->FontFamily; - else - $family = strtolower($family); - $style = strtoupper($style); - if(strpos($style,'U')!==false) - { - $this->underline = true; - $style = str_replace('U','',$style); - } - else - $this->underline = false; - if($style=='IB') - $style = 'BI'; - if($size==0) - $size = $this->FontSizePt; - // Test if font is already selected - if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) - return; - // Test if font is already loaded - $fontkey = $family.$style; - if(!isset($this->fonts[$fontkey])) - { - // Test if one of the core fonts - if($family=='arial') - $family = 'helvetica'; - if(in_array($family,$this->CoreFonts)) - { - if($family=='symbol' || $family=='zapfdingbats') - $style = ''; - $fontkey = $family.$style; - if(!isset($this->fonts[$fontkey])) - $this->AddFont($family,$style); - } - else - $this->Error('Undefined font: '.$family.' '.$style); - } - // Select it - $this->FontFamily = $family; - $this->FontStyle = $style; - $this->FontSizePt = $size; - $this->FontSize = $size/$this->k; - $this->CurrentFont = &$this->fonts[$fontkey]; - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function SetFontSize($size) -{ - // Set font size in points - if($this->FontSizePt==$size) - return; - $this->FontSizePt = $size; - $this->FontSize = $size/$this->k; - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function AddLink() -{ - // Create a new internal link - $n = count($this->links)+1; - $this->links[$n] = array(0, 0); - return $n; -} - -function SetLink($link, $y=0, $page=-1) -{ - // Set destination of internal link - if($y==-1) - $y = $this->y; - if($page==-1) - $page = $this->page; - $this->links[$link] = array($page, $y); -} - -function Link($x, $y, $w, $h, $link) -{ - // Put a link on the page - $this->PageLinks[$this->page][] = array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); -} - -function Text($x, $y, $txt) -{ - // Output a string - $s = sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); - if($this->underline && $txt!='') - $s .= ' '.$this->_dounderline($x,$y,$txt); - if($this->ColorFlag) - $s = 'q '.$this->TextColor.' '.$s.' Q'; - $this->_out($s); -} - -function AcceptPageBreak() -{ - // Accept automatic page break or not - return $this->AutoPageBreak; -} - -function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') -{ - // Output a cell - $k = $this->k; - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - // Automatic page break - $x = $this->x; - $ws = $this->ws; - if($ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - $this->AddPage($this->CurOrientation,$this->CurPageSize); - $this->x = $x; - if($ws>0) - { - $this->ws = $ws; - $this->_out(sprintf('%.3F Tw',$ws*$k)); - } - } - if($w==0) - $w = $this->w-$this->rMargin-$this->x; - $s = ''; - if($fill || $border==1) - { - if($fill) - $op = ($border==1) ? 'B' : 'f'; - else - $op = 'S'; - $s = sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); - } - if(is_string($border)) - { - $x = $this->x; - $y = $this->y; - if(strpos($border,'L')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); - if(strpos($border,'T')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); - if(strpos($border,'R')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - if(strpos($border,'B')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - } - if($txt!=='') - { - if($align=='R') - $dx = $w-$this->cMargin-$this->GetStringWidth($txt); - elseif($align=='C') - $dx = ($w-$this->GetStringWidth($txt))/2; - else - $dx = $this->cMargin; - if($this->ColorFlag) - $s .= 'q '.$this->TextColor.' '; - $txt2 = str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); - $s .= sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); - if($this->underline) - $s .= ' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); - if($this->ColorFlag) - $s .= ' Q'; - if($link) - $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); - } - if($s) - $this->_out($s); - $this->lasth = $h; - if($ln>0) - { - // Go to next line - $this->y += $h; - if($ln==1) - $this->x = $this->lMargin; - } - else - $this->x += $w; -} - -function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) -{ - // Output text with automatic or explicit line breaks - $cw = &$this->CurrentFont['cw']; - if($w==0) - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; - $s = str_replace("\r",'',$txt); - $nb = strlen($s); - if($nb>0 && $s[$nb-1]=="\n") - $nb--; - $b = 0; - if($border) - { - if($border==1) - { - $border = 'LTRB'; - $b = 'LRT'; - $b2 = 'LR'; - } - else - { - $b2 = ''; - if(strpos($border,'L')!==false) - $b2 .= 'L'; - if(strpos($border,'R')!==false) - $b2 .= 'R'; - $b = (strpos($border,'T')!==false) ? $b2.'T' : $b2; - } - } - $sep = -1; - $i = 0; - $j = 0; - $l = 0; - $ns = 0; - $nl = 1; - while($i<$nb) - { - // Get next character - $c = $s[$i]; - if($c=="\n") - { - // Explicit line break - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - $i++; - $sep = -1; - $j = $i; - $l = 0; - $ns = 0; - $nl++; - if($border && $nl==2) - $b = $b2; - continue; - } - if($c==' ') - { - $sep = $i; - $ls = $l; - $ns++; - } - $l += $cw[$c]; - if($l>$wmax) - { - // Automatic line break - if($sep==-1) - { - if($i==$j) - $i++; - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - } - else - { - if($align=='J') - { - $this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; - $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); - } - $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); - $i = $sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - $ns = 0; - $nl++; - if($border && $nl==2) - $b = $b2; - } - else - $i++; - } - // Last chunk - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - if($border && strpos($border,'B')!==false) - $b .= 'B'; - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - $this->x = $this->lMargin; -} - -function Write($h, $txt, $link='') -{ - // Output text in flowing mode - $cw = &$this->CurrentFont['cw']; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; - $s = str_replace("\r",'',$txt); - $nb = strlen($s); - $sep = -1; - $i = 0; - $j = 0; - $l = 0; - $nl = 1; - while($i<$nb) - { - // Get next character - $c = $s[$i]; - if($c=="\n") - { - // Explicit line break - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - $i++; - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) - { - $this->x = $this->lMargin; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; - } - $nl++; - continue; - } - if($c==' ') - $sep = $i; - $l += $cw[$c]; - if($l>$wmax) - { - // Automatic line break - if($sep==-1) - { - if($this->x>$this->lMargin) - { - // Move to next line - $this->x = $this->lMargin; - $this->y += $h; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; - $i++; - $nl++; - continue; - } - if($i==$j) - $i++; - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - } - else - { - $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); - $i = $sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) - { - $this->x = $this->lMargin; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin)*1000/$this->FontSize; - } - $nl++; - } - else - $i++; - } - // Last chunk - if($i!=$j) - $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); -} - -function Ln($h=null) -{ - // Line feed; default value is last cell height - $this->x = $this->lMargin; - if($h===null) - $this->y += $this->lasth; - else - $this->y += $h; -} - -function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') -{ - // Put an image on the page - if(!isset($this->images[$file])) - { - // First use of this image, get info - if($type=='') - { - $pos = strrpos($file,'.'); - if(!$pos) - $this->Error('Image file has no extension and no type was specified: '.$file); - $type = substr($file,$pos+1); - } - $type = strtolower($type); - if($type=='jpeg') - $type = 'jpg'; - $mtd = '_parse'.$type; - if(!method_exists($this,$mtd)) - $this->Error('Unsupported image type: '.$type); - $info = $this->$mtd($file); - $info['i'] = count($this->images)+1; - $this->images[$file] = $info; - } - else - $info = $this->images[$file]; - - // Automatic width and height calculation if needed - if($w==0 && $h==0) - { - // Put image at 96 dpi - $w = -96; - $h = -96; - } - if($w<0) - $w = -$info['w']*72/$w/$this->k; - if($h<0) - $h = -$info['h']*72/$h/$this->k; - if($w==0) - $w = $h*$info['w']/$info['h']; - if($h==0) - $h = $w*$info['h']/$info['w']; - - // Flowing mode - if($y===null) - { - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - // Automatic page break - $x2 = $this->x; - $this->AddPage($this->CurOrientation,$this->CurPageSize); - $this->x = $x2; - } - $y = $this->y; - $this->y += $h; - } - - if($x===null) - $x = $this->x; - $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); - if($link) - $this->Link($x,$y,$w,$h,$link); -} - -function GetX() -{ - // Get x position - return $this->x; -} - -function SetX($x) -{ - // Set x position - if($x>=0) - $this->x = $x; - else - $this->x = $this->w+$x; -} - -function GetY() -{ - // Get y position - return $this->y; -} - -function SetY($y) -{ - // Set y position and reset x - $this->x = $this->lMargin; - if($y>=0) - $this->y = $y; - else - $this->y = $this->h+$y; -} - -function SetXY($x, $y) -{ - // Set x and y positions - $this->SetY($y); - $this->SetX($x); -} - -function Output($name='', $dest='') -{ - // Output PDF to some destination - if($this->state<3) - $this->Close(); - $dest = strtoupper($dest); - if($dest=='') - { - if($name=='') - { - $name = 'doc.pdf'; - $dest = 'I'; - } - else - $dest = 'F'; - } - switch($dest) - { - case 'I': - // Send to standard output - $this->_checkoutput(); - if(PHP_SAPI!='cli') - { - // We send to a browser - header('Content-Type: application/pdf'); - header('Content-Disposition: inline; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - } - echo $this->buffer; - break; - case 'D': - // Download file - $this->_checkoutput(); - header('Content-Type: application/x-download'); - header('Content-Disposition: attachment; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - echo $this->buffer; - break; - case 'F': - // Save to local file - $f = fopen($name,'wb'); - if(!$f) - $this->Error('Unable to create output file: '.$name); - fwrite($f,$this->buffer,strlen($this->buffer)); - fclose($f); - break; - case 'S': - // Return as a string - return $this->buffer; - default: - $this->Error('Incorrect output destination: '.$dest); - } - return ''; -} - -/******************************************************************************* -* * -* Protected methods * -* * -*******************************************************************************/ -function _dochecks() -{ - // Check availability of %F - if(sprintf('%.1F',1.0)!='1.0') - $this->Error('This version of PHP is not supported'); - // Check mbstring overloading - if(ini_get('mbstring.func_overload') & 2) - $this->Error('mbstring overloading must be disabled'); - // Ensure runtime magic quotes are disabled - if(get_magic_quotes_runtime()) - @set_magic_quotes_runtime(0); -} - -function _checkoutput() -{ - if(PHP_SAPI!='cli') - { - if(headers_sent($file,$line)) - $this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)"); - } - if(ob_get_length()) - { - // The output buffer is not empty - if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents())) - { - // It contains only a UTF-8 BOM and/or whitespace, let's clean it - ob_clean(); - } - else - $this->Error("Some data has already been output, can't send PDF file"); - } -} - -function _getpagesize($size) -{ - if(is_string($size)) - { - $size = strtolower($size); - if(!isset($this->StdPageSizes[$size])) - $this->Error('Unknown page size: '.$size); - $a = $this->StdPageSizes[$size]; - return array($a[0]/$this->k, $a[1]/$this->k); - } - else - { - if($size[0]>$size[1]) - return array($size[1], $size[0]); - else - return $size; - } -} - -function _beginpage($orientation, $size) -{ - $this->page++; - $this->pages[$this->page] = ''; - $this->state = 2; - $this->x = $this->lMargin; - $this->y = $this->tMargin; - $this->FontFamily = ''; - // Check page size and orientation - if($orientation=='') - $orientation = $this->DefOrientation; - else - $orientation = strtoupper($orientation[0]); - if($size=='') - $size = $this->DefPageSize; - else - $size = $this->_getpagesize($size); - if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1]) - { - // New size or orientation - if($orientation=='P') - { - $this->w = $size[0]; - $this->h = $size[1]; - } - else - { - $this->w = $size[1]; - $this->h = $size[0]; - } - $this->wPt = $this->w*$this->k; - $this->hPt = $this->h*$this->k; - $this->PageBreakTrigger = $this->h-$this->bMargin; - $this->CurOrientation = $orientation; - $this->CurPageSize = $size; - } - if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1]) - $this->PageSizes[$this->page] = array($this->wPt, $this->hPt); -} - -function _endpage() -{ - $this->state = 1; -} - -function _loadfont($font) -{ - // Load a font definition file from the font directory - include($this->fontpath.$font); - $a = get_defined_vars(); - if(!isset($a['name'])) - $this->Error('Could not include font definition file'); - return $a; -} - -function _escape($s) -{ - // Escape special characters in strings - $s = str_replace('\\','\\\\',$s); - $s = str_replace('(','\\(',$s); - $s = str_replace(')','\\)',$s); - $s = str_replace("\r",'\\r',$s); - return $s; -} - -function _textstring($s) -{ - // Format a text string - return '('.$this->_escape($s).')'; -} - -function _UTF8toUTF16($s) -{ - // Convert UTF-8 to UTF-16BE with BOM - $res = "\xFE\xFF"; - $nb = strlen($s); - $i = 0; - while($i<$nb) - { - $c1 = ord($s[$i++]); - if($c1>=224) - { - // 3-byte character - $c2 = ord($s[$i++]); - $c3 = ord($s[$i++]); - $res .= chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); - $res .= chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); - } - elseif($c1>=192) - { - // 2-byte character - $c2 = ord($s[$i++]); - $res .= chr(($c1 & 0x1C)>>2); - $res .= chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); - } - else - { - // Single-byte character - $res .= "\0".chr($c1); - } - } - return $res; -} - -function _dounderline($x, $y, $txt) -{ - // Underline text - $up = $this->CurrentFont['up']; - $ut = $this->CurrentFont['ut']; - $w = $this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); - return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); -} - -function _parsejpg($file) -{ - // Extract info from a JPEG file - $a = getimagesize($file); - if(!$a) - $this->Error('Missing or incorrect image file: '.$file); - if($a[2]!=2) - $this->Error('Not a JPEG file: '.$file); - if(!isset($a['channels']) || $a['channels']==3) - $colspace = 'DeviceRGB'; - elseif($a['channels']==4) - $colspace = 'DeviceCMYK'; - else - $colspace = 'DeviceGray'; - $bpc = isset($a['bits']) ? $a['bits'] : 8; - $data = file_get_contents($file); - return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); -} - -function _parsepng($file) -{ - // Extract info from a PNG file - $f = fopen($file,'rb'); - if(!$f) - $this->Error('Can\'t open image file: '.$file); - $info = $this->_parsepngstream($f,$file); - fclose($f); - return $info; -} - -function _parsepngstream($f, $file) -{ - // Check signature - if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) - $this->Error('Not a PNG file: '.$file); - - // Read header chunk - $this->_readstream($f,4); - if($this->_readstream($f,4)!='IHDR') - $this->Error('Incorrect PNG file: '.$file); - $w = $this->_readint($f); - $h = $this->_readint($f); - $bpc = ord($this->_readstream($f,1)); - if($bpc>8) - $this->Error('16-bit depth not supported: '.$file); - $ct = ord($this->_readstream($f,1)); - if($ct==0 || $ct==4) - $colspace = 'DeviceGray'; - elseif($ct==2 || $ct==6) - $colspace = 'DeviceRGB'; - elseif($ct==3) - $colspace = 'Indexed'; - else - $this->Error('Unknown color type: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown compression method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown filter method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Interlacing not supported: '.$file); - $this->_readstream($f,4); - $dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w; - - // Scan chunks looking for palette, transparency and image data - $pal = ''; - $trns = ''; - $data = ''; - do - { - $n = $this->_readint($f); - $type = $this->_readstream($f,4); - if($type=='PLTE') - { - // Read palette - $pal = $this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='tRNS') - { - // Read transparency info - $t = $this->_readstream($f,$n); - if($ct==0) - $trns = array(ord(substr($t,1,1))); - elseif($ct==2) - $trns = array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); - else - { - $pos = strpos($t,chr(0)); - if($pos!==false) - $trns = array($pos); - } - $this->_readstream($f,4); - } - elseif($type=='IDAT') - { - // Read image data block - $data .= $this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='IEND') - break; - else - $this->_readstream($f,$n+4); - } - while($n); - - if($colspace=='Indexed' && empty($pal)) - $this->Error('Missing palette in '.$file); - $info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns); - if($ct>=4) - { - // Extract alpha channel - if(!function_exists('gzuncompress')) - $this->Error('Zlib not available, can\'t handle alpha channel: '.$file); - $data = gzuncompress($data); - $color = ''; - $alpha = ''; - if($ct==4) - { - // Gray image - $len = 2*$w; - for($i=0;$i<$h;$i++) - { - $pos = (1+$len)*$i; - $color .= $data[$pos]; - $alpha .= $data[$pos]; - $line = substr($data,$pos+1,$len); - $color .= preg_replace('/(.)./s','$1',$line); - $alpha .= preg_replace('/.(.)/s','$1',$line); - } - } - else - { - // RGB image - $len = 4*$w; - for($i=0;$i<$h;$i++) - { - $pos = (1+$len)*$i; - $color .= $data[$pos]; - $alpha .= $data[$pos]; - $line = substr($data,$pos+1,$len); - $color .= preg_replace('/(.{3})./s','$1',$line); - $alpha .= preg_replace('/.{3}(.)/s','$1',$line); - } - } - unset($data); - $data = gzcompress($color); - $info['smask'] = gzcompress($alpha); - if($this->PDFVersion<'1.4') - $this->PDFVersion = '1.4'; - } - $info['data'] = $data; - return $info; -} - -function _readstream($f, $n) -{ - // Read n bytes from stream - $res = ''; - while($n>0 && !feof($f)) - { - $s = fread($f,$n); - if($s===false) - $this->Error('Error while reading stream'); - $n -= strlen($s); - $res .= $s; - } - if($n>0) - $this->Error('Unexpected end of stream'); - return $res; -} - -function _readint($f) -{ - // Read a 4-byte integer from stream - $a = unpack('Ni',$this->_readstream($f,4)); - return $a['i']; -} - -function _parsegif($file) -{ - // Extract info from a GIF file (via PNG conversion) - if(!function_exists('imagepng')) - $this->Error('GD extension is required for GIF support'); - if(!function_exists('imagecreatefromgif')) - $this->Error('GD has no GIF read support'); - $im = imagecreatefromgif($file); - if(!$im) - $this->Error('Missing or incorrect image file: '.$file); - imageinterlace($im,0); - $f = @fopen('php://temp','rb+'); - if($f) - { - // Perform conversion in memory - ob_start(); - imagepng($im); - $data = ob_get_clean(); - imagedestroy($im); - fwrite($f,$data); - rewind($f); - $info = $this->_parsepngstream($f,$file); - fclose($f); - } - else - { - // Use temporary file - $tmp = tempnam('.','gif'); - if(!$tmp) - $this->Error('Unable to create a temporary file'); - if(!imagepng($im,$tmp)) - $this->Error('Error while saving to temporary file'); - imagedestroy($im); - $info = $this->_parsepng($tmp); - unlink($tmp); - } - return $info; -} - -function _newobj() -{ - // Begin a new object - $this->n++; - $this->offsets[$this->n] = strlen($this->buffer); - $this->_out($this->n.' 0 obj'); -} - -function _putstream($s) -{ - $this->_out('stream'); - $this->_out($s); - $this->_out('endstream'); -} - -function _out($s) -{ - // Add a line to the document - if($this->state==2) - $this->pages[$this->page] .= $s."\n"; - else - $this->buffer .= $s."\n"; -} - -function _putpages() -{ - $nb = $this->page; - if(!empty($this->AliasNbPages)) - { - // Replace number of pages - for($n=1;$n<=$nb;$n++) - $this->pages[$n] = str_replace($this->AliasNbPages,$nb,$this->pages[$n]); - } - if($this->DefOrientation=='P') - { - $wPt = $this->DefPageSize[0]*$this->k; - $hPt = $this->DefPageSize[1]*$this->k; - } - else - { - $wPt = $this->DefPageSize[1]*$this->k; - $hPt = $this->DefPageSize[0]*$this->k; - } - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - for($n=1;$n<=$nb;$n++) - { - // Page - $this->_newobj(); - $this->_out('<</Type /Page'); - $this->_out('/Parent 1 0 R'); - if(isset($this->PageSizes[$n])) - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); - $this->_out('/Resources 2 0 R'); - if(isset($this->PageLinks[$n])) - { - // Links - $annots = '/Annots ['; - foreach($this->PageLinks[$n] as $pl) - { - $rect = sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); - $annots .= '<</Type /Annot /Subtype /Link /Rect ['.$rect.'] /Border [0 0 0] '; - if(is_string($pl[4])) - $annots .= '/A <</S /URI /URI '.$this->_textstring($pl[4]).'>>>>'; - else - { - $l = $this->links[$pl[4]]; - $h = isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; - $annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); - } - } - $this->_out($annots.']'); - } - if($this->PDFVersion>'1.3') - $this->_out('/Group <</Type /Group /S /Transparency /CS /DeviceRGB>>'); - $this->_out('/Contents '.($this->n+1).' 0 R>>'); - $this->_out('endobj'); - // Page content - $p = ($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); - $this->_putstream($p); - $this->_out('endobj'); - } - // Pages root - $this->offsets[1] = strlen($this->buffer); - $this->_out('1 0 obj'); - $this->_out('<</Type /Pages'); - $kids = '/Kids ['; - for($i=0;$i<$nb;$i++) - $kids .= (3+2*$i).' 0 R '; - $this->_out($kids.']'); - $this->_out('/Count '.$nb); - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putfonts() -{ - $nf = $this->n; - foreach($this->diffs as $diff) - { - // Encodings - $this->_newobj(); - $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>'); - $this->_out('endobj'); - } - foreach($this->FontFiles as $file=>$info) - { - // Font file embedding - $this->_newobj(); - $this->FontFiles[$file]['n'] = $this->n; - $font = file_get_contents($this->fontpath.$file,true); - if(!$font) - $this->Error('Font file not found: '.$file); - $compressed = (substr($file,-2)=='.z'); - if(!$compressed && isset($info['length2'])) - $font = substr($font,6,$info['length1']).substr($font,6+$info['length1']+6,$info['length2']); - $this->_out('<</Length '.strlen($font)); - if($compressed) - $this->_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$info['length1']); - if(isset($info['length2'])) - $this->_out('/Length2 '.$info['length2'].' /Length3 0'); - $this->_out('>>'); - $this->_putstream($font); - $this->_out('endobj'); - } - foreach($this->fonts as $k=>$font) - { - // Font objects - $this->fonts[$k]['n'] = $this->n+1; - $type = $font['type']; - $name = $font['name']; - if($type=='Core') - { - // Core font - $this->_newobj(); - $this->_out('<</Type /Font'); - $this->_out('/BaseFont /'.$name); - $this->_out('/Subtype /Type1'); - if($name!='Symbol' && $name!='ZapfDingbats') - $this->_out('/Encoding /WinAnsiEncoding'); - $this->_out('>>'); - $this->_out('endobj'); - } - elseif($type=='Type1' || $type=='TrueType') - { - // Additional Type1 or TrueType/OpenType font - $this->_newobj(); - $this->_out('<</Type /Font'); - $this->_out('/BaseFont /'.$name); - $this->_out('/Subtype /'.$type); - $this->_out('/FirstChar 32 /LastChar 255'); - $this->_out('/Widths '.($this->n+1).' 0 R'); - $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); - if(isset($font['diffn'])) - $this->_out('/Encoding '.($nf+$font['diffn']).' 0 R'); - else - $this->_out('/Encoding /WinAnsiEncoding'); - $this->_out('>>'); - $this->_out('endobj'); - // Widths - $this->_newobj(); - $cw = &$font['cw']; - $s = '['; - for($i=32;$i<=255;$i++) - $s .= $cw[chr($i)].' '; - $this->_out($s.']'); - $this->_out('endobj'); - // Descriptor - $this->_newobj(); - $s = '<</Type /FontDescriptor /FontName /'.$name; - foreach($font['desc'] as $k=>$v) - $s .= ' /'.$k.' '.$v; - if(!empty($font['file'])) - $s .= ' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R'; - $this->_out($s.'>>'); - $this->_out('endobj'); - } - else - { - // Allow for additional types - $mtd = '_put'.strtolower($type); - if(!method_exists($this,$mtd)) - $this->Error('Unsupported font type: '.$type); - $this->$mtd($font); - } - } -} - -function _putimages() -{ - foreach(array_keys($this->images) as $file) - { - $this->_putimage($this->images[$file]); - unset($this->images[$file]['data']); - unset($this->images[$file]['smask']); - } -} - -function _putimage(&$info) -{ - $this->_newobj(); - $info['n'] = $this->n; - $this->_out('<</Type /XObject'); - $this->_out('/Subtype /Image'); - $this->_out('/Width '.$info['w']); - $this->_out('/Height '.$info['h']); - if($info['cs']=='Indexed') - $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); - else - { - $this->_out('/ColorSpace /'.$info['cs']); - if($info['cs']=='DeviceCMYK') - $this->_out('/Decode [1 0 1 0 1 0 1 0]'); - } - $this->_out('/BitsPerComponent '.$info['bpc']); - if(isset($info['f'])) - $this->_out('/Filter /'.$info['f']); - if(isset($info['dp'])) - $this->_out('/DecodeParms <<'.$info['dp'].'>>'); - if(isset($info['trns']) && is_array($info['trns'])) - { - $trns = ''; - for($i=0;$i<count($info['trns']);$i++) - $trns .= $info['trns'][$i].' '.$info['trns'][$i].' '; - $this->_out('/Mask ['.$trns.']'); - } - if(isset($info['smask'])) - $this->_out('/SMask '.($this->n+1).' 0 R'); - $this->_out('/Length '.strlen($info['data']).'>>'); - $this->_putstream($info['data']); - $this->_out('endobj'); - // Soft mask - if(isset($info['smask'])) - { - $dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w']; - $smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']); - $this->_putimage($smask); - } - // Palette - if($info['cs']=='Indexed') - { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); - $this->_putstream($pal); - $this->_out('endobj'); - } -} - -function _putxobjectdict() -{ - foreach($this->images as $image) - $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); -} - -function _putresourcedict() -{ - $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - $this->_out('/Font <<'); - foreach($this->fonts as $font) - $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); - $this->_out('>>'); - $this->_out('/XObject <<'); - $this->_putxobjectdict(); - $this->_out('>>'); -} - -function _putresources() -{ - $this->_putfonts(); - $this->_putimages(); - // Resource dictionary - $this->offsets[2] = strlen($this->buffer); - $this->_out('2 0 obj'); - $this->_out('<<'); - $this->_putresourcedict(); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putinfo() -{ - $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); - if(!empty($this->title)) - $this->_out('/Title '.$this->_textstring($this->title)); - if(!empty($this->subject)) - $this->_out('/Subject '.$this->_textstring($this->subject)); - if(!empty($this->author)) - $this->_out('/Author '.$this->_textstring($this->author)); - if(!empty($this->keywords)) - $this->_out('/Keywords '.$this->_textstring($this->keywords)); - if(!empty($this->creator)) - $this->_out('/Creator '.$this->_textstring($this->creator)); - $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); -} - -function _putcatalog() -{ - $this->_out('/Type /Catalog'); - $this->_out('/Pages 1 0 R'); - if($this->ZoomMode=='fullpage') - $this->_out('/OpenAction [3 0 R /Fit]'); - elseif($this->ZoomMode=='fullwidth') - $this->_out('/OpenAction [3 0 R /FitH null]'); - elseif($this->ZoomMode=='real') - $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); - elseif(!is_string($this->ZoomMode)) - $this->_out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']'); - if($this->LayoutMode=='single') - $this->_out('/PageLayout /SinglePage'); - elseif($this->LayoutMode=='continuous') - $this->_out('/PageLayout /OneColumn'); - elseif($this->LayoutMode=='two') - $this->_out('/PageLayout /TwoColumnLeft'); -} - -function _putheader() -{ - $this->_out('%PDF-'.$this->PDFVersion); -} - -function _puttrailer() -{ - $this->_out('/Size '.($this->n+1)); - $this->_out('/Root '.$this->n.' 0 R'); - $this->_out('/Info '.($this->n-1).' 0 R'); -} - -function _enddoc() -{ - $this->_putheader(); - $this->_putpages(); - $this->_putresources(); - // Info - $this->_newobj(); - $this->_out('<<'); - $this->_putinfo(); - $this->_out('>>'); - $this->_out('endobj'); - // Catalog - $this->_newobj(); - $this->_out('<<'); - $this->_putcatalog(); - $this->_out('>>'); - $this->_out('endobj'); - // Cross-ref - $o = strlen($this->buffer); - $this->_out('xref'); - $this->_out('0 '.($this->n+1)); - $this->_out('0000000000 65535 f '); - for($i=1;$i<=$this->n;$i++) - $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); - // Trailer - $this->_out('trailer'); - $this->_out('<<'); - $this->_puttrailer(); - $this->_out('>>'); - $this->_out('startxref'); - $this->_out($o); - $this->_out('%%EOF'); - $this->state = 3; -} -// End of class -} - -// Handle special IE contype request -if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') -{ - header('Content-Type: application/pdf'); - exit; -} - -?> Modified: trunk/locale/update-makefile.sh =================================================================== --- trunk/locale/update-makefile.sh 2014-10-10 16:45:38 UTC (rev 9247) +++ trunk/locale/update-makefile.sh 2014-10-10 17:02:26 UTC (rev 9248) @@ -38,8 +38,8 @@ # TODO: autogenerate .exclude list from CVS/Entries pot_file_deps () { test -f .exclude || ( echo lib/pear/ > .exclude; echo lib/WikiDB/adodb/ > .exclude; echo lib/nusoap/ > .exclude ) - (cd ..; find lib themes \( -type d -regex '\(^lib/pear\)\|\(^lib/WikiDB/adodb\)\|\(^lib/nusoap\)\|\(^lib/fpdf\)' \) -prune -o \( -type f -a -name \*.php -o -name \*.tmpl \)) | - egrep -v '(^lib/pear)|(^lib/WikiDB/adodb)|(^lib/nusoap)|(^lib/fpdf)' | + (cd ..; find lib themes \( -type d -regex '\(^lib/pear\)\|\(^lib/WikiDB/adodb\)\|\(^lib/nusoap\)' \) -prune -o \( -type f -a -name \*.php -o -name \*.tmpl \)) | + egrep -v '(^lib/pear)|(^lib/WikiDB/adodb)|(^lib/nusoap)' | grep -v -f .exclude | sed 's|^|${POT_FILE}: ../|;' | sort This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 16:45:43
|
Revision: 9247 http://sourceforge.net/p/phpwiki/code/9247 Author: vargenau Date: 2014-10-10 16:45:38 +0000 (Fri, 10 Oct 2014) Log Message: ----------- isa --> is_a Modified Paths: -------------- trunk/SOAP.php trunk/lib/BlockParser.php trunk/lib/CachedMarkup.php trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/DbSession.php trunk/lib/ErrorManager.php trunk/lib/HtmlParser.php trunk/lib/InlineParser.php trunk/lib/MailNotify.php trunk/lib/PageList.php trunk/lib/PagePerm.php trunk/lib/PageType.php trunk/lib/Template.php trunk/lib/WikiDB.php trunk/lib/WikiGroup.php trunk/lib/WikiPlugin.php trunk/lib/WikiTheme.php trunk/lib/WikiUser/AdoDb.php trunk/lib/WikiUser/EMailConfirm.php trunk/lib/WikiUser/File.php trunk/lib/WikiUser/PdoDb.php trunk/lib/WikiUser/PearDb.php trunk/lib/WikiUser.php trunk/lib/XmlRpcServer.php trunk/lib/editpage.php trunk/lib/loadsave.php trunk/lib/main.php trunk/lib/plugin/CreateToc.php trunk/lib/plugin/DebugAuthInfo.php trunk/lib/plugin/GooglePlugin.php trunk/lib/plugin/GraphViz.php trunk/lib/plugin/ListPages.php trunk/lib/plugin/PageHistory.php trunk/lib/plugin/PasswordReset.php trunk/lib/plugin/RecentChanges.php trunk/lib/plugin/SiteMap.php trunk/lib/plugin/UserPreferences.php trunk/lib/plugin/VisualWiki.php trunk/lib/plugin/WatchPage.php trunk/lib/plugin/WhoIsOnline.php trunk/lib/plugin/WikiBlog.php trunk/lib/plugin/WikiFormRich.php trunk/lib/stdlib.php trunk/lib/wikilens/RatingsDb.php trunk/tests/unit/lib/InlineParserTest.php trunk/tests/unit/lib/plugin/AllPagesTest.php trunk/tests/unit/lib/plugin/AllUsersTest.php trunk/tests/unit/lib/plugin/IncludePageTest.php trunk/tests/unit/lib/plugin/ListPagesTest.php trunk/tests/unit/lib/plugin/OrphanedPagesTest.php trunk/tests/unit/lib/plugin/WantedPagesTest.php trunk/themes/MacOSX/themeinfo.php trunk/themes/Portland/themeinfo.php trunk/themes/Wordpress/themeinfo.php trunk/themes/blog/themeinfo.php Modified: trunk/SOAP.php =================================================================== --- trunk/SOAP.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/SOAP.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -319,7 +319,7 @@ $p = $w->getPlugin($pluginName, false); // second arg? $pagelist = $p->run($dbi, $pluginargs, $request, $basepage); $pages = array(); - if (is_object($pagelist) and isa($pagelist, 'PageList')) { + if (is_object($pagelist) and is_a($pagelist, 'PageList')) { foreach ($pagelist->pageNames() as $name) $pages[] = array('pagename' => $name); } Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/BlockParser.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -494,7 +494,7 @@ // If content is a single paragraph, eliminate the paragraph... if (count($this->_content) == 1) { $elem = $this->_content[0]; - if (isa($elem, 'XmlElement') and $elem->getTag() == 'p') { + if (is_a($elem, 'XmlElement') and $elem->getTag() == 'p') { $this->setContent($elem->getContent()); } } @@ -590,7 +590,7 @@ function merge($nextBlock) { - if (isa($nextBlock, 'Block_list') and $this->_tag == $nextBlock->_tag) { + if (is_a($nextBlock, 'Block_list') and $this->_tag == $nextBlock->_tag) { array_splice($this->_content, count($this->_content), 0, $nextBlock->_content); return $this; @@ -733,7 +733,7 @@ function _setTerm($th) { $first_row = &$this->_content[0]; - if (isa($first_row, 'Block_table_dl_defn')) + if (is_a($first_row, 'Block_table_dl_defn')) $first_row->_setTerm($th); else $first_row->unshiftContent($th); @@ -753,7 +753,7 @@ function _IsASubtable($item) { - return isa($item, 'HtmlElement') + return is_a($item, 'HtmlElement') && $item->getTag() == 'table' && $item->getAttr('class') == 'wiki-dl-table'; } @@ -777,7 +777,7 @@ function & firstTR() { $first = &$this->_content[0]; - if (isa($first, 'Block_table_dl_defn')) + if (is_a($first, 'Block_table_dl_defn')) return $first->firstTR(); return $first; } @@ -785,7 +785,7 @@ function & lastTR() { $last = &$this->_content[$this->_nrows - 1]; - if (isa($last, 'Block_table_dl_defn')) + if (is_a($last, 'Block_table_dl_defn')) return $last->lastTR(); return $last; } @@ -798,7 +798,7 @@ $rows = &$this->_content; for ($i = 0; $i < count($rows); $i++) { $row = &$rows[$i]; - if (isa($row, 'Block_table_dl_defn')) + if (is_a($row, 'Block_table_dl_defn')) $row->setWidth($ncols - 1); else { $n = count($row->_content); @@ -1394,7 +1394,7 @@ */ function TransformTextPre($text, $basepage = false) { - if (isa($text, 'WikiDB_PageRevision')) { + if (is_a($text, 'WikiDB_PageRevision')) { $rev = $text; $text = $rev->getPackedContent(); } Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/CachedMarkup.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -45,7 +45,7 @@ // - the history is wrong (user and comment missing) // - the table of contents plugin no longer works global $WikiTheme; - if (isa($WikiTheme, 'WikiTheme_fusionforge')) { + if (is_a($WikiTheme, 'WikiTheme_fusionforge')) { return serialize($this); } @@ -88,7 +88,7 @@ { $links = array(); foreach ($this->_content as $item) { - if (!isa($item, 'Cached_DynamicContent')) + if (!is_a($item, 'Cached_DynamicContent')) continue; if (!($item_links = $item->getWikiPageLinks($this->_basepage))) continue; @@ -110,7 +110,7 @@ function getLinkInfo() { foreach ($this->_content as $link) { - if (!isa($link, 'Cached_Link')) + if (!is_a($link, 'Cached_Link')) continue; $info = $link->getLinkInfo($this->_basepage); $links[$info->href] = $info; @@ -125,13 +125,13 @@ $this->_append($subitem); } elseif (!is_object($item)) { $this->_buf .= $this->_quote((string)$item); - } elseif (isa($item, 'Cached_DynamicContent')) { + } elseif (is_a($item, 'Cached_DynamicContent')) { if ($this->_buf) { $this->_content[] = $this->_buf; $this->_buf = ''; } $this->_content[] = $item; - } elseif (isa($item, 'XmlElement')) { + } elseif (is_a($item, 'XmlElement')) { if ($item->isEmpty()) { $this->_buf .= $item->emptyTag(); } else { @@ -147,7 +147,7 @@ } if (!$item->isInlineElement()) $this->_buf .= "\n"; - } elseif (isa($item, 'XmlContent')) { + } elseif (is_a($item, 'XmlContent')) { foreach ($item->getContent() as $item) $this->_append($item); } elseif (method_exists($item, 'asXML')) { Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/DbSession/ADODB.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -159,7 +159,7 @@ $time = $dbh->qstr(time()); // postgres can't handle binary data in a TEXT field. - if (isa($dbh, 'ADODB_postgres64')) + if (is_a($dbh, 'ADODB_postgres64')) $sess_data = base64_encode($sess_data); $qdata = $dbh->qstr($sess_data); Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/DbSession/PDO.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -101,7 +101,7 @@ $res = ''; } $this->_disconnect(); - if (!empty($res) and isa($dbh, 'ADODB_postgres64')) { + if (!empty($res) and is_a($dbh, 'ADODB_postgres64')) { $res = base64_decode($res); } if (strlen($res) > 4000) { @@ -140,7 +140,7 @@ $time = time(); // postgres can't handle binary data in a TEXT field. - if (isa($dbh, 'ADODB_postgres64')) + if (is_a($dbh, 'ADODB_postgres64')) $sess_data = base64_encode($sess_data); /* AffectedRows with sessions seems to be unstable on certain platforms. Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/DbSession/SQL.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -108,7 +108,7 @@ $this->_disconnect(); if (DB::isError($res) || empty($res)) return ''; - if (isa($dbh, 'DB_pgsql')) + if (is_a($dbh, 'DB_pgsql')) //if (preg_match('|^[a-zA-Z0-9/+=]+$|', $res)) $res = base64_decode($res); if (strlen($res) > 4000) { @@ -149,7 +149,7 @@ trigger_error("delete empty session $qid", E_USER_WARNING); } // postgres can't handle binary data in a TEXT field. - if (isa($dbh, 'DB_pgsql')) + if (is_a($dbh, 'DB_pgsql')) $sess_data = base64_encode($sess_data); $qdata = $dbh->quote($sess_data); Modified: trunk/lib/DbSession.php =================================================================== --- trunk/lib/DbSession.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/DbSession.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -27,7 +27,7 @@ { // Check for existing DbSession handler $db_type = $dbh->getParam('dbtype'); - if (isa($dbh, 'WikiDB')) { + if (is_a($dbh, 'WikiDB')) { @include_once("lib/DbSession/" . $db_type . ".php"); $class = "DbSession_" . $db_type; Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/ErrorManager.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -122,7 +122,7 @@ // format it with the worst class (error, warning, notice) $worst_err = $flushed->_content[0]; foreach ($flushed->_content as $err) { - if ($err and isa($err, 'PhpError') and $err->errno > $worst_err->errno) { + if ($err and is_a($err, 'PhpError') and $err->errno > $worst_err->errno) { $worst_err = $err; } } @@ -276,13 +276,7 @@ $this->_die($error); } elseif (($error->errno & error_reporting()) != 0) { if (($error->errno & $this->_postpone_mask) != 0) { - if ((function_exists('isa') and isa($error, 'PhpErrorOnce')) - or (!function_exists('isa') and - ( - // stdlib independent isa() - (strtolower(get_class($error)) == 'phperroronce') - or (is_subclass_of($error, 'PhpErrorOnce')))) - ) { + if (is_a($error, 'PhpErrorOnce')) { $error->removeDoublettes($this->_postponed_errors); if ($error->_count < 2) $this->_postponed_errors[] = $error; Modified: trunk/lib/HtmlParser.php =================================================================== --- trunk/lib/HtmlParser.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/HtmlParser.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -86,7 +86,7 @@ function wikify($node, $parent = null) { $output = ''; - if (isa($node, 'XmlElement')) { + if (is_a($node, 'XmlElement')) { $dialect =& $this->dialect; $conv = $dialect->_handlers[$node->_tag]; if (is_string($conv) and method_exists($dialect, $conv)) { @@ -126,7 +126,7 @@ function elem_contents($node) { $output = ''; - if (isa($node, 'XmlElement')) { + if (is_a($node, 'XmlElement')) { foreach ($node->getContent() as $child) { $output .= $this->wikify($child, isset($node->parent) ? $node->parent : null); } Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/InlineParser.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -1315,7 +1315,7 @@ function _addMarkup($markup) { - if (isa($markup, 'SimpleMarkup')) + if (is_a($markup, 'SimpleMarkup')) $regexp = $markup->getMatchRegexp(); else $regexp = $markup->getStartRegexp(); @@ -1345,7 +1345,7 @@ // No start pattern found before end pattern. // We're all done! if (isset($markup) and is_object($markup) - and isa($markup, 'Markup_plugin') + and is_a($markup, 'Markup_plugin') ) { $current =& $output->_content[count($output->_content) - 1]; $current->setTightness(true, true); @@ -1367,13 +1367,13 @@ // Matched markup. Eat input, push output. // FIXME: combine adjacent strings. - if (isa($markup, 'SimpleMarkup')) + if (is_a($markup, 'SimpleMarkup')) $current = $markup->markup($match->match); else $current = $markup->markup($match->match, $body); $input = $match->postmatch; if (isset($markup) and is_object($markup) - and isa($markup, 'Markup_plugin') + and is_a($markup, 'Markup_plugin') ) { $current->setTightness(true, true); } @@ -1389,7 +1389,7 @@ function _parse_markup_body($markup, $match, &$text, $end_regexps) { - if (isa($markup, 'SimpleMarkup')) { + if (is_a($markup, 'SimpleMarkup')) { return true; // Done. SimpleMarkup is simple. } Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/MailNotify.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -323,7 +323,7 @@ */ function onChangePage(&$wikidb, &$wikitext, $version, &$meta) { - if (!isa($GLOBALS['request'], 'MockRequest')) { + if (!is_a($GLOBALS['request'], 'MockRequest')) { $notify = $wikidb->get('notify'); /* Generate notification emails? */ if (!empty($notify) and is_array($notify)) { @@ -342,7 +342,7 @@ { $result = true; /* Generate notification emails? */ - if (!$wikidb->isWikiPage($pagename) and !isa($GLOBALS['request'], 'MockRequest')) { + if (!$wikidb->isWikiPage($pagename) and !is_a($GLOBALS['request'], 'MockRequest')) { $notify = $wikidb->get('notify'); if (!empty($notify) and is_array($notify)) { //TODO: deferr it (quite a massive load if you remove some pages). @@ -358,7 +358,7 @@ function onRenamePage(&$wikidb, $oldpage, $new_pagename) { - if (!isa($GLOBALS['request'], 'MockRequest')) { + if (!is_a($GLOBALS['request'], 'MockRequest')) { $notify = $wikidb->get('notify'); if (!empty($notify) and is_array($notify)) { $this->getPageChangeEmails($notify); Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/PageList.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -958,12 +958,12 @@ { global $request; $dbi =& $request->getDbh(); - if (isa($dbi, 'WikiDB_SQL')) { + if (is_a($dbi, 'WikiDB_SQL')) { extract($dbi->_backend->_table_names); $res = $dbi->_backend->_dbh->getOne("SELECT max(length(pagename)) FROM $page_tbl"); if (DB::isError($res) || empty($res)) return false; else return $res; - } elseif (isa($dbi, 'WikiDB_ADODB')) { + } elseif (is_a($dbi, 'WikiDB_ADODB')) { extract($dbi->_backend->_table_names); $row = $dbi->_backend->_dbh->getRow("SELECT max(length(pagename)) FROM $page_tbl"); return $row ? $row[0] : false; @@ -1413,9 +1413,9 @@ return 0; } else { $pagea = $this->_getPageFromHandle($a); // If a string, convert to page - assert(isa($pagea, 'WikiDB_Page')); + assert(is_a($pagea, 'WikiDB_Page')); $pageb = $this->_getPageFromHandle($b); // If a string, convert to page - assert(isa($pageb, 'WikiDB_Page')); + assert(is_a($pageb, 'WikiDB_Page')); foreach ($this->_sortby as $colNum => $direction) { // get column type object if (!is_int($colNum)) { // or column fieldname Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/PagePerm.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -108,9 +108,9 @@ $perm = $perm_tree[1]; elseif (is_array($perm_tree[1])) { $perm_tree = pagePermissionsSimpleFormat($perm_tree[1],$owner,$group); - if (isa($perm_tree[1],'pagepermission')) + if (is_a($perm_tree[1],'pagepermission')) $perm = $perm_tree[1]; - elseif (isa($perm_tree,'htmlelement')) + elseif (is_a($perm_tree,'htmlelement')) return $perm_tree; } */ @@ -416,7 +416,7 @@ if ($group === ACL_ANONYMOUS) return !$user->isSignedIn(); if ($group === ACL_BOGOUSER) - return isa($user, '_BogoUser') or + return is_a($user, '_BogoUser') or (isWikiWord($user->_userid) and $user->_level >= WIKIAUTH_BOGO); if ($group === ACL_HASHOMEPAGE) return $user->hasHomePage(); Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/PageType.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -523,62 +523,6 @@ } } -/** - * FIXME. not yet used - */ -class PageFormatter_pdf extends PageFormatter -{ - - function _transform($text) - { - include_once 'lib/BlockParser.php'; - return TransformText($text); - } - - // one page or set of pages? - // here we try to format only a single page - function format($text) - { - include_once 'lib/Template.php'; - global $request; - $tokens['page'] = $this->_page; - $tokens['CONTENT'] = $this->_transform($text); - $pagename = $this->_page->getName(); - - // This is a XmlElement tree, which must be converted to PDF - - // We can make use of several pdf extensions. This one - fpdf - // - is pure php and very easy, but looks quite ugly and has a - // terrible interface, as terrible as most of the othes. - // The closest to HTML is htmldoc which needs an external cgi - // binary. - // We use a custom HTML->PDF class converter from PHPWebthings - // to be able to use templates for PDF. - require_once 'lib/fpdf.php'; - require_once 'lib/pdf.php'; - - $pdf = new PDF(); - $pdf->SetTitle($pagename); - $pdf->SetAuthor($this->_page->get('author')); - $pdf->SetCreator(WikiURL($pagename, array(), 1)); - $pdf->AliasNbPages(); - $pdf->AddPage(); - //TODO: define fonts - $pdf->SetFont('Times', '', 12); - //$pdf->SetFont('Arial','B',16); - - // PDF pagelayout from a special template - $template = new Template('pdf', $request, $tokens); - $pdf->ConvertFromHTML($template); - - // specify filename, destination - $pdf->Output($pagename . ".pdf", 'I'); // I for stdin or D for download - - // Output([string name [, string dest]]) - return $pdf; - } -} - class PageFormatter_MediaWiki extends PageFormatter { function _transform($text) Modified: trunk/lib/Template.php =================================================================== --- trunk/lib/Template.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/Template.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -92,7 +92,7 @@ private function _print($val) { - if (isa($val, 'Template')) { + if (is_a($val, 'Template')) { $this->_expandSubtemplate($val); } else { PrintXML($val); Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiDB.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -562,7 +562,7 @@ E_USER_WARNING); } /* Generate notification emails? */ - if ($result and ENABLE_MAILNOTIFY and !isa($GLOBALS['request'], 'MockRequest')) { + if ($result and ENABLE_MAILNOTIFY and !is_a($GLOBALS['request'], 'MockRequest')) { $notify = $this->get('notify'); if (!empty($notify) and is_array($notify)) { include_once 'lib/MailNotify.php'; @@ -1041,12 +1041,12 @@ } /* Generate notification emails? */ - if (ENABLE_MAILNOTIFY and isa($newrevision, 'WikiDB_PageRevision')) { + if (ENABLE_MAILNOTIFY and is_a($newrevision, 'WikiDB_PageRevision')) { // Save didn't fail because of concurrent updates. $notify = $this->_wikidb->get('notify'); if (!empty($notify) and is_array($notify) - and !isa($GLOBALS['request'], 'MockRequest') + and !is_a($GLOBALS['request'], 'MockRequest') ) { include_once 'lib/MailNotify.php'; $MailNotify = new MailNotify($newrevision->getName()); Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiGroup.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -215,7 +215,7 @@ case GROUP_ANONYMOUS: return $this->membership[$group] = !$user->isSignedIn(); case GROUP_BOGOUSER: - return $this->membership[$group] = (isa($user, '_BogoUser') + return $this->membership[$group] = (is_a($user, '_BogoUser') and $user->_level >= WIKIAUTH_BOGO); case GROUP_SIGNED: return $this->membership[$group] = $user->isSignedIn(); @@ -276,12 +276,12 @@ //don't strip WHERE, only the userid stuff. $sql = preg_replace('/(WHERE.*?)\s+\w+\s*=\s*["\']\$userid[\'"]/i', '\\1 AND 1', $sql); $sql = str_replace('WHERE AND 1', '', $sql); - if (isa($dbi, 'ADOConnection')) { + if (is_a($dbi, 'ADOConnection')) { $db_result = $dbi->Execute($sql); foreach ($db_result->GetArray() as $u) { $users = array_merge($users, array_values($u)); } - } elseif (isa($dbi, 'DB_common')) { // PearDB + } elseif (is_a($dbi, 'DB_common')) { // PearDB $users = array_merge($users, $dbi->getCol($sql)); } } @@ -293,12 +293,12 @@ $sql = preg_replace('/(WHERE.*?)\s+\w+\s*=\s*["\']\$userid[\'"]/i', '\\1 AND 1', $dbh->getAuthParam('auth_user_exists')); $sql = str_replace('WHERE AND 1', '', $sql); - if (isa($dbi, 'ADOConnection')) { + if (is_a($dbi, 'ADOConnection')) { $db_result = $dbi->Execute($sql); foreach ($db_result->GetArray() as $u) { $users = array_merge($users, array_values($u)); } - } elseif (isa($dbi, 'DB_common')) { + } elseif (is_a($dbi, 'DB_common')) { $users = array_merge($users, $dbi->getCol($sql)); } } @@ -631,16 +631,16 @@ } if (empty($this->user)) { // use _PassUser::prepare instead - if (isa($request->getUser(), '_PassUser')) + if (is_a($request->getUser(), '_PassUser')) $user = $request->getUser(); else $user = new _PassUser($this->username); - } elseif (!isa($this->user, '_PassUser')) { + } elseif (!is_a($this->user, '_PassUser')) { $user = new _PassUser($this->username); } else { $user =& $this->user; } - if (isa($this->user, '_PassUser')) { // TODO: safety by Charles Corrigan + if (is_a($this->user, '_PassUser')) { // TODO: safety by Charles Corrigan $this->_is_member = $user->prepare($DBAuthParams['is_member'], array('userid', 'groupname')); $this->_group_members = $user->prepare($DBAuthParams['group_members'], 'groupname'); @@ -973,7 +973,7 @@ if (strstr(LDAP_BASE_DN, "ou=")) $this->base_dn = preg_replace("/(ou=\w+,)?()/", "\$2", LDAP_BASE_DN); - if (!isset($this->user) or !isa($this->user, '_LDAPPassUser')) + if (!isset($this->user) or !is_a($this->user, '_LDAPPassUser')) $this->_user = new _LDAPPassUser('LdapGroupTest'); // to have a valid username else $this->_user =& $this->user; Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiPlugin.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -274,7 +274,7 @@ $dbi = $request->getDbh(); $pagelist = $this->run($dbi, $plugin_args, $request, $basepage); $list = array(); - if (is_object($pagelist) and isa($pagelist, 'PageList')) + if (is_object($pagelist) and is_a($pagelist, 'PageList')) return $pagelist->pageNames(); elseif (is_array($pagelist)) return $pagelist; Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiTheme.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -61,18 +61,18 @@ $version = false; - if (isa($page_or_rev, 'WikiDB_PageRevision')) { + if (is_a($page_or_rev, 'WikiDB_PageRevision')) { $version = $page_or_rev->getVersion(); if ($page_or_rev->isCurrent()) $version = false; $page = $page_or_rev->getPage(); $pagename = $page->getName(); $wikipage = $pagename; - } elseif (isa($page_or_rev, 'WikiDB_Page')) { + } elseif (is_a($page_or_rev, 'WikiDB_Page')) { $page = $page_or_rev; $pagename = $page->getName(); $wikipage = $pagename; - } elseif (isa($page_or_rev, 'WikiPageName')) { + } elseif (is_a($page_or_rev, 'WikiPageName')) { $wikipage = $page_or_rev; $pagename = $wikipage->name; if (!$wikipage->isValid('strict')) @@ -101,7 +101,7 @@ // WikiLink makes A link, not a string of fancy ones. // (I think that the fancy split links are just confusing.) // Todo: test external ImageLinks http://some/images/next.gif - if (isa($wikipage, 'WikiPageName') and + if (is_a($wikipage, 'WikiPageName') and !$label and strchr(substr($wikipage->shortName, 1), SUBPAGE_SEPARATOR) ) { @@ -130,7 +130,7 @@ if ($exists) { return $WikiTheme->linkExistingWikiWord($wikipage, $label, $version); } elseif ($type == 'if_known') { - if (!$label && isa($wikipage, 'WikiPageName')) + if (!$label && is_a($wikipage, 'WikiPageName')) $label = $wikipage->shortName; return HTML($label ? $label : $pagename); } else { @@ -607,7 +607,7 @@ $link = HTML::a(array('href' => $url)); - if (isa($wikiword, 'WikiPageName')) + if (is_a($wikiword, 'WikiPageName')) $default_text = $wikiword->shortName; else $default_text = $wikiword; @@ -628,7 +628,7 @@ global $request; // Get rid of anchors on unknown wikiwords - if (isa($wikiword, 'WikiPageName')) { + if (is_a($wikiword, 'WikiPageName')) { $default_text = $wikiword->shortName; $wikiword = $wikiword->name; } else { @@ -667,7 +667,7 @@ $link->setAttr('style', 'text-decoration: underline'); $link->setAttr('class', 'wikiunknown'); } - if (!isa($button, "ImageButton")) + if (!is_a($button, "ImageButton")) $button->setAttr('rel', 'nofollow'); $link->pushContent($button); if ($request->getPref('googleLink')) { @@ -685,13 +685,13 @@ if ($linktext) { $text = $linktext; - } elseif (isa($wikiword, 'WikiPageName')) { + } elseif (is_a($wikiword, 'WikiPageName')) { $text = $wikiword->shortName; } else { $text = $wikiword; } - if (isa($wikiword, 'WikiPageName')) + if (is_a($wikiword, 'WikiPageName')) $message = $wikiword->getWarnings(); else $message = sprintf(_("“%s”: Bad page name"), $wikiword); @@ -1043,7 +1043,7 @@ $pagename = $request->getArg("pagename"); $version = $request->getArg("version"); } elseif (is_object($page_or_rev)) { - if (isa($page_or_rev, 'WikiDB_PageRevision')) { + if (is_a($page_or_rev, 'WikiDB_PageRevision')) { $rev = $page_or_rev; $page = $rev->getPage(); if (!$rev->isCurrent()) $version = $rev->getVersion(); Modified: trunk/lib/WikiUser/AdoDb.php =================================================================== --- trunk/lib/WikiUser/AdoDb.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser/AdoDb.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -40,7 +40,7 @@ function _AdoDbPassUser($UserName = '', $prefs = false) { - if (!$this->_prefs and isa($this, "_AdoDbPassUser")) { + if (!$this->_prefs and is_a($this, "_AdoDbPassUser")) { if ($prefs) $this->_prefs = $prefs; if (!isset($this->_prefs->_method)) _PassUser::_PassUser($UserName); Modified: trunk/lib/WikiUser/EMailConfirm.php =================================================================== --- trunk/lib/WikiUser/EMailConfirm.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser/EMailConfirm.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -36,7 +36,7 @@ // sets the pref methods, before this class is initialized. function _EMailConfirmPassUser($UserName = '', $prefs = false, $file = '') { - if (!$this->_prefs and isa($this, "_EMailPassUser")) { + if (!$this->_prefs and is_a($this, "_EMailPassUser")) { if ($prefs) $this->_prefs = $prefs; if (!isset($this->_prefs->_method)) _PassUser::_PassUser($UserName); Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser/File.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -35,7 +35,7 @@ // sets the pref methods, before this class is initialized. function _FilePassUser($UserName = '', $prefs = false, $file = '') { - if (!$this->_prefs and isa($this, "_FilePassUser")) { + if (!$this->_prefs and is_a($this, "_FilePassUser")) { if ($prefs) $this->_prefs = $prefs; if (!isset($this->_prefs->_method)) _PassUser::_PassUser($UserName); @@ -48,7 +48,7 @@ // same style as in main.php include_once(dirname(__FILE__) . "/../pear/File_Passwd.php"); // "__PHP_Incomplete_Class" - if (!empty($file) or empty($this->_file) or !isa($this->_file, "File_Passwd")) + if (!empty($file) or empty($this->_file) or !is_a($this->_file, "File_Passwd")) $this->_file = new File_Passwd($file, false, $file . '.lock'); else return false; Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser/PdoDb.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -38,7 +38,7 @@ function _PdoDbPassUser($UserName = '', $prefs = false) { - if (!$this->_prefs and isa($this, "_PdoDbPassUser")) { + if (!$this->_prefs and is_a($this, "_PdoDbPassUser")) { if ($prefs) $this->_prefs = $prefs; } if (!isset($this->_prefs->_method)) Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser/PearDb.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -36,7 +36,7 @@ function _PearDbPassUser($UserName = '', $prefs = false) { //global $DBAuthParams; - if (!$this->_prefs and isa($this, "_PearDbPassUser")) { + if (!$this->_prefs and is_a($this, "_PearDbPassUser")) { if ($prefs) $this->_prefs = $prefs; } if (!isset($this->_prefs->_method)) Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/WikiUser.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -305,7 +305,7 @@ */ function UpgradeUser($user, $newuser) { - if (isa($user, '_WikiUser') and isa($newuser, '_WikiUser')) { + if (is_a($user, '_WikiUser') and is_a($newuser, '_WikiUser')) { // populate the upgraded class $newuser with the values from the current user object //only _auth_level, _current_method, _current_index, if (!empty($user->_level) and @@ -349,7 +349,7 @@ $request->_user = $user; return true; } - if (isa($user, '_BogoUser')) + if (is_a($user, '_BogoUser')) $user = new _PassUser($UserName, $user->_prefs); $class = $user->nextClass(); if ($user = new $class($UserName, $user->_prefs)) { @@ -534,15 +534,15 @@ */ function isSignedIn() { - return (isa($this, '_BogoUser') or isa($this, '_PassUser')); + return (is_a($this, '_BogoUser') or is_a($this, '_PassUser')); } /** This is password checked for sure. */ function isAuthenticated() { - //return isa($this,'_PassUser'); - //return isa($this,'_BogoUser') || isa($this,'_PassUser'); + //return is_a($this,'_PassUser'); + //return is_a($this,'_BogoUser') || is_a($this,'_PassUser'); return $this->_level >= WIKIAUTH_BOGO; } @@ -2111,9 +2111,9 @@ foreach (array_keys($this->_prefs) as $type) { $obj =& $this->_prefs[$type]; $obj->_init = $init; - if (!isset($prefs[$type]) and isa($obj, "_UserPreference_bool")) + if (!isset($prefs[$type]) and is_a($obj, "_UserPreference_bool")) $prefs[$type] = false; - if (isset($prefs[$type]) and isa($obj, "_UserPreference_int")) + if (isset($prefs[$type]) and is_a($obj, "_UserPreference_int")) $prefs[$type] = (int)$prefs[$type]; if (isset($prefs[$type]) and $obj->get($type) != $prefs[$type]) { // special systemdefault prefs: Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/XmlRpcServer.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -782,7 +782,7 @@ $p = $w->getPlugin($pluginName, false); // second arg? $pagelist = $p->run($dbi, $plugin_args, $request, $basepage); $list = array(); - if (is_object($pagelist) and isa($pagelist, 'PageList')) { + if (is_object($pagelist) and is_a($pagelist, 'PageList')) { foreach ($pagelist->_pages as $page) { $list[] = $page->getName(); } Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/editpage.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -326,7 +326,7 @@ : $this->_currentVersion + 1, // force new? $meta); - if (!isa($newrevision, 'WikiDB_PageRevision')) { + if (!is_a($newrevision, 'WikiDB_PageRevision')) { // Save failed. (Concurrent updates). return false; } @@ -456,14 +456,14 @@ $oldparsed = TransformLinks($oldtext); $oldlinks = array(); foreach ($oldparsed->_content as $link) { - if (isa($link, 'Cached_ExternalLink') and !isa($link, 'Cached_InterwikiLink')) { + if (is_a($link, 'Cached_ExternalLink') and !is_a($link, 'Cached_InterwikiLink')) { $uri = $link->_getURL($this->page->getName()); $oldlinks[$uri]++; } } unset($oldparsed); foreach ($parsed->_content as $link) { - if (isa($link, 'Cached_ExternalLink') and !isa($link, 'Cached_InterwikiLink')) { + if (is_a($link, 'Cached_ExternalLink') and !is_a($link, 'Cached_InterwikiLink')) { $uri = $link->_getURL($this->page->getName()); // only check new links, so admins may add blocked links. if (!array_key_exists($uri, $oldlinks) and ($res = IsBlackListed($uri))) { Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/loadsave.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -41,7 +41,7 @@ { // MockRequest is from the unit testsuite, a faked request. (may be cmd-line) // We are silent on unittests. - if (isa($request, 'MockRequest')) + if (is_a($request, 'MockRequest')) return; // FIXME: This is a hack. This really is the worst overall hack in phpwiki. if ($html) @@ -60,7 +60,7 @@ { global $WikiTheme; - if (isa($request, 'MockRequest')) + if (is_a($request, 'MockRequest')) return; $action = $request->getArg('action'); $label = ''; @@ -119,31 +119,31 @@ PrintXML(HTML::p(HTML::strong(_("Complete."))), HTML::p(fmt("Return to %s", $pagelink))); // Ugly hack to get valid XHTML code - if (isa($WikiTheme, 'WikiTheme_fusionforge')) { + if (is_a($WikiTheme, 'WikiTheme_fusionforge')) { echo "</div>\n"; echo "</div>\n"; echo "</main>\n"; echo "</div>\n"; - } elseif (isa($WikiTheme, 'WikiTheme_Sidebar') - or isa($WikiTheme, 'WikiTheme_MonoBook') + } elseif (is_a($WikiTheme, 'WikiTheme_Sidebar') + or is_a($WikiTheme, 'WikiTheme_MonoBook') ) { echo "</div>\n"; echo "</div>\n"; echo "</div>\n"; echo "</div>\n"; - } elseif (isa($WikiTheme, 'WikiTheme_wikilens')) { + } elseif (is_a($WikiTheme, 'WikiTheme_wikilens')) { echo "</div>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; - } elseif (isa($WikiTheme, 'WikiTheme_blog')) { + } elseif (is_a($WikiTheme, 'WikiTheme_blog')) { echo "</div>\n"; echo "</div>\n"; - } elseif (isa($WikiTheme, 'WikiTheme_Crao') - or isa($WikiTheme, 'WikiTheme_Hawaiian') - or isa($WikiTheme, 'WikiTheme_MacOSX') - or isa($WikiTheme, 'WikiTheme_shamino_com') - or isa($WikiTheme, 'WikiTheme_smaller') + } elseif (is_a($WikiTheme, 'WikiTheme_Crao') + or is_a($WikiTheme, 'WikiTheme_Hawaiian') + or is_a($WikiTheme, 'WikiTheme_MacOSX') + or is_a($WikiTheme, 'WikiTheme_shamino_com') + or is_a($WikiTheme, 'WikiTheme_smaller') ) { echo "</div>\n"; } @@ -357,13 +357,13 @@ longer_timeout($timeout); // Reset watchdog $pagename = $page->getName(); - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML(HTML::br(), $pagename, ' ... '); flush(); } if (in_array($pagename, $excludeList)) { - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML(_("Skipped.")); flush(); } @@ -389,7 +389,7 @@ $num = fwrite($fd, $data, strlen($data)); $msg->pushContent(HTML::small(fmt("%s bytes written", $num))); - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML($msg); flush(); } @@ -402,7 +402,7 @@ function _copyMsg($page, $smallmsg) { - if (!isa($GLOBALS['request'], 'MockRequest')) { + if (!is_a($GLOBALS['request'], 'MockRequest')) { if ($page) $msg = HTML(HTML::br(), HTML($page), HTML::small($smallmsg)); else $msg = HTML::small($smallmsg); PrintXML($msg); @@ -626,13 +626,13 @@ if ($page->get('locked')) $attrib['write_protected'] = 1; } elseif (!$silent) { - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML(HTML::br(), $pagename, ' ... '); flush(); } } if (in_array($pagename, $excludeList)) { - if (!$silent and !isa($request, 'MockRequest')) { + if (!$silent and !is_a($request, 'MockRequest')) { PrintXML(_("Skipped.")); flush(); } @@ -715,7 +715,7 @@ } $msg->pushContent(HTML::small(fmt("%s bytes written", $num), "\n")); if (!$silent) { - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML($msg); } flush(); @@ -1006,7 +1006,7 @@ if (!$skip) { // in case of failures print the culprit: - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { PrintXML(HTML::span(WikiLink($pagename))); flush(); } @@ -1053,7 +1053,7 @@ } } - if (!isa($request, 'MockRequest')) { + if (!is_a($request, 'MockRequest')) { if ($skip) PrintXML(HTML::em(WikiLink($pagename)), $mesg); else @@ -1158,7 +1158,7 @@ return $content; // if loading from virgin setup do echo, otherwise trigger_error E_USER_NOTICE - if (!isa($GLOBALS['request'], 'MockRequest')) + if (!is_a($GLOBALS['request'], 'MockRequest')) echo sprintf(_("Loading InterWikiMap from external file %s."), $mapfile), "<br />"; $fd = fopen($mapfile, "rb"); Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/main.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -120,7 +120,7 @@ //$user = $this->getSessionVar('wiki_user'); // revive db handle, because these don't survive sessions if (isset($this->_user) and - (!isa($this->_user, WikiUserClassname()) + (!is_a($this->_user, WikiUserClassname()) or (strtolower(get_class($this->_user)) == '_passuser') or (strtolower(get_class($this->_user)) == '_fusionforgepassuser')) ) { @@ -136,7 +136,7 @@ $this->_user->_HomePagehandle = $this->getPage($userid); } // need to update the lockfile filehandle - if (isa($this->_user, '_FilePassUser') + if (is_a($this->_user, '_FilePassUser') and $this->_user->_file->lockfile and !$this->_user->_file->fplock ) { @@ -247,7 +247,7 @@ function updateAuthAndPrefs() { - if (isset($this->_user) and (!isa($this->_user, WikiUserClassname()))) { + if (isset($this->_user) and (!is_a($this->_user, WikiUserClassname()))) { $this->_user = false; } // Handle authentication request, if any. @@ -255,7 +255,7 @@ $this->setArg('auth', false); $this->_handleAuthRequest($auth_args); // possible NORETURN } elseif (!$this->_user - or (isa($this->_user, WikiUserClassname()) + or (is_a($this->_user, WikiUserClassname()) and !$this->_user->isSignedIn()) ) { // If not auth request, try to sign in as saved user. @@ -414,7 +414,7 @@ } $olduser->PrintLoginForm($this, $auth_args, $fail_message, 'newpage'); $this->finish(); //NORETURN - } elseif (isa($user, WikiUserClassname())) { + } elseif (is_a($user, WikiUserClassname())) { // Successful login (or logout.) $this->_setUser($user); } else { @@ -437,7 +437,7 @@ if (!$this->_user) $this->_user = new _PassUser($userid); $user = $this->_user->AuthCheck(array('userid' => $userid)); - if (isa($user, WikiUserClassname())) { + if (is_a($user, WikiUserClassname())) { $this->_setUser($user); // success! } } @@ -977,7 +977,7 @@ if (empty($_SERVER['PHP_AUTH_USER'])) { return false; } - } elseif (isa($user, WikiUserClassname())) { + } elseif (is_a($user, WikiUserClassname())) { $this->_user = $user; $this->_user->_authhow = 'session'; return $user->UserName(); Modified: trunk/lib/plugin/CreateToc.php =================================================================== --- trunk/lib/plugin/CreateToc.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/CreateToc.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -183,7 +183,7 @@ $content[$j]) ) return $j; - } elseif (isa($content[$j], 'cached_link')) { + } elseif (is_a($content[$j], 'cached_link')) { if (method_exists($content[$j], 'asXML')) { $content[$j]->_basepage = $basepage; $content[$j] = $content[$j]->asXML(); Modified: trunk/lib/plugin/DebugAuthInfo.php =================================================================== --- trunk/lib/plugin/DebugAuthInfo.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/DebugAuthInfo.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -103,7 +103,7 @@ $table = HTML::table(array('class' => 'bordered')); //$table->pushContent(HTML::tr(HTML::td(array('colspan' => 2)))); $userdata = obj2hash($user, array('_dbi', '_request', 'password', 'passwd')); - if (isa($user, "_FilePassUser")) { + if (is_a($user, "_FilePassUser")) { foreach ($userdata['_file']->users as $u => $p) { $userdata['_file']->users[$u] = "<hidden>"; } Modified: trunk/lib/plugin/GooglePlugin.php =================================================================== --- trunk/lib/plugin/GooglePlugin.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/GooglePlugin.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -88,9 +88,9 @@ default: trigger_error("Invalid mode"); } - if (isa($result, 'HTML')) + if (is_a($result, 'HTML')) $html->pushContent($result); - if (isa($result, 'GoogleSearchResults')) { + if (is_a($result, 'GoogleSearchResults')) { //TODO: result template if (!empty($result->resultElements)) { $list = HTML::ol(); Modified: trunk/lib/plugin/GraphViz.php =================================================================== --- trunk/lib/plugin/GraphViz.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/GraphViz.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -339,7 +339,7 @@ protected function getMap($dbi, $argarray, $request) { $result = $this->invokeDot($argarray); - if (isa($result, 'HtmlElement')) + if (is_a($result, 'HtmlElement')) return array(false, $result); else return $result; Modified: trunk/lib/plugin/ListPages.php =================================================================== --- trunk/lib/plugin/ListPages.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/ListPages.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -71,8 +71,8 @@ extract($args); // If the ratings table does not exist, or on dba it will break otherwise. - // Check if WikiTheme isa 'wikilens' - if ($info == 'pagename' and isa($GLOBALS['WikiTheme'], 'wikilens')) + // Check if WikiTheme is_a 'wikilens' + if ($info == 'pagename' and is_a($GLOBALS['WikiTheme'], 'wikilens')) $info .= ",top3recs"; if ($info) $info = explode(',', $info); Modified: trunk/lib/plugin/PageHistory.php =================================================================== --- trunk/lib/plugin/PageHistory.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/PageHistory.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -196,7 +196,7 @@ $minor_flag = ''; } $line = HTML::li(array('class' => $class)); - if (isa($WikiTheme, 'WikiTheme_MonoBook')) { + if (is_a($WikiTheme, 'WikiTheme_MonoBook')) { $line->pushContent( $this->diffLink($rev), ' ', $this->pageLink($rev), ' ', Modified: trunk/lib/plugin/PasswordReset.php =================================================================== --- trunk/lib/plugin/PasswordReset.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/PasswordReset.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -123,7 +123,7 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); - if (isa($request, 'MockRequest')) + if (is_a($request, 'MockRequest')) return ''; $user =& $request->_user; Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/RecentChanges.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -541,7 +541,7 @@ $linkorname = $this->pageLink($rev); } - if ((isa($WikiTheme, 'WikiTheme_MonoBook')) or (isa($WikiTheme, 'WikiTheme_fusionforge'))) { + if ((is_a($WikiTheme, 'WikiTheme_MonoBook')) or (is_a($WikiTheme, 'WikiTheme_fusionforge'))) { $line->pushContent( $args['historylinks'] ? '' : $this->historyLink($rev), ' . . ', $linkorname, '; ', Modified: trunk/lib/plugin/SiteMap.php =================================================================== --- trunk/lib/plugin/SiteMap.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/SiteMap.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -188,7 +188,7 @@ reset($pagearr); if (!empty($includepages)) { // disallow direct usage, only via child class IncludeSiteMap - if (!isa($this, "WikiPlugin_IncludeSiteMap") and !isa($this, "WikiPlugin_IncludeTree")) + if (!is_a($this, "WikiPlugin_IncludeSiteMap") and !is_a($this, "WikiPlugin_IncludeTree")) $includepages = ''; if (!is_string($includepages)) $includepages = ' '; // avoid plugin loader problems Modified: trunk/lib/plugin/UserPreferences.php =================================================================== --- trunk/lib/plugin/UserPreferences.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/UserPreferences.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -72,7 +72,7 @@ $args = $this->getArgs($argstr, $request); $user =& $request->_user; $user->_request = $request; - if (isa($request, 'MockRequest')) + if (is_a($request, 'MockRequest')) return ''; if (defined('FUSIONFORGE') and FUSIONFORGE) { if (!($user->isAuthenticated())) { @@ -84,7 +84,7 @@ and (!isset($user->_prefs->_method) or !in_array($user->_prefs->_method, array('ADODB', 'SQL', 'PDO')))) or (in_array($request->getArg('action'), array('zip', 'ziphtml', 'dumphtml'))) - or (isa($user, '_ForbiddenUser')) + or (is_a($user, '_ForbiddenUser')) ) { $no_args = $this->getDefaultArguments(); $no_args['errmsg'] = HTML::p(array('class' => 'error'), Modified: trunk/lib/plugin/VisualWiki.php =================================================================== --- trunk/lib/plugin/VisualWiki.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/VisualWiki.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -148,7 +148,7 @@ /* ($dbi, $large, $recent, $refined, $backlink, $neighbour, $excludelist, $includelist, $color); */ $result = $this->invokeDot($argarray); - if (isa($result, 'HtmlElement')) + if (is_a($result, 'HtmlElement')) return array(false, $result); else return $result; Modified: trunk/lib/plugin/WatchPage.php =================================================================== --- trunk/lib/plugin/WatchPage.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/WatchPage.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -106,7 +106,7 @@ { $args = $this->getArgs($argstr, $request); - if (isa($request, 'MockRequest')) + if (is_a($request, 'MockRequest')) return ''; $user =& $request->_user; $userid = $user->UserName(); Modified: trunk/lib/plugin/WhoIsOnline.php =================================================================== --- trunk/lib/plugin/WhoIsOnline.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/WhoIsOnline.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -133,7 +133,7 @@ if (empty($date)) continue; $num_online++; $user = @unserialize($data); - if (!empty($user) and !isa($user, "__PHP_incomplete_Class")) { + if (!empty($user) and !is_a($user, "__PHP_incomplete_Class")) { // if "__PHP_incomplete_Class" try to avoid notice $userid = @$user->_userid; $level = @$user->_level; Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/WikiBlog.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -387,7 +387,7 @@ list(, $prefix, $month, $day, $time) = $m; return array('pagename' => $pagename, // page (list pages per month) or revision (list months)? - //'title' => isa($rev_or_page,'WikiDB_PageRevision') ? $rev_or_page->get('summary') : '', + //'title' => is_a($rev_or_page,'WikiDB_PageRevision') ? $rev_or_page->get('summary') : '', //'monthtitle' => $this->monthTitle($month), 'month' => $month, 'day' => $day, Modified: trunk/lib/plugin/WikiFormRich.php =================================================================== --- trunk/lib/plugin/WikiFormRich.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/plugin/WikiFormRich.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -147,7 +147,7 @@ $plugin_str = preg_replace(array("/^<!/", "/!>$/"), array("<?", "?>"), $value); // will return a pagelist object! pulldown,checkbox,radiobutton $value = $loader->expandPI($plugin_str, $GLOBALS['request'], $markup, $basepage); - if (isa($value, 'PageList')) + if (is_a($value, 'PageList')) $value = $value->pageNames(); // apply limit elseif (!is_array($value)) trigger_error(sprintf("Invalid argument %s ignored", htmlentities($arg_array[$i])), @@ -366,7 +366,7 @@ trigger_error("invalid input['method'] " . $input['method'], E_USER_WARNING); $pagelist = $p->run($dbi, @$input['args'], $request, $basepage); $values = array(); - if (is_object($pagelist) and isa($pagelist, 'PageList')) { + if (is_object($pagelist) and is_a($pagelist, 'PageList')) { foreach ($pagelist->_pages as $page) { if (is_object($page)) $values[] = $page->getName(); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-10 16:23:28 UTC (rev 9246) +++ trunk/lib/stdlib.php 2014-10-10 16:45:38 UTC (rev 9247) @@ -62,7 +62,6 @@ glob_to_pcre ($glob) glob_match ($glob, $against, $case_sensitive = true) explodePageList ($input, $perm = false) - isa ($object, $class) function_usable ($function_name) wikihash ($x) count_all ($arg) @@ -165,13 +164,13 @@ $anchor = false; if (is_object($pagename)) { - if (isa($pagename, 'WikiDB_Page')) { + if (is_a($pagename, 'WikiDB_Page')) { $pagename = $pagename->getName(); - } elseif (isa($pagename, 'WikiDB_PageRevision')) { + } elseif (is_a($pagename, 'WikiDB_PageRevision')) { $page = $pagename->getPage(); $args['version'] = $pagename->getVersion(); $pagename = $page->getName(); - } elseif (isa($pagename, 'WikiPageName')) { + } elseif (is_a($pagename, 'WikiPageName')) { $anchor = $pagename->anchor; $pagename = $pagename->name; } else { // php5 @@ -898,11 +897,11 @@ function _pagename($page) { - if (isa($page, 'WikiDB_Page')) + if (is_a($page, 'WikiDB_Page')) return $page->getName(); - elseif (isa($page, 'WikiDB_PageRevision')) + elseif (is_a($page, 'WikiDB_PageRevision')) return $page->getPageName(); - elseif (isa($page, 'WikiPageName')) + elseif (is_a($page, 'WikiPageName')) return $page->name; return $page; } @@ -1516,23 +1515,6 @@ // Class introspections -/** - * Determine whether object is of a specified type. - * In PHP builtin since 4.2.0 as is_a() - * is_a() deprecated in PHP 5, in favor of instanceof operator - * @param $object object An object. - * @param $class string Class name. - * @return bool True iff $object is a $class - * or a sub-type of $class. - */ -function isa($object, $class) -{ - $lclass = $class; - return is_object($object) - && (strtolower(get_class($object)) == strtolower($class) - || is_subclass_of($obje... [truncated message content] |
From: <var...@us...> - 2014-10-10 16:23:31
|
Revision: 9246 http://sourceforge.net/p/phpwiki/code/9246 Author: vargenau Date: 2014-10-10 16:23:28 +0000 (Fri, 10 Oct 2014) Log Message: ----------- function GetPageType is static Modified Paths: -------------- trunk/lib/PageType.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-10-10 16:03:31 UTC (rev 9245) +++ trunk/lib/PageType.php 2014-10-10 16:23:28 UTC (rev 9246) @@ -76,7 +76,7 @@ * @param string $name Name of the page type. * @return PageType An object which is a subclass of PageType. */ - function GetPageType($name = '') + static function GetPageType($name = '') { if (!$name) $name = 'wikitext'; @@ -351,6 +351,7 @@ if (!$this->_map) return '(?:(?!a)a)'; // Never matches. + $qkeys = array(); foreach (array_keys($this->_map) as $moniker) $qkeys[] = preg_quote($moniker, '/'); return "(?:" . join("|", $qkeys) . ")"; @@ -363,7 +364,7 @@ { /** * @param WikiDB_Page $page - * @param hash $meta Version meta-data. + * @param array $meta Version meta-data hash. */ function __construct(&$page, $meta) { @@ -424,13 +425,14 @@ { $map = $this->_getMap($pagetext); if (!$map) - return HTML::p("<No interwiki map found>"); // Shouldn't happen. + return HTML::p("No interwiki map found"); // Shouldn't happen. $mon_attr = array('class' => 'interwiki-moniker'); $url_attr = array('class' => 'interwiki-url'); $thead = HTML::thead(HTML::tr(HTML::th($mon_attr, _("Moniker")), HTML::th($url_attr, _("InterWiki Address")))); + $rows = array(); foreach ($map as $moniker => $interurl) { $rows[] = HTML::tr(HTML::td($mon_attr, new Cached_WikiLinkIfKnown($moniker)), HTML::td($url_attr, HTML::samp($interurl))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 16:03:34
|
Revision: 9245 http://sourceforge.net/p/phpwiki/code/9245 Author: vargenau Date: 2014-10-10 16:03:31 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/themes/Sidebar/themeinfo.php trunk/themes/blog/themeinfo.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-10-10 15:45:46 UTC (rev 9244) +++ trunk/lib/WikiTheme.php 2014-10-10 16:03:31 UTC (rev 9245) @@ -189,7 +189,7 @@ /** * noinit: Do not initialize unnecessary items in default_theme fallback twice. */ - function WikiTheme($theme_name = 'default', $noinit = false) + function __construct($theme_name = 'default', $noinit = false) { $this->_name = $theme_name; $this->_themes_dir = NormalizeLocalFileName("themes"); @@ -752,6 +752,8 @@ return $path; } + public $_linkIcons; + function setLinkIcon($proto, $image = false) { if (!$image) @@ -784,6 +786,8 @@ $this->_linkIcon = $where; } + public $_buttonAliases; + function addButtonAlias($text, $alias = false) { $aliases = &$this->_buttonAliases; @@ -795,6 +799,8 @@ $aliases[$text] = $alias; } + public $dumped_buttons; + function getButtonURL($text) { $aliases = &$this->_buttonAliases; @@ -825,6 +831,8 @@ return $url; } + public $_button_path; + function _findButton($button_file) { if (empty($this->_button_path)) @@ -1235,6 +1243,7 @@ } } + public $_headers_printed; /** * Add a random header element to head * TODO: first css, then js. Maybe separate it into addJSHeaders/addCSSHeaders @@ -1681,7 +1690,7 @@ * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. */ - function Button($text, $url, $class = '', $options = array()) + function __construct($text, $url, $class = '', $options = array()) { global $request; $this->_init('a', array('href' => $url)); @@ -1714,9 +1723,9 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function ImageButton($text, $url, $class, $img_url, $img_attr = array()) + function __construct($text, $url, $class, $img_url, $img_attr = array()) { - $this->__construct('a', array('href' => $url)); + parent::__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this @@ -1746,10 +1755,9 @@ * @param $class string The CSS class for the button. * @param $options array Additional attributes for the <input> tag. */ - function SubmitButton($text, $name = '', $class = '', $options = array()) + function __construct($text, $name = '', $class = '', $options = array()) { - $this->__construct('input', array('type' => 'submit', - 'value' => $text)); + parent::__construct('input', array('type' => 'submit', 'value' => $text)); if ($name) $this->setAttr('name', $name); if ($class) @@ -1775,9 +1783,9 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) + function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) { - $this->__construct('input', array('type' => 'image', + parent::__construct('input', array('type' => 'image', 'src' => $img_url, 'alt' => $text)); if ($name) @@ -1808,7 +1816,7 @@ class SidebarBox { - function SidebarBox($title, $body) + function __construct($title, $body) { require_once 'lib/WikiPlugin.php'; $this->title = $title; @@ -1831,21 +1839,16 @@ public $_plugin, $_args = false, $_basepage = false; - function PluginSidebarBox($name, $args = false, $basepage = false) + function __construct($name, $args = false, $basepage = false) { require_once 'lib/WikiPlugin.php'; $loader = new WikiPluginLoader(); $plugin = $loader->getPlugin($name); if (!$plugin) { - return $loader->_error(sprintf(_("Plugin %s: undefined"), - $name)); + $loader->_error(sprintf(_("Plugin %s: undefined"), $name)); + return; } - /* - if (!method_exists($plugin, 'box')) { - return $loader->_error(sprintf(_("%s: has no box method"), - get_class($plugin))); - }*/ $this->_plugin =& $plugin; $this->_args = $args ? $args : array(); $this->_basepage = $basepage; @@ -1862,7 +1865,7 @@ // Various boxes which are no plugins class RelatedLinksBox extends SidebarBox { - function RelatedLinksBox($title = false, $body = '', $limit = 20) + function __construct($title = false, $body = '', $limit = 20) { global $request; $this->title = $title ? $title : _("Related Links"); @@ -1885,7 +1888,7 @@ class RelatedExternalLinksBox extends SidebarBox { - function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) + function __construct($title = false, $body = '', $limit = 20) { global $request; $this->title = $title ? $title : _("External Links"); Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2014-10-10 15:45:46 UTC (rev 9244) +++ trunk/themes/Sidebar/themeinfo.php 2014-10-10 16:03:31 UTC (rev 9245) @@ -36,7 +36,7 @@ function __construct($theme_name = 'Sidebar') { - $this->WikiTheme($theme_name); + parent::__construct($theme_name); //$this->calendarInit(true); } Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2014-10-10 15:45:46 UTC (rev 9244) +++ trunk/themes/blog/themeinfo.php 2014-10-10 16:03:31 UTC (rev 9245) @@ -48,7 +48,7 @@ function __construct($theme_name = 'blog') { - $this->WikiTheme($theme_name); + parent::__construct($theme_name); $this->calendarInit(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 15:45:55
|
Revision: 9244 http://sourceforge.net/p/phpwiki/code/9244 Author: vargenau Date: 2014-10-10 15:45:46 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Moving highlight.js to themes/default Modified Paths: -------------- trunk/themes/Crao/templates/bottom.tmpl trunk/themes/Crao/templates/head.tmpl trunk/themes/blog/templates/bottom.tmpl trunk/themes/default/templates/bottom.tmpl trunk/themes/default/templates/head.tmpl trunk/themes/fusionforge/templates/bottom.tmpl trunk/themes/wikilens/templates/head.tmpl Added Paths: ----------- trunk/themes/default/highlight.js/ Removed Paths: ------------- trunk/highlight.js/ Modified: trunk/themes/Crao/templates/bottom.tmpl =================================================================== --- trunk/themes/Crao/templates/bottom.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/Crao/templates/bottom.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -1,7 +1,7 @@ <!-- Add your Disclaimer here --> <?php echo $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML() ?> <?php if (defined('DEBUG') and DEBUG) { ?><?php echo Template('debug') ?><?php } ?> -<script type="text/javascript" src="<?php echo DATA_PATH ?>/highlight.js/highlight.pack.js"></script> +<script type="text/javascript" src="<?php echo DATA_PATH ?>/themes/default/highlight.js/highlight.pack.js"></script> <script> hljs.tabReplace = ' '; hljs.initHighlightingOnLoad(); Modified: trunk/themes/Crao/templates/head.tmpl =================================================================== --- trunk/themes/Crao/templates/head.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/Crao/templates/head.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -11,7 +11,7 @@ <meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> -<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> +<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/themes/default/highlight.js/styles/github.css"/> <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?> <link rel="home" title="<?php echo HOME_PAGE?>" href="<?php echo WikiURL(HOME_PAGE)?>" /> <link rel="help" title="<?php echo Modified: trunk/themes/blog/templates/bottom.tmpl =================================================================== --- trunk/themes/blog/templates/bottom.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/blog/templates/bottom.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -4,7 +4,7 @@ <?php if (DEBUG & _DEBUG_VERBOSE) { ?><?php echo Template('debug') ?><?php } ?> <?php } ?> <!--/span--> -<script type="text/javascript" src="<?php echo DATA_PATH ?>/highlight.js/highlight.pack.js"></script> +<script type="text/javascript" src="<?php echo DATA_PATH ?>/themes/default/highlight.js/highlight.pack.js"></script> <script> hljs.tabReplace = ' '; hljs.initHighlightingOnLoad(); Modified: trunk/themes/default/templates/bottom.tmpl =================================================================== --- trunk/themes/default/templates/bottom.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/default/templates/bottom.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -4,7 +4,7 @@ <?php echo $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML() ?> <?php if (defined('DEBUG') and DEBUG & 1) { ?><?php echo Template('debug') ?><?php } ?> <?php } ?> -<script type="text/javascript" src="<?php echo DATA_PATH ?>/highlight.js/highlight.pack.js"></script> +<script type="text/javascript" src="<?php echo DATA_PATH ?>/themes/default/highlight.js/highlight.pack.js"></script> <script> hljs.tabReplace = ' '; hljs.initHighlightingOnLoad(); Modified: trunk/themes/default/templates/head.tmpl =================================================================== --- trunk/themes/default/templates/head.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/default/templates/head.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -15,7 +15,7 @@ <meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> -<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> +<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/themes/default/highlight.js/styles/github.css"/> <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?> <link rel="home" title="<?php echo HOME_PAGE?>" href="<?php echo WikiURL(HOME_PAGE)?>" /> <link rel="help" title="<?php echo Modified: trunk/themes/fusionforge/templates/bottom.tmpl =================================================================== --- trunk/themes/fusionforge/templates/bottom.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/fusionforge/templates/bottom.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -5,7 +5,7 @@ <?php echo Template('debug') ?> <?php } ?> <?php } ?> -<script type="text/javascript" src="/wiki/highlight.js/highlight.pack.js"></script> +<script type="text/javascript" src="/wiki/themes/default/highlight.js/highlight.pack.js"></script> <script> hljs.tabReplace = ' '; hljs.initHighlightingOnLoad(); Modified: trunk/themes/wikilens/templates/head.tmpl =================================================================== --- trunk/themes/wikilens/templates/head.tmpl 2014-10-10 14:52:59 UTC (rev 9243) +++ trunk/themes/wikilens/templates/head.tmpl 2014-10-10 15:45:46 UTC (rev 9244) @@ -11,7 +11,7 @@ <meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> -<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> +<link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/themes/default/highlight.js/styles/github.css"/> <?php /* The next few lines are wrapped in an odd manner to allow gettext string extraction: cd locale;make */ ?> <link rel="home" title="<?php echo HOME_PAGE?>" href="<?php echo WikiURL(HOME_PAGE)?>" /> <link rel="help" title="<?php echo _("HowToUseWiki")?>" href="<?php echo WikiURL( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 14:53:02
|
Revision: 9243 http://sourceforge.net/p/phpwiki/code/9243 Author: vargenau Date: 2014-10-10 14:52:59 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Create branch release-1.5.2 Added Paths: ----------- branches/release-1.5.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 14:41:08
|
Revision: 9242 http://sourceforge.net/p/phpwiki/code/9242 Author: vargenau Date: 2014-10-10 14:41:06 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Create tag release-1.5.2 Added Paths: ----------- tags/release-1.5.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 08:43:57
|
Revision: 9241 http://sourceforge.net/p/phpwiki/code/9241 Author: vargenau Date: 2014-10-10 08:43:49 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Add warning_msg as synonym of warning Modified Paths: -------------- trunk/themes/MonoBook/monobook.css trunk/themes/Sidebar/sidebar.css trunk/themes/Wordpress/Wordpress.css trunk/themes/default/phpwiki.css Modified: trunk/themes/MonoBook/monobook.css =================================================================== --- trunk/themes/MonoBook/monobook.css 2014-10-10 08:22:57 UTC (rev 9240) +++ trunk/themes/MonoBook/monobook.css 2014-10-10 08:43:49 UTC (rev 9241) @@ -1926,7 +1926,7 @@ clear: both; } -.warning { +.warning, .warning_msg { color: black; background-color: #eee; margin-top: 1em; Modified: trunk/themes/Sidebar/sidebar.css =================================================================== --- trunk/themes/Sidebar/sidebar.css 2014-10-10 08:22:57 UTC (rev 9240) +++ trunk/themes/Sidebar/sidebar.css 2014-10-10 08:43:49 UTC (rev 9241) @@ -1955,7 +1955,7 @@ clear: both; } -.warning { +.warning, .warning_msg { color: black; background-color: #FFCCCC; margin-top: 1em; Modified: trunk/themes/Wordpress/Wordpress.css =================================================================== --- trunk/themes/Wordpress/Wordpress.css 2014-10-10 08:22:57 UTC (rev 9240) +++ trunk/themes/Wordpress/Wordpress.css 2014-10-10 08:43:49 UTC (rev 9241) @@ -620,7 +620,7 @@ clear: both; } -.warning { +.warning, .warning_msg { color: black; background: #eee; margin-top: 1em; Modified: trunk/themes/default/phpwiki.css =================================================================== --- trunk/themes/default/phpwiki.css 2014-10-10 08:22:57 UTC (rev 9240) +++ trunk/themes/default/phpwiki.css 2014-10-10 08:43:49 UTC (rev 9241) @@ -666,7 +666,7 @@ clear: both; } -.warning { +.warning, .warning_msg { color: black; background: #eee; margin-top: 1em; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-10 08:23:06
|
Revision: 9240 http://sourceforge.net/p/phpwiki/code/9240 Author: vargenau Date: 2014-10-10 08:22:57 +0000 (Fri, 10 Oct 2014) Log Message: ----------- Translate error message Modified Paths: -------------- trunk/lib/ErrorManager.php trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/lib/ErrorManager.php 2014-10-10 08:22:57 UTC (rev 9240) @@ -261,11 +261,13 @@ echo "<html>\n"; echo "<head>\n"; echo "<meta charset=\"UTF-8\" />\n"; - echo "<title>Fatal Error</title>\n"; + echo "<title>"._('Fatal PhpWiki Error')."</title>\n"; echo '<link rel="stylesheet" type="text/css" href="themes/default/phpwiki.css" />'."\n"; echo "</head>\n"; echo "<body>\n"; - echo "<div style=\"font-weight:bold; color:red;\">Fatal Error:</div>\n"; + echo '<div style="font-weight:bold; color:red;">'; + echo _('Fatal PhpWiki Error')._(':'); + echo "</div>\n"; if (defined('DEBUG') and (DEBUG & _DEBUG_TRACE)) { echo "error_reporting=", error_reporting(), "\n<br />"; Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/de.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -482,6 +482,12 @@ msgid "%s: error while handling error:" msgstr "%s: Fehler während der Fehlerbehandlung von:" +msgid "Fatal PhpWiki Error" +msgstr "Fataler PhpWiki-Fehler" + +msgid ":" +msgstr ":" + #, php-format msgid "File “%s” not found." msgstr "Datei »%s« nicht gefunden." @@ -984,9 +990,6 @@ msgid "%s: Bad action" msgstr "%s: Ungültige Aktion" -msgid "Fatal PhpWiki Error" -msgstr "Fataler PhpWiki-Fehler" - msgid "PageDump" msgstr "SeiteSpeichern" @@ -5313,9 +5316,6 @@ "Wenn Sie diese Seite jetzt speichern, wird die aktuelle Version " "überschrieben." -msgid ":" -msgstr ":" - msgid "H" msgstr "H." Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/es.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -477,6 +477,12 @@ msgid "%s: error while handling error:" msgstr "%s: error mientras que maneja error:" +msgid "Fatal PhpWiki Error" +msgstr "Error Fatal De PhpWiki" + +msgid ":" +msgstr ":" + #, php-format msgid "File “%s” not found." msgstr "Fichero “%s” no encontrado." @@ -965,9 +971,6 @@ msgid "%s: Bad action" msgstr "%s: Mala acción" -msgid "Fatal PhpWiki Error" -msgstr "Error Fatal De PhpWiki" - msgid "PageDump" msgstr "DescargeDeLaPágina" @@ -5187,9 +5190,6 @@ msgid "Saving this page will overwrite the current version." msgstr "Ahorrando esta página sobreescribirá la versión actual." -msgid ":" -msgstr ":" - msgid "H" msgstr "Al" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/fr.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -478,6 +478,12 @@ msgid "%s: error while handling error:" msgstr "%s : erreur pendant la gestion de l'erreur :" +msgid "Fatal PhpWiki Error" +msgstr "Erreur fatale de PhpWiki" + +msgid ":" +msgstr " :" + #, php-format msgid "File “%s” not found." msgstr "Fichier « %s » non trouvé." @@ -964,9 +970,6 @@ msgid "%s: Bad action" msgstr "%s : mauvaise action" -msgid "Fatal PhpWiki Error" -msgstr "Erreur fatale de PhpWiki" - msgid "PageDump" msgstr "RécupérationDeLaPage" @@ -5243,9 +5246,6 @@ msgid "Saving this page will overwrite the current version." msgstr "Enregistrer cette page écrasera la version actuelle." -msgid ":" -msgstr " :" - msgid "H" msgstr "H" Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/it.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -467,6 +467,12 @@ msgid "%s: error while handling error:" msgstr "" +msgid "Fatal PhpWiki Error" +msgstr "Errore Fatale Di PhpWiki" + +msgid ":" +msgstr "" + #, php-format msgid "File “%s” not found." msgstr "File «%s» non trovato." @@ -951,9 +957,6 @@ msgid "%s: Bad action" msgstr "" -msgid "Fatal PhpWiki Error" -msgstr "Errore Fatale Di PhpWiki" - msgid "PageDump" msgstr "" @@ -5133,9 +5136,6 @@ msgid "Saving this page will overwrite the current version." msgstr "" -msgid ":" -msgstr "" - msgid "H" msgstr "A" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/ja.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -455,6 +455,12 @@ msgid "%s: error while handling error:" msgstr "" +msgid "Fatal PhpWiki Error" +msgstr "致命的なPhpWikiのエラーです。" + +msgid ":" +msgstr "" + #, php-format msgid "File “%s” not found." msgstr "%s: ファイルが見つかりません。" @@ -949,9 +955,6 @@ msgid "%s: Bad action" msgstr "%s: 正しくない操作です。" -msgid "Fatal PhpWiki Error" -msgstr "致命的なPhpWikiのエラーです。" - msgid "PageDump" msgstr "" @@ -5291,9 +5294,6 @@ msgid "Saving this page will overwrite the current version." msgstr "" -msgid ":" -msgstr "" - msgid "H" msgstr "高さ" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/nl.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -460,6 +460,12 @@ msgid "%s: error while handling error:" msgstr "" +msgid "Fatal PhpWiki Error" +msgstr "PhpWiki Fatale Fout" + +msgid ":" +msgstr "" + #, php-format msgid "File “%s” not found." msgstr "" @@ -942,9 +948,6 @@ msgid "%s: Bad action" msgstr "" -msgid "Fatal PhpWiki Error" -msgstr "PhpWiki Fatale Fout" - msgid "PageDump" msgstr "" @@ -5125,9 +5128,6 @@ msgid "Saving this page will overwrite the current version." msgstr "" -msgid ":" -msgstr "" - msgid "H" msgstr "H" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/phpwiki.pot 2014-10-10 08:22:57 UTC (rev 9240) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -454,6 +454,12 @@ msgid "%s: error while handling error:" msgstr "" +msgid "Fatal PhpWiki Error" +msgstr "" + +msgid ":" +msgstr "" + #, php-format msgid "File “%s” not found." msgstr "" @@ -936,9 +942,6 @@ msgid "%s: Bad action" msgstr "" -msgid "Fatal PhpWiki Error" -msgstr "" - msgid "PageDump" msgstr "" @@ -5117,9 +5120,6 @@ msgid "Saving this page will overwrite the current version." msgstr "" -msgid ":" -msgstr "" - msgid "H" msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/sv.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -455,6 +455,12 @@ msgid "%s: error while handling error:" msgstr "" +msgid "Fatal PhpWiki Error" +msgstr "PhpWiki Fatal Error" + +msgid ":" +msgstr "" + #, php-format msgid "File “%s” not found." msgstr "Fila “%s” ingen funna." @@ -937,9 +943,6 @@ msgid "%s: Bad action" msgstr "" -msgid "Fatal PhpWiki Error" -msgstr "PhpWiki Fatal Error" - msgid "PageDump" msgstr "" @@ -5118,9 +5121,6 @@ msgid "Saving this page will overwrite the current version." msgstr "" -msgid ":" -msgstr "" - msgid "H" msgstr "H" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-10-09 18:39:11 UTC (rev 9239) +++ trunk/locale/po/zh.po 2014-10-10 08:22:57 UTC (rev 9240) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-07 19:10+0200\n" +"POT-Creation-Date: 2014-10-10 10:22+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -478,6 +478,12 @@ msgid "%s: error while handling error:" msgstr "%s: 處理錯誤時發生錯誤:" +msgid "Fatal PhpWiki Error" +msgstr "致命的 PhpWiki 錯誤" + +msgid ":" +msgstr ":" + #, php-format msgid "File “%s” not found." msgstr "%s 找不到檔案." @@ -979,9 +985,6 @@ msgid "%s: Bad action" msgstr "%s: 錯誤的動作" -msgid "Fatal PhpWiki Error" -msgstr "致命的 PhpWiki 錯誤" - msgid "PageDump" msgstr "" @@ -5383,9 +5386,6 @@ msgid "Saving this page will overwrite the current version." msgstr "儲存此頁面將會覆寫掉目前版本." -msgid ":" -msgstr ":" - msgid "H" msgstr "高" Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-09 18:39:18
|
Revision: 9239 http://sourceforge.net/p/phpwiki/code/9239 Author: vargenau Date: 2014-10-09 18:39:11 +0000 (Thu, 09 Oct 2014) Log Message: ----------- Add class variables Modified Paths: -------------- trunk/lib/diff.php trunk/lib/diff3.php trunk/lib/difflib.php Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2014-10-09 18:37:59 UTC (rev 9238) +++ trunk/lib/diff.php 2014-10-09 18:39:11 UTC (rev 9239) @@ -12,7 +12,7 @@ class _HWLDF_WordAccumulator { - function _HWLDF_WordAccumulator() + function __construct() { $this->_lines = array(); $this->_line = false; @@ -129,6 +129,15 @@ */ class HtmlUnifiedDiffFormatter extends UnifiedDiffFormatter { + /** + * @var HtmlElement + */ + public $_top; + /** + * @var HtmlElement + */ + public $_block; + function __construct($context_lines = 4) { parent::__construct($context_lines); @@ -199,6 +208,13 @@ ///////////////////////////////////////////////////////////////// +/** + * @param string $label + * @param WikiDB_PageRevision $rev + * @param WikiRequest $request + * @param bool $is_current + * @return $this|HtmlElement + */ function PageInfoRow($label, $rev, &$request, $is_current = false) { global $WikiTheme; @@ -230,6 +246,9 @@ return $row; } +/** + * @param WikiRequest $request + */ function showDiff(&$request) { $pagename = $request->getArg('pagename'); @@ -243,7 +262,6 @@ } // abort if page doesn't exist - $dbi = $request->getDbh(); $page = $request->getPage(); $current = $page->getCurrentRevision(false); if ($current->getVersion() < 1) { @@ -280,12 +298,10 @@ $others = array('major', 'minor'); break; case 'minor': - $previous = 'minor'; $old = $page->getRevisionBefore($new); $old_version = _("previous revision"); $others = array('major', 'author'); break; - case 'major': default: $old = $new; while ($old && $old->get('is_minor_edit')) Modified: trunk/lib/diff3.php =================================================================== --- trunk/lib/diff3.php 2014-10-09 18:37:59 UTC (rev 9238) +++ trunk/lib/diff3.php 2014-10-09 18:39:11 UTC (rev 9239) @@ -44,7 +44,7 @@ { public $type = 'copy'; - function __construct($lines = false) + function __construct($lines = array()) { $this->orig = $lines ? $lines : array(); $this->final1 = &$this->orig; @@ -64,6 +64,10 @@ class _Diff3_BlockBuilder { + public $orig; + public $final1; + public $final2; + function __construct() { $this->_init(); Modified: trunk/lib/difflib.php =================================================================== --- trunk/lib/difflib.php 2014-10-09 18:37:59 UTC (rev 9238) +++ trunk/lib/difflib.php 2014-10-09 18:39:11 UTC (rev 9239) @@ -115,6 +115,16 @@ */ class _DiffEngine { + public $xchanged; + public $ychanged; + public $xv; + public $yv; + public $xind; + public $yind; + public $lcs; + public $seq; + public $in_seq; + function diff($from_lines, $to_lines) { $n_from = sizeof($from_lines); @@ -612,6 +622,8 @@ * Check a Diff for validity. * * This is here only for debugging purposes. + * @param string $from_lines + * @param string $to_lines */ function _check($from_lines, $to_lines) { @@ -863,7 +875,7 @@ */ class UnifiedDiffFormatter extends DiffFormatter { - function UnifiedDiffFormatter($context_lines = 4) + function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-09 18:38:02
|
Revision: 9238 http://sourceforge.net/p/phpwiki/code/9238 Author: vargenau Date: 2014-10-09 18:37:59 +0000 (Thu, 09 Oct 2014) Log Message: ----------- Update PHP Doc Modified Paths: -------------- trunk/lib/Request.php trunk/lib/WikiDB.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-10-09 18:36:52 UTC (rev 9237) +++ trunk/lib/Request.php 2014-10-09 18:37:59 UTC (rev 9238) @@ -79,6 +79,10 @@ } } + /** + * @param $key + * @return string|bool + */ function getArg($key) { if (isset($this->args[$key])) Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-10-09 18:36:52 UTC (rev 9237) +++ trunk/lib/WikiDB.php 2014-10-09 18:37:59 UTC (rev 9238) @@ -1133,7 +1133,7 @@ * * @param bool $need_content * - * @return WikiDB_PageRevision The requested WikiDB_PageRevision object, or false if the + * @return WikiDB_PageRevision|bool The requested WikiDB_PageRevision object, or false if the * requested revision does not exist in the {@link WikiDB}. Note that * unless $version is greater than zero, a revision (perhaps version zero, * the default revision) will always be found. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |