diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-11-14 17:07:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 17:07:00 +0100 |
commit | b7e13b43fbcaf874b52eadb881e6265340b7cde8 (patch) | |
tree | 157653f6c99e3b11546eb31561a0e407ef6f42e2 /lib | |
parent | c9b1108e8e1380dbc266dcfca1020ff3f8fa48e1 (diff) | |
parent | 4a9361905d9013c7132d3226c921ce6d995b36e4 (diff) | |
download | nextcloud-server-b7e13b43fbcaf874b52eadb881e6265340b7cde8.tar.gz nextcloud-server-b7e13b43fbcaf874b52eadb881e6265340b7cde8.zip |
Merge pull request #2114 from nextcloud/downstream-26498
make object prefix configurable
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 0f0229c9ca5..2dcf830cc1e 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -48,6 +48,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { */ protected $user; + private $objectPrefix = 'urn:oid:'; + public function __construct($params) { if (isset($params['objectstore']) && $params['objectstore'] instanceof IObjectStore) { $this->objectStore = $params['objectstore']; @@ -59,6 +61,9 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { } else { $this->id = 'object::store:' . $this->objectStore->getStorageId(); } + if (isset($params['objectPrefix'])) { + $this->objectPrefix = $params['objectPrefix']; + } //initialize cache with root directory in cache if (!$this->is_dir('/')) { $this->mkdir('/'); @@ -216,7 +221,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { */ protected function getURN($fileId) { if (is_numeric($fileId)) { - return 'urn:oid:' . $fileId; + return $this->objectPrefix . $fileId; } return null; } |