Commit 0f10824f authored by Sebastian Kummer's avatar Sebastian Kummer

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.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 89bc1043
......@@ -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