@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | public function getSystemInfo($allowAllDatabases = false) { |
| 209 | 209 | $databases = $this->getSupportedDatabases($allowAllDatabases); |
| 210 | 210 | |
| 211 | - $dataDir = $this->config->getValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
| 211 | + $dataDir = $this->config->getValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
| 212 | 212 | |
| 213 | 213 | $errors = []; |
| 214 | 214 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | if (\OC_Util::runningOnMac()) { |
| 240 | 240 | $errors[] = [ |
| 241 | 241 | 'error' => $this->l10n->t( |
| 242 | - 'Mac OS X is not supported and %s will not work properly on this platform. ' . |
|
| 242 | + 'Mac OS X is not supported and %s will not work properly on this platform. '. |
|
| 243 | 243 | 'Use it at your own risk! ', |
| 244 | 244 | [$this->defaults->getProductName()] |
| 245 | 245 | ), |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | if ($this->iniWrapper->getString('open_basedir') !== '' && PHP_INT_SIZE === 4) { |
| 251 | 251 | $errors[] = [ |
| 252 | 252 | 'error' => $this->l10n->t( |
| 253 | - 'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' . |
|
| 253 | + 'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. '. |
|
| 254 | 254 | 'This will lead to problems with files over 4 GB and is highly discouraged.', |
| 255 | 255 | [$this->defaults->getProductName()] |
| 256 | 256 | ), |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $error[] = $l->t('Set an admin password.'); |
| 288 | 288 | } |
| 289 | 289 | if (empty($options['directory'])) { |
| 290 | - $options['directory'] = \OC::$SERVERROOT . "/data"; |
|
| 290 | + $options['directory'] = \OC::$SERVERROOT."/data"; |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | if (!isset(self::$dbSetupClasses[$dbType])) { |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | ]; |
| 344 | 344 | |
| 345 | 345 | if ($this->config->getValue('overwrite.cli.url', null) === null) { |
| 346 | - $newConfigValues['overwrite.cli.url'] = $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT; |
|
| 346 | + $newConfigValues['overwrite.cli.url'] = $request->getServerProtocol().'://'.$request->getInsecureServerHost().\OC::$WEBROOT; |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | $this->config->setValues($newConfigValues); |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | return $error; |
| 361 | 361 | } catch (Exception $e) { |
| 362 | 362 | $error[] = [ |
| 363 | - 'error' => 'Error while trying to create admin user: ' . $e->getMessage(), |
|
| 363 | + 'error' => 'Error while trying to create admin user: '.$e->getMessage(), |
|
| 364 | 364 | 'exception' => $e, |
| 365 | 365 | 'hint' => '', |
| 366 | 366 | ]; |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | $dbSetup->runMigrations(); |
| 372 | 372 | } catch (Exception $e) { |
| 373 | 373 | $error[] = [ |
| 374 | - 'error' => 'Error while trying to initialise the database: ' . $e->getMessage(), |
|
| 374 | + 'error' => 'Error while trying to initialise the database: '.$e->getMessage(), |
|
| 375 | 375 | 'exception' => $e, |
| 376 | 376 | 'hint' => '', |
| 377 | 377 | ]; |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | |
| 411 | 411 | // create empty file in data dir, so we can later find |
| 412 | 412 | // out that this is indeed an ownCloud data directory |
| 413 | - file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', ''); |
|
| 413 | + file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', ''); |
|
| 414 | 414 | |
| 415 | 415 | // Update .htaccess files |
| 416 | 416 | self::updateHtaccess(); |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | * @return string Absolute path to htaccess |
| 457 | 457 | */ |
| 458 | 458 | private function pathToHtaccess() { |
| 459 | - return \OC::$SERVERROOT . '/.htaccess'; |
|
| 459 | + return \OC::$SERVERROOT.'/.htaccess'; |
|
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | /** |
@@ -514,10 +514,10 @@ discard block |
||
| 514 | 514 | $htaccessContent = explode($content, $htaccessContent, 2)[0]; |
| 515 | 515 | |
| 516 | 516 | //custom 403 error page |
| 517 | - $content .= "\nErrorDocument 403 " . $webRoot . '/index.php/error/403'; |
|
| 517 | + $content .= "\nErrorDocument 403 ".$webRoot.'/index.php/error/403'; |
|
| 518 | 518 | |
| 519 | 519 | //custom 404 error page |
| 520 | - $content .= "\nErrorDocument 404 " . $webRoot . '/index.php/error/404'; |
|
| 520 | + $content .= "\nErrorDocument 404 ".$webRoot.'/index.php/error/404'; |
|
| 521 | 521 | |
| 522 | 522 | // Add rewrite rules if the RewriteBase is configured |
| 523 | 523 | $rewriteBase = $config->getValue('htaccess.RewriteBase', ''); |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | $content .= "\n RewriteCond %{REQUEST_URI} !^/\\.well-known/(acme-challenge|pki-validation)/.*"; |
| 537 | 537 | $content .= "\n RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$"; |
| 538 | 538 | $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]"; |
| 539 | - $content .= "\n RewriteBase " . $rewriteBase; |
|
| 539 | + $content .= "\n RewriteBase ".$rewriteBase; |
|
| 540 | 540 | $content .= "\n <IfModule mod_env.c>"; |
| 541 | 541 | $content .= "\n SetEnv front_controller_active true"; |
| 542 | 542 | $content .= "\n <IfModule mod_dir.c>"; |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | |
| 549 | 549 | if ($content !== '') { |
| 550 | 550 | //suppress errors in case we don't have permissions for it |
| 551 | - return (bool)@file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent . $content . "\n"); |
|
| 551 | + return (bool) @file_put_contents($setupHelper->pathToHtaccess(), $htaccessContent.$content."\n"); |
|
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | return false; |
@@ -582,19 +582,19 @@ discard block |
||
| 582 | 582 | $content .= " IndexIgnore *\n"; |
| 583 | 583 | $content .= "</IfModule>"; |
| 584 | 584 | |
| 585 | - $baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
| 586 | - file_put_contents($baseDir . '/.htaccess', $content); |
|
| 587 | - file_put_contents($baseDir . '/index.html', ''); |
|
| 585 | + $baseDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
| 586 | + file_put_contents($baseDir.'/.htaccess', $content); |
|
| 587 | + file_put_contents($baseDir.'/index.html', ''); |
|
| 588 | 588 | } |
| 589 | 589 | |
| 590 | 590 | private function getVendorData(): array { |
| 591 | 591 | // this should really be a JSON file |
| 592 | - require \OC::$SERVERROOT . '/version.php'; |
|
| 592 | + require \OC::$SERVERROOT.'/version.php'; |
|
| 593 | 593 | /** @var mixed $vendor */ |
| 594 | 594 | /** @var mixed $OC_Channel */ |
| 595 | 595 | return [ |
| 596 | - 'vendor' => (string)$vendor, |
|
| 597 | - 'channel' => (string)$OC_Channel, |
|
| 596 | + 'vendor' => (string) $vendor, |
|
| 597 | + 'channel' => (string) $OC_Channel, |
|
| 598 | 598 | ]; |
| 599 | 599 | } |
| 600 | 600 | } |