diff --git a/bureau/class/functions.php b/bureau/class/functions.php index 59f95a3e..05c865c3 100644 --- a/bureau/class/functions.php +++ b/bureau/class/functions.php @@ -41,7 +41,7 @@ function compare_logname($a, $b) { or a string for the index in $tld */ function checkhostallow($domain,$dns) { - global $L_NS1,$L_NS2,$db; + global $L_NS1,$L_NS2,$db,$dom; $sizefound=0; $found=""; $db->query("SELECT tld,mode FROM tld;"); @@ -55,8 +55,7 @@ function checkhostallow($domain,$dns) { } } } - $tld_no_check_at_all = variable_get('tld_no_check_at_all', 0,'Set to 1 to disable ALL check on the TLD (users will be able to add any domain)'); - if ( $tld_no_check_at_all ) + if ( $dom->tld_no_check_at_all ) return 0; // OK , the boss say that you can. if (!$found || $fmode==0) // TLD not allowed at all diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index c4374532..fb9dda5a 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -78,11 +78,13 @@ class m_dom { var $action_update= "1"; var $action_delete = "2"; + var $tld_no_check_at_all = "1"; /* ----------------------------------------------------------------- */ /** * Constructeur */ function m_dom() { + $this->tld_no_check_at_all = variable_get('tld_no_check_at_all', 0,'Set to 1 to disable ALL check on the TLD (users will be able to add any domain)'); } function hook_menu() {