$xoopsTpl->assign('result_cache', $result_cache); $xoopsTpl->assign('result_session', $result_session); $xoopsTpl->assign('result_avatar', $result_avatar); $xoopsTpl->assign('result_maintenance', $result_maintenance); $xoopsTpl->assign('maintenance', true); break; case 'dump_save': // Check security if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('admin.php?fct=maintenance', 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); } //Define Breadcrumb and tips $xoBreadCrumb->addLink(_AM_SYSTEM_MAINTENANCE_NAV_MANAGER, system_adminVersion('maintenance', 'adminpath')); $xoBreadCrumb->addLink(_AM_SYSTEM_MAINTENANCE_NAV_DUMP); $xoBreadCrumb->render(); $dump = new SystemMaintenance(); $dump_modules = isset($_REQUEST['dump_modules']) ? $_REQUEST['dump_modules'] : false; $dump_tables = isset($_REQUEST['dump_tables']) ? $_REQUEST['dump_tables'] : false; $drop = system_CleanVars($_REQUEST, 'drop', 1, 'int'); if ($dump_tables === true && $dump_modules === true || $dump_tables === false && $dump_modules === false) { redirect_header('admin.php?fct=maintenance', 2, _AM_SYSTEM_MAINTENANCE_DUMP_ERROR_TABLES_OR_MODULES); } if ($dump_tables !== false) { $result = $dump->dump_tables($dump_tables, $drop); } elseif ($dump_modules !== false) { $result = $dump->dump_modules($dump_modules, $drop); } $xoopsTpl->assign('result_dump', $result[1]); break; } xoops_cp_footer();
if (function_exists('xoops_module_update_' . $dirname)) { $func = 'xoops_module_update_' . $dirname; if (!$func($module, $prev_version)) { $msgs[] = "<p>" . sprintf(_AM_SYSTEM_MODULES_FAILED_EXECUTE, $func) . "</p>"; $msgs = array_merge($msgs, $module->getErrors()); } else { $msgs[] = "<p>" . sprintf(_AM_SYSTEM_MODULES_FAILED_SUCESS, "<strong>" . $func . "</strong>") . "</p>"; $msgs += $module->getErrors(); } } } $msgs[] = sprintf(_AM_SYSTEM_MODULES_OKUPD, '<strong>' . $module->getVar('name', 's') . '</strong>'); $msgs[] = '</div></div>'; $msgs[] = '<div class="center"><a href="admin.php?fct=modulesadmin">' . _AM_SYSTEM_MODULES_BTOMADMIN . '</a></div>'; foreach ($msgs as $msg) { echo $msg . '<br />'; } } // Call Footer xoops_cp_footer(); // Flush cache files for cpanel GUIs xoops_load("cpanel", "system"); XoopsSystemCpanel::flush(); require_once XOOPS_ROOT_PATH . '/modules/system/class/maintenance.php'; $maintenance = new SystemMaintenance(); $folder = array(1, 3); $maintenance->CleanCache($folder); //Set active modules in cache folder xoops_setActiveModules(); break; }