Minahito
minah****@users*****
2006年 11月 9日 (木) 16:21:28 JST
Index: xoops2jp/html/modules/legacy/preload/Primary/SiteClose.class.php diff -u xoops2jp/html/modules/legacy/preload/Primary/SiteClose.class.php:1.1.2.4 xoops2jp/html/modules/legacy/preload/Primary/SiteClose.class.php:1.1.2.5 --- xoops2jp/html/modules/legacy/preload/Primary/SiteClose.class.php:1.1.2.4 Sun Nov 5 15:39:14 2006 +++ xoops2jp/html/modules/legacy/preload/Primary/SiteClose.class.php Thu Nov 9 16:21:27 2006 @@ -53,6 +53,7 @@ $GLOBALS['xoopsUser'] = $context->mXoopsUser; if (!empty($_POST['cube_module_install'])) { //@todo use Ticket require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstaller.class.php"; + require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstallUtils.class.php"; if (isset($_POST['uninstalled_modules']) && is_array($_POST['uninstalled_modules'])){ foreach ($_POST['uninstalled_modules'] as $module) { $module = basename($module); @@ -64,7 +65,7 @@ $xoopsModule->set('weight', 1); $xoopsModule->loadInfoAsVar($module); - $installer =& new Legacy_ModuleInstaller(); + $installer =& Legacy_ModuleInstallUtils::createInstaller($xoopsModule->get('dirname')); $installer->setCurrentXoopsModule($xoopsModule); $installer->executeInstall(); } @@ -101,7 +102,7 @@ $xoopsModule->set('weight', 1); $xoopsModule->loadInfoAsVar($module); - $installer =& new Legacy_ModuleInstaller(); + $installer =& Legacy_ModuleInstallUtils::createInstaller($xoopsModule->get('dirname')); $installer->setCurrentXoopsModule($xoopsModule); $installer->executeInstall(); } @@ -125,6 +126,7 @@ } elseif (!empty($_POST['cube_module_uninstallok'])) { //@todo use Ticket require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleUninstaller.class.php"; + require_once XOOPS_LEGACY_PATH . "/admin/class/ModuleInstallUtils.class.php"; $module = basename($_POST['cube_module_uninstallok']); if (in_array($module, $retArray['disabled'])) { $controller->mRoot->mLanguageManager->loadModuleAdminMessageCatalog('legacy'); @@ -132,7 +134,7 @@ $handler =& xoops_gethandler('module'); $xoopsModule =& $handler->getByDirname($module); - $uninstaller =& new Legacy_ModuleUninstaller(); + $uninstaller =& Legacy_ModuleInstallUtils::createUninstaller($xoopsModule->get('dirname')); $uninstaller->setCurrentXoopsModule($xoopsModule); $uninstaller->executeUninstall(); }