]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix bug #3386178: "system:unfiled" secret tag does not work
authorChristian Weiske <cweiske@cweiske.de>
Fri, 5 Aug 2011 04:47:37 +0000 (06:47 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 5 Aug 2011 04:47:37 +0000 (06:47 +0200)
doc/ChangeLog
src/SemanticScuttle/Service/Tag.php
tests/Bookmark2TagTest.php

index b512d3c3c710960dad439cc130bef6f90228e057..d71a3d05de68cc719077d9b9f78d41c89090213f 100644 (file)
@@ -6,6 +6,7 @@ ChangeLog for SemantiScuttle
 0.98.2 - 2011-08-XX
 -------------------
 - 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
index 83252855c44c07771045deb304fa90ff9e2d5c34..2476608c3ddca9ecefa13f1a85cf3569aaaefac5 100644 (file)
@@ -143,6 +143,7 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService
         if(!is_array($tags)) {
             $tags = utf8_strtolower(trim($tags));
         } else {
+            $tags = array_filter($tags);//remove empty values
             for($i=0; $i<count($tags); $i++) {
                 $tags[$i] = utf8_strtolower(trim($tags[$i]));
             }
index 1367a0eb0d10dc0056058ebc3bb1fb677064e794..f466a7d7b3984e17b7d0da29ecf2232baab10f26 100644 (file)
@@ -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)
+        );
+    }
+
 
 
     /**