This commit is contained in:
Roeland Jago Douma 2016-05-23 20:41:51 +02:00
parent 7ef21b0b27
commit e03e4921a0
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
3 changed files with 11 additions and 7 deletions

View File

@ -72,3 +72,7 @@ Options -Indexes
<IfModule pagespeed_module>
ModPagespeed Off
</IfModule>
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php

View File

@ -53,9 +53,9 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
*/
public function getHomeMountForUser(IUser $user, IStorageFactory $loader) {
$config = $this->multiBucketObjectStore($user);
$config = $this->getMultiBucketObjectStoreConfig($user);
if ($config === null) {
$config = $this->singleBucketObjectStore($user);
$config = $this->getSingleBucketObjectStoreConfig($user);
}
if ($config === null) {
@ -69,7 +69,7 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
* @param IUser $user
* @return array|null
*/
private function singleBucketObjectStore(IUser $user) {
private function getSingleBucketObjectStoreConfig(IUser $user) {
$config = $this->config->getSystemValue('objectstore');
if (!is_array($config)) {
return null;
@ -93,7 +93,7 @@ class ObjectHomeMountProvider implements IHomeMountProvider {
* @param IUser $user
* @return array|null
*/
private function multiBucketObjectStore(IUser $user) {
private function getMultiBucketObjectStoreConfig(IUser $user) {
$config = $this->config->getSystemValue('objectstore_multibucket');
if (!is_array($config)) {
return null;

View File

@ -42,7 +42,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase {
$this->user->expects($this->never())->method($this->anything());
$this->loader->expects($this->never())->method($this->anything());
$config = $this->invokePrivate($this->provider, 'singleBucketObjectStore', [$this->user, $this->loader]);
$config = $this->invokePrivate($this->provider, 'getSingleBucketObjectStoreConfig', [$this->user, $this->loader]);
$this->assertArrayHasKey('class', $config);
$this->assertEquals($config['class'], 'Test\Files\Mount\FakeObjectStore');
@ -66,7 +66,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase {
->willReturn('uid');
$this->loader->expects($this->never())->method($this->anything());
$config = $this->invokePrivate($this->provider, 'multiBucketObjectStore', [$this->user, $this->loader]);
$config = $this->invokePrivate($this->provider, 'getMultiBucketObjectStoreConfig', [$this->user, $this->loader]);
$this->assertArrayHasKey('class', $config);
$this->assertEquals($config['class'], 'Test\Files\Mount\FakeObjectStore');
@ -95,7 +95,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase {
->willReturn('uid');
$this->loader->expects($this->never())->method($this->anything());
$config = $this->invokePrivate($this->provider, 'multiBucketObjectStore', [$this->user, $this->loader]);
$config = $this->invokePrivate($this->provider, 'getMultiBucketObjectStoreConfig', [$this->user, $this->loader]);
$this->assertArrayHasKey('class', $config);
$this->assertEquals($config['class'], 'Test\Files\Mount\FakeObjectStore');