Commit 8dcb3e16 authored by skummer's avatar skummer

ZP-458 #comment SyncCollection should not remove old states anymore. This is...

ZP-458 #comment SyncCollection should not remove old states anymore. This is only done by regular sync operations now.

git-svn-id: https://z-push.org/svn/z-push/trunk@1753 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 58cc1611
......@@ -87,6 +87,16 @@ class StateManager {
$this->synchedFolders = array();
}
/**
* Prevents the StateMachine from removing old states
*
* @access public
* @return void
*/
public function DoNotDeleteOldStates() {
$this->deleteOldStates = false;
}
/**
* Sets an ASDevice for the Statemanager to work with
*
......
......@@ -108,6 +108,9 @@ class SyncCollections implements Iterator {
public function LoadAllCollections($overwriteLoaded = false, $loadState = false, $checkPermissions = false) {
$this->loadStateManager();
// this operation should not remove old state counters
$this->stateManager->DoNotDeleteOldStates();
$invalidStates = false;
foreach($this->stateManager->GetSynchedFolders() as $folderid) {
if ($overwriteLoaded === false && isset($this->collections[$folderid]))
......
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