summaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-01-03 15:28:31 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-01-08 11:45:19 +0100
commit8b64e92b9262d2a2eec6345685ce421050f95c66 (patch)
treedd51490b8a184b2643414d11867a9fa450aa5065 /lib/private/Repair
parent84e6e9f7cf19207041925eaa237d24e1c12c2c2d (diff)
downloadnextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.tar.gz
nextcloud-server-8b64e92b9262d2a2eec6345685ce421050f95c66.zip
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r--lib/private/Repair/Collation.php4
-rw-r--r--lib/private/Repair/RemoveLinkShares.php16
-rw-r--r--lib/private/Repair/RepairMimeTypes.php6
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php
index fb0e0192693..d2974c1680a 100644
--- a/lib/private/Repair/Collation.php
+++ b/lib/private/Repair/Collation.php
@@ -28,7 +28,7 @@
namespace OC\Repair;
use Doctrine\DBAL\Exception\DriverException;
-use Doctrine\DBAL\Platforms\MySqlPlatform;
+use Doctrine\DBAL\Platforms\MySQLPlatform;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\ILogger;
@@ -69,7 +69,7 @@ class Collation implements IRepairStep {
* Fix mime types
*/
public function run(IOutput $output) {
- if (!$this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
+ if (!$this->connection->getDatabasePlatform() instanceof MySQLPlatform) {
$output->info('Not a mysql database -> nothing to do');
return;
}
diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php
index 3a0dd6f2884..32cbd1f73f8 100644
--- a/lib/private/Repair/RemoveLinkShares.php
+++ b/lib/private/Repair/RemoveLinkShares.php
@@ -30,8 +30,8 @@ declare(strict_types=1);
namespace OC\Repair;
-use Doctrine\DBAL\Driver\Statement;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\DB\IResult;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
use OCP\IDBConnection;
@@ -138,10 +138,8 @@ class RemoveLinkShares implements IRepairStep {
/**
* Get the cursor to fetch all the shares
- *
- * @return \Doctrine\DBAL\Driver\Statement
*/
- private function getShares(): Statement {
+ private function getShares(): IResult {
$subQuery = $this->connection->getQueryBuilder();
$subQuery->select('*')
->from('share')
@@ -160,7 +158,9 @@ class RemoveLinkShares implements IRepairStep {
$query->expr()->eq('s2.share_type', $query->expr()->literal(2, IQueryBuilder::PARAM_INT))
))
->andWhere($query->expr()->eq('s1.item_source', 's2.item_source'));
- return $query->execute();
+ /** @var IResult $result */
+ $result = $query->execute();
+ return $result;
}
/**
@@ -210,13 +210,13 @@ class RemoveLinkShares implements IRepairStep {
private function repair(IOutput $output, int $total): void {
$output->startProgress($total);
- $shareCursor = $this->getShares();
- while ($data = $shareCursor->fetch()) {
+ $shareResult = $this->getShares();
+ while ($data = $shareResult->fetch()) {
$this->processShare($data);
$output->advance();
}
$output->finishProgress();
- $shareCursor->closeCursor();
+ $shareResult->closeCursor();
// Notifiy all admins
$adminGroup = $this->groupManager->get('admin');
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 3e6fa51b196..d0e3bbff707 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -71,7 +71,7 @@ class RepairMimeTypes implements IRepairStep {
if (empty($this->folderMimeTypeId)) {
$query->setParameter('mimetype', 'httpd/unix-directory');
$result = $query->execute();
- $this->folderMimeTypeId = (int)$result->fetchColumn();
+ $this->folderMimeTypeId = (int)$result->fetchOne();
$result->closeCursor();
}
@@ -88,7 +88,7 @@ class RepairMimeTypes implements IRepairStep {
// get target mimetype id
$query->setParameter('mimetype', $mimetype);
$result = $query->execute();
- $mimetypeId = (int)$result->fetchColumn();
+ $mimetypeId = (int)$result->fetchOne();
$result->closeCursor();
if (!$mimetypeId) {
@@ -242,7 +242,7 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '20.0.0.5', '<') && $this->introduceOpenDocumentTemplates()) {
$out->info('Fixed OpenDocument template mime types');
}
-
+
if (version_compare($ocVersionFromBeforeUpdate, '21.0.0.7', '<') && $this->introduceOrgModeType()) {
$out->info('Fixed orgmode mime types');
}