projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79218fe
)
Better check for valid resource
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Wed, 23 Sep 2009 17:13:40 +0000
(13:13 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Tue, 29 Sep 2009 20:53:57 +0000
(16:53 -0400)
kronolith/lib/Driver/Resource.php
patch
|
blob
|
history
diff --git
a/kronolith/lib/Driver/Resource.php
b/kronolith/lib/Driver/Resource.php
index
2bdf22a
..
2168911
100644
(file)
--- a/
kronolith/lib/Driver/Resource.php
+++ b/
kronolith/lib/Driver/Resource.php
@@
-389,10
+389,13
@@
class Kronolith_Driver_Resource extends Kronolith_Driver_Sql
* calendar.
*
* @param Kronolith_Resource $resource The kronolith resource to remove
+ *
+ * @return boolean
+ * @throws Horde_Exception
*/
public function delete($resource)
{
- if (!
$resource->get('calendar'
) || !$resource->getId()) {
+ if (!
($resource instanceof Kronolith_Resource_Base
) || !$resource->getId()) {
throw new Horde_Exception(_("Resource not valid."));
}