diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2017-01-30 13:01:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 13:01:24 +0100 |
commit | 64e9a1aec09bd24fe411e75df710b99dcb67bc86 (patch) | |
tree | 3f544e544fbd355e9b887f6553b4c9663a7f5586 | |
parent | 9a036a2ae3594ab7d3322a93c176c8db2813ad1a (diff) | |
parent | a4ad8af6e3f0247db6f74dfcddc144e91f61fe84 (diff) | |
download | nextcloud-server-64e9a1aec09bd24fe411e75df710b99dcb67bc86.tar.gz nextcloud-server-64e9a1aec09bd24fe411e75df710b99dcb67bc86.zip |
Merge pull request #3176 from nextcloud/default-value-datadir
Add proper default value for datadir
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 2 | ||||
-rw-r--r-- | apps/theming/lib/Util.php | 2 | ||||
-rw-r--r-- | lib/private/Repair/MoveUpdaterStepFile.php | 2 | ||||
-rw-r--r-- | lib/private/Setup/Sqlite.php | 2 | ||||
-rw-r--r-- | lib/private/User/User.php | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 9d20742fcb0..1d9affa8d68 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -207,7 +207,7 @@ class SFTP extends \OC\Files\Storage\Common { try { $storage_view = \OCP\Files::getStorage('files_external'); if ($storage_view) { - return \OC::$server->getConfig()->getSystemValue('datadirectory') . + return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . $storage_view->getAbsolutePath('') . 'ssh_hostKeys'; } diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index e73d6b0ac69..2e66a6b96e1 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -902,7 +902,7 @@ class Trashbin { * @return integer size of the folder */ private static function calculateSize($view) { - $root = \OC::$server->getConfig()->getSystemValue('datadirectory') . $view->getAbsolutePath(''); + $root = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . $view->getAbsolutePath(''); if (!file_exists($root)) { return 0; } diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 9fea56838ad..5c9ccb3baa6 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -128,7 +128,7 @@ class Util { } catch (AppPathNotFoundException $e) {} if($this->config->getAppValue('theming', 'logoMime', '') !== '' && $this->rootFolder->nodeExists('/themedinstancelogo')) { - return $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/') . '/themedinstancelogo'; + return $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/themedinstancelogo'; } return \OC::$SERVERROOT . '/core/img/logo.svg'; } diff --git a/lib/private/Repair/MoveUpdaterStepFile.php b/lib/private/Repair/MoveUpdaterStepFile.php index fabaff40d24..feb8a291282 100644 --- a/lib/private/Repair/MoveUpdaterStepFile.php +++ b/lib/private/Repair/MoveUpdaterStepFile.php @@ -44,7 +44,7 @@ class MoveUpdaterStepFile implements IRepairStep { public function run(IOutput $output) { - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT); + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); if(!is_string($instanceId) || empty($instanceId)) { diff --git a/lib/private/Setup/Sqlite.php b/lib/private/Setup/Sqlite.php index 63b970be42e..4d860103b60 100644 --- a/lib/private/Setup/Sqlite.php +++ b/lib/private/Setup/Sqlite.php @@ -33,7 +33,7 @@ class Sqlite extends AbstractDatabase { } public function setupDatabase($username) { - $datadir = \OC::$server->getSystemConfig()->getValue('datadirectory'); + $datadir = \OC::$server->getSystemConfig()->getValue('datadirectory', \OC::$SERVERROOT . '/data'); //delete the old sqlite database first, might cause infinte loops otherwise if(file_exists("$datadir/owncloud.db")) { diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 4b37efe0705..c37bb59028e 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -267,7 +267,7 @@ class User implements IUser { if ($this->backend->implementsActions(Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) { $this->home = $home; } elseif ($this->config) { - $this->home = $this->config->getSystemValue('datadirectory') . '/' . $this->uid; + $this->home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $this->uid; } else { $this->home = \OC::$SERVERROOT . '/data/' . $this->uid; } |