[Pkg-owncloud-commits] [owncloud] 70/199: Use 'filesystem_check_enable' as a config option.

David Prévot taffit at moszumanska.debian.org
Sun Jun 1 18:53:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 26d169b27c43d06db1158990e33939b85d14a60d
Author: ringmaster <epithet at gmail.com>
Date:   Tue May 27 16:01:16 2014 -0400

    Use 'filesystem_check_enable' as a config option.
---
 config/config.sample.php            | 5 ++++-
 lib/private/files/cache/scanner.php | 8 ++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/config/config.sample.php b/config/config.sample.php
index 8069483..8fb782e 100755
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -291,6 +291,9 @@ $CONFIG = array(
  * 1 -> check each file or folder at most once per request, recomended for general use if outside changes might happen
  * 2 -> check every time the filesystem is used, causes a performance hit when using external storages, not recomended for regular use
  */
-'filesystem_check_changes' => 1
+'filesystem_check_changes' => 1,
+
+/* specifies whether changes in the filesystem outside of owncloud affect cached data about those files */
+'filesystem_check_enable' => 1,
 
 );
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 24d406f..e838a8b 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -157,7 +157,7 @@ class Scanner extends BasicEmitter {
 					}
 				}
 				if (!empty($newData)) {
-					$addToCache = Config::getSystemValue('allow_scanner_to_affect_cache', true);
+					$addToCache = Config::getSystemValue('filesystem_check_enable', true);
 					\OC_Hook::emit('Scanner', 'addToCache', array('file' => $file, 'addToCache' => &$addToCache, 'data' => &$newData));
 					if($addToCache) {
 						$data['fileid'] = $this->cache->put($file, $newData);
@@ -166,7 +166,7 @@ class Scanner extends BasicEmitter {
 					\OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
 				}
 			} else {
-				$removeFromCache = Config::getSystemValue('allow_scanner_to_affect_cache', true);
+				$removeFromCache = Config::getSystemValue('filesystem_check_enable', true);
 				\OC_Hook::emit('Scanner', 'removeFromCache', array('file' => $file, 'removeFromCache' => &$removeFromCache));
 				if($removeFromCache) {
 					$this->cache->remove($file);
@@ -253,7 +253,7 @@ class Scanner extends BasicEmitter {
 			$removedChildren = \array_diff($existingChildren, $newChildren);
 			foreach ($removedChildren as $childName) {
 				$child = ($path) ? $path . '/' . $childName : $childName;
-				$removeFromCache = Config::getSystemValue('allow_scanner_to_affect_cache', true);
+				$removeFromCache = Config::getSystemValue('filesystem_check_enable', true);
 				\OC_Hook::emit('Scanner', 'removeFromCache', array('file' => $child, 'removeFromCache' => &$removeFromCache));
 				if($removeFromCache) {
 					$this->cache->remove($child);
@@ -277,7 +277,7 @@ class Scanner extends BasicEmitter {
 				}
 			}
 			$newData = array('size' => $size);
-			$addToCache = Config::getSystemValue('allow_scanner_to_affect_cache', true);
+			$addToCache = Config::getSystemValue('filesystem_check_enable', true);
 			\OC_Hook::emit('Scanner', 'addToCache', array('file' => $child, 'addToCache' => &$addToCache, 'data' => &$newData));
 			if($addToCache) {
 				$this->cache->put($path, $newData);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list