From 51e658da2aeab432858146ad5f8f09d8e2d6c850 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Sun, 23 Apr 2017 19:32:15 +0200 Subject: Join if block to preceding if chain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If getShareType() returns "email" it can not also return "user", "group" nor "link", so the if block can be added to the preceding if chain. Signed-off-by: Daniel Calviño Sánchez --- lib/private/Share20/Manager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 7bed012fe8f..3e4d5cc3813 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -731,10 +731,9 @@ class Manager implements IManager { $this->validateExpirationDate($share); $expirationDateUpdated = true; } - } + } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) { + $plainTextPassword = null; - $plainTextPassword = null; - if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) { // Password updated. if ($share->getPassword() !== $originalShare->getPassword()) { //Verify the password -- cgit v1.2.3