From dd1e47b3b896e2ee59faf5f423bb911c5d2c2548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 15 Apr 2014 20:26:04 +0200 Subject: [PATCH] typos, use, unused and return fixed --- apps/files_sharing/appinfo/update.php | 4 +++- apps/files_sharing/lib/helper.php | 7 +++---- apps/files_sharing/lib/sharedstorage.php | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index ebeeae10d2..c79a2291e9 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -18,7 +18,7 @@ if (version_compare($installedVersion, '0.4', '<')) { $users[] = $row['share_with']; $shares[$row['id']] = $row['file_target']; } else if ($row['share_type'] === "1" && ($row['item_type'] === 'file' || $row['item_type'] === 'folder')) { - //collect all group sharesX + //collect all group shares $users = array_merge($users, \OC_group::usersInGroup($row['share_with'])); $shares[$row['id']] = $row['file_target']; } else if ($row['share_type'] === "2") { @@ -48,7 +48,9 @@ if (version_compare($installedVersion, '0.4', '<')) { $statement .= ' END WHERE `id` IN (' . $ids . ')'; $query = OCP\DB::prepare($statement); + $query->execute(array()); + } } diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php index 1381c0002d..e2780e9893 100644 --- a/apps/files_sharing/lib/helper.php +++ b/apps/files_sharing/lib/helper.php @@ -2,6 +2,9 @@ namespace OCA\Files_Sharing; +use OC_Config; +use PasswordHash; + class Helper { /** @@ -26,9 +29,6 @@ class Helper { exit; } - $type = $linkItem['item_type']; - $fileSource = $linkItem['file_source']; - $shareOwner = $linkItem['uid_owner']; $rootLinkItem = \OCP\Share::resolveReShare($linkItem); $path = null; if (isset($rootLinkItem['uid_owner'])) { @@ -61,7 +61,6 @@ class Helper { } $basePath = $path; - $rootName = basename($path); if ($relativePath !== null && \OC\Files\Filesystem::isReadable($basePath . $relativePath)) { $path .= \OC\Files\Filesystem::normalizePath($relativePath); diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index eedd279bf2..b8a799f720 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -299,14 +299,14 @@ class Shared extends \OC\Files\Storage\Common { } /** - * @brief rename a shared foder/file + * @brief rename a shared folder/file * @param string $sourcePath * @param string $targetPath * @return bool */ private function renameMountPoint($sourcePath, $targetPath) { - // it shoulbn't be possible to move a Shared storage into another one + // it shouldn't be possible to move a Shared storage into another one list($targetStorage, ) = \OC\Files\Filesystem::resolvePath($targetPath); if ($targetStorage instanceof \OC\Files\Storage\Shared) { \OCP\Util::writeLog('file sharing', @@ -452,6 +452,7 @@ class Shared extends \OC\Files\Storage\Common { list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source); return $storage->free_space($internalPath); } + return \OC\Files\SPACE_UNKNOWN; } public function getLocalFile($path) {