Hookup the etag propagator

This commit is contained in:
Robin Appelman 2014-09-29 13:46:27 +02:00 committed by Vincent Petry
parent 5d7bd8be42
commit 1030f0a763
2 changed files with 17 additions and 0 deletions

View File

@ -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');
}
}
/**

View File

@ -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 {