Use constant
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 22 Oct 2009 18:12:04 +0000 (14:12 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 22 Oct 2009 18:12:04 +0000 (14:12 -0400)
kronolith/lib/Forms/CreateResourceGroup.php
kronolith/lib/Forms/EditResourceGroup.php
kronolith/resources/groups/index.php
kronolith/resources/index.php

index bce170f..90b28e7 100644 (file)
@@ -28,7 +28,7 @@ class Kronolith_CreateResourceGroupForm extends Horde_Form {
     {
         parent::Horde_Form($vars, _("Create Resource"));
 
-        $resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => 'Single'));
+        $resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
         $enum = array();
         foreach ($resources as $resource) {
             $enum[$resource->getId()] = htmlspecialchars($resource->get('name'));
index 32c6603..54597ce 100644 (file)
@@ -32,7 +32,7 @@ class Kronolith_EditResourceGroupForm extends Horde_Form {
     {
         $this->_resource = &$resource;
         parent::Horde_Form($vars, sprintf(_("Edit %s"), $resource->get('name')));
-        $resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => 'Single'));
+        $resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
         $enum = array();
         foreach ($resources as $r) {
             $enum[$r->getId()] = htmlspecialchars($r->get('name'));
index db2346c..d444fc9 100644 (file)
@@ -18,7 +18,7 @@ if (!Horde_Auth::getAuth()) {
 $edit_url_base = Horde::applicationUrl('resources/groups/edit.php');
 $edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
 
-$resources = Kronolith::getDriver('Resource')->listResources(PERMS_EDIT, array('type' => 'Group'));
+$resources = Kronolith::getDriver('Resource')->listResources(PERMS_EDIT, array('type' => Kronolith_Resource::TYPE_GROUP));
 //$display_url_base = Horde::applicationUrl('month.php', true, -1);
 $delete_url_base = Horde::applicationUrl('resources/groups/delete.php');
 $delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
index 9c76043..a36ff72 100644 (file)
@@ -17,7 +17,7 @@ if (!Horde_Auth::getAuth()) {
 }
 $edit_url_base = Horde::applicationUrl('resources/edit.php');
 $edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
-$resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => 'Single'));
+$resources = Kronolith::getDriver('Resource')->listResources(PERMS_READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
 $display_url_base = Horde::applicationUrl('month.php', true, -1);
 $delete_url_base = Horde::applicationUrl('resources/delete.php');
 $delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));