]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Mentions are now displayed much faster. Attention: The related database update can...
[friendica.git] / mod / network.php
index 2ab5b6de35b17f0b57b5c4f4de1894b3e789b67a..ecef7c1dfbb85c60a78d799d8f27534d41167343 100644 (file)
@@ -674,8 +674,10 @@ function network_content(&$a, $update = 0) {
                $myurl = substr($myurl,strpos($myurl,'://')+3);
                $myurl = str_replace('www.','',$myurl);
                $diasp_url = str_replace('/profile/','/u/',$myurl);
-               if (get_config('system','use_fulltext_engine'))
+               /*if (get_config('system','use_fulltext_engine'))
                        $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where (MATCH(`author-link`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(`tag`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode))) ",
+                       //$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where (`author-link` IN ('https://%s', 'http://%s') OR MATCH(`tag`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode))) ",
+                       //$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where `author-link` IN ('https://%s', 'http://%s') OR `mention`)",
                                dbesc(protect_sprintf($myurl)),
                                dbesc(protect_sprintf($myurl)),
                                dbesc(protect_sprintf($diasp_url))
@@ -685,8 +687,12 @@ function network_content(&$a, $update = 0) {
                                dbesc(protect_sprintf('%' . $myurl)),
                                dbesc(protect_sprintf('%' . $myurl . ']%')),
                                dbesc(protect_sprintf('%' . $diasp_url . ']%'))
-                       );
+                       );*/
 
+               $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where `author-link` IN ('https://%s', 'http://%s') OR `mention`)",
+                       dbesc(protect_sprintf($myurl)),
+                       dbesc(protect_sprintf($myurl))
+               );
        }
 
        if($update) {
@@ -696,7 +702,7 @@ function network_content(&$a, $update = 0) {
 
        }
        else {
-               if(! get_pconfig(local_user(),'system','alt_pager')) {
+               if( (! get_config('alt_pager', 'global')) && (! get_pconfig(local_user(),'system','alt_pager')) ) {
                        $r = q("SELECT COUNT(*) AS `total`
                                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
@@ -845,11 +851,11 @@ function network_content(&$a, $update = 0) {
        $o .= conversation($a,$items,$mode,$update);
 
        if(! $update) {
-               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($items));
                }
                else {
-                       $o .= alt_pager($a,count($items));
+                       $o .= paginate($a);
                }
        }