From: <var...@us...> - 2021-06-17 15:44:39
|
Revision: 10295 http://sourceforge.net/p/phpwiki/code/10295 Author: vargenau Date: 2021-06-17 15:44:38 +0000 (Thu, 17 Jun 2021) Log Message: ----------- Use same parameter name in subclasses Modified Paths: -------------- trunk/lib/plugin/BackLinks.php trunk/lib/plugin/FullTextSearch.php trunk/lib/plugin/LinkDatabase.php trunk/lib/plugin/LinkSearch.php trunk/lib/plugin/ListPages.php trunk/lib/plugin/ListSubpages.php trunk/lib/plugin/SemanticSearch.php trunk/lib/plugin/WantedPages.php trunk/lib/plugin/WikiAdminUtils.php trunk/lib/plugin/WikiTranslation.php Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/BackLinks.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -211,9 +211,9 @@ // how many links from this backLink to other pages class _PageList_Column_BackLinks_count extends _PageList_Column { - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - $iter = $page->getPageLinks(); + $iter = $page_handle->getPageLinks(); $count = $iter->count(); return $count; } Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/FullTextSearch.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -205,11 +205,11 @@ parent::__construct($params[0], $params[1], $params[2]); } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - $pagename = $page->getName(); + $pagename = $page_handle->getName(); $count = count($this->parentobj->_wpagelist[$pagename]); - return LinkURL(WikiURL($page, array('action' => 'BackLinks'), false), + return LinkURL(WikiURL($page_handle, array('action' => 'BackLinks'), false), fmt("(%d Links)", $count)); } } Modified: trunk/lib/plugin/LinkDatabase.php =================================================================== --- trunk/lib/plugin/LinkDatabase.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/LinkDatabase.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -224,10 +224,10 @@ class _PageList_Column_LinkDatabase_links extends _PageList_Column { - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { $out = HTML(); - $links = $page->getPageLinks(); + $links = $page_handle->getPageLinks(); while ($link = $links->next()) { $out->pushContent(" ", WikiLink($link)); } Modified: trunk/lib/plugin/LinkSearch.php =================================================================== --- trunk/lib/plugin/LinkSearch.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/LinkSearch.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -198,10 +198,12 @@ $this->_pagelist =& $pagelist; } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - if (is_object($page)) $text = $page->getName(); - else $text = $page; + if (is_object($page_handle)) + $text = $page_handle->getName(); + else + $text = $page_handle; $link = $this->_pagelist->_links[$this->current_row]; return WikiLink($link['linkvalue'], 'if_known'); } Modified: trunk/lib/plugin/ListPages.php =================================================================== --- trunk/lib/plugin/ListPages.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/ListPages.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -146,9 +146,9 @@ parent::__construct($field, $display, 'center'); } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - $iter = $page->getLinks($this->_direction); + $iter = $page_handle->getLinks($this->_direction); $count = $iter->count(); return $count; } Modified: trunk/lib/plugin/ListSubpages.php =================================================================== --- trunk/lib/plugin/ListSubpages.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/ListSubpages.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -136,9 +136,9 @@ // how many backlinks for this subpage class _PageList_Column_ListSubpages_count extends _PageList_Column { - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - $iter = $page->getBackLinks(); + $iter = $page_handle->getBackLinks(); $count = $iter->count(); return $count; } Modified: trunk/lib/plugin/SemanticSearch.php =================================================================== --- trunk/lib/plugin/SemanticSearch.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/SemanticSearch.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -472,7 +472,7 @@ $this->_pagelist =& $pagelist; } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { $link = $this->_pagelist->_links[$this->current_row]; return WikiLink($link['linkname'], 'if_known'); @@ -482,7 +482,7 @@ class _PageList_Column_SemanticSearch_link extends _PageList_Column_SemanticSearch_relation { - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { $link = $this->_pagelist->_links[$this->current_row]; if ($this->_field != 'value') Modified: trunk/lib/plugin/WantedPages.php =================================================================== --- trunk/lib/plugin/WantedPages.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/WantedPages.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -176,10 +176,10 @@ parent::__construct($params[0], $params[1], $params[2]); } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { $html = false; - $pagename = $page->getName(); + $pagename = $page_handle->getName(); foreach ($this->parentobj->_wpagelist[$pagename] as $page) { if ($html) $html->pushContent(', ', WikiLink($page)); @@ -201,9 +201,9 @@ parent::__construct($params[0], $params[1], $params[2]); } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - $pagename = $page->getName(); + $pagename = $page_handle->getName(); $count = count($this->parentobj->_wpagelist[$pagename]); return LinkURL(WikiURL($page, array('action' => 'BackLinks'), false), fmt("(%d Links)", $count)); Modified: trunk/lib/plugin/WikiAdminUtils.php =================================================================== --- trunk/lib/plugin/WikiAdminUtils.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/WikiAdminUtils.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -315,9 +315,9 @@ class _PageList_Column_email extends _PageList_Column { - function _getValue($prefs, $dummy) + function _getValue($page_handle, $revision_handle) { - return $prefs->get('email'); + return $page_handle->get('email'); } } @@ -324,15 +324,15 @@ class _PageList_Column_emailVerified extends _PageList_Column { - function _getValue($prefs, $status) + function _getValue($page_handle, $revision_handle) { - $name = $prefs->get('userid'); + $name = $page_handle->get('userid'); $input = HTML::input(array('type' => 'checkbox', 'name' => 'wikiadminutils[verified][' . $name . ']', 'value' => 1)); - if ($prefs->get('emailVerified')) + if ($page_handle->get('emailVerified')) $input->setAttr('checked', '1'); - if ($status) + if ($revision_handle) $input->setAttr('disabled', '1'); return HTML($input, HTML::input (array('type' => 'hidden', Modified: trunk/lib/plugin/WikiTranslation.php =================================================================== --- trunk/lib/plugin/WikiTranslation.php 2021-06-17 14:34:02 UTC (rev 10294) +++ trunk/lib/plugin/WikiTranslation.php 2021-06-17 15:44:38 UTC (rev 10295) @@ -516,10 +516,12 @@ _PageList_Column_base::__construct($this->_field); } - function _getValue($page, $revision_handle) + function _getValue($page_handle, $revision_handle) { - if (is_object($page)) $text = $page->getName(); - else $text = $page; + if (is_object($page_handle)) + $text = $page_handle->getName(); + else + $text = $page_handle; $trans = $this->_plugin->fast_translate($text, $this->_field, $this->_from_lang); // how to markup untranslated words and not existing pages? @@ -547,10 +549,10 @@ $text->setAttr('style', 'text-decoration:line-through'); $link->pushContent($text); return $link; - } elseif (is_object($page)) + } elseif (is_object($page_handle)) return ''; else // not existing: empty return ''; - } elseif (is_object($page)) { + } elseif (is_object($page_handle)) { if (!$this->_nolinks) return WikiLink($trans, 'auto'); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |