X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsearch.php;h=956816fed0ec7dc5212f4274454e5cc4a29b1e41;hb=11c06e21b7a656c4aeae0d5c157e1db97d6db02e;hp=300eb912c13c59412786c36b6c6a9c98974d6959;hpb=ac0ad8fecf56ee8f299cd4a0d496b777efd9f7d0;p=friendica.git diff --git a/mod/search.php b/mod/search.php index 300eb912c1..956816fed0 100644 --- a/mod/search.php +++ b/mod/search.php @@ -4,18 +4,34 @@ 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()) ); if(count($r)) { - $o .= '
'; - $o .= '

' . t('Saved Searches') . '

' . "\r\n"; - $o .= '
' . "\r\n"; + + + $tpl = get_markup_template("saved_searches_aside.tpl"); + + $o .= replace_macros($tpl, array( + '$title' => t('Saved Searches'), + '$add' => '', + '$searchbox' => '', + '$saved' => $saved, + )); } return $o; @@ -80,9 +96,7 @@ function search_content(&$a) { require_once('include/security.php'); require_once('include/conversation.php'); - $o = '' . "\r\n"; - - $o .= '

' . t('Search') . '

'; + $o = '

' . t('Search') . '

'; if(x($a->data,'search')) $search = notags(trim($a->data['search'])); @@ -130,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 @@ -183,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;