@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this->stopwatch->start($cacheKey, 'XTools'); |
| 79 | 79 | $api = $this->getMediawikiApi($project); |
| 80 | - $params = [ "list"=>"users", "ususers"=>$username, "usprop"=>"groups" ]; |
|
| 80 | + $params = ["list"=>"users", "ususers"=>$username, "usprop"=>"groups"]; |
|
| 81 | 81 | $query = new SimpleRequest('query', $params); |
| 82 | 82 | $result = []; |
| 83 | 83 | $res = $api->getRequest($query); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | // Create the API query. |
| 114 | 114 | $api = $this->getMediawikiApi($project); |
| 115 | - $params = [ "meta"=>"globaluserinfo", "guiuser"=>$username, "guiprop"=>"groups" ]; |
|
| 115 | + $params = ["meta"=>"globaluserinfo", "guiuser"=>$username, "guiprop"=>"groups"]; |
|
| 116 | 116 | $query = new SimpleRequest('query', $params); |
| 117 | 117 | |
| 118 | 118 | // Get the result. |
@@ -156,8 +156,8 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | $username = $user->getUsername(); |
| 158 | 158 | |
| 159 | - $cacheKey = 'pages.' . $project->getDatabaseName() . '.' |
|
| 160 | - . $user->getCacheKey() . '.' . $namespace . '.' . $redirects; |
|
| 159 | + $cacheKey = 'pages.'.$project->getDatabaseName().'.' |
|
| 160 | + . $user->getCacheKey().'.'.$namespace.'.'.$redirects; |
|
| 161 | 161 | if ($this->cache->hasItem($cacheKey)) { |
| 162 | 162 | return $this->cache->getItem($cacheKey)->get(); |
| 163 | 163 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | JOIN $revisionTable ON page_id = rev_page |
| 216 | 216 | $paJoin |
| 217 | 217 | WHERE $whereRev AND rev_parent_id = '0' $namespaceConditionRev $redirectCondition |
| 218 | - " . ($hasPageAssessments ? 'GROUP BY rev_page' : '') . " |
|
| 218 | + ".($hasPageAssessments ? 'GROUP BY rev_page' : '')." |
|
| 219 | 219 | ) |
| 220 | 220 | |
| 221 | 221 | UNION |
@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | $resultQuery->execute(); |
| 147 | 147 | $results = $resultQuery->fetchAll(); |
| 148 | 148 | $logCounts = array_combine( |
| 149 | - array_map(function ($e) { |
|
| 149 | + array_map(function($e) { |
|
| 150 | 150 | return $e['source']; |
| 151 | 151 | }, $results), |
| 152 | - array_map(function ($e) { |
|
| 152 | + array_map(function($e) { |
|
| 153 | 153 | return $e['value']; |
| 154 | 154 | }, $results) |
| 155 | 155 | ); |
@@ -366,9 +366,9 @@ discard block |
||
| 366 | 366 | $resultQuery->bindParam(":id", $userId); |
| 367 | 367 | $resultQuery->execute(); |
| 368 | 368 | $results = $resultQuery->fetchAll(); |
| 369 | - $namespaceTotals = array_combine(array_map(function ($e) { |
|
| 369 | + $namespaceTotals = array_combine(array_map(function($e) { |
|
| 370 | 370 | return $e['page_namespace']; |
| 371 | - }, $results), array_map(function ($e) { |
|
| 371 | + }, $results), array_map(function($e) { |
|
| 372 | 372 | return $e['total']; |
| 373 | 373 | }, $results)); |
| 374 | 374 | |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | } |
| 428 | 428 | $queries[] = $sql; |
| 429 | 429 | } |
| 430 | - $sql = "(\n" . join("\n) UNION (\n", $queries) . ")\n"; |
|
| 430 | + $sql = "(\n".join("\n) UNION (\n", $queries).")\n"; |
|
| 431 | 431 | $resultQuery = $this->getProjectsConnection()->prepare($sql); |
| 432 | 432 | $resultQuery->bindParam(":username", $username); |
| 433 | 433 | $resultQuery->execute(); |