projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c885ee
)
expire the listCache when a share is saved, or parent is changed.
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Sun, 12 Dec 2010 00:20:01 +0000
(19:20 -0500)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Sun, 12 Dec 2010 00:20:01 +0000
(19:20 -0500)
framework/Share/lib/Horde/Share.php
patch
|
blob
|
history
framework/Share/lib/Horde/Share/Object.php
patch
|
blob
|
history
framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
patch
|
blob
|
history
diff --git
a/framework/Share/lib/Horde/Share.php
b/framework/Share/lib/Horde/Share.php
index
d5e349d
..
4f77bf4
100644
(file)
--- a/
framework/Share/lib/Horde/Share.php
+++ b/
framework/Share/lib/Horde/Share.php
@@
-540,6
+540,16
@@
class Horde_Share
}
/**
+ * Expire the current list cache. This would be needed anytime a share is
+ * either added, deleted, had a change in owner, parent, or perms.
+ *
+ */
+ public function expireListCache()
+ {
+ $this->_listcache = array();
+ }
+
+ /**
* Utility function to be used with uasort() for sorting arrays of
* Horde_Share objects.
*
diff --git
a/framework/Share/lib/Horde/Share/Object.php
b/framework/Share/lib/Horde/Share/Object.php
index
055b7d9
..
66e03d2
100644
(file)
--- a/
framework/Share/lib/Horde/Share/Object.php
+++ b/
framework/Share/lib/Horde/Share/Object.php
@@
-110,6
+110,7
@@
abstract class Horde_Share_Object implements Serializable
public function save()
{
$this->getShareOb()->runCallback('modify', array($this));
+ $this->getShareOb()->expireListCache();
return $this->_save();
}
diff --git
a/framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
b/framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
index
ef5d74a
..
8e2c125
100644
(file)
--- a/
framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
+++ b/
framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
@@
-131,6
+131,7
@@
class Horde_Share_Object_Sql_Hierarchical extends Horde_Share_Object_Sql
$child->setParent($this);
}
+ $this->_shareOb->expireListCache();
return true;
}