From c5c299f91dc9307b2fd9a232981e49dd74ed611b Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 18 Apr 2008 11:16:24 +0000 Subject: Updated input tag field to take in strings as well as arrays git-svn-id: https://code.elgg.org/elgg/trunk@491 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/tags.php | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/views/default/input/tags.php b/views/default/input/tags.php index 1b0f647fb..f9812c8cc 100644 --- a/views/default/input/tags.php +++ b/views/default/input/tags.php @@ -19,21 +19,24 @@ */ $tags = ""; - - if (!empty($vars['value']) && is_array($vars['value'])) { - foreach($vars['value'] as $tag) { - - if (!empty($tags)) { - $tags .= ", "; - } - if (is_string($tag)) { - $tags .= $tag; - } else { - $tags .= $tag->value; - } - - } + if (!empty($vars['value'])) { + if (is_array($vars['value'])) { + foreach($vars['value'] as $tag) { + + if (!empty($tags)) { + $tags .= ", "; + } + if (is_string($tag)) { + $tags .= $tag; + } else { + $tags .= $tag->value; + } + + } + } else { + $tags = $vars['value']; + } } ?> - name="" value="" class="input-tags"/> \ No newline at end of file + name="" value="" class="input-tags"/> \ No newline at end of file -- cgit v1.2.3