summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-18 11:35:14 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2016-08-10 10:57:49 +0200
commit412b5c5407c936eb768554685c3c7fab87389c23 (patch)
tree813f90bdc6ef8dea5bb154a655bb0d427cd0f901 /apps/files_sharing
parentd6bee61131d9702483830d39819e6204588eb800 (diff)
downloadnextcloud-server-412b5c5407c936eb768554685c3c7fab87389c23.tar.gz
nextcloud-server-412b5c5407c936eb768554685c3c7fab87389c23.zip
Store the shared propagator instance
This instead of recreating it for every call.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php7
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) {