Need to move this comparison after the loop.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 12 Sep 2009 16:20:54 +0000 (12:20 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 29 Sep 2009 20:54:00 +0000 (16:54 -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

index b40e175..3814a08 100644 (file)
@@ -68,7 +68,7 @@ class Kronolith_Resource_Single extends Kronolith_Resource_Base
             }
         }
 
-        return true;
+        return ($conflicts < $this->get('max_reservations'));
     }
 
     /**