summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-26 13:07:12 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-26 14:40:23 +0200
commitf4fd0224db82b1bab3e7f661686718fa9aebdf3b (patch)
treecf48b9c0f9877e5d6842838df17463a0e11c87c2 /lib
parente2b44d199bea7da74811689ec3ab787135e22de6 (diff)
downloadnextcloud-server-f4fd0224db82b1bab3e7f661686718fa9aebdf3b.tar.gz
nextcloud-server-f4fd0224db82b1bab3e7f661686718fa9aebdf3b.zip
Do not use \OCP\DB anymore
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Tags.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index cf1c5c0fbad..c78297e5290 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -288,7 +288,7 @@ class Tags implements \OCP\ITags {
. '` WHERE `categoryid` = ?';
try {
- $stmt = \OCP\DB::prepare($sql);
+ $stmt = \OC_DB::prepare($sql);
$result = $stmt->execute(array($tagId));
if ($result === null) {
\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OC::$server->getDatabaseConnection()->getError(), \OCP\Util::ERROR);
@@ -530,7 +530,7 @@ class Tags implements \OCP\ITags {
// Find all objectid/tagId pairs.
$result = null;
try {
- $stmt = \OCP\DB::prepare('SELECT `id` FROM `' . self::TAG_TABLE . '` '
+ $stmt = \OC_DB::prepare('SELECT `id` FROM `' . self::TAG_TABLE . '` '
. 'WHERE `uid` = ?');
$result = $stmt->execute(array($arguments['uid']));
if ($result === null) {
@@ -546,7 +546,7 @@ class Tags implements \OCP\ITags {
if(!is_null($result)) {
try {
- $stmt = \OCP\DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` '
+ $stmt = \OC_DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` '
. 'WHERE `categoryid` = ?');
while( $row = $result->fetchRow()) {
try {
@@ -568,7 +568,7 @@ class Tags implements \OCP\ITags {
}
}
try {
- $stmt = \OCP\DB::prepare('DELETE FROM `' . self::TAG_TABLE . '` '
+ $stmt = \OC_DB::prepare('DELETE FROM `' . self::TAG_TABLE . '` '
. 'WHERE `uid` = ?');
$result = $stmt->execute(array($arguments['uid']));
if ($result === null) {
@@ -600,7 +600,7 @@ class Tags implements \OCP\ITags {
$query .= 'WHERE `objid` IN (' . str_repeat('?,', count($ids)-1) . '?) ';
$query .= 'AND `type`= ?';
$updates[] = $this->type;
- $stmt = \OCP\DB::prepare($query);
+ $stmt = \OC_DB::prepare($query);
$result = $stmt->execute($updates);
if ($result === null) {
\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OC::$server->getDatabaseConnection()->getError(), \OCP\Util::ERROR);
@@ -719,7 +719,7 @@ class Tags implements \OCP\ITags {
try {
$sql = 'DELETE FROM `' . self::RELATION_TABLE . '` '
. 'WHERE `objid` = ? AND `categoryid` = ? AND `type` = ?';
- $stmt = \OCP\DB::prepare($sql);
+ $stmt = \OC_DB::prepare($sql);
$stmt->execute(array($objid, $tagId, $this->type));
} catch(\Exception $e) {
\OC::$server->getLogger()->logException($e, [
@@ -769,7 +769,7 @@ class Tags implements \OCP\ITags {
try {
$sql = 'DELETE FROM `' . self::RELATION_TABLE . '` '
. 'WHERE `categoryid` = ?';
- $stmt = \OCP\DB::prepare($sql);
+ $stmt = \OC_DB::prepare($sql);
$result = $stmt->execute(array($id));
if ($result === null) {
\OCP\Util::writeLog('core',