From 51f65f6debcb86ed5b329aa79bf571d60f587468 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Mar 2009 11:22:39 +0000 Subject: Added contentWrapper view git-svn-id: https://code.elgg.org/elgg/trunk@3063 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 3b7735f9f..4aa0983db 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -620,18 +620,21 @@ $subtype = $entity->getSubtype(); if (empty($subtype)) { $subtype = $entity_type; } - + + $contents = ''; if (elgg_view_exists("{$entity_type}/{$subtype}")) { - return elgg_view("{$entity_type}/{$subtype}",array( + $contents = elgg_view("{$entity_type}/{$subtype}",array( 'entity' => $entity, 'full' => $full ), $bypass, $debug); - } else { - return elgg_view("{$entity_type}/default",array( + } + if (empty($contents)) { + $contents = elgg_view("{$entity_type}/default",array( 'entity' => $entity, 'full' => $full ), $bypass, $debug); - } + } + return $contents; } /** -- cgit v1.2.3