Commit 8af3361f authored by Franco Fichtner's avatar Franco Fichtner

config: remove unused code

(cherry picked from commit ceafaf0a)
parent ecce3eb9
......@@ -168,19 +168,14 @@ function write_config($desc = '', $backup = true)
global $config;
if (!empty($_SERVER['REMOTE_ADDR'])) {
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (!empty($_SESSION['Username']) && ($_SESSION['Username'] != 'root')) {
$user = getUserEntry($_SESSION['Username']);
if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) {
session_write_close();
// okay, it's not very nice to check permissions here, but let's make it explicit while we do...
log_error(gettext("WARNING: User")." ".$_SESSION['Username']." ".gettext("may not write config (user-config-readonly set)"));
return false;
}
}
session_write_close();
}
if (!isset($config['version'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment