compatibility to Nc 19
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
8f499b9c8a
commit
1bb5314491
|
@ -157,7 +157,7 @@ class Repair implements IOutput {
|
||||||
new RemoveLinkShares(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig(), \OC::$server->getGroupManager(), \OC::$server->getNotificationManager(), \OC::$server->query(ITimeFactory::class)),
|
new RemoveLinkShares(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig(), \OC::$server->getGroupManager(), \OC::$server->getNotificationManager(), \OC::$server->query(ITimeFactory::class)),
|
||||||
new ClearCollectionsAccessCache(\OC::$server->getConfig(), \OC::$server->query(IManager::class)),
|
new ClearCollectionsAccessCache(\OC::$server->getConfig(), \OC::$server->query(IManager::class)),
|
||||||
\OC::$server->query(ResetGeneratedAvatarFlag::class),
|
\OC::$server->query(ResetGeneratedAvatarFlag::class),
|
||||||
\OC::$server->get(RepairDavShares::class)
|
\OC::$server->query(RepairDavShares::class)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OC\Repair;
|
namespace OC\Repair;
|
||||||
|
|
||||||
use OCP\DB\Exception;
|
use Doctrine\DBAL\DBALException;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IDBConnection;
|
use OCP\IDBConnection;
|
||||||
use OCP\IGroupManager;
|
use OCP\IGroupManager;
|
||||||
|
@ -112,7 +112,7 @@ class RepairDavShares implements IRepairStep {
|
||||||
->setParameter('shareId', $share['id'])
|
->setParameter('shareId', $share['id'])
|
||||||
->execute();
|
->execute();
|
||||||
$this->logger->info('Repaired principal for dav share {id} from {old} to {new}', $logParameters);
|
$this->logger->info('Repaired principal for dav share {id} from {old} to {new}', $logParameters);
|
||||||
} catch (Exception $e) {
|
} catch (DBALException $e) {
|
||||||
$logParameters['message'] = $e->getMessage();
|
$logParameters['message'] = $e->getMessage();
|
||||||
$logParameters['exception'] = $e;
|
$logParameters['exception'] = $e;
|
||||||
$this->logger->info('Could not repair principal for dav share {id} from {old} to {new}: {message}', $logParameters);
|
$this->logger->info('Could not repair principal for dav share {id} from {old} to {new}: {message}', $logParameters);
|
||||||
|
|
|
@ -25,8 +25,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Test\Repair;
|
namespace Test\Repair;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Driver\Statement;
|
||||||
use OC\Repair\RepairDavShares;
|
use OC\Repair\RepairDavShares;
|
||||||
use OCP\DB\IResult;
|
|
||||||
use OCP\DB\QueryBuilder\IExpressionBuilder;
|
use OCP\DB\QueryBuilder\IExpressionBuilder;
|
||||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
@ -130,7 +130,7 @@ class RepairDavSharesTest extends TestCase {
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$shareResults = $this->createMock(IResult::class);
|
$shareResults = $this->createMock(Statement::class);
|
||||||
$shareResults->expects($this->any())
|
$shareResults->expects($this->any())
|
||||||
->method('fetch')
|
->method('fetch')
|
||||||
->willReturnCallback(function () use (&$shareResultData) {
|
->willReturnCallback(function () use (&$shareResultData) {
|
||||||
|
|
Loading…
Reference in New Issue