From: <var...@us...> - 2021-02-22 18:37:24
|
Revision: 10257 http://sourceforge.net/p/phpwiki/code/10257 Author: vargenau Date: 2021-02-22 18:37:22 +0000 (Mon, 22 Feb 2021) Log Message: ----------- plugin LinkSearch: better test boolean arguments "noform" and "noheader" Modified Paths: -------------- trunk/lib/plugin/LinkSearch.php Modified: trunk/lib/plugin/LinkSearch.php =================================================================== --- trunk/lib/plugin/LinkSearch.php 2021-02-22 18:28:34 UTC (rev 10256) +++ trunk/lib/plugin/LinkSearch.php 2021-02-22 18:37:22 UTC (rev 10257) @@ -137,6 +137,22 @@ { $args = $this->getArgs($argstr, $request); + if (($noform == '0') || ($noform == 'false')) { + $noform = false; + } elseif (($noform == '1') || ($noform == 'true')) { + $noform = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "noform")); + } + + if (($noheader == '0') || ($noheader == 'false')) { + $noheader = false; + } elseif (($noheader == '1') || ($noheader == 'true')) { + $noheader = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "noheader")); + } + if (empty($args['page'])) $args['page'] = "*"; $form = $this->showForm($dbi, $request, $args); @@ -158,7 +174,7 @@ if (!$noheader) { // We put the form into the caption just to be able to return one pagelist object, // and to still have the convenience form at the top. we could workaround this by - // putting the form as WikiFormRich into the actionpage. but thid doesnt look as + // putting the form as WikiFormRich into the actionpage. But this does not look as // nice as this here. $pagelist->setCaption ( // on mozilla the form doesn't fit into the caption very well. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |