@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @NoCSRFRequired |
| 58 | 58 | */ |
| 59 | 59 | public function getSingleIcon($base64Url) { |
| 60 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
| 60 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
| 61 | 61 | if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
| 62 | 62 | $url = "http://" . $url; |
| 63 | 63 | } |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | $icon = new IconService($url); |
| 67 | 67 | |
| 68 | 68 | if ($icon->icoExists) { |
| 69 | - $icon_json['type']= $icon->icoType; |
|
| 70 | - $icon_json['content']= base64_encode($icon->icoData); |
|
| 69 | + $icon_json['type'] = $icon->icoType; |
|
| 70 | + $icon_json['content'] = base64_encode($icon->icoData); |
|
| 71 | 71 | return new JSONResponse($icon_json); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -79,13 +79,13 @@ discard block |
||
| 79 | 79 | * @NoCSRFRequired |
| 80 | 80 | */ |
| 81 | 81 | public function getIcon($base64Url, $credentialId) { |
| 82 | - $url = base64_decode(str_replace('_','/', $base64Url)); |
|
| 82 | + $url = base64_decode(str_replace('_', '/', $base64Url)); |
|
| 83 | 83 | |
| 84 | - if($credentialId) { |
|
| 84 | + if ($credentialId) { |
|
| 85 | 85 | try { |
| 86 | 86 | $credential = $this->credentialService->getCredentialById($credentialId, $this->userId); |
| 87 | 87 | $credential = $credential->jsonSerialize(); |
| 88 | - } catch (DoesNotExistException $e){ |
|
| 88 | + } catch (DoesNotExistException $e) { |
|
| 89 | 89 | // Credential is not found, continue |
| 90 | 90 | $credential = false; |
| 91 | 91 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | ]; |
| 112 | 112 | $credential['icon'] = json_encode($iconData); |
| 113 | 113 | try { |
| 114 | - if($credential) { |
|
| 114 | + if ($credential) { |
|
| 115 | 115 | $this->credentialService->updateCredential($credential); |
| 116 | 116 | } |
| 117 | 117 | } catch (DriverException $exception) { |
@@ -152,12 +152,12 @@ discard block |
||
| 152 | 152 | $pack = explode('/', $path[1])[2]; |
| 153 | 153 | $mime = mime_content_type($iconPath); |
| 154 | 154 | //print_r($path); |
| 155 | - if($mime !== 'directory') { |
|
| 155 | + if ($mime !== 'directory') { |
|
| 156 | 156 | $icon = []; |
| 157 | 157 | $icon['mimetype'] = mime_content_type($iconPath); |
| 158 | 158 | $icon['url'] = $this->urlGenerator->linkTo('passman', $path[1]); |
| 159 | 159 | $icon['pack'] = $pack; |
| 160 | - if(!isset($icons[$pack])){ |
|
| 160 | + if (!isset($icons[$pack])) { |
|
| 161 | 161 | $icons[$pack] = []; |
| 162 | 162 | } |
| 163 | 163 | $icons[$pack][] = $icon; |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | 'password.r' => $this->trans->t('Repeat password'), |
| 141 | 141 | 'add.tag' => $this->trans->t('Add tag'), |
| 142 | 142 | 'pick.icon' => $this->trans->t('Pick an icon'), |
| 143 | - 'pick.icon.search' => $this->trans->t('Search icons'), |
|
| 144 | - 'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'), |
|
| 143 | + 'pick.icon.search' => $this->trans->t('Search icons'), |
|
| 144 | + 'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'), |
|
| 145 | 145 | 'use.icon' => $this->trans->t('Use this icon'), |
| 146 | 146 | 'use.icon.delete' => $this->trans->t('Delete current icon'), |
| 147 | 147 | 'use.icon.refresh' => $this->trans->t('Get icon from page'), |
@@ -351,15 +351,15 @@ discard block |
||
| 351 | 351 | 'decline' => $this->trans->t('Decline'), |
| 352 | 352 | 'session.time.left' => $this->trans->t('You have {{session_time}} left before logout.'), |
| 353 | 353 | 'vault.locked' => $this->trans->t('Your vault has been locked for {{time}} because of {{tries}} failed attempts!'), |
| 354 | - 'vault.hint.hello' => $this->trans->t('Hello there!'), |
|
| 355 | - 'vault.hint.hello.add' => $this->trans->t('It does not seem that you have any passwords. Do you want to add one?'), |
|
| 356 | - 'vault.hint.list.nogood' => $this->trans->t('You don\'t have good credentials'), |
|
| 357 | - 'vault.hint.list.nomedium' => $this->trans->t('You don\'t have medium credentials'), |
|
| 358 | - 'vault.hint.list.nobad' => $this->trans->t('You don\'t have bad credentials'), |
|
| 359 | - 'vault.hint.list.noexpired' => $this->trans->t('You don\'t have expired credentials'), |
|
| 360 | - 'vault.hint.list.nodeleted' => $this->trans->t('You don\'t have deleted credentials'), |
|
| 361 | - 'vault.hint.list.notags' => $this->trans->t('There are no credentials with your selected tags'), |
|
| 362 | - 'vault.hint.list.nosearch' => $this->trans->t('There are no credentials matching'), |
|
| 354 | + 'vault.hint.hello' => $this->trans->t('Hello there!'), |
|
| 355 | + 'vault.hint.hello.add' => $this->trans->t('It does not seem that you have any passwords. Do you want to add one?'), |
|
| 356 | + 'vault.hint.list.nogood' => $this->trans->t('You don\'t have good credentials'), |
|
| 357 | + 'vault.hint.list.nomedium' => $this->trans->t('You don\'t have medium credentials'), |
|
| 358 | + 'vault.hint.list.nobad' => $this->trans->t('You don\'t have bad credentials'), |
|
| 359 | + 'vault.hint.list.noexpired' => $this->trans->t('You don\'t have expired credentials'), |
|
| 360 | + 'vault.hint.list.nodeleted' => $this->trans->t('You don\'t have deleted credentials'), |
|
| 361 | + 'vault.hint.list.notags' => $this->trans->t('There are no credentials with your selected tags'), |
|
| 362 | + 'vault.hint.list.nosearch' => $this->trans->t('There are no credentials matching'), |
|
| 363 | 363 | |
| 364 | 364 | |
| 365 | 365 | // templates/views/vaults.html |
@@ -405,15 +405,15 @@ discard block |
||
| 405 | 405 | 'deleted.credentials' => $this->trans->t('Deleted credentials'), |
| 406 | 406 | 'logout' => $this->trans->t('Logout'), |
| 407 | 407 | 'donate' => $this->trans->t('Donate'), |
| 408 | - 'navigation.show.all' => $this->trans->t('Show All'), |
|
| 409 | - 'navigation.tags' => $this->trans->t('Tags'), |
|
| 410 | - 'navigation.tags.search' => $this->trans->t('Search Tags'), |
|
| 411 | - 'navigation.strength.good' => $this->trans->t('Good Strength'), |
|
| 412 | - 'navigation.strength.medium' => $this->trans->t('Medium Strength'), |
|
| 413 | - 'navigation.strength.bad' => $this->trans->t('Bad Strength'), |
|
| 414 | - 'navigation.expired' => $this->trans->t('Expired'), |
|
| 415 | - 'navigation.advanced.filter' => $this->trans->t('Filter Tags'), |
|
| 416 | - 'navigation.advanced.checkbox' => $this->trans->t('Simple Navigation'), |
|
| 408 | + 'navigation.show.all' => $this->trans->t('Show All'), |
|
| 409 | + 'navigation.tags' => $this->trans->t('Tags'), |
|
| 410 | + 'navigation.tags.search' => $this->trans->t('Search Tags'), |
|
| 411 | + 'navigation.strength.good' => $this->trans->t('Good Strength'), |
|
| 412 | + 'navigation.strength.medium' => $this->trans->t('Medium Strength'), |
|
| 413 | + 'navigation.strength.bad' => $this->trans->t('Bad Strength'), |
|
| 414 | + 'navigation.expired' => $this->trans->t('Expired'), |
|
| 415 | + 'navigation.advanced.filter' => $this->trans->t('Filter Tags'), |
|
| 416 | + 'navigation.advanced.checkbox' => $this->trans->t('Simple Navigation'), |
|
| 417 | 417 | |
| 418 | 418 | |
| 419 | 419 | // templates/public_share.php |