From: <var...@us...> - 2014-11-26 13:47:39
|
Revision: 9384 http://sourceforge.net/p/phpwiki/code/9384 Author: vargenau Date: 2014-11-26 13:47:32 +0000 (Wed, 26 Nov 2014) Log Message: ----------- Remove unused parameters Modified Paths: -------------- trunk/lib/plugin/DebugBackendInfo.php Modified: trunk/lib/plugin/DebugBackendInfo.php =================================================================== --- trunk/lib/plugin/DebugBackendInfo.php 2014-11-26 13:39:34 UTC (rev 9383) +++ trunk/lib/plugin/DebugBackendInfo.php 2014-11-26 13:47:32 UTC (rev 9384) @@ -54,7 +54,6 @@ extract($args); if (empty($userid) or $userid == $request->_user->UserName()) { $user = $request->_user; - $userid = $user->UserName(); } else { $user = WikiUser($userid); } @@ -141,7 +140,7 @@ $data[$key] = HTML::pre(ob_get_contents()); ob_end_clean(); } elseif (is_bool($val)) { - $data[$key] = $this->_showvalue($key, $val ? "true" : "false", $prefix); + $data[$key] = $this->_showvalue($val ? "true" : "false"); } elseif (is_string($val) && ((substr($val, 0, 2) == 'a:' or (substr($val, 0, 2) == 'O:'))) ) { @@ -194,14 +193,13 @@ HTML::raw(' '))), HTML::td(array( 'style' => 'color:black; background-color:white'), - $this->_showvalue($key, $val, $prefix)) + $this->_showvalue($val)) ); } return $rows; } - /* also used in plugin/EditMetaData */ - protected function _showvalue($key, $val, $prefix = '') + private function _showvalue($val) { return $val ? $val : HTML::raw(' '); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-01-07 15:45:56
|
Revision: 10231 http://sourceforge.net/p/phpwiki/code/10231 Author: vargenau Date: 2021-01-07 15:45:54 +0000 (Thu, 07 Jan 2021) Log Message: ----------- lib/plugin/DebugBackendInfo.php: no need for a table if no pagedata Modified Paths: -------------- trunk/lib/plugin/DebugBackendInfo.php Modified: trunk/lib/plugin/DebugBackendInfo.php =================================================================== --- trunk/lib/plugin/DebugBackendInfo.php 2021-01-07 11:13:17 UTC (rev 10230) +++ trunk/lib/plugin/DebugBackendInfo.php 2021-01-07 15:45:54 UTC (rev 10231) @@ -70,14 +70,13 @@ $this->readonly_pagemeta = array(); $this->hidden_pagemeta = array('_cached_html'); - $html = HTML(HTML::h2(fmt("Querying backend directly for “%s”", - $page))); + $html = HTML(HTML::h2(fmt("Querying backend directly for “%s”", $page))); $table = HTML::table(array('class' => 'bordered')); $pagedata = $backend->get_pagedata($page); if (!$pagedata) { - // FIXME: invalid HTML $html->pushContent(HTML::p(fmt("No pagedata for %s", $page))); + return $html; } else { $this->_fixupData($pagedata); $table->pushContent($this->_showhash("get_pagedata('$page')", $pagedata)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2022-01-23 12:10:35
|
Revision: 10930 http://sourceforge.net/p/phpwiki/code/10930 Author: vargenau Date: 2022-01-23 12:10:34 +0000 (Sun, 23 Jan 2022) Log Message: ----------- Make ?action=DebugBackendInfo work Modified Paths: -------------- trunk/lib/plugin/DebugBackendInfo.php Modified: trunk/lib/plugin/DebugBackendInfo.php =================================================================== --- trunk/lib/plugin/DebugBackendInfo.php 2022-01-23 11:44:12 UTC (rev 10929) +++ trunk/lib/plugin/DebugBackendInfo.php 2022-01-23 12:10:34 UTC (rev 10930) @@ -66,7 +66,8 @@ } if (empty($page)) { - return $this->error("page missing"); + $page = $request->getPage(); + $page = $page->getName(); } if (!is_bool($notallversions)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2023-07-13 19:30:52
|
Revision: 11047 http://sourceforge.net/p/phpwiki/code/11047 Author: vargenau Date: 2023-07-13 19:30:51 +0000 (Thu, 13 Jul 2023) Log Message: ----------- DebugBackendInfo.php: make functions _fixupData and _showhash public Modified Paths: -------------- trunk/lib/plugin/DebugBackendInfo.php Modified: trunk/lib/plugin/DebugBackendInfo.php =================================================================== --- trunk/lib/plugin/DebugBackendInfo.php 2023-07-13 17:15:41 UTC (rev 11046) +++ trunk/lib/plugin/DebugBackendInfo.php 2023-07-13 19:30:51 UTC (rev 11047) @@ -30,12 +30,12 @@ public $readonly_pagemeta; public $hidden_pagemeta; - public function getDescription() + public function getDescription(): string { return sprintf(_("Get debugging information for %s."), '[pagename]'); } - public function getDefaultArguments() + public function getDefaultArguments(): array { return array('page' => '[pagename]', 'notallversions' => false); @@ -142,7 +142,7 @@ * Really should have a _fixupPagedata and _fixupVersiondata, but this works. * also used in plugin/EditMetaData */ - protected function _fixupData(&$data, $prefix = '') + public function _fixupData(&$data, $prefix = '') { if (!is_array($data)) { return; @@ -204,7 +204,7 @@ } /* also used in plugin/EditMetaData */ - protected function _showhash($heading, $hash, $prefix = '') + public function _showhash($heading, $hash, $prefix = ''): array { $rows = array(); if ($heading) { @@ -246,7 +246,7 @@ return $rows; } - private function _showvalue($val) + private function _showvalue($val): RawXml { return $val ? $val : HTML::raw(' '); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |