fixed ACTION:NONE was not detected because of missing multiline switch, causing empty pref reset to 0

This commit is contained in:
Ralf Becker 2014-06-11 09:15:43 +00:00
parent 5a32a7d622
commit 6ae1ca93fd

View File

@ -771,7 +771,7 @@ class calendar_hooks
if (!isset($val)) // no calendar pref --> read value from caldav if (!isset($val)) // no calendar pref --> read value from caldav
{ {
$matches = null; $matches = null;
if (preg_match('/^ACTION:NONE$/i', $pref)) if (preg_match('/^ACTION:NONE$/mi', $pref))
{ {
$val = ''; $val = '';
} }
@ -817,7 +817,7 @@ END:VALARM';
$pref = preg_replace('/^TRIGGER:.*$/m', $trigger.number_format(abs($val)/60, 0).'H', $pref); $pref = preg_replace('/^TRIGGER:.*$/m', $trigger.number_format(abs($val)/60, 0).'H', $pref);
} }
$GLOBALS['egw']->preferences->add('groupdav', $dav, $pref, 'user'); $GLOBALS['egw']->preferences->add('groupdav', $dav, $pref, 'user');
error_log(__METHOD__."() storing $name=$val --> $dav='$pref'"); //error_log(__METHOD__."() storing $name=$val --> $dav='$pref'");
} }
} }
} }