@@ -23,7 +23,7 @@ |
||
23 | 23 | $userSearchHelper = UserSearchHelper::get($this->getDatabase()); |
24 | 24 | |
25 | 25 | if (WebRequest::getString('all') === null) { |
26 | - $userSearchHelper->byStatus(User::STATUS_ACTIVE); |
|
26 | + $userSearchHelper->byStatus(User::STATUS_ACTIVE); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 |
@@ -241,19 +241,19 @@ |
||
241 | 241 | */ |
242 | 242 | public function setForwardedIp($forwardedip) |
243 | 243 | { |
244 | - // Verify that the XFF chain only contains valid IP addresses, and silently discard anything that isn't. |
|
244 | + // Verify that the XFF chain only contains valid IP addresses, and silently discard anything that isn't. |
|
245 | 245 | |
246 | - $xff = explode(',', $forwardedip); |
|
247 | - $valid = array(); |
|
246 | + $xff = explode(',', $forwardedip); |
|
247 | + $valid = array(); |
|
248 | 248 | |
249 | - foreach ($xff as $ip) { |
|
250 | - $ip = trim($ip); |
|
251 | - if (filter_var($ip, FILTER_VALIDATE_IP)) { |
|
252 | - $valid[] = $ip; |
|
253 | - } |
|
254 | - } |
|
249 | + foreach ($xff as $ip) { |
|
250 | + $ip = trim($ip); |
|
251 | + if (filter_var($ip, FILTER_VALIDATE_IP)) { |
|
252 | + $valid[] = $ip; |
|
253 | + } |
|
254 | + } |
|
255 | 255 | |
256 | - $this->forwardedip = implode(", ", $valid); |
|
256 | + $this->forwardedip = implode(", ", $valid); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
@@ -420,7 +420,7 @@ |
||
420 | 420 | . '|' . $this->forwardedip // } private data not known to those without access |
421 | 421 | . '|' . $this->useragent // } |
422 | 422 | . '|' . $this->email // } |
423 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
423 | + . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
424 | 424 | |
425 | 425 | return hash('sha256', $data); |
426 | 426 | } |
@@ -28,15 +28,15 @@ |
||
28 | 28 | return (bool)$dontUseDb; |
29 | 29 | } |
30 | 30 | |
31 | - /** |
|
32 | - * Gets the offline message |
|
33 | - * |
|
34 | - * @param bool $external |
|
35 | - * @param null|string $message |
|
36 | - * |
|
37 | - * @return string |
|
38 | - * @throws SmartyException |
|
39 | - */ |
|
31 | + /** |
|
32 | + * Gets the offline message |
|
33 | + * |
|
34 | + * @param bool $external |
|
35 | + * @param null|string $message |
|
36 | + * |
|
37 | + * @return string |
|
38 | + * @throws SmartyException |
|
39 | + */ |
|
40 | 40 | public static function getOfflineMessage($external, $message = null) |
41 | 41 | { |
42 | 42 | global $dontUseDbCulprit, $dontUseDbReason, $baseurl; |
@@ -190,7 +190,8 @@ |
||
190 | 190 | $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint(); |
191 | 191 | $response = $this->httpHelper->get($endpoint, $parameters); |
192 | 192 | $response = json_decode($response, true); |
193 | - } catch (CurlException $ex) { |
|
193 | + } |
|
194 | + catch (CurlException $ex) { |
|
194 | 195 | // failed getting identification status, so throw a nicer error. |
195 | 196 | $message = 'Could not contact metawiki API to determine user\' identification status. ' |
196 | 197 | . 'This is probably a transient error, so please try again.'; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $currentUser = User::getCurrent($database); |
49 | 49 | $this->assign('currentUser', $currentUser); |
50 | 50 | |
51 | - if($this->securityManager !== null) { |
|
51 | + if ($this->securityManager !== null) { |
|
52 | 52 | $this->setupNavMenuAccess($currentUser); |
53 | 53 | } |
54 | 54 |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | { |
348 | 348 | $userIds = array(); |
349 | 349 | |
350 | - foreach ($logs as $logEntry) { |
|
350 | + foreach ($logs as $logEntry) { |
|
351 | 351 | if (!$logEntry instanceof Log) { |
352 | 352 | // if this happens, we've done something wrong with passing back the log data. |
353 | 353 | throw new Exception('Log entry is not an instance of a Log, this should never happen.'); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | $logData = array(); |
370 | 370 | |
371 | - foreach ($logs as $logEntry) { |
|
371 | + foreach ($logs as $logEntry) { |
|
372 | 372 | $objectDescription = self::getObjectDescription($logEntry->getObjectId(), $logEntry->getObjectType(), |
373 | 373 | $database, $configuration); |
374 | 374 |
@@ -361,7 +361,7 @@ |
||
361 | 361 | } |
362 | 362 | |
363 | 363 | $task = $job->getTask(); |
364 | - if(isset($taskDescriptions[$task])){ |
|
364 | + if (isset($taskDescriptions[$task])) { |
|
365 | 365 | $description = $taskDescriptions[$task]; |
366 | 366 | } else { |
367 | 367 | $description = 'Unknown task'; |
@@ -361,9 +361,10 @@ |
||
361 | 361 | } |
362 | 362 | |
363 | 363 | $task = $job->getTask(); |
364 | - if(isset($taskDescriptions[$task])){ |
|
364 | + if(isset($taskDescriptions[$task])) { |
|
365 | 365 | $description = $taskDescriptions[$task]; |
366 | - } else { |
|
366 | + } |
|
367 | + else { |
|
367 | 368 | $description = 'Unknown task'; |
368 | 369 | } |
369 | 370 |
@@ -16,8 +16,8 @@ |
||
16 | 16 | 'google' => 'https://www.google.com/search?q=%DATA%', |
17 | 17 | 'domain' => 'http://%DATA%/', |
18 | 18 | 'rangefinder' => 'https://tools.wmflabs.org/rangeblockfinder/?ip=%DATA%', |
19 | - 'ipcheck' => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%', |
|
20 | - 'bgpview' => 'https://bgpview.io/ip/%DATA%' |
|
19 | + 'ipcheck' => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%', |
|
20 | + 'bgpview' => 'https://bgpview.io/ip/%DATA%' |
|
21 | 21 | ); |
22 | 22 | |
23 | 23 | if (!isset($_GET['tool']) |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $currentUser = User::getCurrent($database); |
49 | 49 | $this->assign('currentUser', $currentUser); |
50 | 50 | |
51 | - if($this->securityManager !== null) { |
|
51 | + if ($this->securityManager !== null) { |
|
52 | 52 | $this->setupNavMenuAccess($currentUser); |
53 | 53 | } |
54 | 54 |
@@ -592,7 +592,7 @@ |
||
592 | 592 | { |
593 | 593 | $cookie = &self::$globalStateProvider->getCookieSuperGlobal(); |
594 | 594 | |
595 | - if(isset($cookie['sitenotice'])) { |
|
595 | + if (isset($cookie['sitenotice'])) { |
|
596 | 596 | return $cookie['sitenotice'] === $expectedHash; |
597 | 597 | } |
598 | 598 |