summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-18 17:02:39 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-18 17:02:39 +0200
commite837927ad573d1c8fbcecc1759859d6a3465c691 (patch)
treedf9a2c18f8b1f57e2b8e1f95a3c777bda8ab7800
parent47ecfd98a39e596c8f47dd9a6b14ece4e651f685 (diff)
downloadnextcloud-server-e837927ad573d1c8fbcecc1759859d6a3465c691.tar.gz
nextcloud-server-e837927ad573d1c8fbcecc1759859d6a3465c691.zip
fix followup issues with unneeded parameters
-rw-r--r--apps/files_sharing/api/local.php2
-rw-r--r--lib/private/db.php6
-rw-r--r--lib/private/share/share.php16
-rw-r--r--lib/private/tags.php12
-rw-r--r--lib/private/user/database.php4
5 files changed, 20 insertions, 20 deletions
diff --git a/apps/files_sharing/api/local.php b/apps/files_sharing/api/local.php
index 1a5edbfd070..00509bcee69 100644
--- a/apps/files_sharing/api/local.php
+++ b/apps/files_sharing/api/local.php
@@ -571,7 +571,7 @@ class Local {
$result = $query->execute($args);
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('files_sharing', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('files_sharing', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
return null;
}
if ($share = $result->fetchRow()) {
diff --git a/lib/private/db.php b/lib/private/db.php
index 673ad894b66..98df1c73714 100644
--- a/lib/private/db.php
+++ b/lib/private/db.php
@@ -290,11 +290,11 @@ class OC_DB {
public static function raiseExceptionOnError($result, $message = null) {
if(self::isError($result)) {
if ($message === null) {
- $message = self::getErrorMessage($result);
+ $message = self::getErrorMessage();
} else {
- $message .= ', Root cause:' . self::getErrorMessage($result);
+ $message .= ', Root cause:' . self::getErrorMessage();
}
- throw new \OC\DatabaseException($message, self::getErrorCode($result));
+ throw new \OC\DatabaseException($message, self::getErrorCode());
}
}
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 729dbe79d38..227a3d5a411 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -153,7 +153,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute(array($source, self::SHARE_TYPE_USER));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OC_Log::ERROR);
} else {
while ($row = $result->fetchRow()) {
$shares[] = $row['share_with'];
@@ -175,7 +175,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute(array($source, self::SHARE_TYPE_GROUP));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OC_Log::ERROR);
} else {
while ($row = $result->fetchRow()) {
$usersInGroup = \OC_Group::usersInGroup($row['share_with']);
@@ -199,7 +199,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute(array($source, self::SHARE_TYPE_LINK));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
} else {
if ($result->fetchRow()) {
$publicShare = true;
@@ -218,7 +218,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute(array($source, self::SHARE_TYPE_REMOTE));
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
} else {
if ($result->fetchRow()) {
$remoteShare = true;
@@ -256,7 +256,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute();
if (\OCP\DB::isError($result)) {
- \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OC_Log::ERROR);
} else {
while ($row = $result->fetchRow()) {
foreach ($fileTargets[$row['fileid']] as $uid => $shareData) {
@@ -447,7 +447,7 @@ class Share extends \OC\Share\Constants {
$query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?', 1);
$result = $query->execute(array($token));
if (\OC_DB::isError($result)) {
- \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', token=' . $token, \OC_Log::ERROR);
+ \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage() . ', token=' . $token, \OC_Log::ERROR);
}
$row = $result->fetchRow();
if ($row === false) {
@@ -1598,7 +1598,7 @@ class Share extends \OC\Share\Constants {
$result = $query->execute($queryArgs);
if (\OC_DB::isError($result)) {
\OC_Log::write('OCP\Share',
- \OC_DB::getErrorMessage($result) . ', select=' . $select . ' where=',
+ \OC_DB::getErrorMessage() . ', select=' . $select . ' where=',
\OC_Log::ERROR);
}
$items = array();
@@ -1662,7 +1662,7 @@ class Share extends \OC\Share\Constants {
$parentResult = $query->execute(array($row['parent']));
if (\OC_DB::isError($result)) {
\OC_Log::write('OCP\Share', 'Can\'t select parent: ' .
- \OC_DB::getErrorMessage($result) . ', select=' . $select . ' where=' . $where,
+ \OC_DB::getErrorMessage() . ', select=' . $select . ' where=' . $where,
\OC_Log::ERROR);
} else {
$parentRow = $parentResult->fetchRow();
diff --git a/lib/private/tags.php b/lib/private/tags.php
index 975b6dbfe0d..84ee5c98dfd 100644
--- a/lib/private/tags.php
+++ b/lib/private/tags.php
@@ -233,7 +233,7 @@ class Tags implements \OCP\ITags {
$entry = $entries[$objId][] = $row['category'];
}
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(), \OCP\Util::ERROR);
return false;
}
}
@@ -283,7 +283,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(), \OCP\Util::ERROR);
return false;
}
} catch(\Exception $e) {
@@ -510,7 +510,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(), \OCP\Util::ERROR);
}
} catch(\Exception $e) {
\OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
@@ -539,7 +539,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(), \OCP\Util::ERROR);
}
} catch(\Exception $e) {
\OCP\Util::writeLog('core', __METHOD__ . ', exception: '
@@ -567,7 +567,7 @@ class Tags implements \OCP\ITags {
$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);
+ \OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage(), \OCP\Util::ERROR);
return false;
}
} catch(\Exception $e) {
@@ -725,7 +725,7 @@ class Tags implements \OCP\ITags {
$result = $stmt->execute(array($id));
if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('core',
- __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result),
+ __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage(),
\OCP\Util::ERROR);
return false;
}
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 457d40e22d3..f2fa0cc39ce 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -200,7 +200,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
$result = $query->execute(array($uid));
if (OC_DB::isError($result)) {
- OC_Log::write('core', OC_DB::getErrorMessage($result), OC_Log::ERROR);
+ OC_Log::write('core', OC_DB::getErrorMessage(), OC_Log::ERROR);
return false;
}
@@ -268,7 +268,7 @@ class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
$query = OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users`');
$result = $query->execute();
if (OC_DB::isError($result)) {
- OC_Log::write('core', OC_DB::getErrorMessage($result), OC_Log::ERROR);
+ OC_Log::write('core', OC_DB::getErrorMessage(), OC_Log::ERROR);
return false;
}
return $result->fetchOne();