From 65d94131b76ddef5a0788bc543452534e7faf918 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 Apr 2019 11:39:47 +0200 Subject: [baseconfig] Remove "enabled" checkbox, reset field on override disable Closes #3570 Closes #3569 --- modules-available/baseconfig/install.inc.php | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'modules-available/baseconfig/install.inc.php') diff --git a/modules-available/baseconfig/install.inc.php b/modules-available/baseconfig/install.inc.php index b4eada5d..f8c869a6 100644 --- a/modules-available/baseconfig/install.inc.php +++ b/modules-available/baseconfig/install.inc.php @@ -6,25 +6,11 @@ $res[] = tableCreate('setting_global', " `setting` varchar(28) NOT NULL, `value` text NOT NULL, `displayvalue` text NOT NULL, - `enabled` tinyint(1) UNSIGNED NOT NULL DEFAULT '1', PRIMARY KEY (`setting`) "); // Update path -// Add toggle field - -if (!tableHasColumn('setting_global', 'enabled')) { - if (tableHasColumn('setting_global', 'toggle')) { - $ret = Database::exec("ALTER TABLE `setting_global` CHANGE `toggle` `enabled` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1'"); - } else { - $ret = Database::exec("ALTER TABLE `setting_global` ADD COLUMN `enabled` tinyint(1) UNSIGNED NOT NULL DEFAULT '1'"); - } - if ($ret === false) { - finalResponse(UPDATE_FAILED, 'Adding enabled to setting_global failed: ' . Database::lastError()); - } -} - // Add displayvalue field if (!tableHasColumn('setting_global', 'displayvalue')) { @@ -34,10 +20,6 @@ if (!tableHasColumn('setting_global', 'displayvalue')) { } // Delete old tables - -/* -Keep disabled for a while, in case some customer made unexpected important changes etc... - if (tableExists('setting')) { Database::exec('DROP TABLE setting'); } @@ -47,7 +29,6 @@ if (tableExists('setting_distro')) { if (tableExists('cat_setting')) { Database::exec('DROP TABLE cat_setting'); } -*/ // Create response for browser -- cgit v1.2.3-55-g7522