From a80aa13561696868321767a738b332dde70db5d6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 30 Jun 2014 21:31:16 -0600 Subject: [PATCH] [mms] Fix mailbox selection on Spam page (Bug #13298). Horde_Form doesn't let you do things like add an empty hidden field. Super annoying. --- ingo/docs/CHANGES | 15 ++++++++++++--- ingo/lib/Basic/Base.php | 8 ++++---- ingo/lib/Form/Spam.php | 18 ++++++++++++++++++ ingo/package.xml | 20 ++++++++++++++++++-- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/ingo/docs/CHANGES b/ingo/docs/CHANGES index 021fffe338b..6e2a8c73fc4 100644 --- a/ingo/docs/CHANGES +++ b/ingo/docs/CHANGES @@ -3,13 +3,22 @@ v3.3.0-git ---------- ------- -v3.2.0 ------- +--------- +v3.2.0RC2 +--------- +[mms] Fix mailbox selection on Spam page (Bug #13298). [mms] Fix regression in deactivating scripts (Bug #13297). +--------- +v3.2.0RC1 +--------- + +[jan] Update Polish translation (Maciej Uhlig ). +[jan] Update Japanese translation (Hiromi Kimura ). + + ----------- v3.2.0beta2 ----------- diff --git a/ingo/lib/Basic/Base.php b/ingo/lib/Basic/Base.php index f4bc039caa0..f877d9cfa6c 100644 --- a/ingo/lib/Basic/Base.php +++ b/ingo/lib/Basic/Base.php @@ -80,12 +80,12 @@ public function validateMbox($name) { global $registry; - $new_id = $name . '_new'; + $new_mbox = $this->vars->get($name . '_new'); - if (isset($this->vars->$new_id)) { + if (strlen($new_mbox)) { if ($registry->hasMethod('mail/createMailbox') && - $registry->call('mail/createMailbox', array($this->vars->$new_id))) { - return $this->vars->$new_id; + $registry->call('mail/createMailbox', array($new_mbox))) { + return $new_mbox; } } elseif (strlen($this->vars->$name)) { return $this->vars->$name; diff --git a/ingo/lib/Form/Spam.php b/ingo/lib/Form/Spam.php index 75a0df771a8..0f22281d952 100644 --- a/ingo/lib/Form/Spam.php +++ b/ingo/lib/Form/Spam.php @@ -42,4 +42,22 @@ public function __construct($vars, $title = '', $name = null) $this->setButtons(_("Save")); } + + public function renderActive( + $renderer = null, $vars = null, $action = '', $method = 'get', + $enctype = null, $focus = true + ) + { + if (is_null($vars)) { + $vars = $this->_vars; + } + + $vars = clone $vars; + unset($vars->folder_new); + + parent::renderActive( + $renderer, $vars, $action, $method, $enctype, $focus + ); + } + } diff --git a/ingo/package.xml b/ingo/package.xml index 5488182b97c..0ec2da124bf 100644 --- a/ingo/package.xml +++ b/ingo/package.xml @@ -33,6 +33,7 @@ ASL +* @@ -1438,14 +1439,29 @@ - 3.2.0beta3 + 3.2.0RC1 + 3.2.0 + + beta + beta + 2014-06-17 + ASL + +* [jan] Update Polish translation (Maciej Uhlig <maciej.uhlig@us.edu.pl>). +* [jan] Update Japanese translation (Hiromi Kimura <hiromi@tac.tsukuba.ac.jp>). + + + + + 3.2.0RC2 3.2.0 beta beta - 2014-06-04 + 2014-06-17 ASL +* [mms] Fix mailbox selection on Spam page (Bug #13298). * [mms] Fix regression in deactivating scripts (Bug #13297).