diff --git a/bureau/class/m_mail.php b/bureau/class/m_mail.php index bb9b6e2f..cfc4e47d 100644 --- a/bureau/class/m_mail.php +++ b/bureau/class/m_mail.php @@ -445,6 +445,7 @@ ORDER BY * or false if an error occured ($err is filled accordingly) */ function hook_dom_del_mx_domain($dom_id) { + global $db; $list=$this->enum_domain_mails($dom_id,"",0,-1); if (is_array($list)) { foreach($list as $one) { diff --git a/bureau/class/variables.php b/bureau/class/variables.php index 212f5b5e..a57a94f3 100644 --- a/bureau/class/variables.php +++ b/bureau/class/variables.php @@ -109,7 +109,7 @@ function variable_get($name, $default = null, $createit_comment = null) { * of serialization as necessary. */ function variable_set($name, $value, $comment=null) { - global $conf, $db, $err; + global $conf, $db, $err, $hook; $err->log('variable', 'variable_set', '+'.serialize($value).'+'.$comment.'+'); variable_init_maybe(); @@ -117,10 +117,13 @@ function variable_set($name, $value, $comment=null) { if (is_object($value) || is_array($value)) { $value2 = serialize($value); } + if (array_key_exists($name,$conf)) { + $previous=$conf[$name]; + } else { + $previous=null; + } if (!array_key_exists($name,$conf) || $value!=$conf[$name]) { - $previous=$conf[$name]; $conf[$name] = $value; - if ( empty($comment) ) { $query = "INSERT INTO variable (name, value) values ('".$name."', '".addslashes($value2)."') on duplicate key update name='$name', value='$value';"; } else { diff --git a/debian/changelog b/debian/changelog index 9e83c4b9..7e537b6b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +alternc (3.1.9) oldoldstable; urgency=low + + * fix missing GLOBALS in various places + * fix non-installed default_spf_value and default_dmarc_value in variables + + -- Benjamin Sonntag Wed, 3 Sep 2015 15:53:16 +0200 + alternc (3.1.8) oldoldstable; urgency=low * fix non-working levensthein call for checkPolicy, fixed using preg_split instead diff --git a/install/upgrades/3.4.3~a.php b/install/upgrades/3.4.3~a.php new file mode 100644 index 00000000..449ea99d --- /dev/null +++ b/install/upgrades/3.4.3~a.php @@ -0,0 +1,22 @@ +#!/usr/bin/php + Mon, 3 Aug 2015 15:54:12 +0200 ++ -- Benjamin Sonntag Wed, 3 Sep 2015 15:54:12 +0200 + - alternc (3.1.8) oldoldstable; urgency=low + alternc (3.1.9) oldoldstable; urgency=low - * fix non-working levensthein call for checkPolicy, fixed using preg_split instead + * fix missing GLOBALS in various places