summaryrefslogtreecommitdiff
path: root/classes/Reply.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-12-17 17:13:21 -0800
committerBrion Vibber <brion@pobox.com>2010-12-17 17:13:21 -0800
commitd8a3a88ec8eae3134694c98e5a9ae42bc30b289f (patch)
tree22554406da875404d3417edd91eaeaeef0bb693c /classes/Reply.php
parentbf59eaf602c8319d5ae99d9809b4d4867cb632cd (diff)
parentfb8312ebf4537033077917d0003f716206d0d23d (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: classes/Memcached_DataObject.php
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);