From 0f0d50f06a841e4faed475aa5f73f8bc08bb3a39 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 21 May 2008 15:06:40 -0400 Subject: off-by-one error in subscriptions darcs-hash:20080521190640-84dde-04fc00048b044474488e7774053674231c96e355.gz --- actions/showstream.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actions/showstream.php') diff --git a/actions/showstream.php b/actions/showstream.php index bf9df04a3..984c2454b 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -159,7 +159,14 @@ class ShowstreamAction extends StreamAction { global $config; # XXX: add a limit - $subs = $profile->getLink('id', 'subscription', 'subscriber'); + $subs = DB_DataObject::factory('subscription'); + $subs->subscriber = $profile->id; + + # We ask for an extra one to know if we need to do another page + + $subs->limit(0, SUBSCRIPTIONS); + + $subs_count = $subs->find(); common_element_start('div', 'subscriptions'); -- cgit v1.2.3-54-g00ecf