* adjust the delete logic of module.

This commit is contained in:
wangchunsheng
2010-03-03 05:25:58 +00:00
parent 1d7ed45a4b
commit b1b488ddf6

View File

@@ -247,7 +247,7 @@ class treeModel extends model
/* 删除一个模块。Todo: 需要修改下级目录的权限,还有对应的需求列表。*/
public function delete($moduleID)
{
$sql = "DELETE FROM " . TABLE_MODULE . " WHERE id = '$moduleID' LIMIT 1";
return $this->dbh->exec($sql);
$module = $this->getById((int)$moduleID);
$this->dao->delete()->from(TABLE_MODULE)->where('id')->eq($moduleID)->exec();
}
}