forked from extern/egroupware
A condition with a True action must have a False action. Pick 'none' if not specified
This commit is contained in:
parent
b85e5d0889
commit
0fa73a76a1
@ -366,10 +366,20 @@ class importexport_wizard_basic_import_csv
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Clear conditions that don't do anything
|
// Clear conditions that don't do anything
|
||||||
foreach($content['conditions'] as $key => $condition) {
|
foreach($content['conditions'] as $key => &$condition) {
|
||||||
if(($condition['true']['action'] == 'none' || !$condition['true']['action']) && !$condition['true']['stop']
|
if(($condition['true']['action'] == 'none' || !$condition['true']['action']) && !$condition['true']['stop']
|
||||||
&& ($condition['false']['action'] == 'none' || !$condition['false']['action']) && !$condition['false']['stop']) {
|
&& ($condition['false']['action'] == 'none' || !$condition['false']['action']) && !$condition['false']['stop']) {
|
||||||
unset($content['conditions'][$key]);
|
unset($content['conditions'][$key]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for true without false, or false without true - set to 'none'
|
||||||
|
elseif($condition['true']['action'] == '' && $condition['false']['action'] != '' ||
|
||||||
|
$condition['true']['action'] != '' && $condition['false']['action'] == '' ||
|
||||||
|
!$condition['true'] || !$condition['false']
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$condition[$condition['true']['action'] == '' ? 'true' : 'false']['action'] = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user