[Pkg-owncloud-commits] [owncloud] 235/258: Hookup the etag propagator
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:40 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 f534574b30ae7ca1ce44e6693f5d70c3a9b286a9
Author: Robin Appelman <icewind at owncloud.com>
Date: Mon Sep 29 13:46:27 2014 +0200
Hookup the etag propagator
---
apps/files_external/lib/config.php | 16 ++++++++++++++++
apps/files_external/lib/etagpropagator.php | 1 +
2 files changed, 17 insertions(+)
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index c53ac60..9e58b1d 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -118,6 +118,22 @@ class OC_Mount_Config {
}
$manager->addMount($mount);
}
+
+ if ($data['user']) {
+ $user = \OC::$server->getUserManager()->get($data['user']);
+ $userView = new \OC\Files\View('/' . $user->getUID() . '/files');
+ $changePropagator = new \OC\Files\Cache\ChangePropagator($userView);
+ $etagPropagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, \OC::$server->getConfig());
+ $etagPropagator->propagateDirtyMountPoints();
+ \OCP\Util::connectHook(
+ \OC\Files\Filesystem::CLASSNAME,
+ \OC\Files\Filesystem::signal_create_mount,
+ $etagPropagator, 'updateHook');
+ \OCP\Util::connectHook(
+ \OC\Files\Filesystem::CLASSNAME,
+ \OC\Files\Filesystem::signal_delete_mount,
+ $etagPropagator, 'updateHook');
+ }
}
/**
diff --git a/apps/files_external/lib/etagpropagator.php b/apps/files_external/lib/etagpropagator.php
index 0057165..35bf832 100644
--- a/apps/files_external/lib/etagpropagator.php
+++ b/apps/files_external/lib/etagpropagator.php
@@ -97,6 +97,7 @@ class EtagPropagator {
$users = $params[Filesystem::signal_param_users];
$type = $params[Filesystem::signal_param_mount_type];
$mountPoint = $params[Filesystem::signal_param_path];
+ $mountPoint = Filesystem::normalizePath($mountPoint);
if ($type === \OC_Mount_Config::MOUNT_TYPE_GROUP or $users === 'all') {
$this->markDirty($mountPoint, $time);
} else {
--
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