summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-10-27 14:15:59 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-11-14 15:10:56 +0100
commit4a9361905d9013c7132d3226c921ce6d995b36e4 (patch)
treed9dab336c8d0c4ab7dd389016b89f763e69a204a /lib
parentcebb68992509215163f6776b76e48411a31a287e (diff)
downloadnextcloud-server-4a9361905d9013c7132d3226c921ce6d995b36e4.tar.gz
nextcloud-server-4a9361905d9013c7132d3226c921ce6d995b36e4.zip
make object prefix configurable
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php7
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;
}