[Pkg-owncloud-commits] [owncloud] 88/215: Make the change propagator an emitter
David Prévot
taffit at moszumanska.debian.org
Tue May 5 01:01:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 849e5521de2afdf6efbcb70337079a50f012a6ce
Author: Robin Appelman <icewind at owncloud.com>
Date: Mon Mar 9 16:15:06 2015 +0100
Make the change propagator an emitter
---
lib/private/files/cache/changepropagator.php | 5 ++++-
lib/private/files/cache/updater.php | 4 ++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/private/files/cache/changepropagator.php b/lib/private/files/cache/changepropagator.php
index 4a86063..9696a82 100644
--- a/lib/private/files/cache/changepropagator.php
+++ b/lib/private/files/cache/changepropagator.php
@@ -22,12 +22,14 @@
namespace OC\Files\Cache;
+use OC\Hooks\BasicEmitter;
+
/**
* Propagates changes in etag and mtime up the filesystem tree
*
* @package OC\Files\Cache
*/
-class ChangePropagator {
+class ChangePropagator extends BasicEmitter {
/**
* @var string[]
*/
@@ -75,6 +77,7 @@ class ChangePropagator {
$cache = $storage->getCache();
$entry = $cache->get($internalPath);
$cache->update($entry['fileid'], array('mtime' => max($time, $entry['mtime']), 'etag' => $storage->getETag($internalPath)));
+ $this->emit('\OC\Files', 'propagate', [$parent, $entry]);
}
}
}
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index 14aecf0..6634535 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -60,6 +60,10 @@ class Updater {
$this->enabled = true;
}
+ public function getPropagator() {
+ return $this->propagator;
+ }
+
public function propagate($path, $time = null) {
if (Scanner::isPartialFile($path)) {
return;
--
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