Completed
Push — stable13 ( 9d3a4b...5f029e )
by Morris
105:36 queued 79:13
created
lib/private/Config.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @return mixed the value or $default
86 86
 	 */
87 87
 	public function getValue($key, $default = null) {
88
-		$envValue = getenv(self::ENV_PREFIX . $key);
88
+		$envValue = getenv(self::ENV_PREFIX.$key);
89 89
 		if ($envValue !== false) {
90 90
 			return $envValue;
91 91
 		}
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		foreach ($configFiles as $file) {
198 198
 			$fileExistsAndIsReadable = file_exists($file) && is_readable($file);
199 199
 			$filePointer = $fileExistsAndIsReadable ? fopen($file, 'r') : false;
200
-			if($file === $this->configFilePath &&
200
+			if ($file === $this->configFilePath &&
201 201
 				$filePointer === false) {
202 202
 				// Opening the main config might not be possible, e.g. if the wrong
203 203
 				// permissions are set (likely on a new installation)
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
 			}
206 206
 
207 207
 			// Try to acquire a file lock
208
-			if(!flock($filePointer, LOCK_SH)) {
208
+			if (!flock($filePointer, LOCK_SH)) {
209 209
 				throw new \Exception(sprintf('Could not acquire a shared lock on the config file %s', $file));
210 210
 			}
211 211
 
212 212
 			unset($CONFIG);
213 213
 			include $file;
214
-			if(isset($CONFIG) && is_array($CONFIG)) {
214
+			if (isset($CONFIG) && is_array($CONFIG)) {
215 215
 				$this->cache = array_merge($this->cache, $CONFIG);
216 216
 			}
217 217
 
@@ -236,29 +236,29 @@  discard block
 block discarded – undo
236 236
 		$content .= var_export($this->cache, true);
237 237
 		$content .= ";\n";
238 238
 
239
-		touch ($this->configFilePath);
239
+		touch($this->configFilePath);
240 240
 		$filePointer = fopen($this->configFilePath, 'r+');
241 241
 
242 242
 		// Prevent others not to read the config
243 243
 		chmod($this->configFilePath, 0640);
244 244
 
245 245
 		// File does not exist, this can happen when doing a fresh install
246
-		if(!is_resource ($filePointer)) {
246
+		if (!is_resource($filePointer)) {
247 247
 			// TODO fix this via DI once it is very clear that this doesn't cause side effects due to initialization order
248 248
 			// currently this breaks app routes but also could have other side effects especially during setup and exception handling
249 249
 			$url = \OC::$server->getURLGenerator()->linkToDocs('admin-dir_permissions');
250 250
 			throw new HintException(
251 251
 				"Can't write into config directory!",
252
-				'This can usually be fixed by giving the webserver write access to the config directory. See ' . $url);
252
+				'This can usually be fixed by giving the webserver write access to the config directory. See '.$url);
253 253
 		}
254 254
 
255 255
 		// Try to acquire a file lock
256
-		if(!flock($filePointer, LOCK_EX)) {
256
+		if (!flock($filePointer, LOCK_EX)) {
257 257
 			throw new \Exception(sprintf('Could not acquire an exclusive lock on the config file %s', $this->configFilePath));
258 258
 		}
259 259
 
260 260
 		// Write the config and release the lock
261
-		ftruncate ($filePointer, 0);
261
+		ftruncate($filePointer, 0);
262 262
 		fwrite($filePointer, $content);
263 263
 		fflush($filePointer);
264 264
 		flock($filePointer, LOCK_UN);
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/LanguageParseChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 			throw new \RuntimeException("No app with given id <$appId> known.");
36 36
 		}
37 37
 
38
-		if (!is_dir($appPath . '/l10n/')) {
38
+		if (!is_dir($appPath.'/l10n/')) {
39 39
 			return [];
40 40
 		}
41 41
 
42 42
 		$errors = [];
43
-		$directory = new \DirectoryIterator($appPath . '/l10n/');
43
+		$directory = new \DirectoryIterator($appPath.'/l10n/');
44 44
 
45 45
 		foreach ($directory as $file) {
46 46
 			if ($file->getExtension() !== 'json') {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			json_decode($content, true);
52 52
 
53 53
 			if (json_last_error() !== JSON_ERROR_NONE) {
54
-				$errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg();
54
+				$errors[] = 'Invalid language file found: l10n/'.$file->getFilename().': '.json_last_error_msg();
55 55
 			}
56 56
 		}
57 57
 
Please login to merge, or discard this patch.
core/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 		$container = $this->getContainer();
47 47
 
48
-		$container->registerService('defaultMailAddress', function () {
48
+		$container->registerService('defaultMailAddress', function() {
49 49
 			return Util::getDefaultEmailAddress('lostpassword-noreply');
50 50
 		});
51 51
 	}
Please login to merge, or discard this patch.
settings/Application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @param array $urlParams
54 54
 	 */
55
-	public function __construct(array $urlParams=[]){
55
+	public function __construct(array $urlParams = []) {
56 56
 		parent::__construct('settings', $urlParams);
57 57
 
58 58
 		$container = $this->getContainer();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		$container->registerService('isSubAdmin', function(IContainer $c) {
73 73
 			$userObject = \OC::$server->getUserSession()->getUser();
74 74
 			$isSubAdmin = false;
75
-			if($userObject !== null) {
75
+			if ($userObject !== null) {
76 76
 				$isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject);
77 77
 			}
78 78
 			return $isSubAdmin;
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
 		$container->registerService('userCertificateManager', function(IContainer $c) {
81 81
 			return $c->query('ServerContainer')->getCertificateManager();
82 82
 		}, false);
83
-		$container->registerService('systemCertificateManager', function (IContainer $c) {
83
+		$container->registerService('systemCertificateManager', function(IContainer $c) {
84 84
 			return $c->query('ServerContainer')->getCertificateManager(null);
85 85
 		}, false);
86
-		$container->registerService(IProvider::class, function (IContainer $c) {
86
+		$container->registerService(IProvider::class, function(IContainer $c) {
87 87
 			return $c->query('ServerContainer')->query(IProvider::class);
88 88
 		});
89
-		$container->registerService(IManager::class, function (IContainer $c) {
89
+		$container->registerService(IManager::class, function(IContainer $c) {
90 90
 			return $c->query('ServerContainer')->getSettingsManager();
91 91
 		});
92 92
 
93
-		$container->registerService(NewUserMailHelper::class, function (IContainer $c) {
93
+		$container->registerService(NewUserMailHelper::class, function(IContainer $c) {
94 94
 			/** @var Server $server */
95 95
 			$server = $c->query('ServerContainer');
96 96
 			/** @var Defaults $defaults */
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/DatabaseSchemaChecker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 			throw new \RuntimeException("No app with given id <$appId> known.");
36 36
 		}
37 37
 
38
-		if (!file_exists($appPath . '/appinfo/database.xml')) {
38
+		if (!file_exists($appPath.'/appinfo/database.xml')) {
39 39
 			return ['errors' => [], 'warnings' => []];
40 40
 		}
41 41
 
42 42
 		libxml_use_internal_errors(true);
43 43
 		$loadEntities = libxml_disable_entity_loader(false);
44
-		$xml = simplexml_load_file($appPath . '/appinfo/database.xml');
44
+		$xml = simplexml_load_file($appPath.'/appinfo/database.xml');
45 45
 		libxml_disable_entity_loader($loadEntities);
46 46
 
47 47
 
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 		foreach ($xml->table as $table) {
51 51
 			// Table names
52 52
 			if (strpos($table->name, '*dbprefix*') !== 0) {
53
-				$errors[] = 'Database schema error: name of table ' . $table->name . ' does not start with *dbprefix*';
53
+				$errors[] = 'Database schema error: name of table '.$table->name.' does not start with *dbprefix*';
54 54
 			}
55 55
 			$tableName = substr($table->name, strlen('*dbprefix*'));
56 56
 			if (strpos($tableName, '*dbprefix*') !== false) {
57
-				$warnings[] = 'Database schema warning: *dbprefix* should only appear once in name of table ' . $table->name;
57
+				$warnings[] = 'Database schema warning: *dbprefix* should only appear once in name of table '.$table->name;
58 58
 			}
59 59
 
60 60
 			if (strlen($tableName) > 27) {
61
-				$errors[] = 'Database schema error: Name of table ' . $table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
61
+				$errors[] = 'Database schema error: Name of table '.$table->name.' is too long ('.strlen($tableName).'), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
62 62
 			}
63 63
 
64 64
 			$hasAutoIncrement = false;
@@ -66,20 +66,20 @@  discard block
 block discarded – undo
66 66
 			// Column names
67 67
 			foreach ($table->declaration->field as $column) {
68 68
 				if (strpos($column->name, '*dbprefix*') !== false) {
69
-					$warnings[] = 'Database schema warning: *dbprefix* should not appear in name of column ' . $column->name . ' on table ' . $table->name;
69
+					$warnings[] = 'Database schema warning: *dbprefix* should not appear in name of column '.$column->name.' on table '.$table->name;
70 70
 				}
71 71
 
72 72
 				if (strlen($column->name) > 30) {
73
-					$errors[] = 'Database schema error: Name of column ' . $column->name . ' on table ' . $table->name . ' is too long (' . strlen($tableName) . '), max. 30 characters allowed';
73
+					$errors[] = 'Database schema error: Name of column '.$column->name.' on table '.$table->name.' is too long ('.strlen($tableName).'), max. 30 characters allowed';
74 74
 				}
75 75
 
76 76
 				if ($column->autoincrement) {
77 77
 					if ($hasAutoIncrement) {
78
-						$errors[] = 'Database schema error: Table ' . $table->name . ' has multiple autoincrement columns';
78
+						$errors[] = 'Database schema error: Table '.$table->name.' has multiple autoincrement columns';
79 79
 					}
80 80
 
81 81
 					if (strlen($tableName) > 21) {
82
-						$errors[] = 'Database schema error: Name of table ' . $table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
82
+						$errors[] = 'Database schema error: Name of table '.$table->name.' is too long ('.strlen($tableName).'), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed';
83 83
 					}
84 84
 
85 85
 					$hasAutoIncrement = true;
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
 			foreach ($table->declaration->index as $index) {
91 91
 				$hasPrefix = strpos($index->name, '*dbprefix*');
92 92
 				if ($hasPrefix !== false && $hasPrefix !== 0) {
93
-					$warnings[] = 'Database schema warning: *dbprefix* should only appear at the beginning in name of index ' . $index->name . ' on table ' . $table->name;
93
+					$warnings[] = 'Database schema warning: *dbprefix* should only appear at the beginning in name of index '.$index->name.' on table '.$table->name;
94 94
 				}
95 95
 
96 96
 				$indexName = $hasPrefix === 0 ? substr($index->name, strlen('*dbprefix*')) : $index->name;
97 97
 				if (strlen($indexName) > 27) {
98
-					$errors[] = 'Database schema error: Name of index ' . $index->name . ' on table ' . $table->name . ' is too long (' . strlen($tableName) . '), max. 27 characters + *dbprefix* allowed';
98
+					$errors[] = 'Database schema error: Name of index '.$index->name.' on table '.$table->name.' is too long ('.strlen($tableName).'), max. 27 characters + *dbprefix* allowed';
99 99
 				}
100 100
 			}
101 101
 		}
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Storage/FTP.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -36,28 +36,28 @@  discard block
 block discarded – undo
36 36
 use Icewind\Streams\CallbackWrapper;
37 37
 use Icewind\Streams\RetryWrapper;
38 38
 
39
-class FTP extends StreamWrapper{
39
+class FTP extends StreamWrapper {
40 40
 	private $password;
41 41
 	private $user;
42 42
 	private $host;
43 43
 	private $secure;
44 44
 	private $root;
45 45
 
46
-	private static $tempFiles=array();
46
+	private static $tempFiles = array();
47 47
 
48 48
 	public function __construct($params) {
49 49
 		if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
50
-			$this->host=$params['host'];
51
-			$this->user=$params['user'];
52
-			$this->password=$params['password'];
50
+			$this->host = $params['host'];
51
+			$this->user = $params['user'];
52
+			$this->password = $params['password'];
53 53
 			if (isset($params['secure'])) {
54 54
 				$this->secure = $params['secure'];
55 55
 			} else {
56 56
 				$this->secure = false;
57 57
 			}
58
-			$this->root=isset($params['root'])?$params['root']:'/';
59
-			if ( ! $this->root || $this->root[0]!=='/') {
60
-				$this->root='/'.$this->root;
58
+			$this->root = isset($params['root']) ? $params['root'] : '/';
59
+			if (!$this->root || $this->root[0] !== '/') {
60
+				$this->root = '/'.$this->root;
61 61
 			}
62 62
 			if (substr($this->root, -1) !== '/') {
63 63
 				$this->root .= '/';
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 		
69 69
 	}
70 70
 
71
-	public function getId(){
72
-		return 'ftp::' . $this->user . '@' . $this->host . '/' . $this->root;
71
+	public function getId() {
72
+		return 'ftp::'.$this->user.'@'.$this->host.'/'.$this->root;
73 73
 	}
74 74
 
75 75
 	/**
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 	 * @return string
79 79
 	 */
80 80
 	public function constructUrl($path) {
81
-		$url='ftp';
81
+		$url = 'ftp';
82 82
 		if ($this->secure) {
83
-			$url.='s';
83
+			$url .= 's';
84 84
 		}
85
-		$url.='://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
85
+		$url .= '://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.$this->root.$path;
86 86
 		return $url;
87 87
 	}
88 88
 
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 			return $result;
102 102
 		}
103 103
 	}
104
-	public function fopen($path,$mode) {
105
-		switch($mode) {
104
+	public function fopen($path, $mode) {
105
+		switch ($mode) {
106 106
 			case 'r':
107 107
 			case 'rb':
108 108
 			case 'w':
@@ -122,17 +122,17 @@  discard block
 block discarded – undo
122 122
 			case 'c':
123 123
 			case 'c+':
124 124
 				//emulate these
125
-				if (strrpos($path, '.')!==false) {
126
-					$ext=substr($path, strrpos($path, '.'));
125
+				if (strrpos($path, '.') !== false) {
126
+					$ext = substr($path, strrpos($path, '.'));
127 127
 				} else {
128
-					$ext='';
128
+					$ext = '';
129 129
 				}
130
-				$tmpFile=\OCP\Files::tmpFile($ext);
130
+				$tmpFile = \OCP\Files::tmpFile($ext);
131 131
 				if ($this->file_exists($path)) {
132 132
 					$this->getFile($path, $tmpFile);
133 133
 				}
134 134
 				$handle = fopen($tmpFile, $mode);
135
-				return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
135
+				return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) {
136 136
 					$this->writeBack($tmpFile, $path);
137 137
 				});
138 138
 		}
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Storage/SFTP.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 		$input = $host;
62 62
 		if (strpos($host, '://') === false) {
63 63
 			// add a protocol to fix parse_url behavior with ipv6
64
-			$host = 'http://' . $host;
64
+			$host = 'http://'.$host;
65 65
 		}
66 66
 
67 67
 		$parsed = parse_url($host);
68
-		if(is_array($parsed) && isset($parsed['port'])) {
68
+		if (is_array($parsed) && isset($parsed['port'])) {
69 69
 			return [$parsed['host'], $parsed['port']];
70 70
 		} else if (is_array($parsed)) {
71 71
 			return [$parsed['host'], 22];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		// Register sftp://
82 82
 		Stream::register();
83 83
 
84
-		$parsedHost =  $this->splitHost($params['host']);
84
+		$parsedHost = $this->splitHost($params['host']);
85 85
 
86 86
 		$this->host = $parsedHost[0];
87 87
 		$this->port = $parsedHost[1];
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			= isset($params['root']) ? $this->cleanPath($params['root']) : '/';
104 104
 
105 105
 		if ($this->root[0] !== '/') {
106
-			 $this->root = '/' . $this->root;
106
+			 $this->root = '/'.$this->root;
107 107
 		}
108 108
 
109 109
 		if (substr($this->root, -1, 1) !== '/') {
@@ -158,15 +158,15 @@  discard block
 block discarded – undo
158 158
 	/**
159 159
 	 * {@inheritdoc}
160 160
 	 */
161
-	public function getId(){
162
-		$id = 'sftp::' . $this->user . '@' . $this->host;
161
+	public function getId() {
162
+		$id = 'sftp::'.$this->user.'@'.$this->host;
163 163
 		if ($this->port !== 22) {
164
-			$id .= ':' . $this->port;
164
+			$id .= ':'.$this->port;
165 165
 		}
166 166
 		// note: this will double the root slash,
167 167
 		// we should not change it to keep compatible with
168 168
 		// old storage ids
169
-		$id .= '/' . $this->root;
169
+		$id .= '/'.$this->root;
170 170
 		return $id;
171 171
 	}
172 172
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	 * @return string
197 197
 	 */
198 198
 	private function absPath($path) {
199
-		return $this->root . $this->cleanPath($path);
199
+		return $this->root.$this->cleanPath($path);
200 200
 	}
201 201
 
202 202
 	/**
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
 		try {
207 207
 			$storage_view = \OCP\Files::getStorage('files_external');
208 208
 			if ($storage_view) {
209
-				return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') .
210
-					$storage_view->getAbsolutePath('') .
209
+				return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').
210
+					$storage_view->getAbsolutePath('').
211 211
 					'ssh_hostKeys';
212 212
 			}
213 213
 		} catch (\Exception $e) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			if ($keyPath && file_exists($keyPath)) {
226 226
 				$fp = fopen($keyPath, 'w');
227 227
 				foreach ($keys as $host => $key) {
228
-					fwrite($fp, $host . '::' . $key . "\n");
228
+					fwrite($fp, $host.'::'.$key."\n");
229 229
 				}
230 230
 				fclose($fp);
231 231
 				return true;
@@ -297,15 +297,15 @@  discard block
 block discarded – undo
297 297
 				return false;
298 298
 			}
299 299
 
300
-			$id = md5('sftp:' . $path);
300
+			$id = md5('sftp:'.$path);
301 301
 			$dirStream = array();
302
-			foreach($list as $file) {
302
+			foreach ($list as $file) {
303 303
 				if ($file !== '.' && $file !== '..') {
304 304
 					$dirStream[] = $file;
305 305
 				}
306 306
 			}
307 307
 			return IteratorDirectory::wrap($dirStream);
308
-		} catch(\Exception $e) {
308
+		} catch (\Exception $e) {
309 309
 			return false;
310 310
 		}
311 311
 	}
@@ -357,10 +357,10 @@  discard block
 block discarded – undo
357 357
 	public function fopen($path, $mode) {
358 358
 		try {
359 359
 			$absPath = $this->absPath($path);
360
-			switch($mode) {
360
+			switch ($mode) {
361 361
 				case 'r':
362 362
 				case 'rb':
363
-					if ( !$this->file_exists($path)) {
363
+					if (!$this->file_exists($path)) {
364 364
 						return false;
365 365
 					}
366 366
 				case 'w':
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	/**
388 388
 	 * {@inheritdoc}
389 389
 	 */
390
-	public function touch($path, $mtime=null) {
390
+	public function touch($path, $mtime = null) {
391 391
 		try {
392 392
 			if (!is_null($mtime)) {
393 393
 				return false;
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		// Do not pass the password here. We want to use the Net_SFTP object
463 463
 		// supplied via stream context or fail. We only supply username and
464 464
 		// hostname because this might show up in logs (they are not used).
465
-		$url = 'sftp://' . urlencode($this->user) . '@' . $this->host . ':' . $this->port . $this->root . $path;
465
+		$url = 'sftp://'.urlencode($this->user).'@'.$this->host.':'.$this->port.$this->root.$path;
466 466
 		return $url;
467 467
 	}
468 468
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Command/Import.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			$json = file_get_contents('php://stdin');
113 113
 		} else {
114 114
 			if (!file_exists($path)) {
115
-				$output->writeln('<error>File not found: ' . $path . '</error>');
115
+				$output->writeln('<error>File not found: '.$path.'</error>');
116 116
 				return 1;
117 117
 			}
118 118
 			$json = file_get_contents($path);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 					$existingMount->getApplicableUsers() === $mount->getApplicableUsers() &&
165 165
 					$existingMount->getBackendOptions() === $mount->getBackendOptions()
166 166
 				) {
167
-					$output->writeln("<error>Duplicate mount (" . $mount->getMountPoint() . ")</error>");
167
+					$output->writeln("<error>Duplicate mount (".$mount->getMountPoint().")</error>");
168 168
 					return 1;
169 169
 				}
170 170
 			}
Please login to merge, or discard this patch.
apps/files/ajax/download.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 OCP\User::checkLoggedIn();
32 32
 \OC::$server->getSession()->close();
33 33
 
34
-$files = isset($_GET['files']) ? (string)$_GET['files'] : '';
35
-$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
34
+$files = isset($_GET['files']) ? (string) $_GET['files'] : '';
35
+$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : '';
36 36
 
37 37
 $files_list = json_decode($files);
38 38
 // in case we get only a single file
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
  * the content must not be longer than 32 characters and must only contain
46 46
  * alphanumeric characters
47 47
  */
48
-if(isset($_GET['downloadStartSecret'])
48
+if (isset($_GET['downloadStartSecret'])
49 49
 	&& !isset($_GET['downloadStartSecret'][32])
50 50
 	&& preg_match('!^[a-zA-Z0-9]+$!', $_GET['downloadStartSecret']) === 1) {
51 51
 	setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/');
52 52
 }
53 53
 
54
-$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' );
54
+$server_params = array('head' => \OC::$server->getRequest()->getMethod() === 'HEAD');
55 55
 
56 56
 /**
57 57
  * Http range requests support
Please login to merge, or discard this patch.