示例#1
0
            } else {
                CAppUI::setMsg("Installation de '{$module->mod_name}' à la version {$module->mod_version} sur {$setup->mod_version}", UI_MSG_WARNING, true);
            }
        } else {
            CAppUI::setMsg("Module '%s' non mis à jour", UI_MSG_WARNING, $module->mod_name);
        }
    }
    // In case the setup has added some user prefs
    CAppUI::buildPrefs();
    error_reporting($old_er);
    CAppUI::redirect();
}
$module = new CModule();
if ($mod_id) {
    $module->load($mod_id);
    $module->checkModuleFiles();
} else {
    $module->mod_version = "all";
    $module->mod_name = $mod_name;
}
if (!class_exists($setupclass = "CSetup{$module->mod_name}")) {
    if ($module->mod_type != "core" && !$module->_files_missing) {
        CAppUI::setMsg("CModule-msg-no-setup", UI_MSG_ERROR);
        CAppUI::redirect();
    }
}
if ($module->mod_type == "core" && in_array($cmd, array("remove", "install", "toggle"))) {
    CAppUI::setMsg("Core modules can't be uninstalled or disactivated", UI_MSG_ERROR);
    CAppUI::redirect();
}
if (!$module->_files_missing) {