From ceafaf0ab45a6c7940b270fda26754aac3fdc5ed Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 3 May 2016 09:26:42 +0200 Subject: [PATCH] config: remove unused code --- src/etc/inc/config.lib.inc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 1f0205248..fe46e2bff 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -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'])) {