From 9515303b14288041576c50c1729f874c2e17191f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 22 Jul 2008 12:23:32 -0400 Subject: notices and counts darcs-hash:20080722162332-84dde-75801a271f50789377aa7a3467223286c372ec6c.gz --- classes/User.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/User.php b/classes/User.php index b6689761e..7da483653 100644 --- a/classes/User.php +++ b/classes/User.php @@ -133,12 +133,12 @@ class User extends DB_DataObject $notice = new Notice(); - $notice->query('SELECT notice.* ' . - 'FROM notice JOIN subscription on notice.profile_id = subscription.subscribed ' . - 'WHERE subscription.subscriber = ' . $this->id . ' ' . - 'ORDER BY created DESC, notice.id DESC ' . - 'LIMIT ' . $offset . ', ' . $limit); + $cnt = $notice->query('SELECT notice.* ' . + 'FROM notice JOIN subscription on notice.profile_id = subscription.subscribed ' . + 'WHERE subscription.subscriber = ' . $this->id . ' ' . + 'ORDER BY created DESC, notice.id DESC ' . + 'LIMIT ' . $offset . ', ' . $limit); - return $notice; + return array($cnt, $notice); } } -- cgit v1.2.3-54-g00ecf