summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/subscribed.php27
-rw-r--r--actions/subscriptions.php27
2 files changed, 6 insertions, 48 deletions
diff --git a/actions/subscribed.php b/actions/subscribed.php
index 2b5bbd1b8..d59af0a53 100644
--- a/actions/subscribed.php
+++ b/actions/subscribed.php
@@ -75,9 +75,6 @@ class SubscribedAction extends Action {
while ($subs->fetch()) {
$idx++;
- if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
- common_element_start('div', 'row');
- }
$other = Profile::staticGet($subs->subscriber);
@@ -98,32 +95,14 @@ class SubscribedAction extends Action {
# XXX: subscribe form here
- if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
- common_element_end('div');
- }
-
if ($idx == SUBSCRIPTIONS_PER_PAGE) {
break;
}
}
- if ($page > 1) {
- common_element('a', array('href' =>
- common_local_url('subscriptions',
- array('nickname' => $profile->nickname,
- 'page' => $page - 1)),
- 'class' => 'prev'),
- _t('Previous'));
- }
-
- if ($subs_count > SUBSCRIPTIONS_PER_PAGE) {
- common_element('a', array('href' =>
- common_local_url('subscriptions',
- array('nickname' => $profile->nickname,
- 'page' => $page + 1)),
- 'class' => 'next'),
- _t('Next'));
- }
common_element_end('div');
+
+ common_pagination($page > 1, $subs_count > SUBSCRIPTIONS_PER_PAGE,
+ $page, 'subscribed', array('nickname' => $profile->nickname));
}
} \ No newline at end of file
diff --git a/actions/subscriptions.php b/actions/subscriptions.php
index 35a707894..e5db39bce 100644
--- a/actions/subscriptions.php
+++ b/actions/subscriptions.php
@@ -72,9 +72,6 @@ class SubscriptionsAction extends Action {
while ($subs->fetch()) {
$idx++;
- if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
- common_element_start('div', 'row');
- }
$other = Profile::staticGet($subs->subscribed);
@@ -98,32 +95,14 @@ class SubscriptionsAction extends Action {
# XXX: subscribe form here
- if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
- common_element_end('div');
- }
-
if ($idx == SUBSCRIPTIONS_PER_PAGE) {
break;
}
}
- if ($page > 1) {
- common_element('a', array('href' =>
- common_local_url('subscriptions',
- array('nickname' => $profile->nickname,
- 'page' => $page - 1)),
- 'class' => 'prev'),
- _t('Previous'));
- }
-
- if ($subs_count > SUBSCRIPTIONS_PER_PAGE) {
- common_element('a', array('href' =>
- common_local_url('subscriptions',
- array('nickname' => $profile->nickname,
- 'page' => $page + 1)),
- 'class' => 'next'),
- _t('Next'));
- }
common_element_end('div');
+
+ common_pagination($page > 1, $subs_count > SUBSCRIPTIONS_PER_PAGE,
+ $page, 'subscriptions', array('nickname' => $profile->nickname));
}
} \ No newline at end of file