@@ -55,20 +55,20 @@ |
||
55 | 55 | * @param $uid |
56 | 56 | * @return string |
57 | 57 | */ |
58 | - public static function getNameByUid($uid){ |
|
58 | + public static function getNameByUid($uid) { |
|
59 | 59 | $um = \OC::$server->getUserManager(); |
60 | 60 | $u = $um->get($uid); |
61 | 61 | return $u->getDisplayName(); |
62 | 62 | } |
63 | 63 | |
64 | - public static function getDirContents($dir, &$results = array()){ |
|
64 | + public static function getDirContents($dir, &$results = array()) { |
|
65 | 65 | $files = scandir($dir); |
66 | 66 | |
67 | - foreach($files as $value){ |
|
68 | - $path = realpath($dir.DIRECTORY_SEPARATOR.$value); |
|
69 | - if(!is_dir($path)) { |
|
67 | + foreach ($files as $value) { |
|
68 | + $path = realpath($dir . DIRECTORY_SEPARATOR . $value); |
|
69 | + if (!is_dir($path)) { |
|
70 | 70 | $results[] = $path; |
71 | - } else if($value != "." && $value != "..") { |
|
71 | + } else if ($value != "." && $value != "..") { |
|
72 | 72 | Utils::getDirContents($path, $results); |
73 | 73 | $results[] = $path; |
74 | 74 | } |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | * @NoCSRFRequired |
58 | 58 | */ |
59 | 59 | public function getIcon($base64Url, $credentialId) { |
60 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
60 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
61 | 61 | |
62 | - if($credentialId) { |
|
62 | + if ($credentialId) { |
|
63 | 63 | try { |
64 | 64 | $credential = $this->credentialService->getCredentialById($credentialId, $this->userId); |
65 | 65 | $credential = $credential->jsonSerialize(); |
66 | - } catch (DoesNotExistException $e){ |
|
66 | + } catch (DoesNotExistException $e) { |
|
67 | 67 | // Credential is not found, continue |
68 | 68 | $credential = false; |
69 | 69 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $path = explode('passman/', $iconPath); |
129 | 129 | $mime = mime_content_type($iconPath); |
130 | 130 | //print_r($path); |
131 | - if($mime !== 'directory') { |
|
131 | + if ($mime !== 'directory') { |
|
132 | 132 | $icon = []; |
133 | 133 | $icon['mimetype'] = mime_content_type($iconPath); |
134 | 134 | $icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public function getLanguageStrings() { |
42 | 42 | $translations = array( |
43 | 43 | // js/app/controllers/bookmarklet.js |
44 | - 'generating.sharing.keys' => $this->trans->t('Generating sharing keys ( %s / 2)','%step'), |
|
44 | + 'generating.sharing.keys' => $this->trans->t('Generating sharing keys ( %s / 2)', '%step'), |
|
45 | 45 | 'invalid.vault.key' => $this->trans->t('Incorrect vault password!'), |
46 | 46 | 'password.do.not.match' => $this->trans->t('Passwords do not match'), |
47 | 47 | 'general' => $this->trans->t('General'), |