Completed
Push — newinternal ( 65a0f5...5b021c )
by Simon
08:29
created
includes/Tasks/PageBase.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             $targetScriptName = $currentScriptName;
220 220
         }
221 221
         else {
222
-            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl() . '/' . $script;
222
+            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl().'/'.$script;
223 223
         }
224 224
 
225 225
         $pathInfo = array($targetScriptName);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $url = implode('/', $pathInfo);
234 234
 
235 235
         if (is_array($parameters) && count($parameters) > 0) {
236
-            $url .= '?' . http_build_query($parameters);
236
+            $url .= '?'.http_build_query($parameters);
237 237
         }
238 238
 
239 239
         $this->redirectUrl($url);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      * @param string $path The path (relative to the application root) of the file
279 279
      */
280 280
     final protected function addCss($path) {
281
-        if(in_array($path, $this->extraCss)){
281
+        if (in_array($path, $this->extraCss)) {
282 282
             // nothing to do
283 283
             return;
284 284
         }
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
      *
292 292
      * @param string $path The path (relative to the application root) of the file
293 293
      */
294
-    final protected function addJs($path){
295
-        if(in_array($path, $this->extraJs)){
294
+    final protected function addJs($path) {
295
+        if (in_array($path, $this->extraJs)) {
296 296
             // nothing to do
297 297
             return;
298 298
         }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     protected function sendResponseHeaders()
346 346
     {
347 347
         if (headers_sent()) {
348
-            throw new ApplicationLogicException          ('Headers have already been sent! This is likely a bug in the application.');
348
+            throw new ApplicationLogicException('Headers have already been sent! This is likely a bug in the application.');
349 349
         }
350 350
 
351 351
         foreach ($this->headerQueue as $item) {
Please login to merge, or discard this patch.
includes/Security/SecurityManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
         }
208 208
     }
209 209
 
210
-    public function getRoleConfiguration(){
210
+    public function getRoleConfiguration() {
211 211
         return $this->roleConfiguration;
212 212
     }
213 213
 }
Please login to merge, or discard this patch.
includes/Exceptions/AccessDeniedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $this->assign('currentUser', $currentUser);
58 58
         $this->assign("loggedIn", (!$currentUser->isCommunityUser()));
59 59
 
60
-        if($this->securityManager !== null) {
60
+        if ($this->securityManager !== null) {
61 61
             $this->setupNavMenuAccess($currentUser);
62 62
         }
63 63
 
Please login to merge, or discard this patch.
includes/ConsoleTasks/MigrateToRoles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
             $this->dbObject->prepare("UPDATE user SET oauthidentitycache = NULL WHERE id = :id;")
903 903
                 ->execute(array(":id" => $this->id));
904 904
 
905
-            SessionAlert::warning("OAuth error getting identity from MediaWiki: " . $ex->getMessage());
905
+            SessionAlert::warning("OAuth error getting identity from MediaWiki: ".$ex->getMessage());
906 906
         }
907 907
     }
908 908
 
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
      */
986 986
     public function getForgottenPasswordHash()
987 987
     {
988
-        return md5($this->username . $this->email . $this->welcome_template . $this->id . $this->password);
988
+        return md5($this->username.$this->email.$this->welcome_template.$this->id.$this->password);
989 989
     }
990 990
 
991 991
     /**
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/UserSearchHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,14 +77,14 @@
 block discarded – undo
77 77
      *
78 78
      * @return $this
79 79
      */
80
-    public function lastActiveBefore(DateTime $instant){
80
+    public function lastActiveBefore(DateTime $instant) {
81 81
         $this->whereClause .= ' AND origin.lastactive < ?';
82 82
         $this->parameterList[] = $instant->format("Y-m-d H:i:s");
83 83
 
84 84
         return $this;
85 85
     }
86 86
 
87
-    public function getRoleMap(&$roleMap){
87
+    public function getRoleMap(&$roleMap) {
88 88
         $query = <<<SQL
89 89
             SELECT /* UserSearchHelper/roleMap */ 
90 90
                   r.user user
Please login to merge, or discard this patch.
includes/Helpers/IrcNotificationHelper.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $blacklist = array("DCC", "CCTP", "PRIVMSG");
90 90
         $message = str_replace($blacklist, "(IRC Blacklist)", $message); // Lets stop DCC etc
91 91
 
92
-        $msg = IrcColourCode::RESET . IrcColourCode::BOLD . "[$instanceName]" . IrcColourCode::RESET . ": $message";
92
+        $msg = IrcColourCode::RESET.IrcColourCode::BOLD."[$instanceName]".IrcColourCode::RESET.": $message";
93 93
 
94 94
         try {
95 95
             $notification = new Notification();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function userApproved(User $user)
129 129
     {
130
-        $this->send("{$user->getUsername()} approved by " . $this->currentUser->getUsername());
130
+        $this->send("{$user->getUsername()} approved by ".$this->currentUser->getUsername());
131 131
     }
132 132
 
133 133
     /**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function userPromoted(User $user)
139 139
     {
140
-        $this->send("{$user->getUsername()} promoted to tool admin by " . $this->currentUser->getUsername());
140
+        $this->send("{$user->getUsername()} promoted to tool admin by ".$this->currentUser->getUsername());
141 141
     }
142 142
 
143 143
     /**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function userDeclined(User $user, $reason)
150 150
     {
151
-        $this->send("{$user->getUsername()} declined by " . $this->currentUser->getUsername() . " ($reason)");
151
+        $this->send("{$user->getUsername()} declined by ".$this->currentUser->getUsername()." ($reason)");
152 152
     }
153 153
 
154 154
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function userDemoted(User $user, $reason)
161 161
     {
162
-        $this->send("{$user->getUsername()} demoted by " . $this->currentUser->getUsername() . " ($reason)");
162
+        $this->send("{$user->getUsername()} demoted by ".$this->currentUser->getUsername()." ($reason)");
163 163
     }
164 164
 
165 165
     /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function userSuspended(User $user, $reason)
172 172
     {
173
-        $this->send("{$user->getUsername()} suspended by " . $this->currentUser->getUsername() . " ($reason)");
173
+        $this->send("{$user->getUsername()} suspended by ".$this->currentUser->getUsername()." ($reason)");
174 174
     }
175 175
 
176 176
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function userPrefChange(User $user)
182 182
     {
183
-        $this->send("{$user->getUsername()}'s preferences were changed by " . $this->currentUser->getUsername());
183
+        $this->send("{$user->getUsername()}'s preferences were changed by ".$this->currentUser->getUsername());
184 184
     }
185 185
 
186 186
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function userRenamed(User $user, $old)
193 193
     {
194
-        $this->send($this->currentUser->getUsername() . " renamed $old to {$user->getUsername()}");
194
+        $this->send($this->currentUser->getUsername()." renamed $old to {$user->getUsername()}");
195 195
     }
196 196
 
197 197
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     public function userRolesEdited(User $user, $reason)
202 202
     {
203 203
         $currentUser = $this->currentUser->getUsername();
204
-        $this->send("Active roles for {$user->getUsername()} changed by " . $currentUser . " ($reason)");
204
+        $this->send("Active roles for {$user->getUsername()} changed by ".$currentUser." ($reason)");
205 205
     }
206 206
 
207 207
     #endregion
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function siteNoticeEdited()
215 215
     {
216
-        $this->send("Site notice edited by " . $this->currentUser->getUsername());
216
+        $this->send("Site notice edited by ".$this->currentUser->getUsername());
217 217
     }
218 218
     #endregion
219 219
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function welcomeTemplateCreated(WelcomeTemplate $template)
227 227
     {
228
-        $this->send("Welcome template {$template->getId()} created by " . $this->currentUser->getUsername());
228
+        $this->send("Welcome template {$template->getId()} created by ".$this->currentUser->getUsername());
229 229
     }
230 230
 
231 231
     /**
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function welcomeTemplateDeleted($templateid)
237 237
     {
238
-        $this->send("Welcome template {$templateid} deleted by " . $this->currentUser->getUsername());
238
+        $this->send("Welcome template {$templateid} deleted by ".$this->currentUser->getUsername());
239 239
     }
240 240
 
241 241
     /**
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     public function welcomeTemplateEdited(WelcomeTemplate $template)
247 247
     {
248
-        $this->send("Welcome template {$template->getId()} edited by " . $this->currentUser->getUsername());
248
+        $this->send("Welcome template {$template->getId()} edited by ".$this->currentUser->getUsername());
249 249
     }
250 250
 
251 251
     #endregion
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             $duration = "indefinitely";
263 263
         }
264 264
         else {
265
-            $duration = "until " . date("F j, Y, g:i a", $ban->getDuration());
265
+            $duration = "until ".date("F j, Y, g:i a", $ban->getDuration());
266 266
         }
267 267
 
268 268
         $username = $this->currentUser->getUsername();
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function unbanned(Ban $ban, $unbanreason)
280 280
     {
281
-        $this->send($ban->getTarget() . " unbanned by " . $this->currentUser
282
-                ->getUsername() . " (" . $unbanreason . ")");
281
+        $this->send($ban->getTarget()." unbanned by ".$this->currentUser
282
+                ->getUsername()." (".$unbanreason.")");
283 283
     }
284 284
 
285 285
     #endregion
@@ -294,15 +294,15 @@  discard block
 block discarded – undo
294 294
     public function requestReceived(Request $request)
295 295
     {
296 296
         $this->send(
297
-            IrcColourCode::DARK_GREY . "[["
298
-            . IrcColourCode::DARK_GREEN . "acc:"
299
-            . IrcColourCode::ORANGE . $request->getId()
300
-            . IrcColourCode::DARK_GREY . "]]"
301
-            . IrcColourCode::RED . " N "
302
-            . IrcColourCode::DARK_BLUE . $this->baseUrl . "/internal.php/viewRequest?id={$request->getId()} "
303
-            . IrcColourCode::DARK_RED . "* "
304
-            . IrcColourCode::DARK_GREEN . $request->getName()
305
-            . IrcColourCode::DARK_RED . " * "
297
+            IrcColourCode::DARK_GREY."[["
298
+            . IrcColourCode::DARK_GREEN."acc:"
299
+            . IrcColourCode::ORANGE.$request->getId()
300
+            . IrcColourCode::DARK_GREY."]]"
301
+            . IrcColourCode::RED." N "
302
+            . IrcColourCode::DARK_BLUE.$this->baseUrl."/internal.php/viewRequest?id={$request->getId()} "
303
+            . IrcColourCode::DARK_RED."* "
304
+            . IrcColourCode::DARK_GREEN.$request->getName()
305
+            . IrcColourCode::DARK_RED." * "
306 306
             . IrcColourCode::RESET
307 307
         );
308 308
     }
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
     public function emailCreated(EmailTemplate $template)
464 464
     {
465 465
         $username = $this->currentUser->getUsername();
466
-        $this->send("Email {$template->getId()} ({$template->getName()}) created by " . $username);
466
+        $this->send("Email {$template->getId()} ({$template->getName()}) created by ".$username);
467 467
     }
468 468
 
469 469
     /**
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
     public function emailEdited(EmailTemplate $template)
475 475
     {
476 476
         $username = $this->currentUser->getUsername();
477
-        $this->send("Email {$template->getId()} ({$template->getName()}) edited by " . $username);
477
+        $this->send("Email {$template->getId()} ({$template->getName()}) edited by ".$username);
478 478
     }
479 479
     #endregion
480 480
 }
Please login to merge, or discard this patch.
includes/Pages/PageUserManagement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                     continue;
120 120
                 }
121 121
 
122
-                $newValue = WebRequest::postBoolean('role-' . $name) ? 1 : 0;
122
+                $newValue = WebRequest::postBoolean('role-'.$name) ? 1 : 0;
123 123
                 if ($newValue !== $r['active']) {
124 124
                     if ($newValue === 0) {
125 125
                         $delete[] = $r['object'];
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $user->save();
163 163
 
164 164
             $this->getNotificationHelper()->userRolesEdited($user, $reason);
165
-            SessionAlert::quick('Roles changed for user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
165
+            SessionAlert::quick('Roles changed for user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
166 166
 
167 167
             $this->redirect('statistics/users', 'detail', array('user' => $user->getId()));
168 168
             return;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             Logger::suspendedUser($database, $user, $reason);
215 215
 
216 216
             $this->getNotificationHelper()->userSuspended($user, $reason);
217
-            SessionAlert::quick('Suspended user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
217
+            SessionAlert::quick('Suspended user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
218 218
 
219 219
             // send email
220 220
             $this->sendStatusChangeEmail(
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             Logger::declinedUser($database, $user, $reason);
276 276
 
277 277
             $this->getNotificationHelper()->userDeclined($user, $reason);
278
-            SessionAlert::quick('Declined user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
278
+            SessionAlert::quick('Declined user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
279 279
 
280 280
             // send email
281 281
             $this->sendStatusChangeEmail(
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             Logger::approvedUser($database, $user);
331 331
 
332 332
             $this->getNotificationHelper()->userApproved($user);
333
-            SessionAlert::quick('Approved user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
333
+            SessionAlert::quick('Approved user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
334 334
 
335 335
             // send email
336 336
             $this->sendStatusChangeEmail(
Please login to merge, or discard this patch.
includes/Pages/PageSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     private function getNameSearchResults($searchTerm)
93 93
     {
94
-        $padded = '%' . $searchTerm . '%';
94
+        $padded = '%'.$searchTerm.'%';
95 95
 
96 96
         /** @var Request[] $requests */
97 97
         $requests = RequestSearchHelper::get($this->getDatabase())
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             throw new ApplicationLogicException('The search term "@" is not valid for email address searches!');
117 117
         }
118 118
 
119
-        $padded = '%' . $searchTerm . '%';
119
+        $padded = '%'.$searchTerm.'%';
120 120
 
121 121
         /** @var Request[] $requests */
122 122
         $requests = RequestSearchHelper::get($this->getDatabase())
Please login to merge, or discard this patch.