@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $BUbasefile = "backup"; // The basefile's name. |
132 | 132 | $BUdir = "/home/project/a/c/c/acc/backups"; // The directory where backups should be stored. |
133 | -$BUmonthdir = $BUdir . "/monthly"; // The directory where monthly backups should be stored. |
|
133 | +$BUmonthdir = $BUdir."/monthly"; // The directory where monthly backups should be stored. |
|
134 | 134 | $BUdumper = "/opt/ts/mysql/5.1/bin/mysqldump --defaults-file=~/.my.cnf p_acc_live"; // Add parameters here if they are needed. |
135 | 135 | $BUgzip = "/usr/bin/gzip"; // Add the gzip parameters here if needed. |
136 | 136 | $BUtar = "/bin/tar -cvf"; // Add the tar parameters here if needed. |
@@ -253,17 +253,17 @@ discard block |
||
253 | 253 | |
254 | 254 | $cDatabaseConfig = array( |
255 | 255 | "acc" => array( |
256 | - "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
256 | + "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database, |
|
257 | 257 | "username" => $toolserver_username, |
258 | 258 | "password" => $toolserver_password, |
259 | 259 | ), |
260 | 260 | "wikipedia" => array( |
261 | - "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
261 | + "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db, |
|
262 | 262 | "username" => $toolserver_username, |
263 | 263 | "password" => $toolserver_password, |
264 | 264 | ), |
265 | 265 | "notifications" => array( |
266 | - "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
266 | + "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database, |
|
267 | 267 | "username" => $notifications_username, |
268 | 268 | "password" => $notifications_password, |
269 | 269 | ), |
@@ -293,13 +293,13 @@ discard block |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | // Set up the AutoLoader |
296 | -require_once(__DIR__ . "/includes/AutoLoader.php"); |
|
296 | +require_once(__DIR__."/includes/AutoLoader.php"); |
|
297 | 297 | spl_autoload_register('Waca\\AutoLoader::load'); |
298 | -require_once(__DIR__ . '/vendor/autoload.php'); |
|
298 | +require_once(__DIR__.'/vendor/autoload.php'); |
|
299 | 299 | |
300 | 300 | // Extra includes which are just plain awkward wherever they are. |
301 | -require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
302 | -require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
301 | +require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/OAuth.php'); |
|
302 | +require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/JWT.php'); |
|
303 | 303 | |
304 | 304 | // Crap that's needed for libraries. >:( |
305 | 305 | /** |
@@ -69,7 +69,7 @@ |
||
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 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function getNameSearchResults($searchTerm) |
88 | 88 | { |
89 | - $padded = '%' . $searchTerm . '%'; |
|
89 | + $padded = '%'.$searchTerm.'%'; |
|
90 | 90 | |
91 | 91 | return RequestSearchHelper::get($this->getDatabase()) |
92 | 92 | ->byName($padded) |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | throw new ApplicationLogicException('The search term "@" is not valid for email address searches!'); |
109 | 109 | } |
110 | 110 | |
111 | - $padded = '%' . $searchTerm . '%'; |
|
111 | + $padded = '%'.$searchTerm.'%'; |
|
112 | 112 | |
113 | 113 | return RequestSearchHelper::get($this->getDatabase()) |
114 | 114 | ->byEmailAddress($padded) |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | protected function main() |
21 | 21 | { |
22 | - $path = $this->getSiteConfiguration()->getFilePath() . '/team.json'; |
|
22 | + $path = $this->getSiteConfiguration()->getFilePath().'/team.json'; |
|
23 | 23 | $json = file_get_contents($path); |
24 | 24 | |
25 | 25 | $teamData = json_decode($json, true); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | $safeUsername = htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'); |
65 | - $this->setHtmlTitle($safeUsername . ' :: Users :: Statistics'); |
|
65 | + $this->setHtmlTitle($safeUsername.' :: Users :: Statistics'); |
|
66 | 66 | |
67 | 67 | $activitySummary = $database->prepare(<<<SQL |
68 | 68 | SELECT COALESCE(closes.mail_desc, log.action) AS action, COUNT(*) AS count |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | else { |
38 | 38 | // This is the login form, not the request form. We need protection here. |
39 | - $this->redirectUrl('https://' . WebRequest::serverName() . WebRequest::requestUri()); |
|
39 | + $this->redirectUrl('https://'.WebRequest::serverName().WebRequest::requestUri()); |
|
40 | 40 | |
41 | 41 | return; |
42 | 42 | } |
@@ -239,11 +239,11 @@ |
||
239 | 239 | |
240 | 240 | $emailSig = $currentUser->getEmailSig(); |
241 | 241 | if ($emailSig !== '' || $emailSig !== null) { |
242 | - $emailSig = "\n\n" . $emailSig; |
|
242 | + $emailSig = "\n\n".$emailSig; |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | $subject = "RE: [ACC #{$request->getId()}] English Wikipedia Account Request"; |
246 | - $content = $mailText . $emailSig; |
|
246 | + $content = $mailText.$emailSig; |
|
247 | 247 | |
248 | 248 | $helper->sendMail($request->getEmail(), $subject, $content, $headers); |
249 | 249 |
@@ -48,8 +48,8 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | //Look for and detect IPv4/IPv6 addresses in comment text, and warn the commenter. |
51 | - $ipv4Regex = '/\b' . RegexConstants::IPV4 . '\b/'; |
|
52 | - $ipv6Regex = '/\b' . RegexConstants::IPV6 . '\b/'; |
|
51 | + $ipv4Regex = '/\b'.RegexConstants::IPV4.'\b/'; |
|
52 | + $ipv6Regex = '/\b'.RegexConstants::IPV6.'\b/'; |
|
53 | 53 | |
54 | 54 | $overridePolicy = WebRequest::postBoolean('privpol-check-override'); |
55 | 55 |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | Logger::suspendedUser($database, $user, $reason); |
100 | 100 | |
101 | 101 | $this->getNotificationHelper()->userSuspended($user, $reason); |
102 | - SessionAlert::quick('Suspended user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
102 | + SessionAlert::quick('Suspended user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
103 | 103 | |
104 | 104 | // send email |
105 | 105 | $this->sendStatusChangeEmail( |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | Logger::declinedUser($database, $user, $reason); |
161 | 161 | |
162 | 162 | $this->getNotificationHelper()->userDeclined($user, $reason); |
163 | - SessionAlert::quick('Declined user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
163 | + SessionAlert::quick('Declined user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
164 | 164 | |
165 | 165 | // send email |
166 | 166 | $this->sendStatusChangeEmail( |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | Logger::demotedUser($database, $user, $reason); |
222 | 222 | |
223 | 223 | $this->getNotificationHelper()->userDemoted($user, $reason); |
224 | - SessionAlert::quick('Demoted user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
224 | + SessionAlert::quick('Demoted user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
225 | 225 | |
226 | 226 | // send email |
227 | 227 | $this->sendStatusChangeEmail( |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | Logger::approvedUser($database, $user); |
277 | 277 | |
278 | 278 | $this->getNotificationHelper()->userApproved($user); |
279 | - SessionAlert::quick('Approved user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
279 | + SessionAlert::quick('Approved user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
280 | 280 | |
281 | 281 | // send email |
282 | 282 | $this->sendStatusChangeEmail( |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | Logger::promotedUser($database, $user); |
332 | 332 | |
333 | 333 | $this->getNotificationHelper()->userPromoted($user); |
334 | - SessionAlert::quick('Promoted user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
334 | + SessionAlert::quick('Promoted user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')); |
|
335 | 335 | |
336 | 336 | // send email |
337 | 337 | $this->sendStatusChangeEmail( |