diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-14 12:18:20 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-14 12:18:20 +0200 |
commit | 961a001af3bc69eec8770ddc00ace3553e5c6ee0 (patch) | |
tree | 747f444bf7932a5bf4d8857587e9d824e61a5b13 /lib | |
parent | fc309caf163ae390e81a4473ed35d98b17a79d0a (diff) | |
download | nextcloud-server-961a001af3bc69eec8770ddc00ace3553e5c6ee0.tar.gz nextcloud-server-961a001af3bc69eec8770ddc00ace3553e5c6ee0.zip |
add missing backticks, use executeAudited in post_deleteGroup and post_removeFromGroup
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/share.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 6a26101a1ce..122ab3fa030 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1586,10 +1586,10 @@ class Share { public static function post_removeFromGroup($arguments) { // TODO Don't call if user deleted? - $query = \OC_DB::prepare('SELECT `id`, `share_type` FROM `*PREFIX*share`' - .' WHERE (`share_type` = ? AND `share_with` = ?) OR (`share_type` = ? AND `share_with` = ?)'); - $result = $query->execute(array(self::SHARE_TYPE_GROUP, $arguments['gid'], self::$shareTypeGroupUserUnique, - $arguments['uid'])); + $sql = 'SELECT `id`, `share_type` FROM `*PREFIX*share`' + .' WHERE (`share_type` = ? AND `share_with` = ?) OR (`share_type` = ? AND `share_with` = ?)'; + $result = \OC_DB::executeAudited($sql, array(self::SHARE_TYPE_GROUP, $arguments['gid'], + self::$shareTypeGroupUserUnique, $arguments['uid'])); while ($item = $result->fetchRow()) { if ($item['share_type'] == self::SHARE_TYPE_GROUP) { // Delete all reshares by this user of the group share @@ -1601,8 +1601,8 @@ class Share { } public static function post_deleteGroup($arguments) { - $query = \OC_DB::prepare('SELECT id FROM `*PREFIX*share` WHERE `share_type` = ? AND `share_with` = ?'); - $result = $query->execute(array(self::SHARE_TYPE_GROUP, $arguments['gid'])); + $sql = 'SELECT `id` FROM `*PREFIX*share` WHERE `share_type` = ? AND `share_with` = ?'; + $result = \OC_DB::executeAudited($sql, array(self::SHARE_TYPE_GROUP, $arguments['gid'])); while ($item = $result->fetchRow()) { self::delete($item['id']); } |