]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Sort notices by date then id so they are in the correct order when there are multiple...
authorMike Cochrane <mikec@mikenz.geek.nz>
Sun, 13 Jul 2008 06:50:09 +0000 (02:50 -0400)
committerMike Cochrane <mikec@mikenz.geek.nz>
Sun, 13 Jul 2008 06:50:09 +0000 (02:50 -0400)
darcs-hash:20080713065009-533db-69d7f21d152552d7e994a0c7c7615b61a8ea592c.gz

actions/all.php
actions/allrss.php
actions/noticesearchrss.php
actions/publicrss.php
actions/showstream.php
actions/userrss.php
classes/Profile.php

index ae21b81ee68ddc4aab5136cc91be9be1a3f4f641..20aea766868552348f4b275a84bd29642a85dccb 100644 (file)
@@ -80,7 +80,7 @@ class AllAction extends StreamAction {
                $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.' and subscribed = notice.profile_id)', 'OR');
                $notice->whereAdd('profile_id = ' . $profile->id, 'OR');
 
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
 
                $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
index 86d98284ebdded584d0f83d636e52606a6f0bb68..26e3f5241eb4888742e27faac378d8d2feeb4d04 100644 (file)
@@ -49,7 +49,7 @@ class AllrssAction extends Rss10Action {
                $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$user->id.' and subscribed = notice.profile_id)', 'OR');
                $notice->whereAdd('profile_id = ' . $user->id, 'OR');
 
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
                if ($limit != 0) {
                        $notice->limit(0, $limit);
                }
index 4e206c9a2549ab7b6caab7b29cb5ac747f1ddb89..c9d08ce8e77c1d2ba9af5f09b49a65c7b69a6252 100644 (file)
@@ -40,7 +40,7 @@ class NoticesearchrssAction extends Rss10Action {
                $q = strtolower($q);
 
                $notice->whereAdd('MATCH(content) against (\''.addslashes($q).'\')');
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
 
                # Ask for an extra to see if there's more.
 
index 0916da00913062c8a03d881c12f92631fbc02558..621058d3fe7668c5d887e85dc13266c055e3c2f9 100644 (file)
@@ -40,7 +40,7 @@ class PublicrssAction extends Rss10Action {
 
                $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)');
 
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
 
                if ($limit != 0) {
                        $notice->limit(0, $limit);
index 88a8a90ca3716118304cc2569ce3fb5a3311e46e..8980b4de159692c37130da710069d84dfd03c76d 100644 (file)
@@ -306,7 +306,7 @@ class ShowstreamAction extends StreamAction {
                $notice = DB_DataObject::factory('notice');
                $notice->profile_id = $profile->id;
 
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
 
                $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
 
index 89fe0efb26d474d81d2e448d105ca09388bff645..2ae45dc9cd25d8ef094db12ea80a6a69f4f32083 100644 (file)
@@ -46,7 +46,7 @@ class UserrssAction extends Rss10Action {
 
                $notice = DB_DataObject::factory('notice');
                $notice->profile_id = $user->id; # user id === profile id
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
                if ($limit != 0) {
                        $notice->limit(0, $limit);
                }
index dba7ca8a505e1a24a9a0beef45d13438879ff2d7..d482e8d283a5212160c9632ad4e3b9064b16e93a 100644 (file)
@@ -145,7 +145,7 @@ class Profile extends DB_DataObject
                if ($dt) {
                        $notice->whereAdd('created < "' . $dt . '"');
                }
-               $notice->orderBy('created DESC');
+               $notice->orderBy('created DESC, notice.id DESC');
                $notice->limit(1);
                if ($notice->find(true)) {
                        return $notice;