@@ -45,7 +45,7 @@ |
||
45 | 45 | $request = WebRequest::postString("request"); |
46 | 46 | |
47 | 47 | if ($authenticate === null || $authenticate === "" || $request === null || $request === "") { |
48 | - throw new ApplicationLogicException("No authentication specified"); |
|
48 | + throw new ApplicationLogicException("No authentication specified"); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return array(json_decode($authenticate), json_decode($request), 'u2f'); |
@@ -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 |
@@ -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; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $onWikiName = $strings->upperCaseFirst($onWikiName); |
184 | 184 | |
185 | 185 | $parameters = self::$apiQueryParameters; |
186 | - $parameters['pltitles'] = "User:" . $onWikiName; |
|
186 | + $parameters['pltitles'] = "User:".$onWikiName; |
|
187 | 187 | $parameters['titles'] = $this->siteConfiguration->getIdentificationNoticeboardPage(); |
188 | 188 | |
189 | 189 | try { |
@@ -200,6 +200,6 @@ discard block |
||
200 | 200 | |
201 | 201 | $page = @array_pop($response['query']['pages']); |
202 | 202 | |
203 | - return @$page['links'][0]['title'] === "User:" . $onWikiName; |
|
203 | + return @$page['links'][0]['title'] === "User:".$onWikiName; |
|
204 | 204 | } |
205 | 205 | } |
@@ -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 |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | { |
85 | 85 | $this->whereClause .= $whereClauseSection; |
86 | 86 | |
87 | - $countQuery = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin '; |
|
88 | - $countQuery .= $this->joinClause . $this->whereClause; |
|
87 | + $countQuery = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin '; |
|
88 | + $countQuery .= $this->joinClause.$this->whereClause; |
|
89 | 89 | |
90 | 90 | $query = $this->buildQuery(array('*')); |
91 | 91 | $query .= $this->applyOrder(); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | throw new ApplicationLogicException('Cannot apply distinct to column fetch already using group by'); |
148 | 148 | } |
149 | 149 | |
150 | - $this->groupByClause = ' GROUP BY origin.' . $column; |
|
150 | + $this->groupByClause = ' GROUP BY origin.'.$column; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | $statement = $this->getData(array($column)); |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function getRecordCount(&$count) |
178 | 178 | { |
179 | - $query = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin '; |
|
180 | - $query .= $this->joinClause . $this->whereClause; |
|
179 | + $query = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin '; |
|
180 | + $query .= $this->joinClause.$this->whereClause; |
|
181 | 181 | |
182 | 182 | $statement = $this->database->prepare($query); |
183 | 183 | $statement->execute($this->parameterList); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | private function applyOrder() |
225 | 225 | { |
226 | 226 | if ($this->orderBy !== null) { |
227 | - return ' ORDER BY ' . $this->orderBy; |
|
227 | + return ' ORDER BY '.$this->orderBy; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return ''; |
@@ -257,11 +257,11 @@ discard block |
||
257 | 257 | { |
258 | 258 | $colData = array(); |
259 | 259 | foreach ($columns as $c) { |
260 | - $colData[] = 'origin.' . $c; |
|
260 | + $colData[] = 'origin.'.$c; |
|
261 | 261 | } |
262 | 262 | |
263 | - $query = "SELECT {$this->modifiersClause} /* SearchHelper */ " . implode(', ', $colData) . ' FROM ' . $this->table . ' origin '; |
|
264 | - $query .= $this->joinClause . $this->whereClause . $this->groupByClause; |
|
263 | + $query = "SELECT {$this->modifiersClause} /* SearchHelper */ ".implode(', ', $colData).' FROM '.$this->table.' origin '; |
|
264 | + $query .= $this->joinClause.$this->whereClause.$this->groupByClause; |
|
265 | 265 | |
266 | 266 | return $query; |
267 | 267 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | // You can't use IN() with parameters directly, so let's munge something together. |
283 | 283 | // Let's create a string of question marks, which will do as positional parameters. |
284 | 284 | $valueCount = count($values); |
285 | - $inSection = str_repeat('?,', $valueCount - 1) . '?'; |
|
285 | + $inSection = str_repeat('?,', $valueCount - 1).'?'; |
|
286 | 286 | |
287 | 287 | $this->whereClause .= " AND {$column} IN ({$inSection})"; |
288 | 288 | $this->parameterList = array_merge($this->parameterList, $values); |
@@ -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 |