summaryrefslogtreecommitdiff
path: root/actions/groupsearch.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-19 11:03:07 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-19 11:03:07 -0400
commit739bb522fd5d3ec57d6b7a7398c33f96d65a8d4e (patch)
tree6a20993fbdbbf9467d36a2a5d87de73a807435c2 /actions/groupsearch.php
parente7c57b43073888d18760e2411b207a4ee2cf508b (diff)
parentd1b2a9d7087ecc171f941755b4c3a420cd202842 (diff)
Merge branch 'master' into 0.7.x
Diffstat (limited to 'actions/groupsearch.php')
-rw-r--r--actions/groupsearch.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/actions/groupsearch.php b/actions/groupsearch.php
index 9b0026db9..109a53ce1 100644
--- a/actions/groupsearch.php
+++ b/actions/groupsearch.php
@@ -1,9 +1,4 @@
<?php
-
-
-// define('GROUPS_PER_PAGE', 20);
-
-
/**
* Group search action class.
*
@@ -90,15 +85,15 @@ class GroupSearchResults extends GroupList
{
var $terms = null;
var $pattern = null;
-
+
function __construct($user_group, $terms, $action)
{
parent::__construct($user_group, $terms, $action);
- $this->terms = array_map('preg_quote',
+ $this->terms = array_map('preg_quote',
array_map('htmlspecialchars', $terms));
$this->pattern = '/('.implode('|',$terms).')/i';
}
-
+
function highlight($text)
{
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));