Browse Source

folder sync

euromark 13 years ago
parent
commit
8e23fa6dc1
2 changed files with 12 additions and 1 deletions
  1. 10 1
      Console/Command/FolderSyncShell.php
  2. 2 0
      View/Helper/CaptchaHelper.php

+ 10 - 1
Console/Command/FolderSyncShell.php

@@ -133,12 +133,21 @@ class FolderSyncShell extends AppShell {
 			}
 			$this->missing[] = $name;
 			$this->removedFiles++;
+			if (!empty($this->params['verbose'])) {
+				$this->out('   (source missing, deleting)');
+			}
 			return;
 		} elseif (!$sourceExists) {
 			$this->missing[] = $name;
+			if (!empty($this->params['verbose'])) {
+				$this->out('   (target missing, skipping)');
+			}
 			return;
 		}
-		if (sha1(file_get_contents($source)) === sha1(file_get_contents($target))) {
+		if (file_get_contents($source) === file_get_contents($target)) {
+			if (!empty($this->params['verbose'])) {
+				$this->out('   (equal, skipping)');
+			}
 			return;
 		}
 		if (empty($this->params['dry-run']) && !copy($source, $target)) {

+ 2 - 0
View/Helper/CaptchaHelper.php

@@ -168,6 +168,8 @@ class CaptchaHelper extends AppHelper {
 	/**
 	 * active captcha
 	 * (+ passive captcha right now)
+	 * 
+	 * @return string Form input
 	 * 2010-01-08 ms
 	 */
 	public function active($modelName = null, $options = array()) {