Exemplo n.º 1
0
 $tables = system_CleanVars($_REQUEST, 'tables', array(), 'array');
 $avatar = system_CleanVars($_REQUEST, 'avatar', 1, 'int');
 $tables_op = system_CleanVars($_REQUEST, 'maintenance', array(), 'array');
 $verif_cache = false;
 $verif_session = false;
 $verif_avatar = false;
 $verif_maintenance = false;
 $result_cache = false;
 $result_session = false;
 $result_avatar = false;
 $result_maintenance = false;
 $maintenance = new SystemMaintenance();
 //Cache
 if (!empty($cache)) {
     $verif_cache = true;
     if ($maintenance->CleanCache($_REQUEST['cache'])) {
         $result_cache = true;
         //Set active modules in cache folder
         xoops_setActiveModules();
     }
 }
 //Session
 if ($session == 1) {
     $verif_session = true;
     if ($maintenance->CleanSession()) {
         $result_session = true;
     }
 }
 //Maintenance tables
 if (!empty($tables)) {
     $verif_maintenance = true;
Exemplo n.º 2
0
                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;
}