From: <var...@us...> - 2012-11-14 16:22:16
|
Revision: 8447 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8447&view=rev Author: vargenau Date: 2012-11-14 16:22:05 +0000 (Wed, 14 Nov 2012) Log Message: ----------- Use English quotes Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2012-11-14 16:21:21 UTC (rev 8446) +++ trunk/lib/plugin/FullTextSearch.php 2012-11-14 16:22:05 UTC (rev 8447) @@ -89,7 +89,7 @@ $args['types'] = array(new _PageList_Column_content ('rev:hi_content', _("Content"), "left", $s, $hilight_re)); $list = new PageList(false, $exclude, $args); - $list->setCaption(fmt("Full text search results for '%s'", $s)); + $list->setCaption(fmt("Full text search results for “%s”", $s)); while ($page = $pages->next()) { $list->addPage($page); } @@ -124,7 +124,7 @@ $list); if ($noheader) return $list; - return HTML(HTML::p(fmt("Full text search results for '%s'", $s)), + return HTML(HTML::p(fmt("Full text search results for “%s”", $s)), $list); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-01 14:18:46
|
Revision: 9147 http://sourceforge.net/p/phpwiki/code/9147 Author: vargenau Date: 2014-10-01 14:18:44 +0000 (Wed, 01 Oct 2014) Log Message: ----------- Extract arguments by hand Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2014-10-01 13:47:15 UTC (rev 9146) +++ trunk/lib/plugin/FullTextSearch.php 2014-10-01 14:18:44 UTC (rev 9147) @@ -64,15 +64,30 @@ return $args; } + /** + * @param WikiDB $dbi + * @param string $argstr + * @param WikiRequest $request + * @param string $basepage + * @return $this|bool|HtmlElement|PageList|XmlContent + */ function run($dbi, $argstr, &$request, $basepage) { - + // Extract arguments $args = $this->getArgs($argstr, $request); + $s = $args['s']; + $case_exact = $args['case_exact']; + $regex = $args['regex']; + $sortby = $args['sortby']; + $limit = $args['limit']; + $exclude = $args['exclude']; + $hilight = $args['hilight']; + $quiet = $args['quiet']; + $noheader = $args['noheader']; - if (empty($args['s'])) { + if (empty($s)) { return HTML(); } - extract($args); $query = new TextSearchQuery($s, $case_exact, $regex); $pages = $dbi->fullSearch($query, $sortby, $limit, $exclude); @@ -124,6 +139,11 @@ $list); } + /** + * @param WikiDB_Page $page + * @param string $hilight_re + * @return array + */ function showhits($page, $hilight_re) { $current = $page->getCurrentRevision(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-01 16:12:36
|
Revision: 9151 http://sourceforge.net/p/phpwiki/code/9151 Author: vargenau Date: 2014-10-01 16:12:28 +0000 (Wed, 01 Oct 2014) Log Message: ----------- Define class field Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2014-10-01 15:33:50 UTC (rev 9150) +++ trunk/lib/plugin/FullTextSearch.php 2014-10-01 16:12:28 UTC (rev 9151) @@ -174,6 +174,8 @@ */ class _PageList_Column_hilight extends _PageList_Column { + private $parentobj; + function _PageList_Column_WantedPages_links(&$params) { $this->parentobj =& $params[3]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-01 16:44:28
|
Revision: 9153 http://sourceforge.net/p/phpwiki/code/9153 Author: vargenau Date: 2014-10-01 16:44:17 +0000 (Wed, 01 Oct 2014) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2014-10-01 16:13:18 UTC (rev 9152) +++ trunk/lib/plugin/FullTextSearch.php 2014-10-01 16:44:17 UTC (rev 9153) @@ -76,14 +76,14 @@ // Extract arguments $args = $this->getArgs($argstr, $request); $s = $args['s']; + $hilight = $args['hilight']; $case_exact = $args['case_exact']; $regex = $args['regex']; $sortby = $args['sortby']; - $limit = $args['limit']; + $noheader = $args['noheader']; $exclude = $args['exclude']; - $hilight = $args['hilight']; $quiet = $args['quiet']; - $noheader = $args['noheader']; + $limit = $args['limit']; if (empty($s)) { return HTML(); @@ -114,7 +114,9 @@ if (!$limit or !is_int($limit)) $limit = 0; // expand all page wildcards to a list of pages which should be ignored - if ($exclude) $exclude = explodePageList($exclude); + if ($exclude) { + $exclude = explodePageList($exclude); + } while ($page = $pages->next() and (!$limit or ($count < $limit))) { $name = $page->getName(); if ($exclude and in_array($name, $exclude)) continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-02-22 16:54:58
|
Revision: 10253 http://sourceforge.net/p/phpwiki/code/10253 Author: vargenau Date: 2021-02-22 16:54:52 +0000 (Mon, 22 Feb 2021) Log Message: ----------- plugin FullTextSearch: better test boolean arguments "hilight", "case_exact", "noheader" and "quiet" Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2021-02-22 14:14:10 UTC (rev 10252) +++ trunk/lib/plugin/FullTextSearch.php 2021-02-22 16:54:52 UTC (rev 10253) @@ -77,8 +77,37 @@ _("You must enter a search term.")); } extract($args); - if ($quiet === 'false') { + + if (($hilight == '0') || ($hilight == 'false')) { + $hilight = false; + } elseif (($hilight == '1') || ($hilight == 'true')) { + $hilight = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "hilight")); + } + + 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")); + } + + 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 (($quiet == '0') || ($quiet == 'false')) { $quiet = false; + } elseif (($quiet == '1') || ($quiet == 'true')) { + $quiet = true; + } else { + return $this->error(sprintf(_("Argument '%s' must be a boolean"), "quiet")); } $query = new TextSearchQuery($s, $case_exact, $regex); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-09 18:10:05
|
Revision: 9294 http://sourceforge.net/p/phpwiki/code/9294 Author: vargenau Date: 2014-11-09 18:10:01 +0000 (Sun, 09 Nov 2014) Log Message: ----------- function highlight_line is static Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2014-11-09 17:39:41 UTC (rev 9293) +++ trunk/lib/plugin/FullTextSearch.php 2014-11-09 18:10:01 UTC (rev 9294) @@ -151,7 +151,7 @@ return $html; } - function highlight_line($line, $hilight_re) + static function highlight_line($line, $hilight_re) { while (preg_match("/^(.*?)($hilight_re)/i", $line, $m)) { $line = substr($line, strlen($m[0])); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-01-26 13:05:14
|
Revision: 9489 http://sourceforge.net/p/phpwiki/code/9489 Author: vargenau Date: 2015-01-26 13:05:02 +0000 (Mon, 26 Jan 2015) Log Message: ----------- Remove obsolete comment Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2015-01-22 14:54:52 UTC (rev 9488) +++ trunk/lib/plugin/FullTextSearch.php 2015-01-26 13:05:02 UTC (rev 9489) @@ -33,11 +33,6 @@ * Only uploaded: textfiles, PDF, HTML, DOC, XLS, ... or * External apps: xapian-omages seems to be the better than lucene, * lucene.net, swish, nakamazu, ... - * - * See http://sf.net/tracker/index.php?aid=927395&group_id=6121&atid=106121 - * Wordaround to let the dead locks occur somewhat later: - * Increase the memory limit of PHP from 8 MB to 32 MB - * php.ini: memory_limit = 32 MB */ class WikiPlugin_FullTextSearch extends WikiPlugin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-10-15 08:07:56
|
Revision: 9733 http://sourceforge.net/p/phpwiki/code/9733 Author: vargenau Date: 2015-10-15 08:07:53 +0000 (Thu, 15 Oct 2015) Log Message: ----------- FullTextSearch: better test quiet argument Modified Paths: -------------- trunk/lib/plugin/FullTextSearch.php Modified: trunk/lib/plugin/FullTextSearch.php =================================================================== --- trunk/lib/plugin/FullTextSearch.php 2015-09-23 08:37:53 UTC (rev 9732) +++ trunk/lib/plugin/FullTextSearch.php 2015-10-15 08:07:53 UTC (rev 9733) @@ -75,7 +75,7 @@ _("You must enter a search term.")); } extract($args); - if ($quiet == 'false') { + if ($quiet === 'false') { $quiet = false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |