NobuNobu
nobun****@users*****
2006年 4月 2日 (日) 22:07:47 JST
Index: xoops2jp/html/class/XCube_Utils.class.php diff -u xoops2jp/html/class/XCube_Utils.class.php:1.1.2.2 xoops2jp/html/class/XCube_Utils.class.php:1.1.2.3 --- xoops2jp/html/class/XCube_Utils.class.php:1.1.2.2 Tue Nov 15 21:42:56 2005 +++ xoops2jp/html/class/XCube_Utils.class.php Sun Apr 2 22:07:47 2006 @@ -1,5 +1,5 @@ <?php -// $Id: XCube_Utils.class.php,v 1.1.2.2 2005/11/15 12:42:56 minahito Exp $ +// $Id: XCube_Utils.class.php,v 1.1.2.3 2006/04/02 13:07:47 nobunobu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPSCube.org // @@ -126,6 +126,28 @@ return str_replace($searches,$replaces,$subject); } + + function checkSystemModules() { + $root=&XCube_Root::getSingleton(); + $systemModules = explode(',',$root->getSiteConfig('Cube','SystemModules')); + $moduleHandler =& xoops_gethandler('module'); + $uninstalledModules = array(); + $disabledModules = array(); + foreach($systemModules as $systemModule) { + if(!empty($systemModule)) { + if(!($moduleObject =& $moduleHandler->getByDirname($systemModule))) { + $uninstalledModules[] = $systemModule; + } else if(!$moduleObject->getVar('isactive')) { + $disabledModules[] = $systemModule; + } + } + } + if ((count($uninstalledModules)==0)&&(count($disabledModules)==0)) { + return true; + } else { + return array('uninstalled' =>$uninstalledModules, 'disabled'=>$disabledModules); + } + } } ?> \ No newline at end of file