summaryrefslogtreecommitdiffstats
path: root/lib/files/cache
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-06-10 05:15:07 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-06-10 05:15:07 -0700
commit1da112750e1c32ab50980434fea56c5d32723b6f (patch)
treec8e79b0f205ea9c0bb916d9fda3a05fde6ff24ef /lib/files/cache
parentd264d0a79dd4433771da35f402d119de192a9a80 (diff)
parent124f34422c3b488869e0348c97d87aa0a69a3fe9 (diff)
downloadnextcloud-server-1da112750e1c32ab50980434fea56c5d32723b6f.tar.gz
nextcloud-server-1da112750e1c32ab50980434fea56c5d32723b6f.zip
Merge pull request #3647 from owncloud/missing_backticks
add missing backticks all over the place
Diffstat (limited to 'lib/files/cache')
-rw-r--r--lib/files/cache/backgroundwatcher.php4
-rw-r--r--lib/files/cache/cache.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/files/cache/backgroundwatcher.php b/lib/files/cache/backgroundwatcher.php
index 8933101577d..8e68f41cf44 100644
--- a/lib/files/cache/backgroundwatcher.php
+++ b/lib/files/cache/backgroundwatcher.php
@@ -59,9 +59,9 @@ class BackgroundWatcher {
*/
static private function getNextFileId($previous, $folder) {
if ($folder) {
- $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `fileid` > ? AND mimetype = ' . self::getFolderMimetype() . ' ORDER BY `fileid` ASC', 1);
+ $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `fileid` > ? AND `mimetype` = ' . self::getFolderMimetype() . ' ORDER BY `fileid` ASC', 1);
} else {
- $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `fileid` > ? AND mimetype != ' . self::getFolderMimetype() . ' ORDER BY `fileid` ASC', 1);
+ $query = \OC_DB::prepare('SELECT `fileid` FROM `*PREFIX*filecache` WHERE `fileid` > ? AND `mimetype` != ' . self::getFolderMimetype() . ' ORDER BY `fileid` ASC', 1);
}
$result = $query->execute(array($previous));
if ($row = $result->fetchRow()) {
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index cae2e63e4dc..6c2ef71098b 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -241,7 +241,7 @@ class Cache {
$params[] = $id;
$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET ' . implode(' = ?, ', $queryParts) . '=?'
- . ' WHERE fileid = ?');
+ . ' WHERE `fileid` = ?');
$query->execute($params);
}
@@ -385,10 +385,10 @@ class Cache {
* remove all entries for files that are stored on the storage from the cache
*/
public function clear() {
- $query = \OC_DB::prepare('DELETE FROM `*PREFIX*filecache` WHERE storage = ?');
+ $query = \OC_DB::prepare('DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?');
$query->execute(array($this->getNumericStorageId()));
- $query = \OC_DB::prepare('DELETE FROM `*PREFIX*storages` WHERE id = ?');
+ $query = \OC_DB::prepare('DELETE FROM `*PREFIX*storages` WHERE `id` = ?');
$query->execute(array($this->storageId));
}