Fix bug #3386178: "system:unfiled" secret tag does not work
This commit is contained in:
parent
c1528d1c5b
commit
9c18fe1cc7
3 changed files with 11 additions and 0 deletions
|
@ -6,6 +6,7 @@ ChangeLog for SemantiScuttle
|
||||||
0.98.2 - 2011-08-XX
|
0.98.2 - 2011-08-XX
|
||||||
-------------------
|
-------------------
|
||||||
- Fix bug #3385724: Rename tag ends with XML Parsing Error
|
- Fix bug #3385724: Rename tag ends with XML Parsing Error
|
||||||
|
- Fix bug #3386178: "system:unfiled" secret tag does not work
|
||||||
|
|
||||||
|
|
||||||
0.98.1 - 2011-08-01
|
0.98.1 - 2011-08-01
|
||||||
|
|
|
@ -143,6 +143,7 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService
|
||||||
if(!is_array($tags)) {
|
if(!is_array($tags)) {
|
||||||
$tags = utf8_strtolower(trim($tags));
|
$tags = utf8_strtolower(trim($tags));
|
||||||
} else {
|
} else {
|
||||||
|
$tags = array_filter($tags);//remove empty values
|
||||||
for($i=0; $i<count($tags); $i++) {
|
for($i=0; $i<count($tags); $i++) {
|
||||||
$tags[$i] = utf8_strtolower(trim($tags[$i]));
|
$tags[$i] = utf8_strtolower(trim($tags[$i]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,15 @@ class Bookmark2TagTest extends TestBase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testAttachTagsWithArrayWithEmptyStringAddsSystemUnfiled()
|
||||||
|
{
|
||||||
|
$bid = $this->addBookmark(null, null, 0, array(''));
|
||||||
|
$this->assertEquals(
|
||||||
|
array('system:unfiled'),
|
||||||
|
$this->b2ts->getTagsForBookmark($bid, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue