forked from GNUsocial/gnu-social
		
	Sort notices by date then id so they are in the correct order when there are multiple in the same second
darcs-hash:20080713065009-533db-69d7f21d152552d7e994a0c7c7615b61a8ea592c.gz
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
| @@ -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); | ||||
| 		} | ||||
|   | ||||
| @@ -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. | ||||
|  | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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; | ||||
|  | ||||
|   | ||||
| @@ -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); | ||||
| 		} | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user