From 20fbf497852f18c71c3631cec8704726efa9f1a6 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 2 Mar 2017 07:52:57 +0200 Subject: [PATCH] *Fix Proxy setting becomes unset by user* --- web/edit/web/index.php | 4 ++-- web/templates/user/edit_web.html | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/web/edit/web/index.php b/web/edit/web/index.php index 11cda0ea2..e736908dd 100644 --- a/web/edit/web/index.php +++ b/web/edit/web/index.php @@ -230,8 +230,8 @@ if (!empty($_POST['save'])) { $restart_proxy = 'yes'; } - // Change proxy template / Update extension list - if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) { + // Change proxy template / Update extension list (admin only) + if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg'])) && ($_SESSION['user'] == 'admin')) { $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']); $ext = preg_replace("/,/", " ", $ext); $ext = preg_replace('/\s+/', ' ',$ext); diff --git a/web/templates/user/edit_web.html b/web/templates/user/edit_web.html index 20358b032..a7f54db03 100644 --- a/web/templates/user/edit_web.html +++ b/web/templates/user/edit_web.html @@ -85,6 +85,29 @@ + + + + + + + + + + + + + + + +
+ +
+ +
+ + +