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;
$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);
}
function renameTag($uId, $oldName, $newName) {
+ $tagservice =& ServiceFactory::getServiceInstance('TagService');
+ $newName = $tagservice->normalize($newName);
+
$query = 'UPDATE `'. $this->getTableName() .'`';
$query.= ' SET tag1="'.$newName.'"';
$query.= ' WHERE tag1="'.$oldName.'"';
}
function renameTag($uId, $oldName, $newName) {
+ $newname = $this->normalize($newname);
+
$query = 'UPDATE `'. $this->getTableName() .'`';
$query.= ' SET tag="'.$newName.'"';
$query.= ' WHERE tag="'.$oldName.'"';