diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-27 11:50:49 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-27 22:04:09 +0100 |
commit | 0832cca54e09c9b1f04f3133cc1780ca6ab1ae3b (patch) | |
tree | 5fb5215fae670d53397027bf2d156883c2672878 /lib | |
parent | 90f2a2352de876a5b125df2b9817f78790b25805 (diff) | |
download | nextcloud-server-0832cca54e09c9b1f04f3133cc1780ca6ab1ae3b.tar.gz nextcloud-server-0832cca54e09c9b1f04f3133cc1780ca6ab1ae3b.zip |
[Share 2.0] Fix IShare
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share20/defaultshareprovider.php | 2 | ||||
-rw-r--r-- | lib/private/share20/ishare.php | 18 | ||||
-rw-r--r-- | lib/private/share20/share.php | 132 |
3 files changed, 47 insertions, 105 deletions
diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php index 117d56acf93..36ba56d63a2 100644 --- a/lib/private/share20/defaultshareprovider.php +++ b/lib/private/share20/defaultshareprovider.php @@ -356,7 +356,7 @@ class DefaultShareProvider implements IShareProvider { 'file_source' => $qb->createNamedParameter($share->getPath()->getId()), 'file_target' => $qb->createNamedParameter($share->getTarget()), 'permissions' => $qb->createNamedParameter(0), - 'stime' => $qb->createNamedParameter($share->getSharetime()), + 'stime' => $qb->createNamedParameter($share->getShareTime()), ])->execute(); } else if ($data['permissions'] !== 0) { diff --git a/lib/private/share20/ishare.php b/lib/private/share20/ishare.php index 34d1dfa4d3d..d3ffd417fe0 100644 --- a/lib/private/share20/ishare.php +++ b/lib/private/share20/ishare.php @@ -218,11 +218,27 @@ interface IShare { public function getTarget(); /** + * Set the time this share was created + * + * @param int $shareTime + * @return IShare The modified object + */ + public function setShareTime($shareTime); + + /** * Get the timestamp this share was created * * @return int */ - public function getSharetime(); + public function getShareTime(); + + /** + * Set mailSend + * + * @param bool $mailSend + * @return IShare The modified object + */ + public function setMailSend($mailSend); /** * Get mailSend diff --git a/lib/private/share20/share.php b/lib/private/share20/share.php index ee43725d9bc..3e42d508476 100644 --- a/lib/private/share20/share.php +++ b/lib/private/share20/share.php @@ -58,10 +58,7 @@ class Share implements IShare { private $mailSend; /** - * Set the id of the share - * - * @param string $id - * @return IShare The modified object + * @inheritdoc */ public function setId($id) { $this->id = $id; @@ -69,9 +66,7 @@ class Share implements IShare { } /** - * Get the id of the share - * - * @return string + * @inheritdoc */ public function getId() { return $this->id; @@ -93,10 +88,7 @@ class Share implements IShare { } /** - * Set the path of this share - * - * @param Node $path - * @return IShare The modified object + * @inheritdoc */ public function setPath(Node $path) { $this->path = $path; @@ -104,19 +96,14 @@ class Share implements IShare { } /** - * Get the path of this share for the current user - * - * @return Node + * @inheritdoc */ public function getPath() { return $this->path; } /** - * Set the shareType - * - * @param int $shareType - * @return IShare The modified object + * @inheritdoc */ public function setShareType($shareType) { $this->shareType = $shareType; @@ -124,19 +111,14 @@ class Share implements IShare { } /** - * Get the shareType - * - * @return int + * @inheritdoc */ public function getShareType() { return $this->shareType; } /** - * Set the receiver of this share - * - * @param IUser|IGroup|string - * @return IShare The modified object + * @inheritdoc */ public function setSharedWith($sharedWith) { $this->sharedWith = $sharedWith; @@ -144,19 +126,14 @@ class Share implements IShare { } /** - * Get the receiver of this share - * - * @return IUser|IGroup|string + * @inheritdoc */ public function getSharedWith() { return $this->sharedWith; } /** - * Set the permissions - * - * @param int $permissions - * @return IShare The modified object + * @inheritdoc */ public function setPermissions($permissions) { //TODO checkes @@ -166,19 +143,14 @@ class Share implements IShare { } /** - * Get the share permissions - * - * @return int + * @inheritdoc */ public function getPermissions() { return $this->permissions; } /** - * Set the expiration date - * - * @param \DateTime $expireDate - * @return IShare The modified object + * @inheritdoc */ public function setExpirationDate($expireDate) { //TODO checks @@ -188,19 +160,14 @@ class Share implements IShare { } /** - * Get the share expiration date - * - * @return \DateTime + * @inheritdoc */ public function getExpirationDate() { return $this->expireDate; } /** - * Set the sharer of the path - * - * @param IUser|string $sharedBy - * @return IShare The modified object + * @inheritdoc */ public function setSharedBy($sharedBy) { //TODO checks @@ -210,9 +177,7 @@ class Share implements IShare { } /** - * Get share sharer - * - * @return IUser|string + * @inheritdoc */ public function getSharedBy() { //TODO check if set @@ -220,11 +185,7 @@ class Share implements IShare { } /** - * Set the original share owner (who owns the path) - * - * @param IUser|string - * - * @return IShare The modified object + * @inheritdoc */ public function setShareOwner($shareOwner) { //TODO checks @@ -234,9 +195,7 @@ class Share implements IShare { } /** - * Get the original share owner (who owns the path) - * - * @return IUser|string + * @inheritdoc */ public function getShareOwner() { //TODO check if set @@ -244,33 +203,22 @@ class Share implements IShare { } /** - * Set the password - * - * @param string $password - * - * @return IShare The modified object + * @inheritdoc */ public function setPassword($password) { - //TODO verify - $this->password = $password; return $this; } /** - * Get the password - * - * @return string + * @inheritdoc */ public function getPassword() { return $this->password; } /** - * Set the token - * - * @param string $token - * @return IShare The modified object + * @inheritdoc */ public function setToken($token) { $this->token = $token; @@ -278,19 +226,14 @@ class Share implements IShare { } /** - * Get the token - * - * @return string + * @inheritdoc */ public function getToken() { return $this->token; } /** - * Set the parent id of this share - * - * @param int $parent - * @return IShare The modified object + * @inheritdoc */ public function setParent($parent) { $this->parent = $parent; @@ -298,19 +241,14 @@ class Share implements IShare { } /** - * Get the parent id of this share - * - * @return int + * @inheritdoc */ public function getParent() { return $this->parent; } /** - * Set the target of this share - * - * @param string $target - * @return IShare The modified object + * @inheritdoc */ public function setTarget($target) { $this->target = $target; @@ -318,19 +256,14 @@ class Share implements IShare { } /** - * Get the target of this share - * - * @return string + * @inheritdoc */ public function getTarget() { return $this->target; } /** - * Set the time this share was created - * - * @param int $shareTime - * @return IShare The modified object + * @inheritdoc */ public function setShareTime($shareTime) { $this->shareTime = $shareTime; @@ -338,19 +271,14 @@ class Share implements IShare { } /** - * Get the timestamp this share was created - * - * @return int + * @inheritdoc */ - public function getSharetime() { + public function getShareTime() { return $this->shareTime; } /** - * Set mailSend - * - * @param bool $mailSend - * @return IShare The modified object + * @inheritdoc */ public function setMailSend($mailSend) { $this->mailSend = $mailSend; @@ -358,9 +286,7 @@ class Share implements IShare { } /** - * Get mailSend - * - * @return bool + * @inheritdoc */ public function getMailSend() { return $this->mailSend; |