Tags: Fix clearing internal cache after removing a tag
This commit is contained in:
parent
832a16ddf3
commit
f08efd9170
2 changed files with 5 additions and 1 deletions
|
@ -236,7 +236,7 @@ class kolab_storage_config
|
||||||
// on success, update cached tags list
|
// on success, update cached tags list
|
||||||
if ($status && is_array($this->tags)) {
|
if ($status && is_array($this->tags)) {
|
||||||
foreach ($this->tags as $idx => $tag) {
|
foreach ($this->tags as $idx => $tag) {
|
||||||
if ($tag['uid'] == $uid) {
|
if ($tag['uid'] == $object['uid']) {
|
||||||
unset($this->tags[$idx]);
|
unset($this->tags[$idx]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,5 +230,9 @@ class kolab_storage_config_test extends PHPUnit_Framework_TestCase
|
||||||
// get tags again, make sure it contains the new tag
|
// get tags again, make sure it contains the new tag
|
||||||
$tags = $config->get_tags();
|
$tags = $config->get_tags();
|
||||||
$this->assertCount(4, $tags);
|
$this->assertCount(4, $tags);
|
||||||
|
|
||||||
|
foreach ($tags as $_tag) {
|
||||||
|
$this->assertTrue($_tag['uid'] != $tag['uid']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue