summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-04-02 11:34:21 +0200
committerGitHub <noreply@github.com>2020-04-02 11:34:21 +0200
commitbc6a5ef5c4431ca662424dbd1125e65e74b27fa8 (patch)
treea4ca41650699b5d9f9356eb4e7d5a5a10ab15ab2 /apps/settings
parentc1368b86963b93a42ec98a856f8d307d922c8967 (diff)
parent1f5ba56235349ad811329b80cc1a2338dc8c79c7 (diff)
downloadnextcloud-server-bc6a5ef5c4431ca662424dbd1125e65e74b27fa8.tar.gz
nextcloud-server-bc6a5ef5c4431ca662424dbd1125e65e74b27fa8.zip
Merge pull request #19890 from nextcloud/enh/comments-reference-id
Add optional comments reference_id
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php11
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php1
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 04711cf5308..6f3bb539eff 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -46,6 +46,7 @@ use GuzzleHttp\Exception\ClientException;
use OC;
use OC\AppFramework\Http;
use OC\DB\Connection;
+use OC\DB\MissingColumnInformation;
use OC\DB\MissingIndexInformation;
use OC\DB\SchemaWrapper;
use OC\IntegrityCheck\Checker;
@@ -445,6 +446,15 @@ Raw output
return $indexInfo->getListOfMissingIndexes();
}
+ protected function hasMissingColumns(): array {
+ $indexInfo = new MissingColumnInformation();
+ // Dispatch event so apps can also hint for pending index updates if needed
+ $event = new GenericEvent($indexInfo);
+ $this->dispatcher->dispatch(IDBConnection::CHECK_MISSING_COLUMNS_EVENT, $event);
+
+ return $indexInfo->getListOfMissingColumns();
+ }
+
protected function isSqliteUsed() {
return strpos($this->config->getSystemValue('dbtype'), 'sqlite') !== false;
}
@@ -693,6 +703,7 @@ Raw output
'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
'hasFreeTypeSupport' => $this->hasFreeTypeSupport(),
'missingIndexes' => $this->hasMissingIndexes(),
+ 'missingColumns' => $this->hasMissingColumns(),
'isSqliteUsed' => $this->isSqliteUsed(),
'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
'isPHPMailerUsed' => $this->isPHPMailerUsed(),
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index 5e59bfe353a..c15f3b8f23a 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -583,6 +583,7 @@ class CheckSetupControllerTest extends TestCase {
'isSqliteUsed' => false,
'databaseConversionDocumentation' => 'http://docs.example.org/server/go.php?to=admin-db-conversion',
'missingIndexes' => [],
+ 'missingColumns' => [],
'isPHPMailerUsed' => false,
'mailSettingsDocumentation' => 'https://server/index.php/settings/admin',
'isMemoryLimitSufficient' => true,