]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Merge remote-tracking branch 'upstream/develop' into 1607-performance
[friendica.git] / mod / network.php
index 559bad0a3e332208c6795898135007f7674ced82..1b7574d1097c99211be99399b14940dc615f2806 100644 (file)
@@ -578,8 +578,8 @@ function network_content(&$a, $update = 0) {
                                $sql_extra = sprintf(" AND MATCH (`item`.`body`, `item`.`title`) AGAINST ('%s' in boolean mode) ", dbesc(protect_sprintf($search)));
                        else
                                $sql_extra = sprintf(" AND `item`.`body` REGEXP '%s' ", dbesc(protect_sprintf(preg_quote($search))));
-                       $sql_order = "`item`.`received`";
-                       $order_mode = "received";
+                       $sql_order = "`item`.`id`";
+                       $order_mode = "id";
                }
        }
        if(strlen($file)) {
@@ -597,8 +597,7 @@ function network_content(&$a, $update = 0) {
                // only setup pagination on initial page view
                $pager_sql = '';
 
-       }
-       else {
+       } else {
                if(get_config('system', 'old_pager')) {
                        $r = qu("SELECT COUNT(*) AS `total`
                                FROM $sql_table $sql_post_table INNER JOIN `contact` ON `contact`.`id` = $sql_table.`contact-id`
@@ -637,7 +636,7 @@ function network_content(&$a, $update = 0) {
                $simple_update = (($update) ? " AND `item`.`unseen` " : '');
 
                if ($sql_order == "")
-                       $sql_order = "`item`.`received`";
+                       $sql_order = "`item`.`id`";
 
                // "New Item View" - show all items unthreaded in reverse created date order
                $items = qu("SELECT %s FROM $sql_table $sql_post_table %s