@@ -235,7 +235,7 @@ |
||
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | - $this->forwardedip = implode(", ", $valid); |
|
| 238 | + $this->forwardedip = implode(", ", $valid); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
@@ -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 | } |
| 367 | 367 | else { |
@@ -361,9 +361,9 @@ |
||
| 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 | + } |
|
| 367 | 367 | else { |
| 368 | 368 | $description = 'Unknown task'; |
| 369 | 369 | } |
@@ -321,7 +321,7 @@ |
||
| 321 | 321 | */ |
| 322 | 322 | final protected function addJs($path) |
| 323 | 323 | { |
| 324 | - if (in_array($path, $this->extraJs)){ |
|
| 324 | + if (in_array($path, $this->extraJs)) { |
|
| 325 | 325 | // nothing to do |
| 326 | 326 | return; |
| 327 | 327 | } |
@@ -321,7 +321,7 @@ |
||
| 321 | 321 | */ |
| 322 | 322 | final protected function addJs($path) |
| 323 | 323 | { |
| 324 | - if (in_array($path, $this->extraJs)){ |
|
| 324 | + if (in_array($path, $this->extraJs)) { |
|
| 325 | 325 | // nothing to do |
| 326 | 326 | return; |
| 327 | 327 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | if ($targetVar !== null && preg_match('/^[a-z]+$/', $targetVar)) { |
| 73 | 73 | $data = $targetVar . ' = ' . $data . ';'; |
| 74 | 74 | header("Content-Type: text/javascript"); |
| 75 | - } |
|
| 75 | + } |
|
| 76 | 76 | else { |
| 77 | 77 | header("Content-Type: application/json"); |
| 78 | 78 | } |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint(); |
| 191 | 191 | $response = $this->httpHelper->get($endpoint, $parameters); |
| 192 | 192 | $response = json_decode($response, true); |
| 193 | - } |
|
| 193 | + } |
|
| 194 | 194 | catch (CurlException $ex) { |
| 195 | 195 | // failed getting identification status, so throw a nicer error. |
| 196 | 196 | $message = 'Could not contact metawiki API to determine user\' identification status. ' |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $userObj = User::getByUsername($filterUser, $database); |
| 44 | 44 | if ($userObj !== false) { |
| 45 | 45 | $logSearch->byUser($userObj->getId()); |
| 46 | - } |
|
| 46 | + } |
|
| 47 | 47 | else { |
| 48 | 48 | $logSearch->byUser(-1); |
| 49 | 49 | } |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | // <https://accounts.wmflabs.org/wiki/Help:Introduction> |
| 123 | 123 | // The code currently assumes that the template was parsed for enwiki, and will need to be |
| 124 | 124 | // updated once other wikis are supported. |
| 125 | - $templateHtml = preg_replace('/(<a href=")(\/wiki\/)/', '$1//en.wikipedia.org$2', $templateHtml ); |
|
| 125 | + $templateHtml = preg_replace('/(<a href=")(\/wiki\/)/', '$1//en.wikipedia.org$2', $templateHtml); |
|
| 126 | 126 | |
| 127 | 127 | $this->assign('templateHtml', $templateHtml); |
| 128 | 128 | $this->assign('template', $template); |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | if ($user->getForceIdentified() === null) { |
| 151 | 151 | $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase()); |
| 152 | 152 | $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing'); |
| 153 | - } |
|
| 153 | + } |
|
| 154 | 154 | else { |
| 155 | 155 | $this->assign('identificationStatus', $user->getForceIdentified() == 1 ? 'forced-on' : 'forced-off'); |
| 156 | 156 | } |
@@ -225,7 +225,7 @@ |
||
| 225 | 225 | 'jobId' => $job->getId(), |
| 226 | 226 | 'jobDesc' => JobQueue::getTaskDescriptions()[$job->getTask()], |
| 227 | 227 | ); |
| 228 | - } |
|
| 228 | + } |
|
| 229 | 229 | else { |
| 230 | 230 | $requestLogs[] = array( |
| 231 | 231 | 'type' => 'log', |