Commit bc067ce2 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-832 Run SyncCollections->CheckForChanges() stat comparing only on

first run, improved comment.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 37293fc8
...@@ -483,8 +483,8 @@ class SyncCollections implements Iterator { ...@@ -483,8 +483,8 @@ class SyncCollections implements Iterator {
throw new StatusException(sprintf("Error initializing ChangesSink for folder id '%s'", $folderid), self::ERROR_WRONG_HIERARCHY); throw new StatusException(sprintf("Error initializing ChangesSink for folder id '%s'", $folderid), self::ERROR_WRONG_HIERARCHY);
} }
// check if the folder stat changed since the last sync, if so generate a change for it // check if the folder stat changed since the last sync, if so generate a change for it (only on first run)
if (ZPush::GetBackend()->HasFolderStats() && $spa->HasFolderStat() && ZPush::GetBackend()->GetFolderStat($store, $spa->GetFolderId()) !== $spa->GetFolderStat()) { if ($this->waitingTime == 0 && ZPush::GetBackend()->HasFolderStats() && $spa->HasFolderStat() && ZPush::GetBackend()->GetFolderStat($store, $spa->GetFolderId()) !== $spa->GetFolderStat()) {
$this->changes[$spa->GetFolderId()] = 1; $this->changes[$spa->GetFolderId()] = 1;
} }
} }
......
...@@ -260,7 +260,8 @@ abstract class Backend implements IBackend { ...@@ -260,7 +260,8 @@ abstract class Backend implements IBackend {
* @return string * @return string
*/ */
public function GetFolderStat($store, $folderid) { public function GetFolderStat($store, $folderid) {
// as this is not implemented, the value returned will be different each time, resulting in a standard exporter setup. // As this is not implemented, the value returned will change every hour.
// This will only be called if HasFolderStats() returns true.
return "not implemented-".gmdate("Y-m-d-H"); return "not implemented-".gmdate("Y-m-d-H");
} }
......
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