diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-10-02 11:37:03 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-10-02 11:37:03 +0000 |
commit | e1652f241d7ef5e4641af27fae22240232787568 (patch) | |
tree | 62d2318700c214e4b5dfc59ec7c6d7d5f4371474 /actions | |
parent | 364ea2fc085056d842e8aa6a3823a6b3084e229f (diff) | |
download | elgg-e1652f241d7ef5e4641af27fae22240232787568.tar.gz elgg-e1652f241d7ef5e4641af27fae22240232787568.tar.bz2 |
fixed delete tags bug
Diffstat (limited to 'actions')
-rw-r--r-- | actions/deletetag.php | 6 |
1 files changed, 3 insertions, 3 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');
}
}
|