projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b12e031
)
Need to move this comparison after the loop.
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Sat, 12 Sep 2009 16:20:54 +0000
(12:20 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Tue, 29 Sep 2009 20:53:55 +0000
(16:53 -0400)
If we are editing an event that was already accepted, we might hit max_reservations
before we get to the event we are editing.
kronolith/lib/Resource/Single.php
patch
|
blob
|
history
diff --git
a/kronolith/lib/Resource/Single.php
b/kronolith/lib/Resource/Single.php
index
f686b4a
..
55f2304
100644
(file)
--- a/
kronolith/lib/Resource/Single.php
+++ b/
kronolith/lib/Resource/Single.php
@@
-46,17
+46,13
@@
class Kronolith_Resource_Single extends Kronolith_Resource_Base
if (!($e->start->compareDateTime($event->end) >= 1 ||
$e->end->compareDateTime($event->start) <= -1)) {
- /* Conflict, but check to see if we are allowed mulitiple */
- if (++$conflicts >= $this->get('max_reservations')) {
- return false;
- }
-
+ $conflicts++;
}
}
}
}
- return
true
;
+ return
($conflicts < $this->get('max_reservations'))
;
}
/**