Revision: 10264
http://sourceforge.net/p/phpwiki/code/10264
Author: vargenau
Date: 2021-02-22 20:44:05 +0000 (Mon, 22 Feb 2021)
Log Message:
-----------
plugin RecentReferrers: better test boolean argument "noheader"
Modified Paths:
--------------
trunk/lib/plugin/RecentReferrers.php
Modified: trunk/lib/plugin/RecentReferrers.php
===================================================================
--- trunk/lib/plugin/RecentReferrers.php 2021-02-22 20:38:42 UTC (rev 10263)
+++ trunk/lib/plugin/RecentReferrers.php 2021-02-22 20:44:05 UTC (rev 10264)
@@ -61,6 +61,16 @@
return HTML::div(array('class' => "error"), _("Error: no ACCESS_LOG"));
}
$args = $this->getArgs($argstr, $request);
+
+ $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"));
+ }
+
$table = HTML::table(array('class' => 'pagelist'));
if (!$args['noheader'] and !empty($args['caption']))
$table->pushContent(HTML::caption(array('style' => 'caption-side:top'), $args['caption']));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|