@@ -207,7 +207,8 @@ |
||
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - public function getRoleConfiguration(){ |
|
| 210 | + public function getRoleConfiguration() |
|
| 211 | + { |
|
| 211 | 212 | return $this->roleConfiguration; |
| 212 | 213 | } |
| 213 | 214 | } |
@@ -29,11 +29,11 @@ discard block |
||
| 29 | 29 | foreach ($users as $user) { |
| 30 | 30 | $toAdd = array('user'); |
| 31 | 31 | |
| 32 | - if($user['status'] === 'Admin'){ |
|
| 32 | + if($user['status'] === 'Admin') { |
|
| 33 | 33 | $toAdd[] = 'admin'; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if($user['checkuser'] == 1){ |
|
| 36 | + if($user['checkuser'] == 1) { |
|
| 37 | 37 | $toAdd[] = 'checkuser'; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $log->setComment($logData); |
| 61 | 61 | $log->save(); |
| 62 | 62 | |
| 63 | - if($user['status'] === 'Admin' || $user['status'] === 'User'){ |
|
| 63 | + if($user['status'] === 'Admin' || $user['status'] === 'User') { |
|
| 64 | 64 | $update->execute(array('id' => $user['id'])); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | |
| 143 | 143 | $loginResponse = $this->callApi($params, 'POST'); |
| 144 | 144 | |
| 145 | - if($loginResponse->login->result == 'Success'){ |
|
| 145 | + if($loginResponse->login->result == 'Success') { |
|
| 146 | 146 | return; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -241,7 +241,8 @@ |
||
| 241 | 241 | * @param string $username |
| 242 | 242 | * @return bool |
| 243 | 243 | */ |
| 244 | - public function checkAccountExists($username) { |
|
| 244 | + public function checkAccountExists($username) |
|
| 245 | + { |
|
| 245 | 246 | $parameters = array( |
| 246 | 247 | 'action' => 'query', |
| 247 | 248 | 'list' => 'users', |
@@ -23,7 +23,8 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return JobQueueSearchHelper |
| 25 | 25 | */ |
| 26 | - public static function get(PdoDatabase $database) { |
|
| 26 | + public static function get(PdoDatabase $database) |
|
| 27 | + { |
|
| 27 | 28 | $helper = new JobQueueSearchHelper($database); |
| 28 | 29 | return $helper; |
| 29 | 30 | } |
@@ -33,7 +34,8 @@ discard block |
||
| 33 | 34 | * |
| 34 | 35 | * @return $this |
| 35 | 36 | */ |
| 36 | - public function statusIn($statuses) { |
|
| 37 | + public function statusIn($statuses) |
|
| 38 | + { |
|
| 37 | 39 | $this->inClause('status', $statuses); |
| 38 | 40 | |
| 39 | 41 | return $this; |
@@ -42,27 +44,31 @@ discard block |
||
| 42 | 44 | /** |
| 43 | 45 | * @return $this |
| 44 | 46 | */ |
| 45 | - public function notAcknowledged() { |
|
| 47 | + public function notAcknowledged() |
|
| 48 | + { |
|
| 46 | 49 | $this->whereClause .= ' AND (acknowledged IS NULL OR acknowledged = 0)'; |
| 47 | 50 | |
| 48 | 51 | return $this; |
| 49 | 52 | } |
| 50 | 53 | |
| 51 | - public function byTask($task) { |
|
| 54 | + public function byTask($task) |
|
| 55 | + { |
|
| 52 | 56 | $this->whereClause .= ' AND task = ?'; |
| 53 | 57 | $this->parameterList[] = $task; |
| 54 | 58 | |
| 55 | 59 | return $this; |
| 56 | 60 | } |
| 57 | 61 | |
| 58 | - public function byUser($userId) { |
|
| 62 | + public function byUser($userId) |
|
| 63 | + { |
|
| 59 | 64 | $this->whereClause .= ' AND user = ?'; |
| 60 | 65 | $this->parameterList[] = $userId; |
| 61 | 66 | |
| 62 | 67 | return $this; |
| 63 | 68 | } |
| 64 | 69 | |
| 65 | - public function byStatus($status) { |
|
| 70 | + public function byStatus($status) |
|
| 71 | + { |
|
| 66 | 72 | $this->whereClause .= ' AND status = ?'; |
| 67 | 73 | $this->parameterList[] = $status; |
| 68 | 74 | |
@@ -323,9 +323,10 @@ |
||
| 323 | 323 | $taskDescriptions = JobQueue::getTaskDescriptions(); |
| 324 | 324 | |
| 325 | 325 | $task = $job->getTask(); |
| 326 | - if(isset($taskDescriptions[$task])){ |
|
| 326 | + if(isset($taskDescriptions[$task])) { |
|
| 327 | 327 | $description = $taskDescriptions[$task]; |
| 328 | - } else { |
|
| 328 | + } |
|
| 329 | + else { |
|
| 329 | 330 | $description = 'Unknown task'; |
| 330 | 331 | } |
| 331 | 332 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | return; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if (!$mediaWikiHelper->checkAccountExists($request->getName())){ |
|
| 64 | + if (!$mediaWikiHelper->checkAccountExists($request->getName())) { |
|
| 65 | 65 | $this->markFailed('Account does not exist!'); |
| 66 | 66 | |
| 67 | 67 | return; |
@@ -82,7 +82,8 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | protected abstract function getMediaWikiClient(); |
| 84 | 84 | |
| 85 | - protected function getMediaWikiHelper(){ |
|
| 85 | + protected function getMediaWikiHelper() |
|
| 86 | + { |
|
| 86 | 87 | if($this->mwHelper === null) { |
| 87 | 88 | $this->mwHelper = new MediaWikiHelper($this->getMediaWikiClient(), $this->getSiteConfiguration()); |
| 88 | 89 | } |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | throw new ApplicationLogicException('Cannot locate request'); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if($this->job->getEmailTemplate() !== null){ |
|
| 180 | + if($this->job->getEmailTemplate() !== null) { |
|
| 181 | 181 | $this->emailTemplate = EmailTemplate::getById($this->job->getEmailTemplate(), $this->getDatabase()); |
| 182 | 182 | |
| 183 | 183 | if ($this->emailTemplate === false) { |