summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-21 15:06:40 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-21 15:06:40 -0400
commit0f0d50f06a841e4faed475aa5f73f8bc08bb3a39 (patch)
treefad66ea6d079878d6b5221d8e82ac3f4c90a0cc4 /actions/showstream.php
parentb791a835929c659d8dcf174553f7786fb45cf978 (diff)
off-by-one error in subscriptions
darcs-hash:20080521190640-84dde-04fc00048b044474488e7774053674231c96e355.gz
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php9
1 files changed, 8 insertions, 1 deletions
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');