@@ -52,8 +52,7 @@ |
||
| 52 | 52 | SessionAlert::success('Password changed successfully!'); |
| 53 | 53 | |
| 54 | 54 | $this->redirect('preferences'); |
| 55 | - } |
|
| 56 | - else { |
|
| 55 | + } else { |
|
| 57 | 56 | $this->assignCSRFToken(); |
| 58 | 57 | $this->setTemplate('preferences/changePassword.tpl'); |
| 59 | 58 | $this->addJs("/vendor/dropbox/zxcvbn/dist/zxcvbn.js"); |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | SessionAlert::success('<strong>Your password reset request has been completed.</strong> If the details you have provided match our records, you should receive an email shortly.'); |
| 47 | 47 | |
| 48 | 48 | $this->redirect('login'); |
| 49 | - } |
|
| 50 | - else { |
|
| 49 | + } else { |
|
| 51 | 50 | $this->assignCSRFToken(); |
| 52 | 51 | $this->setTemplate('forgot-password/forgotpw.tpl'); |
| 53 | 52 | } |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | |
| 131 | 130 | return; |
| 132 | 131 | } |
| 133 | - } |
|
| 134 | - else { |
|
| 132 | + } else { |
|
| 135 | 133 | $this->assignCSRFToken(); |
| 136 | 134 | $this->assign('user', $user); |
| 137 | 135 | $this->setTemplate('forgot-password/forgotpwreset.tpl'); |
@@ -116,7 +116,8 @@ discard block |
||
| 116 | 116 | $job->setDatabase($database); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - $this->getTypeAheadHelper()->defineTypeAheadSource('username-typeahead', function() use ($database) { |
|
| 119 | + $this->getTypeAheadHelper()->defineTypeAheadSource('username-typeahead', function() use ($database) |
|
| 120 | + { |
|
| 120 | 121 | return UserSearchHelper::get($database)->fetchColumn('username'); |
| 121 | 122 | }); |
| 122 | 123 | |
@@ -158,8 +159,7 @@ discard block |
||
| 158 | 159 | ->byObjectId($job->getId())->getRecordCount($logCount)->fetch(); |
| 159 | 160 | if ($logCount === 0) { |
| 160 | 161 | $this->assign('log', array()); |
| 161 | - } |
|
| 162 | - else { |
|
| 162 | + } else { |
|
| 163 | 163 | list($users, $logData) = LogHelper::prepareLogsForTemplate($logs, $database, $this->getSiteConfiguration()); |
| 164 | 164 | |
| 165 | 165 | $this->assign("log", $logData); |
@@ -38,7 +38,8 @@ |
||
| 38 | 38 | $requestList->requests = $requests; |
| 39 | 39 | |
| 40 | 40 | $userIds = array_map( |
| 41 | - function(Request $entry) { |
|
| 41 | + function(Request $entry) |
|
| 42 | + { |
|
| 42 | 43 | return $entry->getReserved(); |
| 43 | 44 | }, |
| 44 | 45 | $requests |
@@ -260,8 +260,7 @@ |
||
| 260 | 260 | |
| 261 | 261 | $comment->setComment("This request would have been deferred automatically due to a matching rule, but the queue to defer to could not be found."); |
| 262 | 262 | $comment->save(); |
| 263 | - } |
|
| 264 | - else { |
|
| 263 | + } else { |
|
| 265 | 264 | $this->deferRequest($request, $targetQueue, 'Request deferred automatically due to matching rule.'); |
| 266 | 265 | } |
| 267 | 266 | } |
@@ -82,8 +82,7 @@ |
||
| 82 | 82 | |
| 83 | 83 | if ($siteConfiguration->getTitleBlacklistEnabled()) { |
| 84 | 84 | $page->setBlacklistHelper(new BlacklistHelper($page->getHttpHelper(), $database, $siteConfiguration)); |
| 85 | - } |
|
| 86 | - else { |
|
| 85 | + } else { |
|
| 87 | 86 | $page->setBlacklistHelper(new FakeBlacklistHelper()); |
| 88 | 87 | } |
| 89 | 88 | |
@@ -166,8 +166,7 @@ discard block |
||
| 166 | 166 | SessionAlert::success("Template successfully created."); |
| 167 | 167 | |
| 168 | 168 | $this->redirect('welcomeTemplates'); |
| 169 | - } |
|
| 170 | - else { |
|
| 169 | + } else { |
|
| 171 | 170 | $this->assignCSRFToken(); |
| 172 | 171 | $this->assign('template', new WelcomeTemplate()); |
| 173 | 172 | $this->setTemplate("welcome-template/edit.tpl"); |
@@ -216,8 +215,7 @@ discard block |
||
| 216 | 215 | $this->getNotificationHelper()->welcomeTemplateEdited($template); |
| 217 | 216 | |
| 218 | 217 | $this->redirect('welcomeTemplates'); |
| 219 | - } |
|
| 220 | - else { |
|
| 218 | + } else { |
|
| 221 | 219 | $this->assignCSRFToken(); |
| 222 | 220 | $this->assign('template', $template); |
| 223 | 221 | $this->setTemplate('welcome-template/edit.tpl'); |
@@ -30,11 +30,13 @@ |
||
| 30 | 30 | $files = scandir($errorLogDirectory); |
| 31 | 31 | |
| 32 | 32 | // Exclude the files we know should be there |
| 33 | - $filteredFiles = array_filter($files, function($file) { |
|
| 33 | + $filteredFiles = array_filter($files, function($file) |
|
| 34 | + { |
|
| 34 | 35 | return !in_array($file, ['.', '..', 'README.md']); |
| 35 | 36 | }); |
| 36 | 37 | |
| 37 | - $exceptionDetails = array_map(function($item) use ($errorLogDirectory) { |
|
| 38 | + $exceptionDetails = array_map(function($item) use ($errorLogDirectory) |
|
| 39 | + { |
|
| 38 | 40 | $filename = realpath($errorLogDirectory) . DIRECTORY_SEPARATOR . $item; |
| 39 | 41 | |
| 40 | 42 | return [ |
@@ -187,7 +187,8 @@ |
||
| 187 | 187 | |
| 188 | 188 | // FIXME: domains! |
| 189 | 189 | $requestQueues = RequestQueue::getAllQueues($database); |
| 190 | - $queuesById = array_reduce($requestQueues, function($result, RequestQueue $item) { |
|
| 190 | + $queuesById = array_reduce($requestQueues, function($result, RequestQueue $item) |
|
| 191 | + { |
|
| 191 | 192 | $result[$item->getId()] = $item; |
| 192 | 193 | return $result; |
| 193 | 194 | }, array()); |