summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-20 14:49:10 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-24 16:29:59 +0200
commitc79f7f4f3cb460f890fccb5a7de7d62ea0a5fc15 (patch)
tree18653beec724fbdcf1cd3e7e4da4a3965e0c2de5 /apps/files_encryption/lib
parentc223bee6df33b3208dbb5a7c46dbeb98eccf10ac (diff)
downloadnextcloud-server-c79f7f4f3cb460f890fccb5a7de7d62ea0a5fc15.tar.gz
nextcloud-server-c79f7f4f3cb460f890fccb5a7de7d62ea0a5fc15.zip
fix numRows usage in files_encryption
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/util.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index e8e53859bd8..b3de85254e2 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -362,17 +362,7 @@ class Util {
}
- $query = \OCP\DB::prepare($sql);
-
- if ($query->execute($args)) {
-
- return true;
-
- } else {
-
- return false;
-
- }
+ return is_numeric(\OC_DB::executeAudited($sql, $args));
}
@@ -1063,8 +1053,7 @@ class Util {
$sql = 'UPDATE `*PREFIX*encryption` SET `migration_status` = ? WHERE `uid` = ? and `migration_status` = ?';
$args = array(self::MIGRATION_IN_PROGRESS, $this->userId, self::MIGRATION_OPEN);
$query = \OCP\DB::prepare($sql);
- $result = $query->execute($args);
- $manipulatedRows = $result->numRows();
+ $manipulatedRows = $query->execute($args);
if ($manipulatedRows === 1) {
$return = true;
@@ -1087,8 +1076,7 @@ class Util {
$sql = 'UPDATE `*PREFIX*encryption` SET `migration_status` = ? WHERE `uid` = ? and `migration_status` = ?';
$args = array(self::MIGRATION_COMPLETED, $this->userId, self::MIGRATION_IN_PROGRESS);
$query = \OCP\DB::prepare($sql);
- $result = $query->execute($args);
- $manipulatedRows = $result->numRows();
+ $manipulatedRows = $query->execute($args);
if ($manipulatedRows === 1) {
$return = true;