Experiment with getting either a share or resource here
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 9 Sep 2009 19:10:56 +0000 (15:10 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 29 Sep 2009 20:53:59 +0000 (16:53 -0400)
kronolith/lib/Kronolith.php

index 5de3a68..c744f11 100644 (file)
@@ -2064,4 +2064,16 @@ class Kronolith
         }
     }
 
+
+    static public function getInternalCalendar($target)
+    {
+        if (self::isResourceCalendar($taget)) {
+            $driver = self::getDriver('Resource');
+            $id = $driver->getResourceIdByCalendar($id);
+            return $driver->getResoruce($id);
+        } else {
+            return $GLOBALS['kronolith_shares']->getShare($target);
+        }
+    }
+
 }