projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92b1234
)
Set task alarm without value from ajax interface too.
author
Jan Schneider
<jan@horde.org>
Tue, 27 Apr 2010 08:22:58 +0000
(10:22 +0200)
committer
Jan Schneider
<jan@horde.org>
Tue, 27 Apr 2010 09:33:16 +0000
(11:33 +0200)
kronolith/lib/Ajax/Application.php
patch
|
blob
|
history
diff --git
a/kronolith/lib/Ajax/Application.php
b/kronolith/lib/Ajax/Application.php
index
df6f234
..
8702bf5
100644
(file)
--- a/
kronolith/lib/Ajax/Application.php
+++ b/
kronolith/lib/Ajax/Application.php
@@
-390,9
+390,16
@@
class Kronolith_Ajax_Application extends Horde_Ajax_Application_Base
$task['due'] = $due->timestamp();
}
- $task['alarm'] = $task['alarm']['on']
- ? $task['alarm']['value'] * $task['alarm']['unit']
- : 0;
+ if ($task['alarm']['on']) {
+ $value = $task['alarm']['value'];
+ $unit = $task['alarm']['unit'];
+ if ($value == 0) {
+ $value = $unit = 1;
+ }
+ $task['alarm'] = $value * $unit;
+ } else {
+ $task['alarm'] = 0;
+ }
$result = new stdClass;
try {