From 8dbec8e24377eef837e8791cd0c3382dff583f95 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 27 Mar 2014 16:40:30 +0000 Subject: [PATCH] Enleve les derniere declaration de var de mysql.sql et les range dans config. --- bureau/class/config.php | 8 ++++++++ bureau/class/m_variables.php | 2 +- install/mysql.sql | 26 +------------------------- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/bureau/class/config.php b/bureau/class/config.php index 0a531206..bf33f23e 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -214,4 +214,12 @@ if ($oldid && $oldid!=$cuid) { $isinvited=true; } + +// Init some vars +variable_get('hosting_tld', '','This is a FQDN that designates the main hostname of the service. For example, hosting_tld determines in what TLD the "free" user domain is created. If this is set to "example.com", a checkbox will appear in the user creation dialog requesting the creator if he wants to create the domain "username.example.com".', array(array('desc'=>'Wanted FQDN','type'=>'string'))); + +variable_get('subadmin_restriction', '0', "This variable set the way the account list works for accounts other than 'admin' (2000). 0 (default) = admin other than admin/2000 can see their own account, but not the other one 1 = admin other than admin/2000 can see any account by clicking the ''show all accounts'' link.", array(array('desc'=>'Shared access activated?','type'=>'boolean'))); + +variable_get('auth_ip_ftp_default_yes', '1', "This variable set if you want to allow all IP address to access FTP by default. If the user start to define some IP or subnet in the allow list, only those he defined will be allowed.", array(array('desc'=>'Allow by default?','type'=>'boolean'))); + ?> diff --git a/bureau/class/m_variables.php b/bureau/class/m_variables.php index 942b5fcf..2662be1b 100644 --- a/bureau/class/m_variables.php +++ b/bureau/class/m_variables.php @@ -169,7 +169,7 @@ class m_variables { // Replace needed vars foreach ($variables as $vv => $hh) { - if (!isset($hh['value'])) { + if (!isset($hh['value']) || !empty($hh['value'])) { continue; } $variables[$vv]['value'] = strtr($hh['value'], $this->replace_array ); diff --git a/install/mysql.sql b/install/mysql.sql index c889867b..1d3e838d 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -398,17 +398,6 @@ CREATE TABLE `variable` ( KEY `name` (`name`) ) ENGINE=MyISAM; --- hosting_tld: only used, for now, in bureau/admin/adm_*add.php -INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('hosting_tld', 0, -'This is a FQDN that designates the main hostname of the service. - -For example, hosting_tld determines in what TLD the "free" user domain -is created. If this is set to "example.com", a checkbox will appear in -the user creation dialog requesting the creator if he wants to create -the domain "username.example.com". - -If this is set to 0 or a "false" string, it will be ignored.'); - -- -- Table structure for table `dbusers` -- @@ -471,13 +460,6 @@ CREATE TABLE IF NOT EXISTS `policy` ( PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='The password policies for services'; - -INSERT IGNORE INTO `variable` (`name` ,`value` ,`comment`) -VALUES ( -'subadmin_restriction', '', -'This variable set the way the account list works for accounts other than "admin" (2000). 0 (default) = admin other than admin/2000 can see their own account, but not the other one 1 = admin other than admin/2000 can see any account by clicking the ''show all accounts'' link. ' -); - -- Domains type CREATE TABLE IF NOT EXISTS `domaines_type` ( `name` VARCHAR (30) NOT NULL, -- Uniq name @@ -585,13 +567,6 @@ CREATE TABLE IF NOT EXISTS `authorised_ip_affected` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM COMMENT='Table with list of protocol <-> authorised ip and subnet'; -INSERT IGNORE INTO `variable` (`name` ,`value` ,`comment`) -VALUES ( -'auth_ip_ftp_default_yes', '1', -'This variable set if you want to allow all IP address to access FTP by default. If the user start to define some IP or subnet in the allow list, only those he defined will be allowed. This variable can take two value : 0 or 1.' -); - - -- -- Structure de la table `cron` -- @@ -763,3 +738,4 @@ CREATE TABLE IF NOT EXISTS `actions` ( status int(8) unsigned default NULL, PRIMARY KEY ( `id` ) ) ENGINE=MyISAM COMMENT = 'generic actions'; +