From: Michael J. Rubinsky Date: Sat, 12 Sep 2009 15:06:36 +0000 (-0400) Subject: More additions based on some discussion with Gunnar in IRC: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=638ca83cbc856d0456d23ce5e00f58cbd94ea81d;p=horde.git More additions based on some discussion with Gunnar in IRC: - Allow specifying if a resource is required or optional - Add a response_type property to resources. Specifies if REQUESTS are either always accepted, always denied, automatically accepted/denied based on actual availability, handled manually (still todo), or simply ignored (set response to NONE). Also, try to clean up the implementation - trying to make it more likely to be able to be extened for kolab. No idea if this helps of not though ;) --- diff --git a/kronolith/lib/Resource/Base.php b/kronolith/lib/Resource/Base.php index 29ba9fc31..0c8258514 100644 --- a/kronolith/lib/Resource/Base.php +++ b/kronolith/lib/Resource/Base.php @@ -12,17 +12,11 @@ abstract class Kronolith_Resource_Base * * name - Display name of resource. * calendar - The calendar associated with this resource. -<<<<<<< HEAD - * * description - * email - * response_type - a RESPONSETYPE_* constant -======= * category - The category of this resource...an arbitrary label used * to group multiple resources for the resource_group implementation - * description - ->>>>>>> Lots of stuff: - * * @var array */ protected $_params = array(); @@ -54,15 +48,9 @@ abstract class Kronolith_Resource_Base } /** -<<<<<<< HEAD * Obtain the resource's internal identifier. * * @return mixed The id. -======= - * Obtain the resource's internal id. - * - * @return integer The id. ->>>>>>> Lots of stuff: */ public function getId() { diff --git a/kronolith/scripts/upgrades/2009-08-17_add_resources.sql b/kronolith/scripts/upgrades/2009-08-17_add_resources.sql index bc228525d..a66d24aad 100644 --- a/kronolith/scripts/upgrades/2009-08-17_add_resources.sql +++ b/kronolith/scripts/upgrades/2009-08-17_add_resources.sql @@ -6,6 +6,8 @@ CREATE TABLE kronolith_resources ( resource_calendar VARCHAR(255), resource_description TEXT, resource_category VARCHAR(255), + resource_response_type INT DEFAULT 0, + resource_max_reservations INT DEFAULT 1, PRIMARY KEY (resource_id) );