start/end times to determine if an event collides.
Add basic hasPermission method, not sure if it's really needed yet.
$e->hasStatus(Kronolith::STATUS_FREE)) &&
$e->getUID() !== $uid) {
- return false;
+ if (!($e->start->compareDateTime($event->end) >= 1 ||
+ $e->end->compareDateTime($event->start) <= -1)) {
+ // $e starts after $event ends OR $e ends before $event->start
+
+ return false;
+ }
}
}
}
}
}
+ /**
+ * @TODO: need to fine tune this
+ * @param $user
+ * @param $permission
+ * @param $restrict
+ * @return unknown_type
+ */
+ public function hasPermission($user, $permission = PERMS_READ, $restrict = null)
+ {
+ if (Horde_Auth::isAdmin()) {
+ return true;
+ }
+
+ return false;
+ }
+
}
\ No newline at end of file