aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/cache/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/cache/storage.php')
-rw-r--r--lib/files/cache/storage.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/files/cache/storage.php b/lib/files/cache/storage.php
index 72de376798c..8a9e47ca36d 100644
--- a/lib/files/cache/storage.php
+++ b/lib/files/cache/storage.php
@@ -32,13 +32,13 @@ class Storage {
$this->storageId = md5($this->storageId);
}
- $query = \OC_DB::prepare('SELECT `numeric_id` FROM `*PREFIX*storages` WHERE `id` = ?');
- $result = $query->execute(array($this->storageId));
+ $sql = 'SELECT `numeric_id` FROM `*PREFIX*storages` WHERE `id` = ?';
+ $result = \OC_DB::executeAudited($sql, array($this->storageId));
if ($row = $result->fetchRow()) {
$this->numericId = $row['numeric_id'];
} else {
- $query = \OC_DB::prepare('INSERT INTO `*PREFIX*storages`(`id`) VALUES(?)');
- $query->execute(array($this->storageId));
+ $sql = 'INSERT INTO `*PREFIX*storages` (`id`) VALUES(?)';
+ \OC_DB::executeAudited($sql, array($this->storageId));
$this->numericId = \OC_DB::insertid('*PREFIX*storages');
}
}
@@ -48,8 +48,9 @@ class Storage {
}
public static function getStorageId($numericId) {
- $query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?');
- $result = $query->execute(array($numericId));
+
+ $sql = 'SELECT `id` FROM `*PREFIX*storages` WHERE `numeric_id` = ?';
+ $result = \OC_DB::executeAudited($sql, array($numericId));
if ($row = $result->fetchRow()) {
return $row['id'];
} else {