Exemple #1
0
/**
 * Function maintained only for compatibility
 *
 * @todo remove this in 1.4  - all occurrences in the core have been removed
 * @deprecated use impresscms_get_adminmenu instead
 */
function xoops_module_get_admin_menu()
{
    icms_core_Debug::setDeprecated('impresscms_get_adminmenu', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
    return impresscms_get_adminmenu();
}
Exemple #2
0
			}
		}

		icms::$preload->triggerEvent('afterSaveSystemAdminPreferencesItems', $saved_config_items);
		unset($saved_config_items);

		if (! empty($use_mysession) && $icmsConfig['use_mysession'] == 0 && $session_name != '') {
			setcookie($session_name, session_id(), time() +(60 *(int) $session_expire), '/', '', 0);
		}

		// Clean cached files, may take long time
		// Use register_shutdown_function to keep running after connection closes so that cleaning cached files can be finished
		// Cache management should be performed on a separate page
		register_shutdown_function(array(&$xoopsTpl, 'clear_all_cache'));

		// If language is changed, leave the admin menu file to be regenerated upon next request,
		// otherwise regenerate admin menu file for now
		if (! $lang_updated) {
			// regenerate admin menu file
			register_shutdown_function('xoops_module_write_admin_menu', impresscms_get_adminmenu());
		} else {
			$redirect = ICMS_URL . '/admin.php';
		}

		if (isset($redirect) && $redirect != '') {
			redirect_header($redirect, 2, _MD_AM_DBUPDATED);
		} else {
			redirect_header('admin.php?fct=preferences', 2, _MD_AM_DBUPDATED);
		}
}
Exemple #3
0
    $msgs .= '<br /><span style="font-size:smaller;">' . $mod->getVar('name') . '</span><br /><br />' . _MD_AM_RUSUREUPD;
    icms_cp_header();
    if (icms_getModuleInfo('system')->getDBVersion() < 14 && (!is_writable(ICMS_PLUGINS_PATH) || !is_dir(ICMS_ROOT_PATH . '/plugins/preloads') || !is_writable(ICMS_ROOT_PATH . '/plugins/preloads'))) {
        icms_core_Message::error(sprintf(_MD_AM_PLUGINSFOLDER_UPDATE_TEXT, ICMS_PLUGINS_PATH, ICMS_ROOT_PATH . '/plugins/preloads'), _MD_AM_PLUGINSFOLDER_UPDATE_TITLE, TRUE);
    }
    if (icms_getModuleInfo('system')->getDBVersion() < 37 && !is_writable(ICMS_IMANAGER_FOLDER_PATH)) {
        icms_core_Message::error(sprintf(_MD_AM_IMAGESFOLDER_UPDATE_TEXT, str_ireplace(ICMS_ROOT_PATH, "", ICMS_IMANAGER_FOLDER_PATH)), _MD_AM_IMAGESFOLDER_UPDATE_TITLE, TRUE);
    }
    icms_core_Message::confirm(array('module' => $module, 'op' => 'update_ok', 'fct' => 'modulesadmin'), 'admin.php', $msgs, _MD_AM_UPDATE);
    icms_cp_footer();
    exit;
}
if ($op == 'update_ok') {
    $ret = array();
    $ret[] = icms_module_update($module);
    $contents = impresscms_get_adminmenu();
    if (!xoops_module_write_admin_menu($contents)) {
        $ret[] = "<p>" . _MD_AM_FAILWRITE . "</p>";
    }
    icms_cp_header();
    if (count($ret) > 0) {
        foreach ($ret as $msg) {
            if ($msg != '') {
                echo $msg;
            }
        }
    }
    echo "<br /><a href='admin.php?fct=modulesadmin'>" . _MD_AM_BTOMADMIN . "</a>";
    icms_cp_footer();
    exit;
}
 }
 if ($_POST['mod'] == 1) {
     /**
      * Automatically updating the system module before installing the selected modules
      * @since 1.3
      */
     include_once ICMS_ROOT_PATH . '/modules/system/include/update.php';
     $module_handler = icms::handler('icms_module');
     $system_moduleObj = $module_handler->getByDirname('system');
     xoops_module_update_system($system_moduleObj);
     $install_mods = isset($_POST['install_mods']) ? $_POST['install_mods'] : '';
     $anon_accessible_mods = isset($_POST['anon_accessible_mods']) ? $_POST['anon_accessible_mods'] : '';
     if (isset($_POST['install_mods'])) {
         for ($i = 0; $i <= count($install_mods) - 1; $i++) {
             $content .= xoops_module_install($install_mods[$i]);
             impresscms_get_adminmenu();
         }
     } else {
         $content .= _INSTALL_NO_PLUS_MOD;
     }
     //Install protector module by default if found.
     //TODO: Insert Protector installation - leads to blank page as it is now.
     if (file_exists(ICMS_ROOT_PATH . '/modules/protector/xoops_version.php')) {
         $content .= xoops_module_install('protector');
         /*        	include_once "./class/mainfilemanager.php";
         			 $mm = new mainfile_manager("../mainfile.php");
         			 $mm->setRewrite('PROTECTOR1', 'include  XOOPS_TRUST_PATH.\'/modules/protector/include/precheck.inc.php\')' ;
         			 $mm->setRewrite('PROTECTOR2', 'include  XOOPS_TRUST_PATH.\'/modules/protector/include/postcheck.inc.php\')' ;
         
         			 $result = $mm->doRewrite();
         			 $mm->report();*/
Exemple #5
0
$xoopsOption['pagetype'] = 'admin';
include 'mainfile.php';
include ICMS_ROOT_PATH . '/include/cp_functions.php';
// test to see if the system module should be updated, added in 1.2
if (icms_getModuleInfo('system')->getDBVersion() < ICMS_SYSTEM_DBVERSION) {
    redirect_header('modules/system/admin.php?fct=modulesadmin&amp;op=update&amp;module=system', 1, _CO_ICMS_UPDATE_NEEDED);
}
$op = isset($_GET['rssnews']) ? (int) $_GET['rssnews'] : 0;
if (!empty($_GET['op'])) {
    $op = (int) $_GET['op'];
}
if (!empty($_POST['op'])) {
    $op = (int) $_POST['op'];
}
if (!file_exists(ICMS_CACHE_PATH . '/adminmenu_' . $icmsConfig['language'] . '.php')) {
    xoops_module_write_admin_menu(impresscms_get_adminmenu());
}
switch ($op) {
    case 1:
        icms_cp_header();
        showRSS();
        break;
        /*	case 2:
        		 xoops_module_write_admin_menu(impresscms_get_adminmenu());
        		 redirect_header('javascript:history.go(-1)', 1, _AD_LOGINADMIN);
        		 break;*/
    /*	case 2:
    		 xoops_module_write_admin_menu(impresscms_get_adminmenu());
    		 redirect_header('javascript:history.go(-1)', 1, _AD_LOGINADMIN);
    		 break;*/
    default: