]> git.mxchange.org Git - friendica.git/blobdiff - mod/search.php
remove now-unnecessary line in text.php
[friendica.git] / mod / search.php
index 87c72367e83af4ea438c699f0d18b73104f3a6a1..956816fed0ec7dc5212f4274454e5cc4a29b1e41 100644 (file)
@@ -4,6 +4,9 @@ function search_saved_searches() {
 
        $o = '';
 
+       if(! feature_enabled(local_user(),'savedsearch'))
+               return $o;
+
        $r = q("select `id`,`term` from `search` WHERE `uid` = %d",
                intval(local_user())
        );
@@ -93,9 +96,7 @@ function search_content(&$a) {
        require_once('include/security.php');
        require_once('include/conversation.php');
 
-       $o = '<div id="live-search"></div>' . "\r\n";
-
-       $o .= '<h3>' . t('Search') . '</h3>';
+       $o = '<h3>' . t('Search') . '</h3>';
 
        if(x($a->data,'search'))
                $search = notags(trim($a->data['search']));
@@ -143,7 +144,7 @@ function search_content(&$a) {
        // OR your own posts if you are a logged in member
        // No items will be shown if the member has a blocked profile wall. 
 
-       if(! get_pconfig(local_user(),'system','alt_pager')) {
+       if( (! get_config('alt_pager', 'global')) && (! get_pconfig(local_user(),'system','alt_pager')) ) {
                $r = q("SELECT distinct(`item`.`uri`) as `total`
                        FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
                        WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
@@ -196,11 +197,11 @@ function search_content(&$a) {
 
        $o .= conversation($a,$r,'search',false);
 
-        if(! get_pconfig(local_user(),'system','alt_pager')) {
-               $o .= paginate($a);
+       if( get_config('alt_pager', 'global') || get_pconfig(local_user(),'system','alt_pager') ) {
+               $o .= alt_pager($a,count($r));
        }
        else {
-               $o .= alt_pager($a,count($r));
+               $o .= paginate($a);
        }
 
        return $o;