From 9850f323a5fe899814201b0354712644f8e80092 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 20 May 2011 02:08:21 +0000 Subject: Fixes #3189 adds entity support to tags and access views git-svn-id: http://code.elgg.org/elgg/trunk@9106 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/tags.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'views/default/output') diff --git a/views/default/output/tags.php b/views/default/output/tags.php index 345b256c4..57cb21ea7 100644 --- a/views/default/output/tags.php +++ b/views/default/output/tags.php @@ -1,17 +1,19 @@ tags) */ +if (isset($vars['entity'])) { + $defaults['value'] = $vars['entity']->tags; + unset($vars['entity']); +} + if (!empty($vars['subtype'])) { $subtype = "&subtype=" . urlencode($vars['subtype']); } else { @@ -27,6 +29,10 @@ if (empty($vars['tags']) && !empty($vars['value'])) { $vars['tags'] = $vars['value']; } +if (empty($vars['tags']) && isset($vars['entity'])) { + $vars['tags'] = $vars['entity']->tags; +} + if (!empty($vars['tags'])) { if (!is_array($vars['tags'])) { $vars['tags'] = array($vars['tags']); -- cgit v1.2.3