Minahito
minah****@users*****
2006年 1月 14日 (土) 02:54:57 JST
Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.6 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.7 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.6 Sat Jan 14 02:46:50 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Sat Jan 14 02:54:57 2006 @@ -245,16 +245,11 @@ */ function deleteAll($criteria, $force=false) { - $sql = "DELETE FROM " . $this->mTable . " WHERE "; + $objs =& $this->getObjects($criteria, $force); - if (is_a($criteria, 'CriteriaElement')) { - $sql .= $criteria->render(); + foreach ($objs as $obj) { + $this->delete($obj, $force); } - else { - $sql .= $criteria; - } - - return $force ? $this->db->queryF($sql) : $this->db->query($sql); } }