From 2f83db3d5fb1c20fbbda93ef68661597bd0ee837 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Wed, 20 May 2015 19:28:02 +0200 Subject: Adds the form which allows a user to add the shared files to his ownCloud Solution for #144 --- environment/environment.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'environment') diff --git a/environment/environment.php b/environment/environment.php index a5e3a8ff..d116b60a 100644 --- a/environment/environment.php +++ b/environment/environment.php @@ -79,6 +79,10 @@ class Environment { * @var string */ private $folderName; + /** + * @var string + */ + private $shareWith; /*** * Constructor @@ -123,6 +127,7 @@ class Environment { $this->folderName = $linkItem['file_target']; $this->userId = $rootLinkItem['uid_owner']; + $this->shareWith = $linkItem['share_with']; } /** @@ -236,6 +241,15 @@ class Environment { return trim($this->folderName, '//'); } + /** + * Returns if the share is protected (share_with === true) + * + * @return string + */ + public function isShareProtected() { + return $this->shareWith; + } + /** * Returns the path which goes from the file, up to the user folder, based on a node: * parent_folder/current_folder/my_file -- cgit v1.2.3