]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Update sorting for User::repeatedByMe() -- currently unused. Likely not ideally index...
authorBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 23:28:55 +0000 (15:28 -0800)
committerBrion Vibber <brion@pobox.com>
Fri, 17 Dec 2010 23:28:55 +0000 (15:28 -0800)
classes/User.php

index edbd6bb2e394ef3313080b9e66f06b5d927ad6a0..47bf8a617731088589fefc9e0e6b2010c70b8129 100644 (file)
@@ -755,19 +755,14 @@ class User extends Memcached_DataObject
         $notice->profile_id = $this->id;
         $notice->whereAdd('repeat_of IS NOT NULL');
 
-        $notice->orderBy('id DESC');
+        $notice->orderBy('created DESC, id DESC');
 
         if (!is_null($offset)) {
             $notice->limit($offset, $limit);
         }
 
-        if ($since_id != 0) {
-            $notice->whereAdd('id > ' . $since_id);
-        }
-
-        if ($max_id != 0) {
-            $notice->whereAdd('id <= ' . $max_id);
-        }
+        Notice::addWhereSinceId($notice, $since_id);
+        Notice::addWhereMaxId($notice, $max_id);
 
         $ids = array();