diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2016-10-27 14:15:59 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-11-14 15:10:56 +0100 |
commit | 4a9361905d9013c7132d3226c921ce6d995b36e4 (patch) | |
tree | d9dab336c8d0c4ab7dd389016b89f763e69a204a /lib | |
parent | cebb68992509215163f6776b76e48411a31a287e (diff) | |
download | nextcloud-server-4a9361905d9013c7132d3226c921ce6d995b36e4.tar.gz nextcloud-server-4a9361905d9013c7132d3226c921ce6d995b36e4.zip |
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; } |