Commit b5856065 authored by Sebastian Kummer's avatar Sebastian Kummer

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

Merge pull request #190 in ZP/z-push from bugfix/ZP-871-integer-folderids-may-falsly-trigger to develop

* commit '0f10824f':
  ZP-871 Delete the pingable flag only if it is set, SyncCollections iterator: exclude 'false' as valid collection key (hierarchy state), explicitely implement SyncParameters->GetBackendFolderId() as it will return false in case of an upgraded profile.
parents c8909217 0f10824f
......@@ -86,8 +86,7 @@ class SyncCollections implements Iterator {
$sc = new SyncCollections();
$sc->LoadAllCollections();
foreach ($sc as $folderid => $spa) {
$spa->DelPingableFlag();
$sc->SaveCollection($spa);
$sc->invalidateFolderStat($spa);
}
return true;
}
......@@ -853,7 +852,7 @@ class SyncCollections implements Iterator {
* @return boolean
*/
public function valid() {
return (key($this->collections) !== null);
return (key($this->collections) !== null && key($this->collections) !== false);
}
/**
......
......@@ -220,6 +220,20 @@ class SyncParameters extends StateObject {
return true;
}
/**
* Overwrite GetBackendFolderId() because on old profiles, this will not be set.
*
* @access public
* @return string
*/
public function GetBackendFolderId() {
if ($this->backendfolderid) {
return $this->backendfolderid;
}
else {
return $this->GetFolderId();
}
}
/**
* CPO methods
......
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