示例#1
0
文件: Notes.php 项目: sandin/iMemo
 /** 
  * 删除一个category By name
  * [unused]
  * 
  * @param $category_name
  * 
  * @return 
  */
 public function delCategory($category_name)
 {
     if ($category_id = $this->categoryNameToId($category_name)) {
         $this->removeCategoryLink($category_id);
         $user_link_category = new Database_UserLinkCategory($this->_db);
         //如果该category还有其他连接,则只删除此条连接,而不删除category本身
         $category_db = new Database_NotesCategorys($this->_db);
         $category_db->load($category_id);
         return $category_db->delete();
     }
 }