From: <var...@us...> - 2021-02-23 08:07:23
|
Revision: 10266 http://sourceforge.net/p/phpwiki/code/10266 Author: vargenau Date: 2021-02-23 08:07:16 +0000 (Tue, 23 Feb 2021) Log Message: ----------- plugin SearchHighlight: better test boolean argument "case_exact" Modified Paths: -------------- trunk/lib/plugin/SearchHighlight.php trunk/pgsrc/Help%2FSearchHighlightPlugin Modified: trunk/lib/plugin/SearchHighlight.php =================================================================== --- trunk/lib/plugin/SearchHighlight.php 2021-02-22 20:47:09 UTC (rev 10265) +++ trunk/lib/plugin/SearchHighlight.php 2021-02-23 08:07:16 UTC (rev 10266) @@ -71,6 +71,15 @@ return HTML(); } extract($args); + + if (($case_exact == '0') || ($case_exact == 'false')) { + $case_exact = false; + } elseif (($case_exact == '1') || ($case_exact == 'true')) { + $case_exact = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "case_exact")); + } + $html = HTML(); if (!$noheader and isset($request->_searchhighlight)) { $engine = $request->_searchhighlight['engine']; Modified: trunk/pgsrc/Help%2FSearchHighlightPlugin =================================================================== --- trunk/pgsrc/Help%2FSearchHighlightPlugin 2021-02-22 20:47:09 UTC (rev 10265) +++ trunk/pgsrc/Help%2FSearchHighlightPlugin 2021-02-23 08:07:16 UTC (rev 10266) @@ -1,4 +1,4 @@ -Date: Sat, 20 Feb 2021 11:52:37 +0000 +Date: Tue, 23 Feb 2021 09:05:00 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=Help%2FSearchHighlightPlugin; @@ -26,11 +26,11 @@ | //none// |- | **case_exact** -| Boolean +| Boolean. If true, highlight only case exact searches. | false |- | **regex** -| Boolean +| not yet supported | false |} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |