diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-11 11:30:52 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-11 11:30:52 +0100 |
commit | dd630e33ea0223be995a1370e77b42598c181e89 (patch) | |
tree | 20ced46ea18f2633c81f20af6b6c26b91752c5f2 /lib/private/share20 | |
parent | 06af9b817edb1fdf230f71c2fc77bc9c12031bc6 (diff) | |
download | nextcloud-server-dd630e33ea0223be995a1370e77b42598c181e89.tar.gz nextcloud-server-dd630e33ea0223be995a1370e77b42598c181e89.zip |
Properly check for legacy methods
The new shares are completely without parents eventually. But for some
current legacy reasons the methods are still around. But we should
properly check for them.
Fixes #22309
Diffstat (limited to 'lib/private/share20')
-rw-r--r-- | lib/private/share20/manager.php | 2 | ||||
-rw-r--r-- | lib/private/share20/share.php | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index c13bf965676..4345784d2e7 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -720,7 +720,7 @@ class Manager implements IManager { 'itemSource' => $share->getNodeId(), 'shareType' => $shareType, 'shareWith' => $sharedWith, - 'itemparent' => $share->getParent(), + 'itemparent' => method_exists($share, 'getParent') ? $share->getParent() : '', 'uidOwner' => $share->getSharedBy(), 'fileSource' => $share->getNodeId(), 'fileTarget' => $share->getTarget() diff --git a/lib/private/share20/share.php b/lib/private/share20/share.php index 323d8c8e8ab..6edd0e6886a 100644 --- a/lib/private/share20/share.php +++ b/lib/private/share20/share.php @@ -321,7 +321,11 @@ class Share implements \OCP\Share\IShare { } /** - * @inheritdoc + * Set the parent of this share + * + * @param int parent + * @return \OCP\Share\IShare + * @deprecated The new shares do not have parents. This is just here for legacy reasons. */ public function setParent($parent) { $this->parent = $parent; @@ -329,7 +333,10 @@ class Share implements \OCP\Share\IShare { } /** - * @inheritdoc + * Get the parent of this share. + * + * @return int + * @deprecated The new shares do not have parents. This is just here for legacy reasons. */ public function getParent() { return $this->parent; |