summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-18 22:49:09 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-18 22:49:09 +0200
commit76f8be3b7aadbb2c78f6c341ef8919973275efc8 (patch)
treebf4bbd3274e9ffaf35c69f011df60abc7e22c4b4 /lib
parent690e98d45afc46b69df0559dce1ed9da85091e1d (diff)
downloadnextcloud-server-76f8be3b7aadbb2c78f6c341ef8919973275efc8.tar.gz
nextcloud-server-76f8be3b7aadbb2c78f6c341ef8919973275efc8.zip
fixing namespaces and rename hasCategory to hasTag
Diffstat (limited to 'lib')
-rw-r--r--lib/tags.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/tags.php b/lib/tags.php
index 4aafff8e1bb..3320d9ea1a8 100644
--- a/lib/tags.php
+++ b/lib/tags.php
@@ -113,7 +113,7 @@ class Tags implements \OCP\ITags {
$sql = 'SELECT COUNT(*) FROM `' . self::TAG_TABLE . '` '
. 'WHERE `uid` = ? AND `type` = ?';
try {
- $stmt = OCP\DB::prepare($sql);
+ $stmt = \OCP\DB::prepare($sql);
$result = $stmt->execute(array($this->user, $this->type));
if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('core', __METHOD__. ', DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
@@ -191,7 +191,7 @@ class Tags implements \OCP\ITags {
$stmt = \OCP\DB::prepare($sql);
$result = $stmt->execute(array($tagId));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
return false;
}
} catch(\Exception $e) {
@@ -381,7 +381,7 @@ class Tags implements \OCP\ITags {
. 'WHERE `uid` = ?');
$result = $stmt->execute(array($arguments['uid']));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
}
} catch(\Exception $e) {
\OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
@@ -409,12 +409,12 @@ class Tags implements \OCP\ITags {
$stmt = \OCP\DB::prepare('DELETE FROM `' . self::TAG_TABLE . '` '
. 'WHERE `uid` = ?');
$result = $stmt->execute(array($arguments['uid']));
- if (OCP\DB::isError($result)) {
+ if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('core', __METHOD__. ', DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
}
} catch(\Exception $e) {
- OCP\Util::writeLog('core', __METHOD__ . ', exception: '
- . $e->getMessage(), OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', __METHOD__ . ', exception: '
+ . $e->getMessage(), \OCP\Util::ERROR);
}
}
@@ -435,7 +435,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 = \OCP\DB::prepare($query);
$result = $stmt->execute($updates);
if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
@@ -471,7 +471,7 @@ class Tags implements \OCP\ITags {
* @return boolean
*/
public function addToFavorites($objid) {
- if(!$this->hasCategory(self::TAG_FAVORITE)) {
+ if(!$this->hasTag(self::TAG_FAVORITE)) {
$this->add(self::TAG_FAVORITE, true);
}
return $this->tagAs($objid, self::TAG_FAVORITE, $this->type);
@@ -574,7 +574,7 @@ class Tags implements \OCP\ITags {
. '`uid` = ? AND `type` = ? AND `category` = ?');
$result = $stmt->execute(array($this->user, $this->type, $name));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
}
} catch(\Exception $e) {
\OCP\Util::writeLog('core', __METHOD__ . ', exception: '