From: <var...@us...> - 2021-02-22 14:08:54
|
Revision: 10251 http://sourceforge.net/p/phpwiki/code/10251 Author: vargenau Date: 2021-02-22 14:08:53 +0000 (Mon, 22 Feb 2021) Log Message: ----------- plugin BackLinks: better test boolean arguments "noheader" and "include_self" Modified Paths: -------------- trunk/lib/plugin/BackLinks.php Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2021-02-22 12:38:19 UTC (rev 10250) +++ trunk/lib/plugin/BackLinks.php 2021-02-22 14:08:53 UTC (rev 10251) @@ -67,6 +67,23 @@ } extract($args); + + if (($include_self == '0') || ($include_self == 'false')) { + $include_self = false; + } elseif (($include_self == '1') || ($include_self == 'true')) { + $include_self = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "include_self")); + } + + 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($page) and $page != '0') { return ''; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |