CCanDo::checkAdmin(); CModule::loadModules(false); $setupClasses = CApp::getChildClasses("CSetup"); $mbmodules = array("notInstalled" => array(), "installed" => array()); $coreModules = array(); $upgradable = false; foreach ($setupClasses as $setupClass) { if (!class_exists($setupClass)) { continue; } $setup = new $setupClass(); $mbmodule = new CModule(); $mbmodule->compareToSetup($setup); $mbmodule->checkModuleFiles(); $mbmodule->getUpdateMessages($setup, true); $mbmodule->updateFormFields(); if ($mbmodule->mod_ui_order == 1000) { $mbmodules["notInstalled"][$mbmodule->mod_name] = $mbmodule; } else { $mbmodules["installed"][$mbmodule->mod_name] = $mbmodule; if ($mbmodule->_upgradable) { $upgradable = true; } } if ($mbmodule->mod_type == "core" && $mbmodule->_upgradable) { $coreModules[$mbmodule->mod_name] = $mbmodule; } } foreach ($mbmodules as $typeModules) { foreach ($typeModules as $module) { foreach ($module->_dependencies as $version => $dependencies) {