From b1b488ddf602f446534818fca73f7d4b60eea813 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 3 Mar 2010 05:25:58 +0000 Subject: [PATCH] * adjust the delete logic of module. --- module/tree/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index f5488b93ae..2541cae6b2 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -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(); } }