Skip to content
Snippets Groups Projects
Commit 73e37377 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #22316 from owncloud/fix_22309

Properly check for legacy methods on IShare objects
parents 06af9b81 dd630e33
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment