From 8b3b7c3babc25966286b2532803c0ac0a5106375 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 27 Feb 2009 14:27:30 +0000 Subject: set a default num of wire posts to appear on a widget git-svn-id: https://code.elgg.org/elgg/trunk@2981 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/views/default/widgets/thewire/view.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php index 3d08590ea..739fd7617 100644 --- a/mod/thewire/views/default/widgets/thewire/view.php +++ b/mod/thewire/views/default/widgets/thewire/view.php @@ -9,7 +9,11 @@ set_page_owner($page_owner->getGUID()); } - $thewire = $page_owner->getObjects('thewire', $vars['entity']->num_display); + $num = $vars['entity']->num_display; + if(!$num) + $num = 4; + + $thewire = $page_owner->getObjects('thewire', $num); // If there are any thewire to view, view them if (is_array($thewire) && sizeof($thewire) > 0) { -- cgit v1.2.3