Ejemplo n.º 1
0
        //If the form is submitted and validated
        $values = $generalPHPForm->exportValues();
        unset($values['submit']);
        if ($GLOBALS['configuration']['version_hosted']) {
            unset($values['memory_limit']);
            unset($values['max_execution_time']);
        }
        foreach ($values as $key => $value) {
            if ($value == '') {
                if ($key == 'memory_limit' || $key == 'max_execution_time') {
                    ini_restore($key);
                    EfrontConfiguration::setValue($key, str_ireplace("M", "", ini_get($key)));
                } elseif ($key == 'max_file_size') {
                    EfrontConfiguration::setValue($key, FileSystemTree::getUploadMaxSize());
                } else {
                    EfrontConfiguration::deleteValue($key);
                }
            } else {
                if ($key == 'memory_limit' || $key == 'max_execution_time') {
                    //You can't set these values below the php.ini setting
                    ini_restore($key);
                    EfrontConfiguration::setValue($key, $value);
                } else {
                    EfrontConfiguration::setValue($key, $value);
                }
            }
        }
        eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=general&tab=php&message=" . urlencode(_SUCCESFULLYUPDATECONFIGURATION) . "&message_type=success");
    }
}
$smarty->assign("T_GENERAL_PHP_FORM", $generalPHPForm->toArray());