define undefined, order subs

darcs-hash:20080521192912-84dde-4bea2a463bfb357b5688e0f8faccac622770ac95.gz
This commit is contained in:
Evan Prodromou 2008-05-21 15:29:12 -04:00
parent 127bc561ff
commit 4b96241acf
2 changed files with 14 additions and 0 deletions

View File

@ -19,6 +19,11 @@
if (!defined('LACONICA')) { exit(1); }
# XXX: make distinct from similar definitions in showstream.php
define('SUBSCRIPTIONS_PER_ROW', 10);
define('SUBSCRIPTIONS_PER_PAGE', 80);
class SubscribedAction extends Action {
# Who is subscribed to a given user?
@ -47,6 +52,8 @@ class SubscribedAction extends Action {
$subs = DB_DataObject::factory('subscription');
$subs->subscribed = $profile->id;
$subs->orderBy('created DESC');
# We ask for an extra one to know if we need to do another page
$subs->limit((($page-1)*SUBSCRIPTIONS_PER_PAGE), SUBSCRIPTIONS_PER_PAGE + 1);

View File

@ -19,6 +19,11 @@
if (!defined('LACONICA')) { exit(1); }
# XXX: make distinct from similar definitions in showstream.php
define('SUBSCRIPTIONS_PER_ROW', 10);
define('SUBSCRIPTIONS_PER_PAGE', 80);
class SubscriptionsAction extends Action {
function handle($args) {
@ -43,6 +48,8 @@ class SubscriptionsAction extends Action {
$subs = DB_DataObject::factory('subscription');
$subs->subscriber = $profile->id;
$subs->orderBy('created DESC');
# We ask for an extra one to know if we need to do another page
$subs->limit((($page-1)*SUBSCRIPTIONS_PER_PAGE), SUBSCRIPTIONS_PER_PAGE + 1);