Example #1
0
 /**
  * 删除meta信息
  */
 public function deleteByFileId($fileId)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = "file_id=:file_id";
     $criteria->params = array("file_id" => $fileId);
     FileTag::model()->deleteAll($criteria);
     return true;
 }
Example #2
0
 /**
  * 删除指定用户的所有标签
  *
  * @param $user_id 用户编号
  *
  * @since 1.0.7
  */
 public function deleteUserAllTag($user_id)
 {
     $tags = $this->findAll('user_id=:user_id', array(':user_id' => $user_id));
     foreach ($tags as $tag) {
         //删除文件标签关系
         FileTag::model()->deleteAll('tag_id=:tag_id', array(':tag_id' => $tag["id"]));
         //删除用户标签
         $tag->delete();
     }
 }