@@ -39,13 +39,13 @@ |
||
39 | 39 | if (!isset($_POST['action'])) { |
40 | 40 | \OC_JSON::error(['message' => $l->t('No action specified')]); |
41 | 41 | } |
42 | -$action = (string)$_POST['action']; |
|
42 | +$action = (string) $_POST['action']; |
|
43 | 43 | |
44 | 44 | |
45 | 45 | if (!isset($_POST['ldap_serverconfig_chooser'])) { |
46 | 46 | \OC_JSON::error(['message' => $l->t('No configuration specified')]); |
47 | 47 | } |
48 | -$prefix = (string)$_POST['ldap_serverconfig_chooser']; |
|
48 | +$prefix = (string) $_POST['ldap_serverconfig_chooser']; |
|
49 | 49 | |
50 | 50 | $ldapWrapper = new \OCA\User_LDAP\LDAP(); |
51 | 51 | $configuration = new \OCA\User_LDAP\Configuration($prefix); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $encryptedRecoveryKey = $this->crypt->encryptPrivateKey($decryptedRecoveryKey, $newPassword); |
127 | 127 | $header = $this->crypt->generateHeader(); |
128 | 128 | if ($encryptedRecoveryKey) { |
129 | - $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header . $encryptedRecoveryKey); |
|
129 | + $this->keyManager->setSystemPrivateKey($this->keyManager->getRecoveryKeyId(), $header.$encryptedRecoveryKey); |
|
130 | 130 | return true; |
131 | 131 | } |
132 | 132 | return false; |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | $value); |
188 | 188 | |
189 | 189 | if ($value === '1') { |
190 | - $this->addRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
190 | + $this->addRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
191 | 191 | } else { |
192 | - $this->removeRecoveryKeys('/' . $this->user->getUID() . '/files/'); |
|
192 | + $this->removeRecoveryKeys('/'.$this->user->getUID().'/files/'); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | return true; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | foreach ($dirContent as $item) { |
208 | 208 | $filePath = $item->getPath(); |
209 | 209 | if ($item['type'] === 'dir') { |
210 | - $this->addRecoveryKeys($filePath . '/'); |
|
210 | + $this->addRecoveryKeys($filePath.'/'); |
|
211 | 211 | } else { |
212 | 212 | $fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID()); |
213 | 213 | if (!empty($fileKey)) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | foreach ($dirContent as $item) { |
236 | 236 | $filePath = $item->getPath(); |
237 | 237 | if ($item['type'] === 'dir') { |
238 | - $this->removeRecoveryKeys($filePath . '/'); |
|
238 | + $this->removeRecoveryKeys($filePath.'/'); |
|
239 | 239 | } else { |
240 | 240 | $this->keyManager->deleteShareKey($filePath, $this->keyManager->getRecoveryKeyId()); |
241 | 241 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | |
254 | 254 | $privateKey = $this->crypt->decryptPrivateKey($encryptedKey, $recoveryPassword); |
255 | 255 | if ($privateKey !== false) { |
256 | - $this->recoverAllFiles('/' . $user . '/files/', $privateKey, $user); |
|
256 | + $this->recoverAllFiles('/'.$user.'/files/', $privateKey, $user); |
|
257 | 257 | } |
258 | 258 | } |
259 | 259 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | // Get relative path from encryption/keyfiles |
272 | 272 | $filePath = $item->getPath(); |
273 | 273 | if ($this->view->is_dir($filePath)) { |
274 | - $this->recoverAllFiles($filePath . '/', $privateKey, $uid); |
|
274 | + $this->recoverAllFiles($filePath.'/', $privateKey, $uid); |
|
275 | 275 | } else { |
276 | 276 | $this->recoverFile($filePath, $privateKey, $uid); |
277 | 277 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | value="1" <?php if ($_['encryptHomeStorage']) { |
15 | 15 | print_unescaped('checked="checked"'); |
16 | 16 | } ?> /> |
17 | - <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br> |
|
17 | + <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage')); ?></label></br> |
|
18 | 18 | <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em> |
19 | 19 | </p> |
20 | 20 | <br /> |
@@ -87,9 +87,9 @@ |
||
87 | 87 | private function getLegacyForms() { |
88 | 88 | $forms = \OC_App::getForms('admin'); |
89 | 89 | |
90 | - $forms = array_map(function ($form) { |
|
90 | + $forms = array_map(function($form) { |
|
91 | 91 | if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { |
92 | - $sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]); |
|
92 | + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); |
|
93 | 93 | $sectionName = str_replace('</h2>', '', $sectionName); |
94 | 94 | $anchor = strtolower($sectionName); |
95 | 95 | $anchor = str_replace(' ', '-', $anchor); |
@@ -79,9 +79,9 @@ |
||
79 | 79 | private function getLegacyForms() { |
80 | 80 | $forms = \OC_App::getForms('personal'); |
81 | 81 | |
82 | - $forms = array_map(function ($form) { |
|
82 | + $forms = array_map(function($form) { |
|
83 | 83 | if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { |
84 | - $sectionName = str_replace('<h2' . $regs['class'] . '>', '', $regs[0]); |
|
84 | + $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); |
|
85 | 85 | $sectionName = str_replace('</h2>', '', $sectionName); |
86 | 86 | $anchor = strtolower($sectionName); |
87 | 87 | $anchor = str_replace(' ', '-', $anchor); |
@@ -229,7 +229,7 @@ |
||
229 | 229 | 'message' => $this->l->t('Please provide an admin recovery password; otherwise, all user data will be lost.'), |
230 | 230 | ] |
231 | 231 | ]); |
232 | - } elseif ($recoveryEnabledForUser && ! $validRecoveryPassword) { |
|
232 | + } elseif ($recoveryEnabledForUser && !$validRecoveryPassword) { |
|
233 | 233 | return new JSONResponse([ |
234 | 234 | 'status' => 'error', |
235 | 235 | 'data' => [ |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | <?php foreach ($_['forms'] as $form) { |
30 | 30 | if (isset($form['form'])) {?> |
31 | - <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> |
|
31 | + <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p(''); ?>"><?php print_unescaped($form['form']); ?></div> |
|
32 | 32 | <?php } |
33 | 33 | } ?> |
@@ -49,17 +49,17 @@ |
||
49 | 49 | * @param \DOMElement $errorNode |
50 | 50 | * @return void |
51 | 51 | */ |
52 | - public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) { |
|
52 | + public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) { |
|
53 | 53 | |
54 | 54 | // set ownCloud namespace |
55 | 55 | $errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD); |
56 | 56 | |
57 | 57 | // adding the retry node |
58 | - $error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true)); |
|
58 | + $error = $errorNode->ownerDocument->createElementNS('o:', 'o:retry', var_export($this->retry, true)); |
|
59 | 59 | $errorNode->appendChild($error); |
60 | 60 | |
61 | 61 | // adding the message node |
62 | - $error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage()); |
|
62 | + $error = $errorNode->ownerDocument->createElementNS('o:', 'o:reason', $this->getMessage()); |
|
63 | 63 | $errorNode->appendChild($error); |
64 | 64 | } |
65 | 65 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return; |
93 | 93 | } |
94 | 94 | |
95 | - return $this->checkQuota($parent->getPath() . '/' . basename($uri)); |
|
95 | + return $this->checkQuota($parent->getPath().'/'.basename($uri)); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // there is still enough space for the remaining chunks |
164 | 164 | $length -= $chunkHandler->getCurrentSize(); |
165 | 165 | // use target file name for free space check in case of shared files |
166 | - $path = rtrim($parentPath, '/') . '/' . $info['name']; |
|
166 | + $path = rtrim($parentPath, '/').'/'.$info['name']; |
|
167 | 167 | } |
168 | 168 | $freeSpace = $this->getFreeSpace($path); |
169 | 169 | if ($freeSpace >= 0 && $length > $freeSpace) { |