[Pkg-owncloud-commits] [owncloud] 278/394: SQL limit cleanup

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:26 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit cde618472528cfca1c91dad76718d9aec738f91f
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date:   Wed Jan 9 12:42:53 2013 +0100

    SQL limit cleanup
---
 apps/files_sharing/public.php |    2 +-
 lib/public/share.php          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 362dc2d..a91efce 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -7,7 +7,7 @@ OC_App::loadApps();
 // support will be removed in OC 5.0,a
 if (isset($_GET['token'])) {
 	unset($_GET['file']);
-	$qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1');
+	$qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ?', 1);
 	$filepath = $qry->execute(array($_GET['token']))->fetchOne();
 	if(isset($filepath)) {
 		$info = OC_FileCache_Cached::get($filepath, '');
diff --git a/lib/public/share.php b/lib/public/share.php
index 36f6b10..faec4ce 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -149,7 +149,7 @@ class Share {
 	 * @return Item
 	 */
 	public static function getShareByToken($token) {
-		$query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?',1);
+		$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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list