summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-07 22:08:21 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-21 15:25:47 +0200
commitf77e5f411dda91a7c4fc70c090825a036b7b1135 (patch)
tree6cc6cc88d7f3bb3ff137e2da5130e933ca1ab840 /lib
parent516f7e8299c309ed909259c90c23cb0ce6a8e4f7 (diff)
downloadnextcloud-server-f77e5f411dda91a7c4fc70c090825a036b7b1135.tar.gz
nextcloud-server-f77e5f411dda91a7c4fc70c090825a036b7b1135.zip
Fix existing usages by removing the quotes
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php12
-rw-r--r--lib/repair/cleantags.php16
-rw-r--r--lib/repair/filletags.php8
3 files changed, 18 insertions, 18 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index e3364e0de0b..41b60ecc638 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1203,9 +1203,9 @@ class Share extends Constants {
private static function getShareOwner(IDBConnection $connection, $shareId) {
$qb = $connection->getQueryBuilder();
- $qb->select('`uid_owner`')
- ->from('`*PREFIX*share`')
- ->where('`id` = :shareId')
+ $qb->select('uid_owner')
+ ->from('*PREFIX*share')
+ ->where($qb->expr()->eq('id', $qb->createParameter('shareId')))
->setParameter(':shareId', $shareId);
$result = $qb->execute();
$result = $result->fetch();
@@ -1253,9 +1253,9 @@ class Share extends Constants {
}
$qb = $connection->getQueryBuilder();
- $qb->update('`*PREFIX*share`')
- ->set('`share_with`', ':pass')
- ->where('`id` = :shareId')
+ $qb->update('*PREFIX*share')
+ ->set('share_with', $qb->createParameter('pass'))
+ ->where($qb->expr()->eq('id', $qb->createParameter('shareId')))
->setParameter(':pass', is_null($password) ? null : \OC::$server->getHasher()->hash($password))
->setParameter(':shareId', $shareId);
diff --git a/lib/repair/cleantags.php b/lib/repair/cleantags.php
index ddd1a483016..2bda1047081 100644
--- a/lib/repair/cleantags.php
+++ b/lib/repair/cleantags.php
@@ -110,14 +110,14 @@ class CleanTags extends BasicEmitter implements RepairStep {
protected function deleteOrphanEntries($repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
$qb = $this->connection->getQueryBuilder();
- $qb->select('d.`' . $deleteId . '`')
- ->from('`' . $deleteTable . '`', 'd')
- ->leftJoin('d', '`' . $sourceTable . '`', 's', 'd.`' . $deleteId . '` = s.`' . $sourceId . '`')
+ $qb->select('d.' . $deleteId)
+ ->from($deleteTable, 'd')
+ ->leftJoin('d', $sourceTable, 's', $qb->expr()->eq('d.' . $deleteId, ' s.' . $sourceId))
->where(
- 'd.`type` = ' . $qb->expr()->literal('files')
+ $qb->expr()->eq('d.type', $qb->expr()->literal('files'))
)
->andWhere(
- $qb->expr()->isNull('s.`' . $sourceNullColumn . '`')
+ $qb->expr()->isNull('s.' . $sourceNullColumn)
);
$result = $qb->execute();
@@ -129,11 +129,11 @@ class CleanTags extends BasicEmitter implements RepairStep {
if (!empty($orphanItems)) {
$orphanItemsBatch = array_chunk($orphanItems, 200);
foreach ($orphanItemsBatch as $items) {
- $qb->delete('`' . $deleteTable . '`')
+ $qb->delete($deleteTable)
->where(
- '`type` = ' . $qb->expr()->literal('files')
+ $qb->expr()->eq('type', $qb->expr()->literal('files'))
)
- ->andWhere($qb->expr()->in('`' . $deleteId . '`', ':ids'));
+ ->andWhere($qb->expr()->in($deleteId, $qb->createParameter('ids')));
$qb->setParameter('ids', $items, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);
$qb->execute();
}
diff --git a/lib/repair/filletags.php b/lib/repair/filletags.php
index a46c951efaf..f1bb2c896c4 100644
--- a/lib/repair/filletags.php
+++ b/lib/repair/filletags.php
@@ -42,10 +42,10 @@ class FillETags extends BasicEmitter implements \OC\RepairStep {
public function run() {
$qb = $this->connection->getQueryBuilder();
- $qb->update('`*PREFIX*filecache`')
- ->set('`etag`', $qb->expr()->literal('xxx'))
- ->where($qb->expr()->eq('`etag`', $qb->expr()->literal('')))
- ->orWhere($qb->expr()->isNull('`etag`'));
+ $qb->update('*PREFIX*filecache')
+ ->set('etag', $qb->expr()->literal('xxx'))
+ ->where($qb->expr()->eq('etag', $qb->expr()->literal('')))
+ ->orWhere($qb->expr()->isNull('etag'));
$result = $qb->execute();
$this->emit('\OC\Repair', 'info', array("ETags have been fixed for $result files/folders."));