Completed
Push — master ( 68a190...121cb4 )
by Lukas
23:42
created
apps/theming/lib/Controller/IconController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function getThemedIcon($app, $image) {
93 93
 		try {
94
-			$iconFile = $this->imageManager->getCachedImage("icon-" . $app . '-' . str_replace("/","_",$image));
94
+			$iconFile = $this->imageManager->getCachedImage("icon-".$app.'-'.str_replace("/", "_", $image));
95 95
 		} catch (NotFoundException $exception) {
96 96
 			$icon = $this->iconBuilder->colorSvg($app, $image);
97 97
 			if ($icon === false || $icon === "") {
98 98
 				return new NotFoundResponse();
99 99
 			}
100
-			$iconFile = $this->imageManager->setCachedImage("icon-" . $app . '-' . str_replace("/","_",$image), $icon);
100
+			$iconFile = $this->imageManager->setCachedImage("icon-".$app.'-'.str_replace("/", "_", $image), $icon);
101 101
 		}
102 102
 		if ($iconFile !== false) {
103 103
 			$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/svg+xml']);
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
 	public function getFavicon($app = "core") {
126 126
 		if ($this->themingDefaults->shouldReplaceIcons()) {
127 127
 			try {
128
-				$iconFile = $this->imageManager->getCachedImage('favIcon-' . $app);
128
+				$iconFile = $this->imageManager->getCachedImage('favIcon-'.$app);
129 129
 			} catch (NotFoundException $exception) {
130 130
 				$icon = $this->iconBuilder->getFavicon($app);
131
-				$iconFile = $this->imageManager->setCachedImage('favIcon-' . $app, $icon);
131
+				$iconFile = $this->imageManager->setCachedImage('favIcon-'.$app, $icon);
132 132
 			}
133 133
 			if ($iconFile !== false) {
134 134
 				$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/x-icon']);
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
 	public function getTouchIcon($app = "core") {
157 157
 		if ($this->themingDefaults->shouldReplaceIcons()) {
158 158
 			try {
159
-				$iconFile = $this->imageManager->getCachedImage('touchIcon-' . $app);
159
+				$iconFile = $this->imageManager->getCachedImage('touchIcon-'.$app);
160 160
 			} catch (NotFoundException $exception) {
161 161
 				$icon = $this->iconBuilder->getTouchIcon($app);
162
-				$iconFile = $this->imageManager->setCachedImage('touchIcon-' . $app, $icon);
162
+				$iconFile = $this->imageManager->setCachedImage('touchIcon-'.$app, $icon);
163 163
 			}
164 164
 			if ($iconFile !== false) {
165 165
 				$response = new FileDisplayResponse($iconFile, Http::STATUS_OK, ['Content-Type' => 'image/png']);
Please login to merge, or discard this patch.
apps/theming/lib/IconBuilder.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function getFavicon($app) {
55 55
 		$icon = $this->renderAppIcon($app, 32);
56
-		if($icon === false) {
56
+		if ($icon === false) {
57 57
 			return false;
58 58
 		}
59 59
 		$icon->setImageFormat("png24");
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function getTouchIcon($app) {
70 70
 		$icon = $this->renderAppIcon($app, 512);
71
-		if($icon === false) {
71
+		if ($icon === false) {
72 72
 			return false;
73 73
 		}
74 74
 		$icon->setImageFormat("png24");
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			return false;
94 94
 		}
95 95
 
96
-		if($appIconContent === false) {
96
+		if ($appIconContent === false) {
97 97
 			return false;
98 98
 		}
99 99
 
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
 		$mime = mime_content_type($appIcon);
102 102
 
103 103
 		// generate background image with rounded corners
104
-		$background = '<?xml version="1.0" encoding="UTF-8"?>' .
105
-			'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:cc="http://creativecommons.org/ns#" width="512" height="512" xmlns:xlink="http://www.w3.org/1999/xlink">' .
106
-			'<rect x="0" y="0" rx="100" ry="100" width="512" height="512" style="fill:' . $color . ';" />' .
104
+		$background = '<?xml version="1.0" encoding="UTF-8"?>'.
105
+			'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:cc="http://creativecommons.org/ns#" width="512" height="512" xmlns:xlink="http://www.w3.org/1999/xlink">'.
106
+			'<rect x="0" y="0" rx="100" ry="100" width="512" height="512" style="fill:'.$color.';" />'.
107 107
 			'</svg>';
108 108
 		// resize svg magic as this seems broken in Imagemagick
109
-		if($mime === "image/svg+xml" || substr($appIconContent, 0, 4) === "<svg") {
110
-			if(substr($appIconContent, 0, 5) !== "<?xml") {
109
+		if ($mime === "image/svg+xml" || substr($appIconContent, 0, 4) === "<svg") {
110
+			if (substr($appIconContent, 0, 5) !== "<?xml") {
111 111
 				$svg = "<?xml version=\"1.0\"?>".$appIconContent;
112 112
 			} else {
113 113
 				$svg = $appIconContent;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			$res = $tmp->getImageResolution();
120 120
 			$tmp->destroy();
121 121
 
122
-			if($x>$y) {
122
+			if ($x > $y) {
123 123
 				$max = $x;
124 124
 			} else {
125 125
 				$max = $y;
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 
128 128
 			// convert svg to resized image
129 129
 			$appIconFile = new Imagick();
130
-			$resX = (int)(512 * $res['x'] / $max * 2.53);
131
-			$resY = (int)(512 * $res['y'] / $max * 2.53);
130
+			$resX = (int) (512 * $res['x'] / $max * 2.53);
131
+			$resY = (int) (512 * $res['y'] / $max * 2.53);
132 132
 			$appIconFile->setResolution($resX, $resY);
133 133
 			$appIconFile->setBackgroundColor(new ImagickPixel('transparent'));
134 134
 			$appIconFile->readImageBlob($svg);
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
 		}
142 142
 
143 143
 		// offset for icon positioning
144
-		$border_w = (int)($appIconFile->getImageWidth() * 0.05);
145
-		$border_h = (int)($appIconFile->getImageHeight() * 0.05);
146
-		$innerWidth = (int)($appIconFile->getImageWidth() - $border_w * 2);
147
-		$innerHeight = (int)($appIconFile->getImageHeight() - $border_h * 2);
144
+		$border_w = (int) ($appIconFile->getImageWidth() * 0.05);
145
+		$border_h = (int) ($appIconFile->getImageHeight() * 0.05);
146
+		$innerWidth = (int) ($appIconFile->getImageWidth() - $border_w * 2);
147
+		$innerHeight = (int) ($appIconFile->getImageHeight() - $border_h * 2);
148 148
 		$appIconFile->adaptiveResizeImage($innerWidth, $innerHeight);
149 149
 		// center icon
150 150
 		$offset_w = 512 / 2 - $innerWidth / 2;
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$uid = $user->getUID();
80 80
 		foreach (range(1, min([$number, 20])) as $i) {
81
-			$code = $this->random->generate(self::$CODE_LENGTH, ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS);
81
+			$code = $this->random->generate(self::$CODE_LENGTH, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS);
82 82
 
83 83
 			$dbCode = new BackupCode();
84 84
 			$dbCode->setUserId($uid);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$codes = $this->mapper->getBackupCodes($user);
133 133
 		$total = count($codes);
134 134
 		$used = 0;
135
-		array_walk($codes, function (BackupCode $code) use (&$used) {
135
+		array_walk($codes, function(BackupCode $code) use (&$used) {
136 136
 			if (1 === (int) $code->getUsed()) {
137 137
 				$used++;
138 138
 			}
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		$rows = $result->fetchAll();
48 48
 		$result->closeCursor();
49 49
 
50
-		return array_map(function ($row) {
50
+		return array_map(function($row) {
51 51
 			return BackupCode::fromRow($row);
52 52
 		}, $rows);
53 53
 	}
Please login to merge, or discard this patch.
apps/encryption/templates/altmail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 /** @var array $_ */
4 4
 
5 5
 print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", array($_['password'])));
6
-if ( isset($_['expiration']) ) {
6
+if (isset($_['expiration'])) {
7 7
 	print_unescaped($l->t("The share will expire on %s.", array($_['expiration'])));
8 8
 	print_unescaped("\n\n");
9 9
 }
@@ -12,5 +12,5 @@  discard block
 block discarded – undo
12 12
 ?>
13 13
 
14 14
 	--
15
-<?php p($theme->getName() . ' - ' . $theme->getSlogan()); ?>
15
+<?php p($theme->getName().' - '.$theme->getSlogan()); ?>
16 16
 <?php print_unescaped("\n".$theme->getBaseUrl());
Please login to merge, or discard this patch.
apps/encryption/templates/settings-admin.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@  discard block
 block discarded – undo
7 7
 ?>
8 8
 <form id="ocDefaultEncryptionModule" class="sub-section">
9 9
 	<h3><?php p($l->t("Default encryption module")); ?></h3>
10
-	<?php if(!$_["initStatus"]): ?>
10
+	<?php if (!$_["initStatus"]): ?>
11 11
 		<?php p($l->t("Encryption app is enabled but your keys are not initialized, please log-out and log-in again")); ?>
12 12
 	<?php else: ?>
13 13
 		<p id="encryptHomeStorageSetting">
14 14
 			<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
15 15
 				   value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> />
16
-			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
17
-			<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>
16
+			<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage')); ?></label></br>
17
+			<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>
18 18
 		</p>
19 19
 		<br />
20
-		<?php if($_['masterKeyEnabled'] === false): ?>
20
+		<?php if ($_['masterKeyEnabled'] === false): ?>
21 21
 			<p id="encryptionSetRecoveryKey">
22
-				<?php $_["recoveryEnabled"] === '0' ?  p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
22
+				<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
23 23
 				<span class="msg"></span>
24 24
 				<br/>
25 25
 				<em>
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 					   name="enableRecoveryKey"
39 39
 					   id="enableRecoveryKey"
40 40
 					   status="<?php p($_["recoveryEnabled"]) ?>"
41
-					   value="<?php $_["recoveryEnabled"] === '0' ?  p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
41
+					   value="<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
42 42
 			</p>
43 43
 			<br/><br/>
44 44
 
45
-			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
45
+			<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"'); ?>>
46 46
 				<?php p($l->t("Change recovery key password:")); ?>
47 47
 				<span class="msg"></span>
48 48
 				<br/>
Please login to merge, or discard this patch.
apps/encryption/lib/Migration.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
 			$path = '/files_encryption/keys';
138 138
 			$this->renameFileKeys($user, $path);
139 139
 			$trashPath = '/files_trashbin/keys';
140
-			if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($user . '/' . $trashPath)) {
140
+			if (\OC_App::isEnabled('files_trashbin') && $this->view->is_dir($user.'/'.$trashPath)) {
141 141
 				$this->renameFileKeys($user, $trashPath, true);
142 142
 				$this->view->deleteAll($trashPath);
143 143
 			}
144 144
 			// delete old folders
145 145
 			$this->deleteOldKeys($user);
146
-			$this->view->getMount('/' . $user)->getStorage()->getScanner()->scan('files_encryption');
146
+			$this->view->getMount('/'.$user)->getStorage()->getScanner()->scan('files_encryption');
147 147
 		}
148 148
 	}
149 149
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 		while ($row = $appSettings->fetch()) {
174 174
 			// 'installed_version' gets deleted at the end of the migration process
175
-			if ($row['configkey'] !== 'installed_version' ) {
175
+			if ($row['configkey'] !== 'installed_version') {
176 176
 				$this->config->setAppValue('encryption', $row['configkey'], $row['configvalue']);
177 177
 				$this->config->deleteAppValue('files_encryption', $row['configkey']);
178 178
 			}
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 	 * create backup of system-wide keys
196 196
 	 */
197 197
 	private function backupSystemWideKeys() {
198
-		$backupDir = 'encryption_migration_backup_' . date("Y-m-d_H-i-s");
198
+		$backupDir = 'encryption_migration_backup_'.date("Y-m-d_H-i-s");
199 199
 		$this->view->mkdir($backupDir);
200
-		$this->view->copy('files_encryption', $backupDir . '/files_encryption');
200
+		$this->view->copy('files_encryption', $backupDir.'/files_encryption');
201 201
 	}
202 202
 
203 203
 	/**
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 	 * @return bool
208 208
 	 */
209 209
 	private function backupUserKeys($user) {
210
-		$encryptionDir = $user . '/files_encryption';
210
+		$encryptionDir = $user.'/files_encryption';
211 211
 		if ($this->view->is_dir($encryptionDir)) {
212
-			$backupDir = $user . '/encryption_migration_backup_' . date("Y-m-d_H-i-s");
212
+			$backupDir = $user.'/encryption_migration_backup_'.date("Y-m-d_H-i-s");
213 213
 			$this->view->mkdir($backupDir);
214 214
 			$this->view->copy($encryptionDir, $backupDir);
215 215
 			return true;
@@ -222,12 +222,12 @@  discard block
 block discarded – undo
222 222
 	 */
223 223
 	private function renameSystemPrivateKeys() {
224 224
 		$dh = $this->view->opendir('files_encryption');
225
-		$this->createPathForKeys('/files_encryption/' . $this->moduleId );
225
+		$this->createPathForKeys('/files_encryption/'.$this->moduleId);
226 226
 		if (is_resource($dh)) {
227 227
 			while (($privateKey = readdir($dh)) !== false) {
228
-				if (!\OC\Files\Filesystem::isIgnoredDir($privateKey) ) {
229
-					if (!$this->view->is_dir('/files_encryption/' . $privateKey)) {
230
-						$this->view->rename('files_encryption/' . $privateKey, 'files_encryption/' . $this->moduleId . '/' . $privateKey);
228
+				if (!\OC\Files\Filesystem::isIgnoredDir($privateKey)) {
229
+					if (!$this->view->is_dir('/files_encryption/'.$privateKey)) {
230
+						$this->view->rename('files_encryption/'.$privateKey, 'files_encryption/'.$this->moduleId.'/'.$privateKey);
231 231
 						$this->renameSystemPublicKey($privateKey);
232 232
 					}
233 233
 				}
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
 	 * @param string $privateKey private key for which we want to rename the corresponding public key
243 243
 	 */
244 244
 	private function renameSystemPublicKey($privateKey) {
245
-		$publicKey = substr($privateKey,0 , strrpos($privateKey, '.privateKey')) . '.publicKey';
246
-		$this->view->rename('files_encryption/public_keys/' . $publicKey, 'files_encryption/' . $this->moduleId . '/' . $publicKey);
245
+		$publicKey = substr($privateKey, 0, strrpos($privateKey, '.privateKey')).'.publicKey';
246
+		$this->view->rename('files_encryption/public_keys/'.$publicKey, 'files_encryption/'.$this->moduleId.'/'.$publicKey);
247 247
 	}
248 248
 
249 249
 	/**
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 	 * @param string $user
253 253
 	 */
254 254
 	private function renameUsersPrivateKey($user) {
255
-		$oldPrivateKey = $user . '/files_encryption/' . $user . '.privateKey';
256
-		$newPrivateKey = $user . '/files_encryption/' . $this->moduleId . '/' . $user . '.privateKey';
255
+		$oldPrivateKey = $user.'/files_encryption/'.$user.'.privateKey';
256
+		$newPrivateKey = $user.'/files_encryption/'.$this->moduleId.'/'.$user.'.privateKey';
257 257
 		if ($this->view->file_exists($oldPrivateKey)) {
258 258
 			$this->createPathForKeys(dirname($newPrivateKey));
259 259
 			$this->view->rename($oldPrivateKey, $newPrivateKey);
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
 	 * @param string $user
267 267
 	 */
268 268
 	private function renameUsersPublicKey($user) {
269
-		$oldPublicKey = '/files_encryption/public_keys/' . $user . '.publicKey';
270
-		$newPublicKey = $user . '/files_encryption/' . $this->moduleId . '/' . $user . '.publicKey';
269
+		$oldPublicKey = '/files_encryption/public_keys/'.$user.'.publicKey';
270
+		$newPublicKey = $user.'/files_encryption/'.$this->moduleId.'/'.$user.'.publicKey';
271 271
 		if ($this->view->file_exists($oldPublicKey)) {
272 272
 			$this->createPathForKeys(dirname($newPublicKey));
273 273
 			$this->view->rename($oldPublicKey, $newPublicKey);
@@ -283,27 +283,27 @@  discard block
 block discarded – undo
283 283
 	 */
284 284
 	private function renameFileKeys($user, $path, $trash = false) {
285 285
 
286
-		if ($this->view->is_dir($user . '/' . $path) === false) {
287
-			$this->logger->info('Skip dir /' . $user . '/' . $path . ': does not exist');
286
+		if ($this->view->is_dir($user.'/'.$path) === false) {
287
+			$this->logger->info('Skip dir /'.$user.'/'.$path.': does not exist');
288 288
 			return;
289 289
 		}
290 290
 
291
-		$dh = $this->view->opendir($user . '/' . $path);
291
+		$dh = $this->view->opendir($user.'/'.$path);
292 292
 
293 293
 		if (is_resource($dh)) {
294 294
 			while (($file = readdir($dh)) !== false) {
295 295
 				if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
296
-					if ($this->view->is_dir($user . '/' . $path . '/' . $file)) {
297
-						$this->renameFileKeys($user, $path . '/' . $file, $trash);
296
+					if ($this->view->is_dir($user.'/'.$path.'/'.$file)) {
297
+						$this->renameFileKeys($user, $path.'/'.$file, $trash);
298 298
 					} else {
299 299
 						$target = $this->getTargetDir($user, $path, $file, $trash);
300 300
 						if ($target !== false) {
301 301
 							$this->createPathForKeys(dirname($target));
302
-							$this->view->rename($user . '/' . $path . '/' . $file, $target);
302
+							$this->view->rename($user.'/'.$path.'/'.$file, $target);
303 303
 						} else {
304 304
 							$this->logger->warning(
305
-								'did not move key "' . $file
306
-								. '" could not find the corresponding file in /data/' . $user . '/files.'
305
+								'did not move key "'.$file
306
+								. '" could not find the corresponding file in /data/'.$user.'/files.'
307 307
 							. 'Most likely the key was already moved in a previous migration run and is already on the right place.');
308 308
 						}
309 309
 					}
@@ -336,10 +336,10 @@  discard block
 block discarded – undo
336 336
 	private function getTargetDir($user, $keyPath, $filename, $trash) {
337 337
 		if ($trash) {
338 338
 			$filePath = substr($keyPath, strlen('/files_trashbin/keys/'));
339
-			$targetDir = $user . '/files_encryption/keys/files_trashbin/' . $filePath . '/' . $this->moduleId . '/' . $filename;
339
+			$targetDir = $user.'/files_encryption/keys/files_trashbin/'.$filePath.'/'.$this->moduleId.'/'.$filename;
340 340
 		} else {
341 341
 			$filePath = substr($keyPath, strlen('/files_encryption/keys/'));
342
-			$targetDir = $user . '/files_encryption/keys/files/' . $filePath . '/' . $this->moduleId . '/' . $filename;
342
+			$targetDir = $user.'/files_encryption/keys/files/'.$filePath.'/'.$this->moduleId.'/'.$filename;
343 343
 		}
344 344
 
345 345
 		if ($user === '') {
@@ -347,13 +347,13 @@  discard block
 block discarded – undo
347 347
 			$normalized = \OC\Files\Filesystem::normalizePath($filePath);
348 348
 			$systemMountPoints = $this->getSystemMountPoints();
349 349
 			foreach ($systemMountPoints as $mountPoint) {
350
-				$normalizedMountPoint = \OC\Files\Filesystem::normalizePath($mountPoint['mountpoint']) . '/';
350
+				$normalizedMountPoint = \OC\Files\Filesystem::normalizePath($mountPoint['mountpoint']).'/';
351 351
 				if (strpos($normalized, $normalizedMountPoint) === 0)
352 352
 					return $targetDir;
353 353
 			}
354
-		} else if ($trash === false && $this->view->file_exists('/' . $user. '/files/' . $filePath)) {
354
+		} else if ($trash === false && $this->view->file_exists('/'.$user.'/files/'.$filePath)) {
355 355
 			return $targetDir;
356
-		} else if ($trash === true && $this->view->file_exists('/' . $user. '/files_trashbin/' . $filePath)) {
356
+		} else if ($trash === true && $this->view->file_exists('/'.$user.'/files_trashbin/'.$filePath)) {
357 357
 				return $targetDir;
358 358
 			}
359 359
 
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
 	 * @param string $user
367 367
 	 */
368 368
 	private function deleteOldKeys($user) {
369
-		$this->view->deleteAll($user . '/files_encryption/keyfiles');
370
-		$this->view->deleteAll($user . '/files_encryption/share-keys');
369
+		$this->view->deleteAll($user.'/files_encryption/keyfiles');
370
+		$this->view->deleteAll($user.'/files_encryption/share-keys');
371 371
 	}
372 372
 
373 373
 	/**
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 			$sub_dirs = explode('/', $path);
381 381
 			$dir = '';
382 382
 			foreach ($sub_dirs as $sub_dir) {
383
-				$dir .= '/' . $sub_dir;
383
+				$dir .= '/'.$sub_dir;
384 384
 				if (!$this->view->is_dir($dir)) {
385 385
 					$this->view->mkdir($dir);
386 386
 				}
Please login to merge, or discard this patch.
apps/encryption/lib/Util.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 * @return bool
164 164
 	 */
165 165
 	public function userHasFiles($uid) {
166
-		return $this->files->file_exists($uid . '/files');
166
+		return $this->files->file_exists($uid.'/files');
167 167
 	}
168 168
 
169 169
 	/**
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		if (count($parts) > 1) {
180 180
 			$owner = $parts[1];
181 181
 			if ($this->userManager->userExists($owner) === false) {
182
-				throw new \BadMethodCallException('Unknown user: ' .
182
+				throw new \BadMethodCallException('Unknown user: '.
183 183
 				'method expects path to a user folder relative to the data folder');
184 184
 			}
185 185
 
Please login to merge, or discard this patch.
apps/encryption/lib/Controller/SettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 				$encryptedKey = $this->crypt->encryptPrivateKey($decryptedKey, $newPassword, $uid);
129 129
 				$header = $this->crypt->generateHeader();
130 130
 				if ($encryptedKey) {
131
-					$this->keyManager->setPrivateKey($uid, $header . $encryptedKey);
131
+					$this->keyManager->setPrivateKey($uid, $header.$encryptedKey);
132 132
 					$this->session->setPrivateKey($decryptedKey);
133 133
 					$result = true;
134 134
 				}
Please login to merge, or discard this patch.