]> 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 94a6e81b8cfdae2e6dd448fdb877b643a192962c..6a074d08325d1c14dc554719cd6a01fa84ff2aa9 100644 (file)
@@ -579,8 +579,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)) {
@@ -598,8 +598,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`
@@ -638,7 +637,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