diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-18 11:16:24 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-18 11:16:24 +0000 |
commit | c5c299f91dc9307b2fd9a232981e49dd74ed611b (patch) | |
tree | 9c33b0c360574e07116668c673583cb3f9387c26 /views | |
parent | ba50fbb23410592f9194372cc340cd525e04f9ed (diff) | |
download | elgg-c5c299f91dc9307b2fd9a232981e49dd74ed611b.tar.gz elgg-c5c299f91dc9307b2fd9a232981e49dd74ed611b.tar.bz2 |
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
Diffstat (limited to 'views')
-rw-r--r-- | views/default/input/tags.php | 33 |
1 files 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'];
+ }
}
?>
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo $tags; ?>" class="input-tags"/>
\ No newline at end of file +<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($tags); ?>" class="input-tags"/>
\ No newline at end of file |