From 06edfd868603bb622ec17d609214f4b680f8e011 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 29 Nov 2012 09:04:14 -0500
Subject: [PATCH] - Added options to disable combobox and load indicator in Interface Config (default is on). - Bugfix: sys.ini and server.ini: if checkbox is not checked, write default value from tform file into database.
---
interface/web/admin/system_config_edit.php | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php
index 0a75028..2eb513d 100644
--- a/interface/web/admin/system_config_edit.php
+++ b/interface/web/admin/system_config_edit.php
@@ -105,6 +105,16 @@
$section = $app->tform->getCurrentTab();
$server_config_array = $app->getconf->get_global_config();
+
+ foreach($app->tform->formDef['tabs'][$section]['fields'] as $key => $field) {
+ if ($field['formtype'] == 'CHECKBOX') {
+ if($this->dataRecord[$key] == '') {
+ // if a checkbox is not set, we set it to the unchecked value
+ $this->dataRecord[$key] = $field['value'][0];
+ }
+ }
+ }
+
$new_config = $app->tform->encode($this->dataRecord,$section);
if($section == 'sites' && $new_config['vhost_subdomains'] != 'y' && $server_config_array['vhost_subdomains'] == 'y') {
// check for existing vhost subdomains, if found the mode cannot be disabled
--
Gitblit v1.9.1