예제 #1
0
    $smarty->assign("T_INSTALLATION_OPTIONS", array(array('text' => 'Emergency restore', 'image' => "16x16/undo.png", 'href' => 'install/' . basename($_SERVER['PHP_SELF']) . "?restore=1")));
    $smarty->assign("T_CONFIGURATION_EXISTS", true);
}
if (isset($_GET['step']) && $_GET['step'] == 1 || isset($_GET['unattended'])) {
    if (is_file('../php.ini') && !is_file('php.ini') && copy('../php.ini', 'php.ini') && !isset($_GET['unattended'])) {
        header("location:" . $_SERVER['PHP_SELF'] . "?step=1" . (isset($_GET['upgrade']) ? '&upgrade=1' : ''));
    }
    $exclude_normal = true;
    require_once $path . "includes/check_status.php";
    Installation::fix($settings_mandatory, 'local');
    if ($_GET['mode'] != 'none' && sizeof($settings_mandatory) > 0) {
        if (!$_GET['mode']) {
            Installation::fix($settings_mandatory, 'local');
            header("location:" . $_SERVER['PHP_SELF'] . "?step=1&mode=htaccess" . (isset($_GET['upgrade']) ? '&upgrade=1' : ''));
        } else {
            Installation::fix($settings_mandatory, 'htaccess');
            header("location:" . $_SERVER['PHP_SELF'] . "?step=1&mode=none" . (isset($_GET['upgrade']) ? '&upgrade=1' : ''));
        }
    } else {
        if ($_GET['mode'] == 'none' && sizeof($settings_mandatory) > 0) {
            $message = 'The system tried to automatically fix the errors shown below by applying custom php.ini and .htaccess files, but was unable to. Please fix the following errors manually.';
        } else {
            if ($_GET['mode'] == 'none') {
                $message = 'The system automatically changed some php parameters to meet installation prerequisites by applying a local php.ini and/or a .htaccess file';
                $message_type = 'success';
            }
        }
    }
    if (!$install) {
        $smarty->assign("T_MISSING_SETTINGS", true);
    }