mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
config: remove unused code
This commit is contained in:
parent
55d37aff0c
commit
ceafaf0ab4
@ -153,19 +153,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'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user