From: <var...@us...> - 2021-02-23 08:19:48
|
Revision: 10267 http://sourceforge.net/p/phpwiki/code/10267 Author: vargenau Date: 2021-02-23 08:19:43 +0000 (Tue, 23 Feb 2021) Log Message: ----------- plugin SemanticRelations: better test boolean arguments "noheader" and "nohelp" Modified Paths: -------------- trunk/lib/plugin/SemanticRelations.php trunk/pgsrc/Help%2FSemanticRelationsPlugin Modified: trunk/lib/plugin/SemanticRelations.php =================================================================== --- trunk/lib/plugin/SemanticRelations.php 2021-02-23 08:07:16 UTC (rev 10266) +++ trunk/lib/plugin/SemanticRelations.php 2021-02-23 08:19:43 UTC (rev 10267) @@ -63,6 +63,23 @@ global $WikiTheme; $args = $this->getArgs($argstr, $request); extract($args); + + 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 (($nohelp == '0') || ($nohelp == 'false')) { + $nohelp = false; + } elseif (($nohelp == '1') || ($nohelp == 'true')) { + $nohelp = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "nohelp")); + } + if (empty($page)) $page = $request->getArg('pagename'); $relhtml = HTML(); Modified: trunk/pgsrc/Help%2FSemanticRelationsPlugin =================================================================== --- trunk/pgsrc/Help%2FSemanticRelationsPlugin 2021-02-23 08:07:16 UTC (rev 10266) +++ trunk/pgsrc/Help%2FSemanticRelationsPlugin 2021-02-23 08:19:43 UTC (rev 10267) @@ -1,4 +1,4 @@ -Date: Mon, 22 Feb 2021 19:16:32 +0000 +Date: Tue, 23 Feb 2021 09:16:17 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=Help%2FSemanticRelationsPlugin; @@ -34,8 +34,8 @@ | All |- | **units** +| Not yet implemented. | -| |- | **noheader** | Boolean. If true, header should be omitted. @@ -42,11 +42,10 @@ | false |- | **nohelp** -| +| Boolean. If true, do not display help. | false |} - == Example == {{{ @@ -59,6 +58,8 @@ * [[Help:Reini Urban|Reini Urban]] == See Also == +* [[SemanticRelations]], [[ListRelations]], [[SemanticSearch]] +* [[Help:SemanticSearchPlugin|SemanticSearchPlugin]] <noinclude> ---- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |