handle empty subscription list

darcs-hash:20080517192447-84dde-f8dc1f4befde5d7624887b13eb7f5730f693c72c.gz
This commit is contained in:
Evan Prodromou 2008-05-17 15:24:47 -04:00
parent 726e8fdaf7
commit 30089235e0

View File

@ -140,10 +140,12 @@ class ShowstreamAction extends StreamAction {
# XXX: add a limit # XXX: add a limit
$subs = $profile->getLink('id', 'subscription', 'subscriber'); $subs = $profile->getLink('id', 'subscription', 'subscriber');
common_element_start('div', 'subscriptions'); common_element_start('div', 'subscriptions');
$cnt = 0; $cnt = 0;
if ($subs) {
while ($subs->fetch()) { while ($subs->fetch()) {
$cnt++; $cnt++;
if ($cnt % SUBSCRIPTIONS_PER_ROW == 1) { if ($cnt % SUBSCRIPTIONS_PER_ROW == 1) {
@ -169,6 +171,7 @@ class ShowstreamAction extends StreamAction {
break; break;
} }
} }
}
common_element('a', array('href' => common_local_url('subscriptions', common_element('a', array('href' => common_local_url('subscriptions',
array('nickname' => $profile->nickname)), array('nickname' => $profile->nickname)),