diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-06 12:34:19 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-21 15:25:47 +0200 |
commit | de348180ae257017a9a2af05dac72286bf262bed (patch) | |
tree | 3fe07523249ca6a6e91defcff781b86be031b98c /lib/repair | |
parent | 1bfb944d515c88f915739c3b920d39d6da200d29 (diff) | |
download | nextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.tar.gz nextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.zip |
Use the public interface and our method instead of the doctrine thing
Diffstat (limited to 'lib/repair')
-rw-r--r-- | lib/repair/cleantags.php | 10 | ||||
-rw-r--r-- | lib/repair/dropoldtables.php | 8 | ||||
-rw-r--r-- | lib/repair/filletags.php | 7 |
3 files changed, 12 insertions, 13 deletions
diff --git a/lib/repair/cleantags.php b/lib/repair/cleantags.php index 7d2002427f8..ddd1a483016 100644 --- a/lib/repair/cleantags.php +++ b/lib/repair/cleantags.php @@ -22,9 +22,9 @@ namespace OC\Repair; -use OC\DB\Connection; use OC\Hooks\BasicEmitter; use OC\RepairStep; +use OCP\IDBConnection; /** * Class RepairConfig @@ -33,13 +33,13 @@ use OC\RepairStep; */ class CleanTags extends BasicEmitter implements RepairStep { - /** @var Connection */ + /** @var IDBConnection */ protected $connection; /** - * @param Connection $connection + * @param IDBConnection $connection */ - public function __construct(Connection $connection) { + public function __construct(IDBConnection $connection) { $this->connection = $connection; } @@ -108,7 +108,7 @@ class CleanTags extends BasicEmitter implements RepairStep { * the entry is deleted in the $deleteTable */ protected function deleteOrphanEntries($repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) { - $qb = $this->connection->createQueryBuilder(); + $qb = $this->connection->getQueryBuilder(); $qb->select('d.`' . $deleteId . '`') ->from('`' . $deleteTable . '`', 'd') diff --git a/lib/repair/dropoldtables.php b/lib/repair/dropoldtables.php index 9afd9698e04..cfe0df6cb5b 100644 --- a/lib/repair/dropoldtables.php +++ b/lib/repair/dropoldtables.php @@ -22,19 +22,19 @@ namespace OC\Repair; -use OC\DB\Connection; use OC\Hooks\BasicEmitter; use OC\RepairStep; +use OCP\IDBConnection; class DropOldTables extends BasicEmitter implements RepairStep { - /** @var Connection */ + /** @var IDBConnection */ protected $connection; /** - * @param Connection $connection + * @param IDBConnection $connection */ - public function __construct(Connection $connection) { + public function __construct(IDBConnection $connection) { $this->connection = $connection; } diff --git a/lib/repair/filletags.php b/lib/repair/filletags.php index 501a18d0b4a..a46c951efaf 100644 --- a/lib/repair/filletags.php +++ b/lib/repair/filletags.php @@ -22,16 +22,15 @@ namespace OC\Repair; -use Doctrine\DBAL\Query\QueryBuilder; use OC\Hooks\BasicEmitter; class FillETags extends BasicEmitter implements \OC\RepairStep { - /** @var \OC\DB\Connection */ + /** @var \OCP\IDBConnection */ protected $connection; /** - * @param \OC\DB\Connection $connection + * @param \OCP\IDBConnection $connection */ public function __construct($connection) { $this->connection = $connection; @@ -42,7 +41,7 @@ class FillETags extends BasicEmitter implements \OC\RepairStep { } public function run() { - $qb = $this->connection->createQueryBuilder(); + $qb = $this->connection->getQueryBuilder(); $qb->update('`*PREFIX*filecache`') ->set('`etag`', $qb->expr()->literal('xxx')) ->where($qb->expr()->eq('`etag`', $qb->expr()->literal(''))) |