@@ 47-61 (lines=15) @@ | ||
44 | // $onsave = $this->onTemplateSaved("1944", "ppage", "ppage.view.div1.html.any"); |
|
45 | } |
|
46 | ||
47 | public function onTemplateSaved($id, $type, $name) { |
|
48 | $query = "template.value='$id:$type:$name' order by none"; |
|
49 | $objects = $this->cachestore->find("/", $query, 0, 0); |
|
50 | ||
51 | $template = function($object) { |
|
52 | return $object->data->filename; |
|
53 | }; |
|
54 | ||
55 | $result = $this->cachestore->call($template,array(),$objects); |
|
56 | $result = array_unique($result); |
|
57 | ||
58 | foreach ($result as $filename) { |
|
59 | $this->invalidate($filename); |
|
60 | } |
|
61 | } |
|
62 | ||
63 | public function onObjectSaved($id) { |
|
64 | $query = "objectref.value='$id' order by none"; |
|
@@ 63-77 (lines=15) @@ | ||
60 | } |
|
61 | } |
|
62 | ||
63 | public function onObjectSaved($id) { |
|
64 | $query = "objectref.value='$id' order by none"; |
|
65 | $objects = $this->cachestore->find("/", $query, 0, 0); |
|
66 | ||
67 | $template = function($object) { |
|
68 | return $object->data->filename; |
|
69 | }; |
|
70 | ||
71 | $result = $this->cachestore->call($template,array(),$objects); |
|
72 | $result = array_unique($result); |
|
73 | ||
74 | foreach ($result as $filename) { |
|
75 | $this->invalidate($filename); |
|
76 | } |
|
77 | } |
|
78 | ||
79 | public function invalidate($filename) { |
|
80 | global $store; |