Skip to content

Commit

Permalink
phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 17, 2015
1 parent 795c65c commit e855a15
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions kronolith/lib/Event.php
Expand Up @@ -583,9 +583,9 @@ public function save()
// the event will be removed from the resource calendar anyway.
if ($this->status != Kronolith::STATUS_CANCELLED) {
foreach (array_keys($this->getResources()) as $id) {
/* Get the resource and protect against infinite recursion in case
* someone is silly enough to add a resource to it's own event.*/

/* Get the resource and protect against infinite recursion in
* case someone is silly enough to add a resource to it's own
* event.*/
$resource = Kronolith::getDriver('Resource')->getResource($id);
$rcal = $resource->get('calendar');
if ($rcal == $this->calendar) {
Expand All @@ -603,8 +603,8 @@ public function save()
}
if ($haveLock && !$lock[$resource->getId()]) {
// Already locked
// For now, just fail. Not sure how else to capture the locked
// resources and notify the user.
// For now, just fail. Not sure how else to capture the
// locked resources and notify the user.
throw new Kronolith_Exception(sprintf(_("The resource \"%s\" was locked. Please try again."), $resource->get('name')));
} else {
$response = $resource->getResponse($this);
Expand Down Expand Up @@ -1418,8 +1418,8 @@ protected function _handlevEventRecurrence($vEvent)
$this->recurrence->fromRRule10($rrule);
}

/* Delete all existing exceptions to this event if it
* already exists */
/* Delete all existing exceptions to this event if it already
* exists */
if (!empty($this->uid)) {
$kronolith_driver = Kronolith::getDriver(null, $this->calendar);
$search = new StdClass();
Expand Down Expand Up @@ -1541,13 +1541,11 @@ public function fromASAppointment(Horde_ActiveSync_Message_Appointment $message)

/* Recurrence */
if ($rrule = $message->getRecurrence()) {

/* Exceptions */
/* Since AS keeps exceptions as part of the original event, we need to
* delete all existing exceptions and re-create them. The only drawback
* to this is that the UIDs will change.
*/
$kronolith_driver = Kronolith::getDriver(null, $this->calendar);
/* Since AS keeps exceptions as part of the original event, we need
* to delete all existing exceptions and re-create them. The only
* drawback to this is that the UIDs will change. */
$this->recurrence = $rrule;
if (!empty($this->uid)) {
$search = new StdClass();
Expand Down

0 comments on commit e855a15

Please sign in to comment.