@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ]; |
53 | 53 | |
54 | 54 | $requestOptions = ['httpErrors' => false, 'options' => ['allow_redirects' => ['track_redirects' => true]]]; |
55 | - foreach ($urls as [$verb,$url,$validStatuses,$checkCustomHeader]) { |
|
55 | + foreach ($urls as [$verb, $url, $validStatuses, $checkCustomHeader]) { |
|
56 | 56 | $works = null; |
57 | 57 | foreach ($this->runRequest($verb, $url, $requestOptions, isRootRequest: true) as $response) { |
58 | 58 | // Check that the response status matches |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // If 'works' is null then we could not connect to the server |
77 | 77 | if ($works === null) { |
78 | 78 | return SetupResult::info( |
79 | - $this->l10n->t('Could not check that your web server serves `.well-known` correctly. Please check manually.') . "\n" . $this->serverConfigHelp(), |
|
79 | + $this->l10n->t('Could not check that your web server serves `.well-known` correctly. Please check manually.')."\n".$this->serverConfigHelp(), |
|
80 | 80 | $this->urlGenerator->linkToDocs('admin-setup-well-known-URL'), |
81 | 81 | ); |
82 | 82 | } |
@@ -62,10 +62,10 @@ |
||
62 | 62 | } else { |
63 | 63 | $list = ''; |
64 | 64 | foreach ($missingColumns as $missingColumn) { |
65 | - $list .= "\n" . $this->l10n->t('Missing optional column "%s" in table "%s".', [$missingColumn['columnName'], $missingColumn['tableName']]); |
|
65 | + $list .= "\n".$this->l10n->t('Missing optional column "%s" in table "%s".', [$missingColumn['columnName'], $missingColumn['tableName']]); |
|
66 | 66 | } |
67 | 67 | return SetupResult::warning( |
68 | - $this->l10n->t('The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running "occ db:add-missing-columns" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability.') . $list |
|
68 | + $this->l10n->t('The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running "occ db:add-missing-columns" those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability.').$list |
|
69 | 69 | ); |
70 | 70 | } |
71 | 71 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | 'type' => 'highlight', |
51 | 51 | 'id' => 'backgroundjobs', |
52 | 52 | 'name' => 'Check the background job settings', |
53 | - 'link' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']) . '#backgroundjobs', |
|
53 | + 'link' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'server']).'#backgroundjobs', |
|
54 | 54 | ], |
55 | 55 | ], |
56 | 56 | ); |
@@ -79,13 +79,13 @@ |
||
79 | 79 | $list = $this->l10n->t('Missing indices:'); |
80 | 80 | foreach ($missingIndices as $missingIndex) { |
81 | 81 | $processed++; |
82 | - $list .= "\n " . $this->l10n->t('"%s" in table "%s"', [$missingIndex['indexName'], $missingIndex['tableName']]); |
|
82 | + $list .= "\n ".$this->l10n->t('"%s" in table "%s"', [$missingIndex['indexName'], $missingIndex['tableName']]); |
|
83 | 83 | if (count($missingIndices) > $processed) { |
84 | 84 | $list .= ', '; |
85 | 85 | } |
86 | 86 | } |
87 | 87 | return SetupResult::warning( |
88 | - $this->l10n->t('Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them.') . "\n" . $list, |
|
88 | + $this->l10n->t('Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them.')."\n".$list, |
|
89 | 89 | $this->urlGenerator->linkToDocs('admin-long-running-migration-steps') |
90 | 90 | ); |
91 | 91 | } |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | |
79 | 79 | /** Build details data about temporary directory, either one or two of them */ |
80 | 80 | $freeSpaceInTempInGB = $freeSpaceInTemp / 1024 / 1024 / 1024; |
81 | - $spaceDetail = $this->l10n->t('- %.1f GiB available in %s (PHP temporary directory)', [round($freeSpaceInTempInGB, 1),$phpTempPath]); |
|
81 | + $spaceDetail = $this->l10n->t('- %.1f GiB available in %s (PHP temporary directory)', [round($freeSpaceInTempInGB, 1), $phpTempPath]); |
|
82 | 82 | if ($nextcloudTempPath !== $phpTempPath) { |
83 | 83 | $freeSpaceInNextcloudTemp = disk_free_space($nextcloudTempPath); |
84 | 84 | if ($freeSpaceInNextcloudTemp === false) { |
85 | 85 | return SetupResult::error($this->l10n->t('Error while checking the available disk space of temporary PHP path or no free disk space returned. Temporary path: %s', [$nextcloudTempPath])); |
86 | 86 | } |
87 | 87 | $freeSpaceInNextcloudTempInGB = $freeSpaceInNextcloudTemp / 1024 / 1024 / 1024; |
88 | - $spaceDetail .= "\n" . $this->l10n->t('- %.1f GiB available in %s (Nextcloud temporary directory)', [round($freeSpaceInNextcloudTempInGB, 1),$nextcloudTempPath]); |
|
88 | + $spaceDetail .= "\n".$this->l10n->t('- %.1f GiB available in %s (Nextcloud temporary directory)', [round($freeSpaceInNextcloudTempInGB, 1), $nextcloudTempPath]); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | if (!$this->isPrimaryStorageS3()) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | return SetupResult::warning( |
107 | 107 | $this->l10n->t( |
108 | 108 | "This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GiB of free space available in the temp directory of PHP. To improve this please change the temporary directory in the php.ini or make more space available in that path. \nChecking the available space in the temporary path resulted in %.1f GiB instead of the recommended 50 GiB. Path: %s", |
109 | - [round($freeSpaceInTempInGB, 1),$phpTempPath] |
|
109 | + [round($freeSpaceInTempInGB, 1), $phpTempPath] |
|
110 | 110 | ) |
111 | 111 | ); |
112 | 112 | } |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | public function run(): SetupResult { |
44 | - $dataDir = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValueString('datadirectory', '')); |
|
45 | - $dataUrl = $this->urlGenerator->linkTo('', $dataDir . '/.ncdata'); |
|
44 | + $dataDir = str_replace(\OC::$SERVERROOT.'/', '', $this->config->getSystemValueString('datadirectory', '')); |
|
45 | + $dataUrl = $this->urlGenerator->linkTo('', $dataDir.'/.ncdata'); |
|
46 | 46 | |
47 | 47 | $noResponse = true; |
48 | - foreach ($this->runRequest('GET', $dataUrl, [ 'httpErrors' => false ]) as $response) { |
|
48 | + foreach ($this->runRequest('GET', $dataUrl, ['httpErrors' => false]) as $response) { |
|
49 | 49 | $noResponse = false; |
50 | 50 | if ($response->getStatusCode() < 400) { |
51 | 51 | // Read the response body |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | if ($noResponse) { |
66 | - return SetupResult::warning($this->l10n->t('Could not check that the data directory is protected. Please check manually that your server does not allow access to the data directory.') . "\n" . $this->serverConfigHelp()); |
|
66 | + return SetupResult::warning($this->l10n->t('Could not check that the data directory is protected. Please check manually that your server does not allow access to the data directory.')."\n".$this->serverConfigHelp()); |
|
67 | 67 | } |
68 | 68 | return SetupResult::success(); |
69 | 69 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $memcacheDistributedClass = $this->config->getSystemValue('memcache.distributed', null); |
38 | 38 | $memcacheLockingClass = $this->config->getSystemValue('memcache.locking', null); |
39 | 39 | $memcacheLocalClass = $this->config->getSystemValue('memcache.local', null); |
40 | - $caches = array_filter([$memcacheDistributedClass,$memcacheLockingClass,$memcacheLocalClass]); |
|
40 | + $caches = array_filter([$memcacheDistributedClass, $memcacheLockingClass, $memcacheLocalClass]); |
|
41 | 41 | if (in_array(Memcached::class, array_map(fn (string $class) => ltrim($class, '\\'), $caches))) { |
42 | 42 | // wrong PHP module is installed |
43 | 43 | if (extension_loaded('memcache') && !extension_loaded('memcached')) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $isAutoIncrement = $column->getAutoincrement(); |
56 | 56 | $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement; |
57 | 57 | if (!($column->getType() instanceof BigIntType) && !$isAutoIncrementOnSqlite) { |
58 | - $pendingColumns[] = $tableName . '.' . $columnName; |
|
58 | + $pendingColumns[] = $tableName.'.'.$columnName; |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | $list .= "\n"; |
76 | 76 | return SetupResult::info( |
77 | - $this->l10n->t('Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running "occ db:convert-filecache-bigint" those pending changes could be applied manually. This operation needs to be made while the instance is offline.') . $list, |
|
77 | + $this->l10n->t('Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running "occ db:convert-filecache-bigint" those pending changes could be applied manually. This operation needs to be made while the instance is offline.').$list, |
|
78 | 78 | $this->urlGenerator->linkToDocs('admin-bigint-conversion') |
79 | 79 | ); |
80 | 80 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | if (count($testedProviders) < count($providers)) { |
65 | 65 | return SetupResult::warning( |
66 | - $this->l10n->t('Could not check if your web server properly resolves the OCM and OCS provider URLs.', ) . "\n" . $this->serverConfigHelp(), |
|
66 | + $this->l10n->t('Could not check if your web server properly resolves the OCM and OCS provider URLs.',)."\n".$this->serverConfigHelp(), |
|
67 | 67 | ); |
68 | 68 | } |
69 | 69 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->l10n->t('Your web server is not properly set up to resolve %1$s. |
77 | 77 | This is most likely related to a web server configuration that was not updated to deliver this folder directly. |
78 | 78 | Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx. |
79 | -On Nginx those are typically the lines starting with "location ~" that need an update.', [join(', ', array_map(fn ($s) => '"' . $s . '"', $missingProviders))]), |
|
79 | +On Nginx those are typically the lines starting with "location ~" that need an update.', [join(', ', array_map(fn ($s) => '"'.$s.'"', $missingProviders))]), |
|
80 | 80 | $this->urlGenerator->linkToDocs('admin-nginx'), |
81 | 81 | ); |
82 | 82 | } |