Minahito
minah****@users*****
2007年 3月 14日 (水) 20:02:54 JST
Index: xoops2jp/html/modules/legacy/kernel/handler.php diff -u xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.4.2.2 xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.4.2.3 --- xoops2jp/html/modules/legacy/kernel/handler.php:1.1.2.4.2.2 Tue Mar 13 15:22:43 2007 +++ xoops2jp/html/modules/legacy/kernel/handler.php Wed Mar 14 20:02:54 2007 @@ -1,7 +1,7 @@ <?php /** * @package Legacy - * @version $Id: handler.php,v 1.1.2.4.2.2 2007/03/13 06:22:43 tom_g3x Exp $ + * @version $Id: handler.php,v 1.1.2.4.2.3 2007/03/14 11:02:54 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -273,14 +273,14 @@ if ($criteria->hasChildElements()) { $queryString = ""; $maxCount = $criteria->getCountChildElements(); - for ($i = 0; $i < $maxCount ; $i++) { - if ($i != 0) { - $queryString .= " " . $criteria->getCondition($i); - } - $queryString .= " " . $this->_makeCriteria4sql($criteria->getChildElement($i)); - } - return "(" . $queryString . ")"; + $queryString = '('. $this->_makeCriteria4sql($criteria->getChildElement(0)); + for ($i = 1; $i < $maxCount; $i++) { + $queryString .= " " . $criteria->getCondition($i) . " " . $this->_makeCriteria4sql($criteria->getChildElement($i)); + } + $queryString .= ')'; + + return $queryString; } else { //