diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-03-26 15:11:09 +0000 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-03-26 15:11:09 +0000 |
commit | a1dca821f9c2cf770b6884e943a0841c0ab6171d (patch) | |
tree | e64391b80c271874c5aae6b9cb050280663abc62 /apps | |
parent | cd5ebac7c40ad045828ea44c533b57fa25f01177 (diff) | |
download | nextcloud-server-a1dca821f9c2cf770b6884e943a0841c0ab6171d.tar.gz nextcloud-server-a1dca821f9c2cf770b6884e943a0841c0ab6171d.zip |
Use braces on single line if statements
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/smb_oc.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/files_external/lib/smb_oc.php b/apps/files_external/lib/smb_oc.php index ac325cd4fbc..0c79c06c5df 100644 --- a/apps/files_external/lib/smb_oc.php +++ b/apps/files_external/lib/smb_oc.php @@ -54,8 +54,9 @@ class SMB_OC extends \OC\Files\Storage\SMB { public function test($isPersonal = true) { if ($isPersonal) { - if ($this->stat('')) + if ($this->stat('')) { return true; + } return false; } else { $smb = new \smb(); @@ -67,23 +68,26 @@ class SMB_OC extends \OC\Files\Storage\SMB { // Share cannot be checked if dynamic if ($this->username_as_share) { - if ($smb->look($pu)) + if ($smb->look($pu)) { return true; - else + } else { return false; + } } - if (!$pu['share']) + if (!$pu['share']) { return false; + } // The following error messages are expected due to anonymous login $regexp = array( '(NT_STATUS_ACCESS_DENIED)' => 'skip' ) + $smb->getRegexp(); - if ($smb->client("-d 0 " . escapeshellarg('//' . $pu['host'] . '/' . $pu['share']) . " -c exit", $pu, $regexp)) + if ($smb->client("-d 0 " . escapeshellarg('//' . $pu['host'] . '/' . $pu['share']) . " -c exit", $pu, $regexp)) { return true; - else + } else { return false; + } } } } |