From: <var...@us...> - 2021-02-23 19:00:51
|
Revision: 10275 http://sourceforge.net/p/phpwiki/code/10275 Author: vargenau Date: 2021-02-23 19:00:50 +0000 (Tue, 23 Feb 2021) Log Message: ----------- plugin WikiForum: better test boolean argument "noheader" Modified Paths: -------------- trunk/lib/plugin/WikiForum.php Modified: trunk/lib/plugin/WikiForum.php =================================================================== --- trunk/lib/plugin/WikiForum.php 2021-02-23 18:03:47 UTC (rev 10274) +++ trunk/lib/plugin/WikiForum.php 2021-02-23 19:00:50 UTC (rev 10275) @@ -75,10 +75,20 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + if (!$args['pagename']) { return $this->error(sprintf(_("A required argument “%s” is missing."), 'pagename')); } + $noheader = $args['noheader']; + 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")); + } + // Get our form args. $forum = $request->getArg('forum'); $request->setArg('forum', false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |