Minahito
minah****@users*****
2006年 8月 14日 (月) 10:59:26 JST
Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.20 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.21 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.20 Wed Jul 26 19:53:34 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Mon Aug 14 10:59:26 2006 @@ -60,24 +60,26 @@ return; } + require_once XOOPS_MODULE_PATH . "/base/admin/class/Legacy_SQLScanner.class.php"; + $scanner =& new Legacy_SQLScanner(); + $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); + $sqlfile = $sqlfileInfo[XOOPS_DB_TYPE]; - if (!file_exists(XOOPS_MODULE_PATH . "/" . $dirname . "/" . $sqlfile)) { + if (!$scanner->loadFile(XOOPS_MODULE_PATH . "/${dirname}/" . $sqlfile)) { $log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_SQL_FILE_NOT_FOUND, $sqlfile)); return false; } - require_once XOOPS_ROOT_PATH . "/class/database/sqlutility.php"; - $util =& new sqlutility($module->getVar('dirname'),$sqlfile); - + $scanner->parse(); + $sqls = $scanner->getSQL(); + $root =& XCube_Root::getSingleton(); $db =& $root->mController->getDB(); - + // // TODO The following variable exists for rollback, but it is not implemented. // - $createdTables = $util->get_create();; - - foreach ($util->get_sql() as $sql) { + foreach ($sqls as $sql) { if (!$db->query($sql)) { $log->addError($db->error()); return;