From 3e26e49b8604ac423d062d7be5680463afb33939 Mon Sep 17 00:00:00 2001
From: Juan Ferrer Toribio <juan@verdnatura.es>
Date: Sat, 29 Aug 2020 14:35:19 +0200
Subject: [PATCH] Image sync method fixes.

---
 debian/changelog    | 2 +-
 package.json        | 2 +-
 rest/image/sync.php | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 07eac2d8..b88cdd7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedera-web (1.407.30) stable; urgency=low
+hedera-web (1.407.31) stable; urgency=low
 
   * Initial Release.
 
diff --git a/package.json b/package.json
index d55637a6..d90d3729 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "hedera-web",
-  "version": "1.407.30",
+  "version": "1.407.31",
   "description": "Verdnatura web page",
   "license": "GPL-3.0",
   "repository": {
diff --git a/rest/image/sync.php b/rest/image/sync.php
index fd538354..b42e542c 100644
--- a/rest/image/sync.php
+++ b/rest/image/sync.php
@@ -60,7 +60,7 @@ class Sync extends Vn\Lib\Method {
 				);
 
 				if ($res->num_rows == 0) continue;
-				echo "Deleting {$res->num_rows} from collection '$collection'.\n";
+				echo "Recycling {$res->num_rows} images from collection '$collection'.\n";
 
 				while ($image = $res->fetch_object())
 				if (!empty($image->name) && !in_array($image->name, ['.', '..'])) {
@@ -84,8 +84,9 @@ class Sync extends Vn\Lib\Method {
 				throw $e;
 			}
 		}
-
-		echo "Syncronization finished. $deleteCount images moved to trash.\n";
+	
+		echo "Total $deleteCount images moved to trash.\n";
+		echo "Syncronization finished.\n";
 	}
 	
 	/**