diff options
author | Anna Larch <anna@nextcloud.com> | 2023-09-14 14:59:06 +0200 |
---|---|---|
committer | Anna <anna@nextcloud.com> | 2023-09-19 11:56:44 +0200 |
commit | 56419d94f8a128b503a8cd6fe74befe908bb2361 (patch) | |
tree | 4b77648640bd8ac98352a690bd5076f109f50f43 /apps | |
parent | 8157d9789070e6d38710b1530aa4d903d74ca2ac (diff) | |
download | nextcloud-server-56419d94f8a128b503a8cd6fe74befe908bb2361.tar.gz nextcloud-server-56419d94f8a128b503a8cd6fe74befe908bb2361.zip |
enh(db): provide database providers via API
To avoid leaking internals (OC), wrap the getDatabasePlatform and provide the
associated constants
fixes https://github.com/nextcloud/server/issues/30877
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/lib/Controller/CheckSetupController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 295f791babb..5dcf6cda29c 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -641,7 +641,7 @@ Raw output protected function hasValidTransactionIsolationLevel(): bool { try { - if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) { + if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE) { return true; } @@ -839,7 +839,7 @@ Raw output ]; $schema = new SchemaWrapper($this->db); - $isSqlite = $this->db->getDatabasePlatform() instanceof SqlitePlatform; + $isSqlite = $this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE; $pendingColumns = []; foreach ($tables as $tableName => $columns) { |