summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-07-01 12:29:30 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-07-01 12:29:30 +0200
commitabc521dbf7bbf8fbd169d14b70e0f741eab0ce2b (patch)
treeddc928290fec3eaa1f433dc6d85896eefc348d34 /apps/files_sharing/lib
parent75a5746b7042875606bffd27e0c8ac4c65bc4437 (diff)
downloadnextcloud-server-abc521dbf7bbf8fbd169d14b70e0f741eab0ce2b.tar.gz
nextcloud-server-abc521dbf7bbf8fbd169d14b70e0f741eab0ce2b.zip
add missing backticks
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/external/manager.php28
1 files changed, 21 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index 54fa86db762..af317cc2027 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()));
}
}