summaryrefslogtreecommitdiff
path: root/classes/Reply.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Reply.php')
-rw-r--r--classes/Reply.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/classes/Reply.php b/classes/Reply.php
index da8a4f685..371c16cf4 100644
--- a/classes/Reply.php
+++ b/classes/Reply.php
@@ -50,15 +50,10 @@ class Reply extends Memcached_DataObject
$reply = new Reply();
$reply->profile_id = $user_id;
- if ($since_id != 0) {
- $reply->whereAdd('notice_id > ' . $since_id);
- }
-
- if ($max_id != 0) {
- $reply->whereAdd('notice_id <= ' . $max_id);
- }
+ Notice::addWhereSinceId($reply, $since_id, 'notice_id', 'modified');
+ Notice::addWhereMaxId($reply, $max_id, 'notice_id', 'modified');
- $reply->orderBy('notice_id DESC');
+ $reply->orderBy('modified DESC, notice_id DESC');
if (!is_null($offset)) {
$reply->limit($offset, $limit);