@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | - $this->setHtmlTitle($statusSymbol . ' #' . $request->getId()); |
|
133 | + $this->setHtmlTitle($statusSymbol.' #'.$request->getId()); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | $entryComment = $entry->getComment(); |
229 | 229 | |
230 | - if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest'){ |
|
230 | + if ($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest') { |
|
231 | 231 | $data = unserialize($entry->getComment()); |
232 | 232 | /** @var JobQueue $job */ |
233 | 233 | $job = JobQueue::getById($data['job'], $database); |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | $response = $this->mediaWikiClient->doApiCall($tokenParams, 'POST'); |
59 | 59 | |
60 | 60 | if (isset($response->error)) { |
61 | - throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info); |
|
61 | + throw new MediaWikiApiException($response->error->code.': '.$response->error->info); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $token = $response->query->tokens->createaccounttoken; |
65 | 65 | |
66 | - $callback = $this->siteConfiguration->getBaseUrl() . '/internal.php/oauth/createCallback'; |
|
66 | + $callback = $this->siteConfiguration->getBaseUrl().'/internal.php/oauth/createCallback'; |
|
67 | 67 | |
68 | 68 | $checkboxFields = array(); |
69 | 69 | $requiredFields = array(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $createResponse = $this->mediaWikiClient->doApiCall($createParams, 'POST'); |
87 | 87 | |
88 | 88 | if (isset($createResponse->error)) { |
89 | - throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info); |
|
89 | + throw new MediaWikiApiException($response->error->code.': '.$response->error->info); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!isset($createResponse->createaccount) || !isset($createResponse->createaccount->status)) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return; |
103 | 103 | } |
104 | 104 | |
105 | - throw new Exception('API result reported status of ' . $createResponse->createaccount->status); |
|
105 | + throw new Exception('API result reported status of '.$createResponse->createaccount->status); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $response = $this->mediaWikiClient->doApiCall($tokenParams, 'POST'); |
127 | 127 | |
128 | 128 | if (isset($response->error)) { |
129 | - throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info); |
|
129 | + throw new MediaWikiApiException($response->error->code.': '.$response->error->info); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | $token = $response->query->tokens->csrftoken; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | |
138 | 138 | $editParameters = array( |
139 | 139 | 'action' => 'edit', |
140 | - 'title' => 'User talk:' . $username, |
|
140 | + 'title' => 'User talk:'.$username, |
|
141 | 141 | 'section' => 'new', |
142 | 142 | 'sectiontitle' => $title, |
143 | 143 | 'summary' => $summary, |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | if (!isset($response->edit)) { |
155 | 155 | if (isset($response->error)) { |
156 | - throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info); |
|
156 | + throw new MediaWikiApiException($response->error->code.': '.$response->error->info); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | throw new MediaWikiApiException('Unknown error encountered during editing.'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | return; |
165 | 165 | } |
166 | 166 | |
167 | - throw new MediaWikiApiException('Edit status unsuccessful: ' . $editResponse->result); |
|
167 | + throw new MediaWikiApiException('Edit status unsuccessful: '.$editResponse->result); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | public function getCreationFieldData(&$requiredFields, &$checkboxFields) |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $response = $this->mediaWikiClient->doApiCall($params, 'GET'); |
180 | 180 | |
181 | 181 | if (isset($response->error)) { |
182 | - throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info); |
|
182 | + throw new MediaWikiApiException($response->error->code.': '.$response->error->info); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | $requests = $response->query->authmanagerinfo->requests; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | else { |
136 | 136 | // This is the login form, not the request form. We need protection here. |
137 | - $this->redirectUrl('https://' . WebRequest::serverName() . WebRequest::requestUri()); |
|
137 | + $this->redirectUrl('https://'.WebRequest::serverName().WebRequest::requestUri()); |
|
138 | 138 | |
139 | 139 | return false; |
140 | 140 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | throw new ApplicationLogicException('Unknown page handler for next authentication stage.'); |
279 | 279 | } |
280 | 280 | |
281 | - $this->redirect("login/" . $this->nextPageMap[$nextStage]); |
|
281 | + $this->redirect("login/".$this->nextPageMap[$nextStage]); |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | private function setupAlternates(User $user, $partialStage, PdoDatabase $database) |
@@ -17,14 +17,14 @@ |
||
17 | 17 | { |
18 | 18 | list($partialId, $partialStage) = WebRequest::getAuthPartialLogin(); |
19 | 19 | |
20 | - if($partialId !== null && $partialStage > 1) { |
|
20 | + if ($partialId !== null && $partialStage > 1) { |
|
21 | 21 | $sql = 'SELECT type FROM credential WHERE user = :user AND factor = :stage AND disabled = 0 ORDER BY priority'; |
22 | 22 | $statement = $this->getDatabase()->prepare($sql); |
23 | 23 | $statement->execute(array(':user' => $partialId, ':stage' => $partialStage)); |
24 | 24 | $nextStage = $statement->fetchColumn(); |
25 | 25 | $statement->closeCursor(); |
26 | 26 | |
27 | - $this->redirect("login/" . $this->nextPageMap[$nextStage]); |
|
27 | + $this->redirect("login/".$this->nextPageMap[$nextStage]); |
|
28 | 28 | return; |
29 | 29 | } |
30 | 30 |
@@ -136,7 +136,7 @@ |
||
136 | 136 | |
137 | 137 | $data = array(); |
138 | 138 | foreach ($apiResponse as $key => $value) { |
139 | - $data[] = $key . "=" . $value; |
|
139 | + $data[] = $key."=".$value; |
|
140 | 140 | } |
141 | 141 | $dataString = implode('&', $data); |
142 | 142 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | parent::__construct($database, $configuration, 'u2f'); |
34 | 34 | |
35 | - $appId = 'https://' . WebRequest::httpHost(); |
|
35 | + $appId = 'https://'.WebRequest::httpHost(); |
|
36 | 36 | $this->u2f = new U2F($appId); |
37 | 37 | } |
38 | 38 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ':t' => $this->type |
56 | 56 | ); |
57 | 57 | |
58 | - if($disabled !== null) { |
|
58 | + if ($disabled !== null) { |
|
59 | 59 | $sql .= ' AND disabled = :d'; |
60 | 60 | $parameters[':d'] = $disabled ? 1 : 0; |
61 | 61 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $alternates = $statement->fetchColumn(); |
110 | 110 | $statement->closeCursor(); |
111 | 111 | |
112 | - if($alternates <= 1) { |
|
112 | + if ($alternates <= 1) { |
|
113 | 113 | // decrement the factor for every stage above this |
114 | 114 | $sql = 'UPDATE credential SET factor = factor - 1 WHERE user = :user AND factor > :factor'; |
115 | 115 | $statement = $this->database->prepare($sql); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $password = $this->getEncryptionKey(); |
34 | 34 | $encryptedKey = openssl_encrypt($secret, 'aes-256-ctr', $password, OPENSSL_RAW_DATA, $iv); |
35 | 35 | |
36 | - $data = base64_encode($iv) . '|' . base64_encode($encryptedKey); |
|
36 | + $data = base64_encode($iv).'|'.base64_encode($encryptedKey); |
|
37 | 37 | |
38 | 38 | return $data; |
39 | 39 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | $last = array_pop($list); |
18 | 18 | if ($list) { |
19 | - return implode(', ', $list) . ', ' . $conjunction . ' ' . $last; |
|
19 | + return implode(', ', $list).', '.$conjunction.' '.$last; |
|
20 | 20 | } |
21 | 21 | return $last; |
22 | 22 | } |
23 | 23 | \ No newline at end of file |