From 65001decf7a36cffd077575229b4dd9239a48315 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 10 Feb 2009 13:30:57 +0000 Subject: Marcus Povey * Pagination not displayed when no activity present * OpenDD link for your activity now functioning git-svn-id: https://code.elgg.org/elgg/trunk@2703 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/activity/all.php | 6 ++++-- mod/activity/index.php | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mod/activity/all.php b/mod/activity/all.php index cd19a7507..e4252c2ec 100644 --- a/mod/activity/all.php +++ b/mod/activity/all.php @@ -23,8 +23,10 @@ if (elgg_get_viewtype()=='opendd'){ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype))); }else{ - $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype))); - $body .= elgg_view('activity/offset', array('offset' => $offset)); + $activity = activity_get_activity($limit, $offset, $type, $subtype); + $body = elgg_view('activity/dashboard', array('activity' => $activity)); + if (count($activity)) + $body .= elgg_view('activity/offset', array('offset' => $offset)); } page_draw(elgg_echo('activity:all'),elgg_view_layout("two_column_left_sidebar", '', $title . $body)); diff --git a/mod/activity/index.php b/mod/activity/index.php index 583edf555..57ec5ae88 100644 --- a/mod/activity/index.php +++ b/mod/activity/index.php @@ -24,9 +24,12 @@ if (elgg_get_viewtype()=='opendd') $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype, page_owner()))); - else - $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype, page_owner()))); - $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'own')); + else { + $activity = activity_get_activity($limit, $offset, $type, $subtype, page_owner()); + $body = elgg_view('activity/dashboard', array('activity' => $activity)); + if (count($activity)) + $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'own')); + } } else -- cgit v1.2.3