From 5a9e473a7964a068599de59cbbd7fe1dae6493ef Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Wed, 25 Sep 2013 12:15:46 +0200
Subject: [PATCH] use OC_DB::executeAudited

---
 lib/public/share.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/public/share.php b/lib/public/share.php
index bdfaed2d5c..c0f339744c 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -277,12 +277,10 @@ class Share {
 					`item_source` = ? AND `item_type` = ? AND `share_with` = ?'
 				);
 
-		$result = $query->execute(array($itemSource, $itemType, $user));
+		$result = \OC_DB::executeAudited($query, array($itemSource, $itemType, $user));
 
-		if($result) {
-			while ($row = $result->fetchRow()) {
-				$shares[] = $row;
-			}
+		while ($row = $result->fetchRow()) {
+			$shares[] = $row;
 		}
 
 		//if didn't found a result than let's look for a group share.
-- 
GitLab