Commit 17813d04 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #169 in ZP/z-push from...

Merge pull request #169 in ZP/z-push from bugfix/ZP-622-ping-should-notify-on-hierarchy-changes to develop

* commit '24f4523a':
  ZP-622 Reset the backend store before getting the HierarchyExporter. Don't include hierarchy in the listed ping classes.
parents 0df33f3f 24f4523a
...@@ -469,7 +469,7 @@ class SyncCollections implements Iterator { ...@@ -469,7 +469,7 @@ class SyncCollections implements Iterator {
public function CheckForChanges($lifetime = 600, $interval = 30, $onlyPingable = false) { public function CheckForChanges($lifetime = 600, $interval = 30, $onlyPingable = false) {
$classes = array(); $classes = array();
foreach ($this->collections as $folderid => $spa){ foreach ($this->collections as $folderid => $spa){
if ($onlyPingable && $spa->GetPingableFlag() !== true) if ($onlyPingable && $spa->GetPingableFlag() !== true || ! $folderid)
continue; continue;
if (!isset($classes[$spa->GetContentClass()])) if (!isset($classes[$spa->GetContentClass()]))
...@@ -717,6 +717,8 @@ class SyncCollections implements Iterator { ...@@ -717,6 +717,8 @@ class SyncCollections implements Iterator {
$changecount = false; $changecount = false;
if ($exportChanges || $this->hierarchyExporterChecked === false) { if ($exportChanges || $this->hierarchyExporterChecked === false) {
try { try {
// reset backend to the main store
ZPush::GetBackend()->Setup(false);
$changesMem = ZPush::GetDeviceManager()->GetHierarchyChangesWrapper(); $changesMem = ZPush::GetDeviceManager()->GetHierarchyChangesWrapper();
// the hierarchyCache should now fully be initialized - check for changes in the additional folders // the hierarchyCache should now fully be initialized - check for changes in the additional folders
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment