Skip to content

Commit

Permalink
[jan] Fix creating new spam folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jul 12, 2016
1 parent 6466c0d commit 39ac98d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v3.2.12-git
-----------

[jan] Fix creating new spam folders.


-------
Expand Down
3 changes: 2 additions & 1 deletion lib/Basic/Spam.php
Expand Up @@ -133,10 +133,11 @@ static public function url(array $opts = array())
class Horde_Form_Type_ingo_folders extends Horde_Form_Type {

var $_folder;
var $newFolderSet;

function isValid(&$var, &$vars, $value, &$message)
{
if (strlen($value)) {
if ($this->newFolderSet || strlen($value)) {
return true;
}

Expand Down
11 changes: 11 additions & 0 deletions lib/Form/Spam.php
Expand Up @@ -60,4 +60,15 @@ public function renderActive(
);
}

public function validate($vars = null, $canAutoFill = false)
{
if (is_null($vars)) {
$vars = $this->_vars;
}
if (strlen($vars->get('folder_new'))) {
$this->folder_var->type->newFolderSet = true;
}
return parent::validate($vars, $canAutoFill);
}

}
4 changes: 2 additions & 2 deletions package.xml
Expand Up @@ -33,7 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Fix creating new spam folders.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1674,7 +1674,7 @@
<date>2016-07-01</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Fix creating new spam folders.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 39ac98d

Please sign in to comment.