[Pkg-owncloud-commits] [owncloud] 158/273: add missing backticks

David Prévot taffit at moszumanska.debian.org
Fri Jul 4 03:13:11 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit abc521dbf7bbf8fbd169d14b70e0f741eab0ce2b
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date:   Tue Jul 1 12:29:30 2014 +0200

    add missing backticks
---
 apps/files_sharing/lib/external/manager.php | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index 54fa86d..af317cc 100644
--- a/apps/files_sharing/lib/external/manager.php
+++ b/apps/files_sharing/lib/external/manager.php
@@ -50,8 +50,11 @@ class Manager {
 	public function addShare($remote, $token, $password, $name, $owner) {
 		$user = $this->userSession->getUser();
 		if ($user) {
-			$query = $this->connection->prepare('INSERT INTO *PREFIX*share_external(`remote`, `share_token`, `password`,
-				`name`, `owner`, `user`, `mountpoint`, `mountpoint_hash`) VALUES(?, ?, ?, ?, ?, ?, ?, ?)');
+			$query = $this->connection->prepare('
+				INSERT INTO `*PREFIX*share_external`
+					(`remote`, `share_token`, `password`, `name`, `owner`, `user`, `mountpoint`, `mountpoint_hash`)
+				VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+			');
 			$mountPoint = Filesystem::normalizePath('/' . $name);
 			$hash = md5($mountPoint);
 			$query->execute(array($remote, $token, $password, $name, $owner, $user->getUID(), $mountPoint, $hash));
@@ -75,8 +78,11 @@ class Manager {
 
 		$user = $this->userSession->getUser();
 		if ($user) {
-			$query = $this->connection->prepare('SELECT `remote`, `share_token`, `password`, `mountpoint`, `owner`
-			FROM *PREFIX*share_external WHERE `user` = ?');
+			$query = $this->connection->prepare('
+				SELECT `remote`, `share_token`, `password`, `mountpoint`, `owner`
+				FROM `*PREFIX*share_external`
+				WHERE `user` = ?
+			');
 			$query->execute(array($user->getUID()));
 
 			while ($row = $query->fetch()) {
@@ -132,8 +138,12 @@ class Manager {
 		$sourceHash = md5($source);
 		$targetHash = md5($target);
 
-		$query = $this->connection->prepare('UPDATE *PREFIX*share_external SET
-			`mountpoint` = ?, `mountpoint_hash` = ? WHERE `mountpoint_hash` = ? AND `user` = ?');
+		$query = $this->connection->prepare('
+			UPDATE `*PREFIX*share_external`
+			SET `mountpoint` = ?, `mountpoint_hash` = ?
+			WHERE `mountpoint_hash` = ?
+			AND `user` = ?
+		');
 		$result = (bool)$query->execute(array($target, $targetHash, $sourceHash, $user->getUID()));
 
 		return $result;
@@ -143,7 +153,11 @@ class Manager {
 		$user = $this->userSession->getUser();
 		$mountPoint = $this->stripPath($mountPoint);
 		$hash = md5($mountPoint);
-		$query = $this->connection->prepare('DELETE FROM *PREFIX*share_external WHERE `mountpoint_hash` = ? AND `user` = ?');
+		$query = $this->connection->prepare('
+			DELETE FROM `*PREFIX*share_external`
+			WHERE `mountpoint_hash` = ?
+			AND `user` = ?
+		');
 		return (bool)$query->execute(array($hash, $user->getUID()));
 	}
 }

-- 
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