Fix last sync writey, a=chris
Fix last sync writey, a=chris
diff --git a/bin/mirror.php b/bin/mirror.php
index 4bedba5a9..85c646395 100644
--- a/bin/mirror.php
+++ b/bin/mirror.php
@@ -209,6 +209,7 @@ class Mirror implements CrawlConstants
$start_time = microtime();
$time = time();
$session = md5($time . AUTH_KEY);
+ $write_sync_time = true;
$request =
$name_server.
"?c=resource&time=$time&session=$session".
@@ -234,6 +235,7 @@ class Mirror implements CrawlConstants
$info[self::STATUS] == self::NO_DATA_STATE) {
$this->last_sync = $time;
$this->start_sync = $time;
+ $write_sync_time = false;
}
} else {
$info[self::STATUS] = ($this->last_sync == $this->start_sync) ?
@@ -249,7 +251,7 @@ class Mirror implements CrawlConstants
crawlLog("So not notifying scheduler..");
}
}
- if(count($this->sync_schedule) == 0) {
+ if(count($this->sync_schedule) == 0 && $write_sync_time) {
$this->last_sync = $this->start_sync;
$this->db->setWorldPermissionsRecursive($this->sync_dir, true);
file_put_contents($this->last_sync_file,