aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-01 16:59:47 +0200
committerJoas Schilling <coding@schilljs.com>2024-07-19 11:21:14 +0200
commit829f2b9bc7290c0b1b1a9db373ee26199c9bcc4d (patch)
tree5641e35ffe42897566f58acb1d71a0d9afba4729 /apps/user_ldap
parentbd383627a7ef3cb0a8e608b35de067d341f46da4 (diff)
downloadnextcloud-server-829f2b9bc7290c0b1b1a9db373ee26199c9bcc4d.tar.gz
nextcloud-server-829f2b9bc7290c0b1b1a9db373ee26199c9bcc4d.zip
fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of removed upstream platforms
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Mapping/AbstractMapping.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php
index c243731eaf7..79d23b8d618 100644
--- a/apps/user_ldap/lib/Mapping/AbstractMapping.php
+++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php
@@ -8,9 +8,9 @@
namespace OCA\User_LDAP\Mapping;
use Doctrine\DBAL\Exception;
-use Doctrine\DBAL\Platforms\SqlitePlatform;
use OCP\DB\IPreparedStatement;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\IDBConnection;
use Psr\Log\LoggerInterface;
/**
@@ -216,7 +216,7 @@ abstract class AbstractMapping {
public function getListOfIdsByDn(array $fdns): array {
$totalDBParamLimit = 65000;
$sliceSize = 1000;
- $maxSlices = $this->dbc->getDatabasePlatform() instanceof SqlitePlatform ? 9 : $totalDBParamLimit / $sliceSize;
+ $maxSlices = $this->dbc->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE ? 9 : $totalDBParamLimit / $sliceSize;
$results = [];
$slice = 1;