Skip to content

Commit

Permalink
[mms] Fix mailbox selection on Spam page (Bug #13298).
Browse files Browse the repository at this point in the history
Horde_Form doesn't let you do things like add an empty hidden field.
Super annoying.
  • Loading branch information
slusarz committed Jul 1, 2014
1 parent 00e6097 commit a80aa13
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 9 deletions.
15 changes: 12 additions & 3 deletions ingo/docs/CHANGES
Expand Up @@ -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 <maciej.uhlig@us.edu.pl>).
[jan] Update Japanese translation (Hiromi Kimura <hiromi@tac.tsukuba.ac.jp>).


-----------
v3.2.0beta2
-----------
Expand Down
8 changes: 4 additions & 4 deletions ingo/lib/Basic/Base.php
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions ingo/lib/Form/Spam.php
Expand Up @@ -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
);
}

}
20 changes: 18 additions & 2 deletions ingo/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1438,14 +1439,29 @@
</release>
<release>
<version>
<release>3.2.0beta3</release>
<release>3.2.0RC1</release>
<api>3.2.0</api></version>
<stability>
<release>beta</release>
<api>beta</api></stability>
<date>2014-06-17</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
* [jan] Update Polish translation (Maciej Uhlig &lt;maciej.uhlig@us.edu.pl&gt;).
* [jan] Update Japanese translation (Hiromi Kimura &lt;hiromi@tac.tsukuba.ac.jp&gt;).
</notes>
</release>
<release>
<version>
<release>3.2.0RC2</release>
<api>3.2.0</api></version>
<stability>
<release>beta</release>
<api>beta</api></stability>
<date>2014-06-04</date>
<date>2014-06-17</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
* [mms] Fix mailbox selection on Spam page (Bug #13298).
* [mms] Fix regression in deactivating scripts (Bug #13297).
</notes>
</release>
Expand Down

0 comments on commit a80aa13

Please sign in to comment.