summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-04-16 12:21:09 -0700
committerMichael Gapczynski <mtgap@owncloud.com>2013-04-16 12:21:09 -0700
commit2040f0af78bbe73fb477367646183b880348ad86 (patch)
treebae280be051291ec4a3c81be950a183470b546ef
parent8d1db84ed14d423117ea62992d83f0dd1cd5f644 (diff)
parent606b672a3d8fbd7af02c773a64680c0fc32bea7a (diff)
downloadnextcloud-server-2040f0af78bbe73fb477367646183b880348ad86.tar.gz
nextcloud-server-2040f0af78bbe73fb477367646183b880348ad86.zip
Merge pull request #2943 from owncloud/always_load_cache_hooks_first
always connect file cache updater hooks first
-rw-r--r--apps/files/appinfo/app.php7
-rw-r--r--lib/files/filesystem.php5
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 6535a9b7baa..703b1c7cb6c 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -12,3 +12,10 @@ OCP\App::addNavigationEntry( array( "id" => "files_index",
"name" => $l->t("Files") ));
OC_Search::registerProvider('OC_Search_Provider_File');
+
+// cache hooks must be connected before all other apps.
+// since 'files' is always loaded first the hooks need to be connected here
+\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
+\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
+\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
+\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); \ No newline at end of file
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index c8e62956f19..c0e9d215fb5 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -665,9 +665,4 @@ class Filesystem {
}
}
-\OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
-\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
-\OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
-\OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook');
-
\OC_Util::setupFS();