diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-10 17:24:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 17:24:57 +0200 |
commit | 67d016833d637982a197bb848836c7afcea88358 (patch) | |
tree | dac13e91d333e0dda2f756f6e26af76eb1bcd694 /apps | |
parent | 8831d1f53bf8388c14c443dd41958cf4f61889d4 (diff) | |
parent | 412b5c5407c936eb768554685c3c7fab87389c23 (diff) | |
download | nextcloud-server-67d016833d637982a197bb848836c7afcea88358.tar.gz nextcloud-server-67d016833d637982a197bb848836c7afcea88358.zip |
Merge pull request #810 from nextcloud/shared-cachethepropagatorinstance
Store the shared propagator instance
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 8e9a0f41229..92900ccda69 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -319,10 +319,15 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage { } public function getPropagator($storage = null) { + if (isset($this->propagator)) { + return $this->propagator; + } + if (!$storage) { $storage = $this; } - return new \OCA\Files_Sharing\SharedPropagator($storage, \OC::$server->getDatabaseConnection()); + $this->propagator = new \OCA\Files_Sharing\SharedPropagator($storage, \OC::$server->getDatabaseConnection()); + return $this->propagator; } public function getOwner($path) { |