From 3b2c853916fb75968ae759e54bb61a8095debe7e Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Mon, 6 Aug 2012 11:27:13 -0400 Subject: Lots of refactoring to share API --- apps/files_sharing/lib/share/file.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'apps/files_sharing/lib/share/file.php') diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index dd63539cdfe..927e9462f23 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -20,23 +20,27 @@ * License along with this library. If not, see . */ -class OC_Share_Backend_File extends OCP\Share_Backend { +class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { const FORMAT_SHARED_STORAGE = 0; const FORMAT_FILE_APP = 1; const FORMAT_FILE_APP_ROOT = 2; const FORMAT_OPENDIR = 3; - public function getSource($item, $uid) { - if (OC_Filesystem::file_exists($item)) { - return array('item' => null, 'file' => $item); - } - return false; + public function isValidSource($item, $uid) { +// if (OC_Filesystem::file_exists($item)) { + return true; +// } +// return false; + } + + public function getFilePath($item, $uid) { + return $item; } public function generateTarget($item, $uid, $exclude = null) { // TODO Make sure target path doesn't exist already - return '/Shared'.$item; + return $item; } public function formatItems($items, $format, $parameters = null) { -- cgit v1.2.3