From 2b9951bbfe7b2635a630e8eccb05a6134d3b8a24 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 13 Aug 2013 15:36:38 -0400
Subject: [PATCH] Improved permission checks.
---
interface/web/admin/system_config_edit.php | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php
index 2eb513d..9bf84d0 100644
--- a/interface/web/admin/system_config_edit.php
+++ b/interface/web/admin/system_config_edit.php
@@ -50,6 +50,7 @@
class page_action extends tform_actions {
+ //var $_js_changed = false;
function onShowEdit() {
global $app, $conf;
@@ -114,6 +115,12 @@
}
}
}
+
+ /*
+ if((isset($this->dataRecord['use_loadindicator']) && $this->dataRecord['use_loadindicator'] != $server_config_array[$section]['use_loadindicator']) || (isset($this->dataRecord['use_combobox']) && $this->dataRecord['use_combobox'] != $server_config_array[$section]['use_combobox'])){
+ $this->_js_changed = true;
+ }
+ */
$new_config = $app->tform->encode($this->dataRecord,$section);
if($section == 'sites' && $new_config['vhost_subdomains'] != 'y' && $server_config_array['vhost_subdomains'] == 'y') {
@@ -128,8 +135,9 @@
$server_config_array[$section] = $new_config;
$server_config_str = $app->ini_parser->get_ini_string($server_config_array);
- $sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
- if($conf['demo_mode'] != true) $app->db->query($sql);
+ //$sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
+ //if($conf['demo_mode'] != true) $app->db->query($sql);
+ if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($server_config_str)."'", 'sysini_id', 1);
/*
* If we should use the domain-module, we have to insert all existing domains into the table
@@ -156,6 +164,17 @@
}
}
+ /*
+ function onAfterUpdate() {
+ if($this->_js_changed == true) {
+ // not the best way, but it works
+ header('Content-Type: text/html');
+ print '<script type="text/javascript">document.location.reload(true);</script>';
+ exit;
+ }
+ }
+ */
+
}
$app->tform_actions = new page_action;
--
Gitblit v1.9.1