diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-09-29 11:23:18 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-09-29 11:23:18 +0200 |
commit | 6e7acb8ae083c158fb412fa3e035e64a83063911 (patch) | |
tree | 65523f019b8d1869310b13347b538d70bf300359 /apps | |
parent | e5f0dded84a544f4ebd983ef8fb6d898df230575 (diff) | |
download | nextcloud-server-6e7acb8ae083c158fb412fa3e035e64a83063911.tar.gz nextcloud-server-6e7acb8ae083c158fb412fa3e035e64a83063911.zip |
some small fixed, suggested by scrutinizer
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/share.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 1086e21d79f..dacdb9308be 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -57,7 +57,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { * create unique target * @param string $filePath * @param string $shareWith - * @param string $exclude + * @param array $exclude (optional) * @return string */ public function generateTarget($filePath, $shareWith, $exclude = null) { @@ -83,7 +83,9 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { } } - return \OCA\Files_Sharing\Helper::generateUniqueTarget($target, $exclude, $view); + $excludeList = (is_array($exclude)) ? $exclude : array(); + + return \OCA\Files_Sharing\Helper::generateUniqueTarget($target, $excludeList, $view); } public function formatItems($items, $format, $parameters = null) { diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php index 80199505d89..fe80cfca781 100644 --- a/apps/files_sharing/tests/share.php +++ b/apps/files_sharing/tests/share.php @@ -72,8 +72,6 @@ class Test_Files_Sharing extends Test_Files_Sharing_Base { $fileinfo = $this->view->getFileInfo($this->filename); - $pathinfo = pathinfo($this->filename); - $result = \OCP\Share::shareItem('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing::TEST_FILES_SHARING_API_USER2, 31); |