diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-10-27 19:53:12 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-10-27 21:39:35 +0100 |
commit | 79778d6a5118f3d024d1d4c1e001fba8fba13423 (patch) | |
tree | c25a12da7f6cc296c0b1db54dfa28a3b474e97f2 /core/setup | |
parent | 233c49f4b9fc90f5bd023420ed899439fb413db0 (diff) | |
download | nextcloud-server-79778d6a5118f3d024d1d4c1e001fba8fba13423.tar.gz nextcloud-server-79778d6a5118f3d024d1d4c1e001fba8fba13423.zip |
code cleanup during review :+1:
Diffstat (limited to 'core/setup')
-rw-r--r-- | core/setup/controller.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php index 628a4b0349f..f5f05348fd1 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -103,7 +103,7 @@ class Controller { $setup = new \OC_Setup($this->config); $databases = $setup->getSupportedDatabases(); - $datadir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); $vulnerableToNullByte = false; if(@file_exists(__FILE__."\0Nullbyte")) { // Check if the used PHP version is vulnerable to the NULL Byte attack (CVE-2006-7243) $vulnerableToNullByte = true; @@ -114,25 +114,25 @@ class Controller { // Create data directory to test whether the .htaccess works // Notice that this is not necessarily the same data directory as the one // that will effectively be used. - @mkdir($datadir); - if (is_dir($datadir) && is_writable($datadir)) { + @mkdir($dataDir); + $htAccessWorking = true; + if (is_dir($dataDir) && is_writable($dataDir)) { // Protect data directory here, so we can test if the protection is working \OC_Setup::protectDataDirectory(); try { - $htaccessWorking = \OC_Util::isHtaccessWorking(); + $htAccessWorking = \OC_Util::isHtaccessWorking(); } catch (\OC\HintException $e) { $errors[] = array( 'error' => $e->getMessage(), 'hint' => $e->getHint() ); - $htaccessWorking = false; + $htAccessWorking = false; } } if (\OC_Util::runningOnMac()) { $l10n = \OC::$server->getL10N('core'); - $themeName = \OC_Util::getTheme(); $theme = new \OC_Defaults(); $errors[] = array( 'error' => $l10n->t( @@ -151,8 +151,8 @@ class Controller { 'hasOracle' => isset($databases['oci']), 'hasMSSQL' => isset($databases['mssql']), 'databases' => $databases, - 'directory' => $datadir, - 'htaccessWorking' => $htaccessWorking, + 'directory' => $dataDir, + 'htaccessWorking' => $htAccessWorking, 'vulnerableToNullByte' => $vulnerableToNullByte, 'errors' => $errors, ); |