]> git.mxchange.org Git - friendica.git/blobdiff - mod/search.php
Events: Now with guid.
[friendica.git] / mod / search.php
index 431bd821d61478b020afa29f3e828e1c53e3c08c..790f577ba6e17511b6be30b39c3de963da5114a8 100644 (file)
@@ -4,7 +4,6 @@ require_once('include/security.php');
 require_once('include/conversation.php');
 require_once('mod/dirfind.php');
 
-if(! function_exists('search_saved_searches')) {
 function search_saved_searches() {
 
        $o = '';
@@ -40,10 +39,10 @@ function search_saved_searches() {
        }
 
        return $o;
+
 }
-}
 
-if(! function_exists('search_init')) {
+
 function search_init(&$a) {
 
        $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
@@ -77,18 +76,17 @@ function search_init(&$a) {
        }
 
 
+
 }
-}
 
 
-if(! function_exists('search_post')) {
+
 function search_post(&$a) {
        if(x($_POST,'search'))
                $a->data['search'] = $_POST['search'];
 }
-}
 
-if(! function_exists('search_content')) {
+
 function search_content(&$a) {
 
        if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
@@ -149,7 +147,7 @@ function search_content(&$a) {
        }
 
 
-       $o .= search($search,'search-box','/search',((local_user()) ? true : false), false);
+       $o .= search($search,'search-box','search',((local_user()) ? true : false), false);
 
        if(strpos($search,'#') === 0) {
                $tag = true;
@@ -219,11 +217,10 @@ function search_content(&$a) {
                        FROM `item`
                                INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
                        WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
-                               AND (`item`.`uid` = 0 OR (`item`.`uid` = %s AND (`item`.`private` OR NOT `item`.`network` IN ('%s', '%s', '%s'))))
+                               AND (`item`.`uid` = 0 OR (`item`.`uid` = %s AND NOT `item`.`global`))
                                $sql_extra
                        GROUP BY `item`.`uri` ORDER BY `item`.`id` DESC LIMIT %d , %d ",
-                               intval(local_user()), dbesc(NETWORK_DFRN), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DIASPORA),
-                               intval($a->pager['start']), intval($a->pager['itemspage']));
+                               intval(local_user()), intval($a->pager['start']), intval($a->pager['itemspage']));
        }
 
        if(! count($r)) {
@@ -250,4 +247,4 @@ function search_content(&$a) {
 
        return $o;
 }
-}
+