summaryrefslogtreecommitdiff
path: root/actions/groupsearch.php
diff options
context:
space:
mode:
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));