]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/peoplesearch.php
Merge branch 'master' into 0.7.x
[quix0rs-gnu-social.git] / actions / peoplesearch.php
index 3c672c9400450051eb1964c189ca099094ca51d7..9e515ade1a9e7b6d21bab32f18e3e9cf44bc5677 100644 (file)
@@ -63,13 +63,13 @@ class PeoplesearchAction extends SearchAction
 
         $profile = new Profile();
 
-        # lcase it for comparison
-        $q = strtolower($q);
+        // lcase it for comparison
+        // $q = strtolower($q);
 
         $search_engine = $profile->getSearchEngine('identica_people');
 
         $search_engine->set_sort_mode('chron');
-        # Ask for an extra to see if there's more.
+        // Ask for an extra to see if there's more.
         $search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
         if (false === $search_engine->query($q)) {
             $cnt = 0;
@@ -86,28 +86,9 @@ class PeoplesearchAction extends SearchAction
         }
 
         $profile->free();
-        
+
         $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE,
                           $page, 'peoplesearch', array('q' => $q));
     }
 }
 
-class PeopleSearchResults extends ProfileList
-{
-    var $terms = null;
-    var $pattern = null;
-    
-    function __construct($profile, $terms, $action)
-    {
-        parent::__construct($profile, $terms, $action);
-        $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));
-    }
-}
-