diff options
-rw-r--r-- | actions/deletetag.php | 6 | ||||
-rw-r--r-- | views/default/tidypics/tagging.php | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actions/deletetag.php b/actions/deletetag.php index 748d00380..3a76f6e99 100644 --- a/actions/deletetag.php +++ b/actions/deletetag.php @@ -23,10 +23,10 @@ forward($_SERVER['HTTP_REFERER']);
}
- foreach ($tags as $id => $value) {
+ foreach ($tags as $id => $value) {
// delete normal tag if it exists
if (is_array($image->tags)) {
- $index = array_search($value[0], $image->tags);
+ $index = array_search($value, $image->tags);
if ($index !== false) {
$tagarray = $image->tags;
unset($tagarray[$index]);
@@ -34,7 +34,7 @@ $image->tags = $tagarray;
}
} else {
- if ($value[0] === $image->tags) {
+ if ($value === $image->tags) {
$image->clearMetadata('tags');
}
}
diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index ed33c4702..ebaf0dc94 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -70,8 +70,8 @@ if ($tag_info) {
$content = "<input type='hidden' name='image_guid' value='{$image->guid}' />";
foreach ($tag_info['links'] as $id => $link) {
- $name = "tags[{$id}]";
- $content .= elgg_view("input/checkboxes", array('options' => array($link['text'] => $link['text']), 'internalname' => $name, 'value' => '' ));
+ $text = htmlentities($link['text'], ENT_QUOTES, 'UTF-8');
+ $content .= "<label><input type=\"checkbox\" class=\"input-checkboxes\" name=\"tags[{$id}]\" value=\"{$text}\" />{$text}</label><br />";
}
$content .= "<input type='submit' value='" . elgg_echo('tidypics:actiondelete') . "' class='submit_button' />";
|