From 79ab3277e886468d419643d51cb934794e4fd0a3 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 16 Apr 2013 14:03:08 +0000 Subject: [PATCH] Add private keyword for functions git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8748 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/AnalyseAccessLogSql.php | 12 ++++++------ lib/plugin/AppendText.php | 4 ++-- lib/plugin/BackLinks.php | 2 +- lib/plugin/Calendar.php | 6 +++--- lib/plugin/CalendarList.php | 4 ++-- lib/plugin/CreateToc.php | 16 ++++++++-------- lib/plugin/EditMetaData.php | 2 +- lib/plugin/ExternalSearch.php | 2 +- lib/plugin/FileInfo.php | 2 +- lib/plugin/FoafViewer.php | 2 +- lib/plugin/FullTextSearch.php | 4 ++-- lib/plugin/FuzzyPages.php | 4 ++-- lib/plugin/GraphViz.php | 2 +- lib/plugin/HtmlConverter.php | 8 ++++---- lib/plugin/InterWikiSearch.php | 4 ++-- lib/plugin/LikePages.php | 2 +- lib/plugin/LinkDatabase.php | 2 +- lib/plugin/LinkSearch.php | 4 ++-- lib/plugin/ListPages.php | 4 ++-- lib/plugin/ListSubpages.php | 2 +- lib/plugin/ModeratedPage.php | 2 +- lib/plugin/OldStyleTable.php | 2 +- lib/plugin/PageHistory.php | 2 +- lib/plugin/PluginManager.php | 6 +++--- lib/plugin/RateIt.php | 2 +- lib/plugin/RecentChanges.php | 14 +++++++------- lib/plugin/SemanticSearch.php | 6 +++--- lib/plugin/SyncWiki.php | 12 ++++++------ lib/plugin/SystemInfo.php | 2 +- lib/plugin/Transclude.php | 2 +- lib/plugin/WantedPages.php | 8 ++++---- lib/plugin/WantedPagesOld.php | 6 +++--- lib/plugin/WikiAdminRemove.php | 2 +- lib/plugin/WikiAdminRename.php | 2 +- lib/plugin/WikiAdminSelect.php | 2 +- lib/plugin/WikiAdminUtils.php | 24 ++++++++++++------------ lib/plugin/WikiBlog.php | 10 +++++----- lib/plugin/WikiFormRich.php | 2 +- lib/plugin/WikicreoleTable.php | 4 ++-- lib/plugin/_AuthInfo.php | 4 ++-- lib/plugin/_BackendInfo.php | 6 +++--- lib/plugin/_Retransform.php | 2 +- lib/plugin/_WikiTranslation.php | 4 ++-- 43 files changed, 107 insertions(+), 107 deletions(-) diff --git a/lib/plugin/AnalyseAccessLogSql.php b/lib/plugin/AnalyseAccessLogSql.php index c8c9d8d6e..f2bd30712 100644 --- a/lib/plugin/AnalyseAccessLogSql.php +++ b/lib/plugin/AnalyseAccessLogSql.php @@ -53,7 +53,7 @@ class WikiPlugin_AnalyseAccessLogSql * ."WHERE referer IS NOT NULL " * .$where_conditions */ - function _getQueryString(&$args) + private function _getQueryString(&$args) { // extract any parametrised conditions from the arguments, // in particular, how much history to select @@ -224,7 +224,7 @@ class WikiPlugin_AnalyseAccessLogSql /** Honeypot for xgettext. Those strings are translated dynamically. */ - function _locale_dummy() + private function _locale_dummy() { $dummy = array( // mode caption @@ -304,7 +304,7 @@ class WikiPlugin_AnalyseAccessLogSql $tbody); } - function _getQueryResults($query, &$dbi) + private function _getQueryResults($query, &$dbi) { $queryResult = $dbi->genericSqlIter($query); if (!$queryResult) { @@ -325,7 +325,7 @@ class WikiPlugin_AnalyseAccessLogSql return $tbody; } - function _setHeaders($row) + private function _setHeaders($row) { if (!$this->_headerSet) { foreach ($row as $key => $value) { @@ -335,7 +335,7 @@ class WikiPlugin_AnalyseAccessLogSql } } - function _getWhereConditions(&$args) + private function _getWhereConditions(&$args) { $where_conditions = ''; @@ -389,7 +389,7 @@ class WikiPlugin_AnalyseAccessLogSql return $where_conditions; } - function _getCaption(&$args) + private function _getCaption(&$args) { $caption = $args['caption']; if ($caption == '') diff --git a/lib/plugin/AppendText.php b/lib/plugin/AppendText.php index 5478de05f..aa38b460d 100644 --- a/lib/plugin/AppendText.php +++ b/lib/plugin/AppendText.php @@ -54,7 +54,7 @@ class WikiPlugin_AppendText ); } - function _fallback($addtext, $oldtext, $notfound, &$message) + private function _fallback($addtext, $oldtext, $notfound, &$message) { $message->pushContent(sprintf(_("%s not found"), $notfound) . ". " . _("Appending at the end.") . "\n"); @@ -78,7 +78,7 @@ class WikiPlugin_AppendText } } - function _work($pagename, $args, $dbi, &$request) + private function _work($pagename, $args, $dbi, &$request) { if (empty($args['s'])) { if ($request->isPost()) { diff --git a/lib/plugin/BackLinks.php b/lib/plugin/BackLinks.php index 479118e1e..089f1271e 100644 --- a/lib/plugin/BackLinks.php +++ b/lib/plugin/BackLinks.php @@ -179,7 +179,7 @@ class WikiPlugin_BackLinks // how many links from this backLink to other pages class _PageList_Column_BackLinks_count extends _PageList_Column { - function _getValue($page, &$revision_handle) + private function _getValue($page, &$revision_handle) { $iter = $page->getPageLinks(); $count = $iter->count(); diff --git a/lib/plugin/Calendar.php b/lib/plugin/Calendar.php index 417454e36..df2ad25d0 100644 --- a/lib/plugin/Calendar.php +++ b/lib/plugin/Calendar.php @@ -76,7 +76,7 @@ class WikiPlugin_Calendar } } - function __header($pagename, $time) + private function __header($pagename, $time) { $args = &$this->args; @@ -111,7 +111,7 @@ class WikiPlugin_Calendar $row))); } - function __daynames($start_wday) + private function __daynames($start_wday) { $time = mktime(12, 0, 0, 1, 1, 2001); $t = localtime($time, 1); @@ -136,7 +136,7 @@ class WikiPlugin_Calendar return $row; } - function __date($dbi, $time) + private function __date($dbi, $time) { $args = &$this->args; diff --git a/lib/plugin/CalendarList.php b/lib/plugin/CalendarList.php index 0b12709ae..2c40b0ec2 100644 --- a/lib/plugin/CalendarList.php +++ b/lib/plugin/CalendarList.php @@ -97,7 +97,7 @@ class WikiPlugin_CalendarList } } - function _count_events($dbi, $n = 7, $direction = 1) + private function _count_events($dbi, $n = 7, $direction = 1) { // This is used by the last_n/next_n options to determine the date that // accounts for the number of N events in the past/future. @@ -120,7 +120,7 @@ class WikiPlugin_CalendarList return $timeTMP; } - function _date($dbi, $time) + private function _date($dbi, $time) { $args = &$this->args; $date_string = strftime($args['date_format'], $time); diff --git a/lib/plugin/CreateToc.php b/lib/plugin/CreateToc.php index 982296d9c..32bae9927 100644 --- a/lib/plugin/CreateToc.php +++ b/lib/plugin/CreateToc.php @@ -72,14 +72,14 @@ class WikiPlugin_CreateToc } // Initialisation of toc counter - function _initTocCounter() + private function _initTocCounter() { $counter = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0); return $counter; } // Update toc counter with a new title - function _tocCounter(&$counter, $level) + private function _tocCounter(&$counter, $level) { $counter[$level]++; for ($i = $level + 1; $i <= 5; $i++) { @@ -87,7 +87,7 @@ class WikiPlugin_CreateToc } } - function _roman_counter($number) + private function _roman_counter($number) { $n = intval($number); @@ -104,7 +104,7 @@ class WikiPlugin_CreateToc return $result; } - function _letter_counter($number) + private function _letter_counter($number) { if ($number <= 26) { return chr(ord("A") + $number - 1); @@ -114,7 +114,7 @@ class WikiPlugin_CreateToc } // Get string corresponding to the current title - function _getCounter(&$counter, $level, $firstlevelstyle) + private function _getCounter(&$counter, $level, $firstlevelstyle) { if ($firstlevelstyle == 'roman') { $str = $this->_roman_counter($counter[1]); @@ -131,7 +131,7 @@ class WikiPlugin_CreateToc } // Get HTML header corresponding to current level (level is set of ! or =) - function _getHeader($level) + private function _getHeader($level) { $count = substr_count($level, '!'); @@ -159,7 +159,7 @@ class WikiPlugin_CreateToc return ""; } - function _quote($heading) + private function _quote($heading) { if (TOC_FULL_SYNTAX) { $theading = TransformInline($heading); @@ -234,7 +234,7 @@ class WikiPlugin_CreateToc /** prevent from duplicate anchors, * beautify spaces: " " => "_" and not "x20." */ - function _nextAnchor($s) + private function _nextAnchor($s) { static $anchors = array(); diff --git a/lib/plugin/EditMetaData.php b/lib/plugin/EditMetaData.php index f2c11538d..54680ff39 100644 --- a/lib/plugin/EditMetaData.php +++ b/lib/plugin/EditMetaData.php @@ -163,7 +163,7 @@ class WikiPlugin_EditMetaData return $html; } - function _showvalue($key, $val, $prefix = '') + private function _showvalue($key, $val, $prefix = '') { if (is_array($val) or is_object($val)) return $val; if (in_array($key, $this->hidden_pagemeta)) return ''; diff --git a/lib/plugin/ExternalSearch.php b/lib/plugin/ExternalSearch.php index 3c2ac8b49..75a204a57 100644 --- a/lib/plugin/ExternalSearch.php +++ b/lib/plugin/ExternalSearch.php @@ -47,7 +47,7 @@ class WikiPlugin_ExternalSearch //fixme: better description } - function _getInterWikiUrl(&$request) + private function _getInterWikiUrl(&$request) { $intermap = getInterwikiMap(); $map = $intermap->_map; diff --git a/lib/plugin/FileInfo.php b/lib/plugin/FileInfo.php index 7634aa4af..75482ea77 100644 --- a/lib/plugin/FileInfo.php +++ b/lib/plugin/FileInfo.php @@ -197,7 +197,7 @@ class WikiPlugin_FileInfo return ''; } - function _formatsize($n, $factor, $suffix = '') + private function _formatsize($n, $factor, $suffix = '') { if ($n > $factor) { $b = $n / $factor; diff --git a/lib/plugin/FoafViewer.php b/lib/plugin/FoafViewer.php index 044365170..1e2417e27 100644 --- a/lib/plugin/FoafViewer.php +++ b/lib/plugin/FoafViewer.php @@ -57,7 +57,7 @@ class WikiPlugin_FoafViewer { // The handler is handled okay. The only problem is that it still // throws a fatal. - function _error_handler($error) + private function _error_handler($error) { if (strstr($error->errstr, "Failed opening required 'XML/FOAF/Parser.php'")) return true; diff --git a/lib/plugin/FullTextSearch.php b/lib/plugin/FullTextSearch.php index 05eaa29a0..a854cf9d6 100644 --- a/lib/plugin/FullTextSearch.php +++ b/lib/plugin/FullTextSearch.php @@ -157,13 +157,13 @@ class WikiPlugin_FullTextSearch */ class _PageList_Column_hilight extends _PageList_Column { - function _PageList_Column_WantedPages_links(&$params) + private function _PageList_Column_WantedPages_links(&$params) { $this->parentobj =& $params[3]; $this->_PageList_Column($params[0], $params[1], $params[2]); } - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { $pagename = $page->getName(); $count = count($this->parentobj->_wpagelist[$pagename]); diff --git a/lib/plugin/FuzzyPages.php b/lib/plugin/FuzzyPages.php index c9a088b3f..55bf58e02 100644 --- a/lib/plugin/FuzzyPages.php +++ b/lib/plugin/FuzzyPages.php @@ -173,14 +173,14 @@ class WikiPlugin_FuzzyPages return $this->formatTable($this->_list, $dbi); } - function _pushDebugHeadingTDinto(&$row) + private function _pushDebugHeadingTDinto(&$row) { $row->pushContent(HTML::td(_("Spelling Score")), HTML::td(_("Sound Score")), HTML::td('Metaphones')); } - function _pushDebugTDinto(&$row, $pagename) + private function _pushDebugTDinto(&$row, $pagename) { // This actually calculates everything a second time for each pagename // so the individual scores can be displayed separately for debugging. diff --git a/lib/plugin/GraphViz.php b/lib/plugin/GraphViz.php index 81be6df7c..92ed7ad80 100644 --- a/lib/plugin/GraphViz.php +++ b/lib/plugin/GraphViz.php @@ -73,7 +73,7 @@ class WikiPlugin_GraphViz extends WikiPluginCached { - function _mapTypes() + private function _mapTypes() { return array("imap", "cmapx", "ismap", "cmap"); } diff --git a/lib/plugin/HtmlConverter.php b/lib/plugin/HtmlConverter.php index 450213f81..4f1f53e4f 100644 --- a/lib/plugin/HtmlConverter.php +++ b/lib/plugin/HtmlConverter.php @@ -95,7 +95,7 @@ class WikiPlugin_HtmlConverter extends WikiPlugin return $result; } - function _processA(&$file) + private function _processA(&$file) { $file = eregi_replace( @@ -104,7 +104,7 @@ class WikiPlugin_HtmlConverter extends WikiPlugin $file = eregi_replace("{{([-/a-zA-Z0-9._~#@%$?&=:\200-\377\(\)[:space:]]+)}}([^<]+)", "[ \\2 | \\1 ]", $file); } - function _processIMG(&$file) + private function _processIMG(&$file) { $img_regexp = "_]*>_"; @@ -112,7 +112,7 @@ class WikiPlugin_HtmlConverter extends WikiPlugin $file = preg_replace($img_regexp, "\n\n[Upload:\\1]", $file); } - function _processUL(&$file) + private function _processUL(&$file) { // put any
  • -Tag in a new line to indent correctly and strip trailing white space (including new-lines) @@ -132,7 +132,7 @@ class WikiPlugin_HtmlConverter extends WikiPlugin } } - function _process($file_name) + private function _process($file_name) { $result = HTML(); $file = file_get_contents($file_name); diff --git a/lib/plugin/InterWikiSearch.php b/lib/plugin/InterWikiSearch.php index 84a0a43c4..060a1c8c3 100644 --- a/lib/plugin/InterWikiSearch.php +++ b/lib/plugin/InterWikiSearch.php @@ -84,12 +84,12 @@ if (defined('DEBUG') && DEBUG) { $this->_transform($this->_getFooter($text))); } - function _formatMap() + private function _formatMap() { return $this->_arrayToTable($this->_getMap(), $GLOBALS['request']); } - function _arrayToTable($array, &$request) + private function _arrayToTable($array, &$request) { $thead = HTML::thead(); $label[0] = _("Wiki Name"); diff --git a/lib/plugin/LikePages.php b/lib/plugin/LikePages.php index 4b6aa489f..7600f9ecd 100644 --- a/lib/plugin/LikePages.php +++ b/lib/plugin/LikePages.php @@ -110,7 +110,7 @@ class WikiPlugin_LikePages return $pagelist; } - function _quote($str) + private function _quote($str) { return "'" . str_replace("'", "''", $str) . "'"; } diff --git a/lib/plugin/LinkDatabase.php b/lib/plugin/LinkDatabase.php index 01d5d3fe3..34d879398 100644 --- a/lib/plugin/LinkDatabase.php +++ b/lib/plugin/LinkDatabase.php @@ -188,7 +188,7 @@ class WikiPlugin_LinkDatabase class _PageList_Column_LinkDatabase_links extends _PageList_Column { - function _getValue($page, &$revision_handle) + private function _getValue($page, &$revision_handle) { $out = HTML(); $links = $page->getPageLinks(); diff --git a/lib/plugin/LinkSearch.php b/lib/plugin/LinkSearch.php index bb2fbd887..3b4c654c0 100644 --- a/lib/plugin/LinkSearch.php +++ b/lib/plugin/LinkSearch.php @@ -168,7 +168,7 @@ function dirsign_switch() { class _PageList_Column_LinkSearch_link extends _PageList_Column { - function _PageList_Column_LinkSearch_link($field, $heading, &$pagelist) + private function _PageList_Column_LinkSearch_link($field, $heading, &$pagelist) { $this->_field = $field; $this->_heading = $heading; @@ -177,7 +177,7 @@ class _PageList_Column_LinkSearch_link $this->_pagelist =& $pagelist; } - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { if (is_object($page)) $text = $page->getName(); else $text = $page; diff --git a/lib/plugin/ListPages.php b/lib/plugin/ListPages.php index f77a6c2e5..d0d937ea5 100644 --- a/lib/plugin/ListPages.php +++ b/lib/plugin/ListPages.php @@ -135,13 +135,13 @@ class WikiPlugin_ListPages // how many back-/forwardlinks for this page class _PageList_Column_ListPages_count extends _PageList_Column { - function _PageList_Column_ListPages_count($field, $display, $backwards = false) + private function _PageList_Column_ListPages_count($field, $display, $backwards = false) { $this->_direction = $backwards; return $this->_PageList_Column($field, $display, 'center'); } - function _getValue($page, &$revision_handle) + private function _getValue($page, &$revision_handle) { $iter = $page->getLinks($this->_direction); $count = $iter->count(); diff --git a/lib/plugin/ListSubpages.php b/lib/plugin/ListSubpages.php index fbd937c36..c37b63c9b 100644 --- a/lib/plugin/ListSubpages.php +++ b/lib/plugin/ListSubpages.php @@ -116,7 +116,7 @@ class WikiPlugin_ListSubpages // how many backlinks for this subpage class _PageList_Column_ListSubpages_count extends _PageList_Column { - function _getValue($page, &$revision_handle) + private function _getValue($page, &$revision_handle) { $iter = $page->getBackLinks(); $count = $iter->count(); diff --git a/lib/plugin/ModeratedPage.php b/lib/plugin/ModeratedPage.php index 179561eaa..1c1ba70e6 100644 --- a/lib/plugin/ModeratedPage.php +++ b/lib/plugin/ModeratedPage.php @@ -371,7 +371,7 @@ class WikiPlugin_ModeratedPage } } - function _approval_form(&$request, $args, $moderation, $pass = 'approve') + private function _approval_form(&$request, $args, $moderation, $pass = 'approve') { $header = HTML::h3(_("Please approve or reject this request:")); diff --git a/lib/plugin/OldStyleTable.php b/lib/plugin/OldStyleTable.php index c1bd14fbe..5d5eed321 100644 --- a/lib/plugin/OldStyleTable.php +++ b/lib/plugin/OldStyleTable.php @@ -118,7 +118,7 @@ class WikiPlugin_OldStyleTable return $table; } - function _parse_row($line, $basepage) + private function _parse_row($line, $basepage) { $brkt_link = "\\[ .*? [^]\s] .*? \\]"; $cell_content = "(?: [^[] | " . ESCAPE_CHAR . "\\[ | $brkt_link )*?"; diff --git a/lib/plugin/PageHistory.php b/lib/plugin/PageHistory.php index fb77d9f44..8ee9a26b0 100644 --- a/lib/plugin/PageHistory.php +++ b/lib/plugin/PageHistory.php @@ -25,7 +25,7 @@ require_once 'lib/plugin/RecentChanges.php'; class _PageHistory_PageRevisionIter extends WikiDB_PageRevisionIterator { - function _PageHistory_PageRevisionIter($rev_iter, $params) + private function _PageHistory_PageRevisionIter($rev_iter, $params) { $this->_iter = $rev_iter; diff --git a/lib/plugin/PluginManager.php b/lib/plugin/PluginManager.php index d7fbfd3a0..6a48e7ac1 100644 --- a/lib/plugin/PluginManager.php +++ b/lib/plugin/PluginManager.php @@ -62,12 +62,12 @@ class WikiPlugin_PluginManager return $h; } - function _generatePageheader(&$info, &$html) + private function _generatePageheader(&$info, &$html) { $html->pushContent(HTML::p($this->getDescription())); } - function _generateColheadings(&$info, &$table) + private function _generateColheadings(&$info, &$table) { // table headings $tr = HTML::tr(); @@ -80,7 +80,7 @@ class WikiPlugin_PluginManager $table->pushContent(HTML::thead($tr)); } - function _generateTableBody(&$info, &$dbi, &$request, &$table) + private function _generateTableBody(&$info, &$dbi, &$request, &$table) { global $AllAllowedPlugins; diff --git a/lib/plugin/RateIt.php b/lib/plugin/RateIt.php index 272caca0b..81fa461ff 100644 --- a/lib/plugin/RateIt.php +++ b/lib/plugin/RateIt.php @@ -127,7 +127,7 @@ var rateit_action = '" . urlencode("RateIt") . "'; * Take a string and quote it sufficiently to be passed as a Javascript * string between ''s */ - function _javascript_quote_string($s) + private function _javascript_quote_string($s) { return str_replace("'", "\'", $s); } diff --git a/lib/plugin/RecentChanges.php b/lib/plugin/RecentChanges.php index 97c0d388f..849873f76 100644 --- a/lib/plugin/RecentChanges.php +++ b/lib/plugin/RecentChanges.php @@ -28,7 +28,7 @@ class _RecentChanges_Formatter var $_absurls = false; var $action = "RecentChanges"; - function _RecentChanges_Formatter($rc_args) + private function _RecentChanges_Formatter($rc_args) { $this->_args = $rc_args; $this->_diffargs = array('action' => 'diff'); @@ -1515,7 +1515,7 @@ class OptionsButtonBars extends HtmlElement $this->pushContent($table); } - function _makeDayButton($days_button, $days) + private function _makeDayButton($days_button, $days) { global $request; @@ -1533,7 +1533,7 @@ class OptionsButtonBars extends HtmlElement return ($days_button == $days) ? $selected : $unselected; } - function _makeUsersButton($users) + private function _makeUsersButton($users) { global $request; @@ -1554,7 +1554,7 @@ class OptionsButtonBars extends HtmlElement HTML::a(array('href' => $url, 'class' => 'wiki-rc-action'), $label)); } - function _makePagesButton($pages) + private function _makePagesButton($pages) { global $request; @@ -1575,7 +1575,7 @@ class OptionsButtonBars extends HtmlElement HTML::a(array('href' => $url, 'class' => 'wiki-rc-action'), $label)); } - function _makeMinorButton($minor_button, $show_minor) + private function _makeMinorButton($minor_button, $show_minor) { global $request; @@ -1587,7 +1587,7 @@ class OptionsButtonBars extends HtmlElement return ($minor_button == $show_minor) ? $selected : $unselected; } - function _makeShowAllButton($showall_button, $show_all) + private function _makeShowAllButton($showall_button, $show_all) { global $request; @@ -1599,7 +1599,7 @@ class OptionsButtonBars extends HtmlElement return ($showall_button == $show_all) ? $selected : $unselected; } - function _makeNewPagesButton($newpages_button, $only_new) + private function _makeNewPagesButton($newpages_button, $only_new) { global $request; diff --git a/lib/plugin/SemanticSearch.php b/lib/plugin/SemanticSearch.php index c71fb1111..5028a1949 100644 --- a/lib/plugin/SemanticSearch.php +++ b/lib/plugin/SemanticSearch.php @@ -435,7 +435,7 @@ class WikiPlugin_SemanticSearch class _PageList_Column_SemanticSearch_relation extends _PageList_Column { - function _PageList_Column_SemanticSearch_relation($field, $heading, &$pagelist) + private function _PageList_Column_SemanticSearch_relation($field, $heading, &$pagelist) { $this->_field = $field; $this->_heading = $heading; @@ -444,7 +444,7 @@ class _PageList_Column_SemanticSearch_relation $this->_pagelist =& $pagelist; } - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { $link = $this->_pagelist->_links[$this->current_row]; return WikiLink($link['linkname'], 'if_known'); @@ -454,7 +454,7 @@ class _PageList_Column_SemanticSearch_relation class _PageList_Column_SemanticSearch_link extends _PageList_Column_SemanticSearch_relation { - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { $link = $this->_pagelist->_links[$this->current_row]; if ($this->_field != 'value') diff --git a/lib/plugin/SyncWiki.php b/lib/plugin/SyncWiki.php index 82cc8ed7f..8cad057fb 100644 --- a/lib/plugin/SyncWiki.php +++ b/lib/plugin/SyncWiki.php @@ -87,7 +87,7 @@ class WikiPlugin_SyncWiki return $this->_makeButton($request, $args, $label); } - function _do_syncwiki(&$request, $args) + private function _do_syncwiki(&$request, $args) { longer_timeout(240); @@ -250,7 +250,7 @@ class WikiPlugin_SyncWiki } /* path must have ending slash */ - function _dir($path) + private function _dir($path) { $dh = @opendir($path); while ($filename = readdir($dh)) { @@ -265,7 +265,7 @@ class WikiPlugin_SyncWiki closedir($dh); } - function _addConflict($what, $args, $our, $extdate = null) + private function _addConflict($what, $args, $our, $extdate = null) { $pagename = $our->getName(); $meb = Button(array('action' => $args['action'], @@ -285,7 +285,7 @@ class WikiPlugin_SyncWiki } // TODO: store log or checkpoint for restauration? - function _import($args, $our, $extdate = null) + private function _import($args, $our, $extdate = null) { $reaction = 'import '; if ($args['noimport']) return ($reaction . _("skipped")); @@ -309,7 +309,7 @@ class WikiPlugin_SyncWiki } // TODO: store log or checkpoint for restauration? - function _export($args, $our) + private function _export($args, $our) { global $request; $reaction = 'export '; @@ -338,7 +338,7 @@ class WikiPlugin_SyncWiki } // TODO: store log or checkpoint for restauration? - function _upload($args, $path, $timeout) + private function _upload($args, $path, $timeout) { $reaction = 'upload '; if ($args['noupload']) return ($reaction . _("skipped")); diff --git a/lib/plugin/SystemInfo.php b/lib/plugin/SystemInfo.php index d2c33b26a..3ea663182 100644 --- a/lib/plugin/SystemInfo.php +++ b/lib/plugin/SystemInfo.php @@ -211,7 +211,7 @@ class WikiPlugin_SystemInfo } // numeric array - function _stats($hits, $treshold = 10.0) + private function _stats($hits, $treshold = 10.0) { sort($hits); reset($hits); diff --git a/lib/plugin/Transclude.php b/lib/plugin/Transclude.php index 636f9ce9f..98ca54233 100644 --- a/lib/plugin/Transclude.php +++ b/lib/plugin/Transclude.php @@ -132,7 +132,7 @@ class WikiPlugin_Transclude * * @access private */ - function _js() + private function _js() { static $seen = false; diff --git a/lib/plugin/WantedPages.php b/lib/plugin/WantedPages.php index ac5d9e0ae..c85c82a66 100644 --- a/lib/plugin/WantedPages.php +++ b/lib/plugin/WantedPages.php @@ -147,13 +147,13 @@ class WikiPlugin_WantedPages // which links to the missing page class _PageList_Column_WantedPages_wanted extends _PageList_Column { - function _PageList_Column_WantedPages_wanted(&$params) + private function _PageList_Column_WantedPages_wanted(&$params) { $this->parentobj =& $params[3]; $this->_PageList_Column($params[0], $params[1], $params[2]); } - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { $html = false; $pagename = $page->getName(); @@ -172,13 +172,13 @@ class _PageList_Column_WantedPages_wanted extends _PageList_Column */ class _PageList_Column_WantedPages_links extends _PageList_Column { - function _PageList_Column_WantedPages_links(&$params) + private function _PageList_Column_WantedPages_links(&$params) { $this->parentobj =& $params[3]; $this->_PageList_Column($params[0], $params[1], $params[2]); } - function _getValue(&$page, $revision_handle) + private function _getValue(&$page, $revision_handle) { $pagename = $page->getName(); $count = count($this->parentobj->_wpagelist[$pagename]); diff --git a/lib/plugin/WantedPagesOld.php b/lib/plugin/WantedPagesOld.php index 9908e117b..e5e2e5516 100644 --- a/lib/plugin/WantedPagesOld.php +++ b/lib/plugin/WantedPagesOld.php @@ -152,7 +152,7 @@ class WikiPlugin_WantedPagesOld } } - function _generateTable($caption) + private function _generateTable($caption) { if (count($this->pagelist) > 0) { @@ -187,7 +187,7 @@ class WikiPlugin_WantedPagesOld return $table; } - function _generateList($caption) + private function _generateList($caption) { $list = HTML(); $c = count($this->pagelist); @@ -202,7 +202,7 @@ class WikiPlugin_WantedPagesOld return $list; } - function _iterateLinks($page_handle, $dbi) + private function _iterateLinks($page_handle, $dbi) { $links_iter = $page_handle->getLinks($reversed = false); while ($link_handle = $links_iter->next()) { diff --git a/lib/plugin/WikiAdminRemove.php b/lib/plugin/WikiAdminRemove.php index a07a6de0d..58c801734 100644 --- a/lib/plugin/WikiAdminRemove.php +++ b/lib/plugin/WikiAdminRemove.php @@ -241,7 +241,7 @@ class WikiPlugin_WikiAdminRemove class _PageList_Column_remove extends _PageList_Column { - function _getValue($page_handle, &$revision_handle) + private function _getValue($page_handle, &$revision_handle) { return Button(array('action' => 'remove'), _("Remove"), $page_handle->getName()); diff --git a/lib/plugin/WikiAdminRename.php b/lib/plugin/WikiAdminRename.php index 001b68244..27622421b 100644 --- a/lib/plugin/WikiAdminRename.php +++ b/lib/plugin/WikiAdminRename.php @@ -310,7 +310,7 @@ class WikiPlugin_WikiAdminRename // moved from lib/PageList.php class _PageList_Column_renamed_pagename extends _PageList_Column { - function _getValue($page_handle, &$revision_handle) + private function _getValue($page_handle, &$revision_handle) { global $request; $post_args = $request->getArg('admin_rename'); diff --git a/lib/plugin/WikiAdminSelect.php b/lib/plugin/WikiAdminSelect.php index 234e2933f..dcef7b8db 100644 --- a/lib/plugin/WikiAdminSelect.php +++ b/lib/plugin/WikiAdminSelect.php @@ -234,7 +234,7 @@ class WikiPlugin_WikiAdminSelect } } - function _tablePush(&$table, $first, $second) + private function _tablePush(&$table, $first, $second) { $table->pushContent( HTML::tr( diff --git a/lib/plugin/WikiAdminUtils.php b/lib/plugin/WikiAdminUtils.php index 361e2303a..1d9904568 100644 --- a/lib/plugin/WikiAdminUtils.php +++ b/lib/plugin/WikiAdminUtils.php @@ -84,7 +84,7 @@ class WikiPlugin_WikiAdminUtils return $this->_makeButton($request, $args, $label); } - function _makeButton(&$request, $args, $label) + private function _makeButton(&$request, $args, $label) { $args['return_url'] = $request->getURLtoSelf(); return HTML::form(array('action' => $request->getPostURL(), @@ -111,7 +111,7 @@ class WikiPlugin_WikiAdminUtils $alert->show(); // noreturn } - function _getLabel($action) + private function _getLabel($action) { $labels = array('purge-cache' => _("Purge Markup Cache"), 'purge-bad-pagenames' => _("Purge all Pages With Invalid Names"), @@ -125,7 +125,7 @@ class WikiPlugin_WikiAdminUtils return @$labels[$action]; } - function _do_purge_cache(&$request, $args) + private function _do_purge_cache(&$request, $args) { $dbi = $request->getDbh(); $pages = $dbi->getAllPages('include_empty'); // Do we really want the empty ones too? @@ -135,7 +135,7 @@ class WikiPlugin_WikiAdminUtils return _("Markup cache purged!"); } - function _do_purge_bad_pagenames(&$request, $args) + private function _do_purge_bad_pagenames(&$request, $args) { // FIXME: this should be moved into WikiDB::normalize() or something... $dbi = $request->getDbh(); @@ -163,7 +163,7 @@ class WikiPlugin_WikiAdminUtils /** * Purge all non-referenced empty pages. Mainly those created by bad link extraction. */ - function _do_purge_empty_pages(&$request, $args) + private function _do_purge_empty_pages(&$request, $args) { $dbi = $request->getDbh(); $count = 0; @@ -198,7 +198,7 @@ class WikiPlugin_WikiAdminUtils : '')); } - function _do_convert_cached_html(&$request, $args) + private function _do_convert_cached_html(&$request, $args) { require_once 'lib/upgrade.php'; @@ -215,7 +215,7 @@ class WikiPlugin_WikiAdminUtils } } - function _do_db_check(&$request, $args) + private function _do_db_check(&$request, $args) { longer_timeout(180); $dbh = $request->getDbh(); @@ -223,7 +223,7 @@ class WikiPlugin_WikiAdminUtils return $dbh->_backend->check($args); } - function _do_db_rebuild(&$request, $args) + private function _do_db_rebuild(&$request, $args) { longer_timeout(240); $dbh = $request->getDbh(); @@ -233,13 +233,13 @@ class WikiPlugin_WikiAdminUtils //TODO: We need a separate plugin for this. // Too many options. - function _do_access_restrictions(&$request, &$args) + private function _do_access_restrictions(&$request, &$args) { return _("Sorry. Access Restrictions not yet implemented"); } // pagelist with enable/disable button - function _do_email_verification(&$request, &$args) + private function _do_email_verification(&$request, &$args) { $dbi = $request->getDbh(); $pagelist = new PageList('pagename', 0, $args); @@ -316,7 +316,7 @@ require_once 'lib/PageList.php'; class _PageList_Column_email extends _PageList_Column { - function _getValue(&$prefs, $dummy) + private function _getValue(&$prefs, $dummy) { return $prefs->get('email'); } @@ -325,7 +325,7 @@ class _PageList_Column_email class _PageList_Column_emailVerified extends _PageList_Column { - function _getValue(&$prefs, $status) + private function _getValue(&$prefs, $status) { $name = $prefs->get('userid'); $input = HTML::input(array('type' => 'checkbox', diff --git a/lib/plugin/WikiBlog.php b/lib/plugin/WikiBlog.php index 61855c98b..92b2a87ac 100644 --- a/lib/plugin/WikiBlog.php +++ b/lib/plugin/WikiBlog.php @@ -306,7 +306,7 @@ class WikiPlugin_WikiBlog // Subpage for the basepage. All Blogs/Forum/Comment entries are // Subpages under this pagename, to find them faster. - function _blogPrefix($type = 'wikiblog') + private function _blogPrefix($type = 'wikiblog') { if ($type == 'wikiblog') $basepage = "Blog"; @@ -317,7 +317,7 @@ class WikiPlugin_WikiBlog return $basepage; } - function _transformOldFormatBlog($rev, $type = 'wikiblog') + private function _transformOldFormatBlog($rev, $type = 'wikiblog') { $page = $rev->getPage(); $metadata = array(); @@ -370,7 +370,7 @@ class WikiPlugin_WikiBlog } // "2004-12" => "December 2004" - function _monthTitle($month) + private function _monthTitle($month) { if (!$month) $month = strftime("%Y-%m"); //list($year,$mon) = explode("-",$month); @@ -378,7 +378,7 @@ class WikiPlugin_WikiBlog } // "UserName/Blog/2004-12-13/12:28:50+01:00" => array('month' => "2004-12", ...) - function _blog($rev_or_page) + private function _blog($rev_or_page) { $pagename = $rev_or_page->getName(); if (preg_match("/^(.*Blog)\/(\d\d\d\d-\d\d)-(\d\d)\/(.*)/", $pagename, $m)) @@ -393,7 +393,7 @@ class WikiPlugin_WikiBlog 'prefix' => $prefix); } - function _nonDefaultArgs($args) + private function _nonDefaultArgs($args) { return array_diff_assoc($args, $this->getDefaultArguments()); } diff --git a/lib/plugin/WikiFormRich.php b/lib/plugin/WikiFormRich.php index 31be47026..380193d24 100644 --- a/lib/plugin/WikiFormRich.php +++ b/lib/plugin/WikiFormRich.php @@ -318,7 +318,7 @@ class WikiPlugin_WikiFormRich return $form; } - function _doautocomplete(&$form, $inputtype, &$input, &$values) + private function _doautocomplete(&$form, $inputtype, &$input, &$values) { global $request; $input['class'] = "dropdown"; diff --git a/lib/plugin/WikicreoleTable.php b/lib/plugin/WikicreoleTable.php index 7361632ff..6e280648f 100644 --- a/lib/plugin/WikicreoleTable.php +++ b/lib/plugin/WikicreoleTable.php @@ -135,7 +135,7 @@ class WikiPlugin_WikicreoleTable return $htmltable; } - function _parse_row($line) + private function _parse_row($line) { $brkt_link = "\\[ .*? [^]\s] .*? \\]"; $cell_content = "(?: [^[] | " . ESCAPE_CHAR . "\\[ | $brkt_link )*?"; @@ -158,7 +158,7 @@ class WikiPlugin_WikicreoleTable * $i and $j: indexes of cell to compute * $imax and $jmax: table dimensions */ - function _compute_tablecell($table, $i, $j, $imax, $jmax) + private function _compute_tablecell($table, $i, $j, $imax, $jmax) { // What is implemented: diff --git a/lib/plugin/_AuthInfo.php b/lib/plugin/_AuthInfo.php index 748d1c902..5a3ff27d3 100644 --- a/lib/plugin/_AuthInfo.php +++ b/lib/plugin/_AuthInfo.php @@ -130,7 +130,7 @@ class WikiPlugin__AuthInfo return $html; } - function _showhash($heading, $hash, $depth = 0) + private function _showhash($heading, $hash, $depth = 0) { static $seen = array(); static $maxdepth = 0; @@ -189,7 +189,7 @@ class WikiPlugin__AuthInfo return $rows; } - function _buildConstHash($constants) + private function _buildConstHash($constants) { $hash = array(); foreach ($constants as $c) { diff --git a/lib/plugin/_BackendInfo.php b/lib/plugin/_BackendInfo.php index 416a6221f..5e86b27e9 100644 --- a/lib/plugin/_BackendInfo.php +++ b/lib/plugin/_BackendInfo.php @@ -108,7 +108,7 @@ class WikiPlugin__BackendInfo * Really should have a _fixupPagedata and _fixupVersiondata, but this works. * also used in plugin/EditMetaData */ - function _fixupData(&$data, $prefix = '') + private function _fixupData(&$data, $prefix = '') { if (!is_array($data)) return; @@ -167,7 +167,7 @@ class WikiPlugin__BackendInfo } /* also used in plugin/EditMetaData */ - function _showhash($heading, $hash, $prefix = '') + private function _showhash($heading, $hash, $prefix = '') { $rows = array(); if ($heading) @@ -194,7 +194,7 @@ class WikiPlugin__BackendInfo } /* also used in plugin/EditMetaData */ - function _showvalue($key, $val, $prefix = '') + private function _showvalue($key, $val, $prefix = '') { return $val ? $val : HTML::raw(' '); } diff --git a/lib/plugin/_Retransform.php b/lib/plugin/_Retransform.php index 69a6b8859..d59d07935 100644 --- a/lib/plugin/_Retransform.php +++ b/lib/plugin/_Retransform.php @@ -70,7 +70,7 @@ class WikiPlugin__Retransform return $html; } - function _DebugPrintArray(&$array) + private function _DebugPrintArray(&$array) { $html = HTML(); foreach ($array as $line) { diff --git a/lib/plugin/_WikiTranslation.php b/lib/plugin/_WikiTranslation.php index 8ba805022..bf79362ca 100644 --- a/lib/plugin/_WikiTranslation.php +++ b/lib/plugin/_WikiTranslation.php @@ -371,7 +371,7 @@ class WikiPlugin__WikiTranslation class _PageList_Column_customlang extends _PageList_Column { - function _PageList_Column_customlang($field, $from_lang, $plugin) + private function _PageList_Column_customlang($field, $from_lang, $plugin) { $this->_field = $field; $this->_from_lang = $from_lang; @@ -387,7 +387,7 @@ class _PageList_Column_customlang extends _PageList_Column $this->_PageList_Column_base($this->_field); } - function _getValue($page, &$revision_handle) + private function _getValue($page, &$revision_handle) { if (is_object($page)) $text = $page->getName(); else $text = $page; -- 2.45.0