@@ -30,13 +30,13 @@ |
||
30 | 30 | public function authenticate(User $user, $data) |
31 | 31 | { |
32 | 32 | $storedData = $this->getCredentialData($user->getId()); |
33 | - if($storedData === null) |
|
33 | + if ($storedData === null) |
|
34 | 34 | { |
35 | 35 | // No available credential matching these parameters |
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | |
39 | - if($storedData->getVersion() !== 2) { |
|
39 | + if ($storedData->getVersion() !== 2) { |
|
40 | 40 | // Non-2 versions are not supported. |
41 | 41 | return false; |
42 | 42 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $curlDisableSSLVerifyPeer = false; |
242 | 242 | |
243 | 243 | // Change this to be outside the web directory. |
244 | -$curlCookieJar = __DIR__ . '/../cookies.txt'; |
|
244 | +$curlCookieJar = __DIR__.'/../cookies.txt'; |
|
245 | 245 | |
246 | 246 | $yubicoApiId = 0; |
247 | 247 | $yubicoApiKey = ""; |
@@ -260,19 +260,19 @@ discard block |
||
260 | 260 | |
261 | 261 | $cDatabaseConfig = array( |
262 | 262 | "acc" => array( |
263 | - "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
263 | + "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database, |
|
264 | 264 | "username" => $toolserver_username, |
265 | 265 | "password" => $toolserver_password, |
266 | 266 | "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
267 | 267 | ), |
268 | 268 | "wikipedia" => array( |
269 | - "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
269 | + "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db, |
|
270 | 270 | "username" => $toolserver_username, |
271 | 271 | "password" => $toolserver_password, |
272 | 272 | "options" => array(), |
273 | 273 | ), |
274 | 274 | "notifications" => array( |
275 | - "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
275 | + "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database, |
|
276 | 276 | "username" => $notifications_username, |
277 | 277 | "password" => $notifications_password, |
278 | 278 | "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
@@ -303,13 +303,13 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | // Set up the AutoLoader |
306 | -require_once(__DIR__ . "/includes/AutoLoader.php"); |
|
306 | +require_once(__DIR__."/includes/AutoLoader.php"); |
|
307 | 307 | spl_autoload_register('Waca\\AutoLoader::load'); |
308 | -require_once(__DIR__ . '/vendor/autoload.php'); |
|
308 | +require_once(__DIR__.'/vendor/autoload.php'); |
|
309 | 309 | |
310 | 310 | // Extra includes which are just plain awkward wherever they are. |
311 | -require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
312 | -require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
311 | +require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
312 | +require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
313 | 313 | |
314 | 314 | // Crap that's needed for libraries. >:( |
315 | 315 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | /** @var Request[] $results */ |
107 | 107 | $results = $search->getRecordCount($requestCount)->fetch(); |
108 | 108 | |
109 | - if($requestCount > 0) { |
|
109 | + if ($requestCount > 0) { |
|
110 | 110 | $requestSectionData['Hospital - Requests failed auto-creation'] = array( |
111 | 111 | 'requests' => $this->prepareRequestData($results), |
112 | 112 | 'total' => $requestCount, |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | /** @var Request[] $results */ |
141 | 141 | $results = $search->getRecordCount($requestCount)->fetch(); |
142 | 142 | |
143 | - if($requestCount > 0) { |
|
143 | + if ($requestCount > 0) { |
|
144 | 144 | $requestSectionData['Requests queued in the Job Queue'] = array( |
145 | 145 | 'requests' => $this->prepareRequestData($results), |
146 | 146 | 'total' => $requestCount, |
@@ -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 | } |
@@ -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 |