Completed
Push — newinternal-releasecandidate ( 06bb07...1c5b59 )
by Simon
06:04
created
config.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 $BUbasefile = "backup"; // The basefile's name.
134 134
 $BUdir = "/home/project/a/c/c/acc/backups"; // The directory where backups should be stored.
135
-$BUmonthdir = $BUdir . "/monthly"; // The directory where monthly backups should be stored.
135
+$BUmonthdir = $BUdir."/monthly"; // The directory where monthly backups should be stored.
136 136
 $BUdumper = "/opt/ts/mysql/5.1/bin/mysqldump --defaults-file=~/.my.cnf p_acc_live"; // Add parameters here if they are needed.
137 137
 $BUgzip = "/usr/bin/gzip"; // Add the gzip parameters here if needed.
138 138
 $BUtar = "/bin/tar -cvf"; // Add the tar parameters here if needed.
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 $curlDisableSSLVerifyPeer = false;
249 249
 
250 250
 // Change this to be outside the web directory.
251
-$curlCookieJar = __DIR__ . '/../cookies.txt';
251
+$curlCookieJar = __DIR__.'/../cookies.txt';
252 252
 
253 253
 $yubicoApiId = 0;
254 254
 $yubicoApiKey = "";
@@ -267,19 +267,19 @@  discard block
 block discarded – undo
267 267
 
268 268
 $cDatabaseConfig = array(
269 269
     "acc"           => array(
270
-        "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
270
+        "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database,
271 271
         "username" => $toolserver_username,
272 272
         "password" => $toolserver_password,
273 273
 		"options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
274 274
     ),
275 275
     "wikipedia"     => array(
276
-        "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
276
+        "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db,
277 277
         "username" => $toolserver_username,
278 278
         "password" => $toolserver_password,
279 279
         "options"  => array(),
280 280
     ),
281 281
     "notifications" => array(
282
-        "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
282
+        "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database,
283 283
         "username" => $notifications_username,
284 284
         "password" => $notifications_password,
285 285
         "options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
@@ -310,13 +310,13 @@  discard block
 block discarded – undo
310 310
 }
311 311
 
312 312
 // Set up the AutoLoader
313
-require_once(__DIR__ . "/includes/AutoLoader.php");
313
+require_once(__DIR__."/includes/AutoLoader.php");
314 314
 spl_autoload_register('Waca\\AutoLoader::load');
315
-require_once(__DIR__ . '/vendor/autoload.php');
315
+require_once(__DIR__.'/vendor/autoload.php');
316 316
 
317 317
 // Extra includes which are just plain awkward wherever they are.
318
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
319
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/JWT.php');
318
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
319
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/JWT.php');
320 320
 
321 321
 // Crap that's needed for libraries. >:(
322 322
 /**
Please login to merge, or discard this patch.
includes/Helpers/TypeAheadHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $dataList = '';
24 24
         foreach ($generator() as $dataItem) {
25
-            $dataList .= '"' . htmlentities($dataItem) . '", ';
25
+            $dataList .= '"'.htmlentities($dataItem).'", ';
26 26
         }
27
-        $dataList = "[" . rtrim($dataList, ", ") . "]";
27
+        $dataList = "[".rtrim($dataList, ", ")."]";
28 28
 
29 29
         $script = <<<JS
30 30
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         foreach ($this->definedClasses as $class => $js) {
57
-            $jsBlocks = $js . "\r\n\r\n";
57
+            $jsBlocks = $js."\r\n\r\n";
58 58
         }
59 59
 
60 60
         $data = <<<HTML
Please login to merge, or discard this patch.
includes/Tasks/XmlApiPageBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             $CORSallowed = $this->getSiteConfiguration()->getCrossOriginResourceSharingHosts();
70 70
 
71 71
             if (in_array($httpOrigin, $CORSallowed)) {
72
-                header("Access-Control-Allow-Origin: " . $httpOrigin);
72
+                header("Access-Control-Allow-Origin: ".$httpOrigin);
73 73
             }
74 74
         }
75 75
 
Please login to merge, or discard this patch.
includes/ConsoleTasks/RegenerateStylesheetsTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 
34 34
         foreach (['bootstrap-main', 'bootstrap-alt'] as $file) {
35 35
             file_put_contents(
36
-                self::RESOURCES_GENERATED . '/' . $file . '.css',
37
-                $scss->compile('/*! Do not edit this auto-generated file! */ @import "' . $file . '";'));
36
+                self::RESOURCES_GENERATED.'/'.$file.'.css',
37
+                $scss->compile('/*! Do not edit this auto-generated file! */ @import "'.$file.'";'));
38 38
         }
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/ScratchTokenCredentialProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@
 block discarded – undo
62 62
 
63 63
         $usedToken = null;
64 64
         foreach ($scratchTokens as $scratchToken) {
65
-            if (password_verify($data, $scratchToken)){
65
+            if (password_verify($data, $scratchToken)) {
66 66
                 $usedToken = $scratchToken;
67 67
                 SessionAlert::quick("Hey, it looks like you used a scratch token to log in. Would you like to change your multi-factor authentication configuration?", 'alert-warning');
68
-                WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl() . "/internal.php/multiFactor");
68
+                WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl()."/internal.php/multiFactor");
69 69
                 break;
70 70
             }
71 71
         }
72 72
 
73
-        if($usedToken === null) {
73
+        if ($usedToken === null) {
74 74
             return false;
75 75
         }
76 76
 
Please login to merge, or discard this patch.
includes/Pages/PageUserManagement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $userSearchRequest = WebRequest::getString('usersearch');
41 41
         if ($userSearchRequest !== null) {
42 42
             $searchedUser = User::getByUsername($userSearchRequest, $database);
43
-            if($searchedUser !== false) {
43
+            if ($searchedUser !== false) {
44 44
                 $this->redirect('statistics/users', 'detail', ['user' => $searchedUser->getId()]);
45 45
                 return;
46 46
             }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     continue;
135 135
                 }
136 136
 
137
-                $newValue = WebRequest::postBoolean('role-' . $name) ? 1 : 0;
137
+                $newValue = WebRequest::postBoolean('role-'.$name) ? 1 : 0;
138 138
                 if ($newValue !== $r['active']) {
139 139
                     if ($newValue === 0) {
140 140
                         $delete[] = $r['object'];
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $user->save();
178 178
 
179 179
             $this->getNotificationHelper()->userRolesEdited($user, $reason);
180
-            SessionAlert::quick('Roles changed for user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
180
+            SessionAlert::quick('Roles changed for user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
181 181
 
182 182
             $this->redirect('statistics/users', 'detail', array('user' => $user->getId()));
183 183
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             Logger::suspendedUser($database, $user, $reason);
231 231
 
232 232
             $this->getNotificationHelper()->userSuspended($user, $reason);
233
-            SessionAlert::quick('Suspended user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
233
+            SessionAlert::quick('Suspended user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
234 234
 
235 235
             // send email
236 236
             $this->sendStatusChangeEmail(
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             Logger::declinedUser($database, $user, $reason);
292 292
 
293 293
             $this->getNotificationHelper()->userDeclined($user, $reason);
294
-            SessionAlert::quick('Declined user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
294
+            SessionAlert::quick('Declined user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
295 295
 
296 296
             // send email
297 297
             $this->sendStatusChangeEmail(
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             Logger::approvedUser($database, $user);
347 347
 
348 348
             $this->getNotificationHelper()->userApproved($user);
349
-            SessionAlert::quick('Approved user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
349
+            SessionAlert::quick('Approved user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
350 350
 
351 351
             // send email
352 352
             $this->sendStatusChangeEmail(
Please login to merge, or discard this patch.
includes/Pages/PageXffDemo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
                 'ip' => '172.16.0.164',
37 37
                 'routable' => false,
38 38
 
39
-            ],[
39
+            ], [
40 40
                 'trust' => true,
41 41
                 'ip' => '198.51.100.123',
42 42
                 'routable' => true,
43 43
                 'rdns' => 'trustedproxy.example.com',
44 44
 
45
-            ],[
45
+            ], [
46 46
                 'trust' => true,
47 47
                 'ip' => '192.0.2.1',
48 48
                 'routable' => true,
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
                 'ip' => '172.16.0.164',
64 64
                 'routable' => false,
65 65
 
66
-            ],[
66
+            ], [
67 67
                 'trust' => false,
68 68
                 'ip' => '198.51.100.234',
69 69
                 'routable' => true,
70 70
                 'rdns' => 'sketchyproxy.example.com',
71 71
                 'showlinks' => true
72 72
 
73
-            ],[
73
+            ], [
74 74
                 'trust' => false,
75 75
                 'ip' => '192.0.2.1',
76 76
                 'routable' => true,
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
                 'ip' => '172.16.0.164',
92 92
                 'routable' => false,
93 93
 
94
-            ],[
94
+            ], [
95 95
                 'trust' => true,
96 96
                 'ip' => '198.51.100.123',
97 97
                 'routable' => true,
98 98
                 'rdns' => 'trustedproxy.example.com',
99
-            ],[
99
+            ], [
100 100
                 'trust' => false,
101 101
                 'ip' => '198.51.100.234',
102 102
                 'routable' => true,
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 'routable' => true,
110 110
                 'rdns' => 'trustedproxy2.example.com',
111 111
                 'showlinks' => true
112
-            ],[
112
+            ], [
113 113
                 'trust' => false,
114 114
                 'ip' => '192.0.2.1',
115 115
                 'routable' => true,
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PageForgotPassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
     {
153 153
         $user = User::getById($id, $database);
154 154
 
155
-        if ($user === false ||  $user->isCommunityUser()) {
155
+        if ($user === false || $user->isCommunityUser()) {
156 156
             throw new ApplicationLogicException("Password reset failed. Please try again.");
157 157
         }
158 158
 
Please login to merge, or discard this patch.
includes/Tasks/JsonApiPageBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             $CORSallowed = $this->getSiteConfiguration()->getCrossOriginResourceSharingHosts();
34 34
 
35 35
             if (in_array($httpOrigin, $CORSallowed)) {
36
-                header("Access-Control-Allow-Origin: " . $httpOrigin);
36
+                header("Access-Control-Allow-Origin: ".$httpOrigin);
37 37
             }
38 38
         }
39 39
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $targetVar = WebRequest::getString('targetVariable');
72 72
         if ($targetVar !== null && preg_match('/^[a-z]+$/', $targetVar)) {
73
-            $data = $targetVar . ' = ' . $data . ';';
73
+            $data = $targetVar.' = '.$data.';';
74 74
             header("Content-Type: text/javascript");
75 75
         } else {
76 76
             header("Content-Type: application/json");
Please login to merge, or discard this patch.