public function onDeleteModule() { $arg = Common::getPost('modulename', ''); if (false === ($post_module = GWF_ModuleLoader::loadModuleFS($arg))) { return $this->module->error('err_module', htmlspecialchars($arg)) . $this->onTemplateReinstall(false); } $form = $this->formReInstall($post_module); if (false !== ($error = $form->validate($this->module))) { return $error . $this->onTemplateReinstall(false); } if (0 == ($mid = $post_module->getID())) { return GWF_HTML::err('ERR_GENERAL', array(__FILE__, __LINE__)) . $this->onTemplateReinstall(false); } if (false === GDO::table('GWF_Module')->deleteWhere("module_id={$mid}")) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)) . $this->onTemplateReinstall(false); } if (false === GDO::table('GWF_ModuleVar')->deleteWhere("mv_mid={$mid}")) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)) . $this->onTemplateReinstall(false); } return $this->module->message('msg_mod_del'); }
GWF_ModuleLoader::loadModuleFS('Login')->onInclude(); $lf = GDO::table('GWF_LoginFailure'); GWF_ModuleLoader::renameColumn($lf, 'ip', 'logfail_ip'); GWF_ModuleLoader::renameColumn($lf, 'userid', 'logfail_uid'); GWF_ModuleLoader::renameColumn($lf, 'timestamp', 'logfail_time'); $lm = GDO::table('GWF_LangMap'); GWF_ModuleLoader::renameColumn($lm, 'countryid', 'langmap_cid'); GWF_ModuleLoader::renameColumn($lm, 'langid', 'langmap_lid'); # echo "Module_PM changed a lot ... <br/>\n"; if (false !== ($mod_pm = GWF_ModuleLoader::loadModuleFS('PM'))) { $mod_pm->onInclude(); require_once 'install23pm.php'; } echo "Module_Category changed a lot, but was unused.... reinstall wipe<br/>\n"; if (false !== ($mod_cat = GWF_ModuleLoader::loadModuleFS('Category'))) { GWF_ModuleLoader::installModule($mod_cat, true); } echo "Module Flags have changed<br/>\n"; GDO::table('GWF_Module')->update('module_options=module_options|2', 'module_options&4'); GDO::table('GWF_Module')->update('module_options=module_options-4', 'module_options&4'); echo "Register tokens<br/>\n"; GWF_Module::loadModuleDB('Register')->onInclude(); GDO::table('GWF_UserActivation')->createTable(true); echo "CORE: Counter<br/>\n"; $counter = GDO::table('GWF_Counter'); GWF_ModuleLoader::changeColumn($counter, 'key', 'count_key'); GWF_ModuleLoader::changeColumn($counter, 'value', 'count_value'); echo "Installing all modules... some might be gone.<br/>\n"; GWF_InstallFunctions::all_modules(); echo "WHOHO!<br/>\n";