From 280d90cfefb52f911ba272ca6085270f1865a8a4 Mon Sep 17 00:00:00 2001 From: mensonge Date: Tue, 2 Dec 2008 10:13:01 +0000 Subject: Minor fix: normalize tags when renaming them git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@185 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/bookmark2tagservice.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'services/bookmark2tagservice.php') diff --git a/services/bookmark2tagservice.php b/services/bookmark2tagservice.php index 7085d5f..851884f 100644 --- a/services/bookmark2tagservice.php +++ b/services/bookmark2tagservice.php @@ -369,6 +369,7 @@ class Bookmark2TagService { function renameTag($userid, $old, $new, $fromApi = false) { $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); + $tagservice =& ServiceFactory::getServiceInstance('TagService'); if (is_null($userid) || is_null($old) || is_null($new)) return false; @@ -381,6 +382,8 @@ class Bookmark2TagService { $this->deleteTag($userid, $old); // Attach new tags + $new = $tagservice->normalize($new); + foreach(array_keys($bookmarks) as $key) { $row =& $bookmarks[$key]; $this->attachTags($row['bId'], $new, $fromApi, NULL, false); -- cgit v1.2.3