Passed
Pull Request — master (#526)
by Michael
06:45
created
PrecacheGeolocation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
         $database->commit();
64 64
         echo ". Committed txn.\n";
65 65
     } catch (Exception $ex) {
66
-        echo ". Encountered exception: " . $ex->getMessage(). "\n";
66
+        echo ". Encountered exception: ".$ex->getMessage()."\n";
67 67
         $database->rollBack();
68 68
         echo ". Rolled back txn\n";
69 69
         throw $ex;
70 70
     } finally {
71
-        if($database->hasActiveTransaction()){
71
+        if ($database->hasActiveTransaction()) {
72 72
             $database->rollBack();
73 73
             echo ". Rolled back txn\n";
74 74
         }
Please login to merge, or discard this patch.
includes/DataObjects/GeoLocation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	public static function getByAddress($address, PdoDatabase $database, $forUpdate = false)
21 21
 	{
22 22
 		$lockMode = $forUpdate ? ' FOR UPDATE' : '';
23
-		$sql = "SELECT * FROM geolocation WHERE address = :id LIMIT 1" . $lockMode;
23
+		$sql = "SELECT * FROM geolocation WHERE address = :id LIMIT 1".$lockMode;
24 24
 
25 25
 		$statement = $database->prepare($sql);
26 26
 		$statement->bindValue(":id", $address);
Please login to merge, or discard this patch.
users.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	$user->approve();
107 107
 
108 108
 	BootstrapSkin::displayAlertBox(
109
-		"Approved user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
109
+		"Approved user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
110 110
 		"alert-info", 
111 111
 		"", 
112 112
 		false);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 	$headers = 'From: [email protected]';
117 117
 	// TODO: move to template?
118
-	mail($user->getEmail(), "ACC Account Approved", "Dear " . $user->getOnWikiName() . ",\nYour account " . $user->getUsername() . " has been approved by " . User::getCurrent()->getUsername() . ". To login please go to $baseurl/acc.php.\nPlease note that if you cannot login immediately, we may be updating your identification information in the system.  Please let us know if you continue to have issues if you cannot login after 12 hours pass from the time you receive this approval.\n- The English Wikipedia Account Creation Team", $headers);
118
+	mail($user->getEmail(), "ACC Account Approved", "Dear ".$user->getOnWikiName().",\nYour account ".$user->getUsername()." has been approved by ".User::getCurrent()->getUsername().". To login please go to $baseurl/acc.php.\nPlease note that if you cannot login immediately, we may be updating your identification information in the system.  Please let us know if you continue to have issues if you cannot login after 12 hours pass from the time you receive this approval.\n- The English Wikipedia Account Creation Team", $headers);
119 119
 	BootstrapSkin::displayInternalFooter();
120 120
 	die();
121 121
 }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		$user->demote($_POST['reason']);
160 160
 
161 161
 		BootstrapSkin::displayAlertBox( 
162
-			"Changed " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8') . "'s access to 'User'", 
162
+			"Changed ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')."'s access to 'User'", 
163 163
 			"alert-info", 
164 164
 			"", 
165 165
 			false);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		$headers = 'From: [email protected]';
170 170
         
171 171
 		// TODO: move to template?
172
-		mail($user->getEmail(), "ACC Account Demoted", "Dear " . $user->getOnWikiName() . ",\nYour account " . $user->getUsername() . " has been demoted by " . User::getCurrent()->getUsername() . " because " . User::getCurrent()->getUsername() . ". To contest this demotion please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
172
+		mail($user->getEmail(), "ACC Account Demoted", "Dear ".$user->getOnWikiName().",\nYour account ".$user->getUsername()." has been demoted by ".User::getCurrent()->getUsername()." because ".User::getCurrent()->getUsername().". To contest this demotion please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
173 173
 		BootstrapSkin::displayInternalFooter();
174 174
 		die();
175 175
 	}
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
 		Notification::userSuspended($user, $_POST['reason']);
215 215
 		BootstrapSkin::displayAlertBox(
216
-			"Suspended user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
216
+			"Suspended user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
217 217
 			"alert-info", 
218 218
 			"", 
219 219
 			false);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 		$headers = 'From: [email protected]';
222 222
         
223 223
 		// TODO: move to template?
224
-		mail($user->getEmail(), "ACC Account Suspended", "Dear " . $user->getOnWikiName() . ",\nYour account " . $user->getUsername() . " has been suspended by " . User::getCurrent()->getUsername() . " because " . $_POST['reason'] . ". To contest this suspension please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
224
+		mail($user->getEmail(), "ACC Account Suspended", "Dear ".$user->getOnWikiName().",\nYour account ".$user->getUsername()." has been suspended by ".User::getCurrent()->getUsername()." because ".$_POST['reason'].". To contest this suspension please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
225 225
 		BootstrapSkin::displayInternalFooter();
226 226
 		die();
227 227
 	}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	Notification::userPromoted($user);
258 258
 
259 259
 	BootstrapSkin::displayAlertBox(
260
-		htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8') . " promoted to 'Admin'", 
260
+		htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')." promoted to 'Admin'", 
261 261
 		"alert-info", 
262 262
 		"", 
263 263
 		false);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	$headers = 'From: [email protected]';
266 266
     
267 267
 	// TODO: move to template?
268
-	mail($user->getEmail(), "ACC Account Promoted", "Dear " . $user->getOnWikiName() . ",\nYour account " . $user->getUsername() . " has been promted to admin status by " . User::getCurrent()->getUsername() . ".\n- The English Wikipedia Account Creation Team", $headers);
268
+	mail($user->getEmail(), "ACC Account Promoted", "Dear ".$user->getOnWikiName().",\nYour account ".$user->getUsername()." has been promted to admin status by ".User::getCurrent()->getUsername().".\n- The English Wikipedia Account Creation Team", $headers);
269 269
 	die();
270 270
 }
271 271
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		Notification::userDeclined($user, $_POST['reason']);
309 309
 
310 310
 		BootstrapSkin::displayAlertBox(
311
-			"Declined user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
311
+			"Declined user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
312 312
 			"alert-info", 
313 313
 			"", 
314 314
 			false);
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		$headers = 'From: [email protected]';
317 317
         
318 318
 		// TODO: move to template?
319
-		mail($user->getEmail(), "ACC Account Declined", "Dear " . $user->getOnWikiName() . ",\nYour account " . $user->getUsername() . " has been declined access to the account creation tool by " . User::getCurrent()->getUsername() . " because " . $_POST['reason'] . ". For more infomation please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
319
+		mail($user->getEmail(), "ACC Account Declined", "Dear ".$user->getOnWikiName().",\nYour account ".$user->getUsername()." has been declined access to the account creation tool by ".User::getCurrent()->getUsername()." because ".$_POST['reason'].". For more infomation please email [email protected].\n- The English Wikipedia Account Creation Team", $headers);
320 320
 		BootstrapSkin::displayInternalFooter();
321 321
 		die();
322 322
 	}
Please login to merge, or discard this patch.
acc.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 	$user = User::getByUsername($_POST['username'], gGetDb());
350 350
     
351 351
 	if ($user == false || !$user->authenticate($_POST['password'])) {
352
-		header("Location: $baseurl/acc.php?error=authfail&tplUsername=" . urlencode($_POST['username']));
352
+		header("Location: $baseurl/acc.php?error=authfail&tplUsername=".urlencode($_POST['username']));
353 353
 		die();
354 354
 	}
355 355
     
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 				Logger::unbanned($database, $ban, $_POST['unbanreason']);
903 903
 			});
904 904
         
905
-			BootstrapSkin::displayAlertBox("Unbanned " . $ban->getTarget(), "alert-info", "", false, false);
905
+			BootstrapSkin::displayAlertBox("Unbanned ".$ban->getTarget(), "alert-info", "", false, false);
906 906
 			BootstrapSkin::displayInternalFooter();
907 907
 			Notification::unbanned($ban, $_POST['unbanreason']);
908 908
 			die();
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
         
1035 1035
 		if ($request->getStatus() == $_GET['target']) {
1036 1036
 			SessionAlert::error(
1037
-				"Cannot set status, target already deferred to " . htmlentities($_GET['target']), 
1037
+				"Cannot set status, target already deferred to ".htmlentities($_GET['target']), 
1038 1038
 				"Error");
1039 1039
 			header("Location: acc.php?action=zoom&id={$request->getId()}");
1040 1040
 			die();
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
 	if ($request->getEmailSent() == "1" && !isset($_GET['override']) && $gem != 0) {
1151 1151
 		$alertContent = "<p>This request has already been closed in a manner that has generated an e-mail to the user, Proceed?</p><br />";
1152 1152
 		$alertContent .= "<div class=\"row-fluid\">";
1153
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?sum=" . $_GET['sum'] . "&amp;action=done&amp;id=" . $_GET['id'] . "&amp;override=yes&amp;email=" . $_GET['email'] . "\">Yes</a>";
1153
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?sum=".$_GET['sum']."&amp;action=done&amp;id=".$_GET['id']."&amp;override=yes&amp;email=".$_GET['email']."\">Yes</a>";
1154 1154
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1155 1155
 		$alertContent .= "</div>";
1156 1156
         
@@ -1161,9 +1161,9 @@  discard block
 block discarded – undo
1161 1161
 	
1162 1162
 	// check the request is not reserved by someone else
1163 1163
 	if ($request->getReserved() != 0 && !isset($_GET['reserveoverride']) && $request->getReserved() != User::getCurrent()->getId()) {
1164
-		$alertContent = "<p>This request is currently marked as being handled by " . $request->getReservedObject()->getUsername() . ", Proceed?</p><br />";
1164
+		$alertContent = "<p>This request is currently marked as being handled by ".$request->getReservedObject()->getUsername().", Proceed?</p><br />";
1165 1165
 		$alertContent .= "<div class=\"row-fluid\">";
1166
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&reserveoverride=yes\">Yes</a>";
1166
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&reserveoverride=yes\">Yes</a>";
1167 1167
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1168 1168
 		$alertContent .= "</div>";
1169 1169
         
@@ -1179,7 +1179,7 @@  discard block
 block discarded – undo
1179 1179
 	}
1180 1180
 	
1181 1181
 	// Checks whether the username is already in use on Wikipedia.
1182
-	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=" . urlencode($request->getName()) . "&format=php");
1182
+	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=".urlencode($request->getName())."&format=php");
1183 1183
 	$ue = unserialize($userexist);
1184 1184
 	if (!isset ($ue['query']['users']['0']['missing'])) {
1185 1185
 		$exists = true;
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
 	if ($isForCreated && !$exists && !isset($_GET['createoverride'])) {
1201 1201
 		$alertContent = "<p>You have chosen to mark this request as \"created\", but the account does not exist on the English Wikipedia, proceed?</p><br />";
1202 1202
 		$alertContent .= "<div class=\"row-fluid\">";
1203
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&amp;createoverride=yes\">Yes</a>";
1203
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&amp;createoverride=yes\">Yes</a>";
1204 1204
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1205 1205
 		$alertContent .= "</div>";
1206 1206
         
@@ -1245,26 +1245,26 @@  discard block
 block discarded – undo
1245 1245
 			die();
1246 1246
 		}
1247 1247
 
1248
-		$headers = 'From: [email protected]' . "\r\n";
1248
+		$headers = 'From: [email protected]'."\r\n";
1249 1249
 
1250 1250
 		// CC mailing list option
1251 1251
 		if (User::getCurrent()->isAdmin() || User::getCurrent()->isCheckuser()) {
1252 1252
 			// these people get the choice
1253 1253
 			if (isset($_POST['ccmailist']) && $_POST['ccmailist'] == "on") {
1254
-				$headers .= 'Cc: [email protected]' . "\r\n";
1254
+				$headers .= 'Cc: [email protected]'."\r\n";
1255 1255
 			}
1256 1256
 		} else {
1257 1257
 			// these people do not.
1258
-			$headers .= 'Cc: [email protected]' . "\r\n";
1258
+			$headers .= 'Cc: [email protected]'."\r\n";
1259 1259
 		}
1260 1260
 
1261
-		$headers .= 'X-ACC-Request: ' . $request->getId() . "\r\n";
1262
-		$headers .= 'X-ACC-UserID: ' . User::getCurrent()->getId() . "\r\n";
1261
+		$headers .= 'X-ACC-Request: '.$request->getId()."\r\n";
1262
+		$headers .= 'X-ACC-UserID: '.User::getCurrent()->getId()."\r\n";
1263 1263
 
1264 1264
 		// Get the closing user's Email signature and append it to the Email.
1265 1265
 		if (User::getCurrent()->getEmailSig() != "") {
1266 1266
 			$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
1267
-			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'] . "\n\n" . $emailsig, $headers);
1267
+			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody']."\n\n".$emailsig, $headers);
1268 1268
 		}
1269 1269
 		else {
1270 1270
 			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'], $headers);
@@ -1289,7 +1289,7 @@  discard block
 block discarded – undo
1289 1289
 			
1290 1290
 			Notification::requestClosed($request, $crea);
1291 1291
 			BootstrapSkin::displayAlertBox(
1292
-				"Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as '" . htmlentities($crea, ENT_COMPAT, 'UTF-8') . "'.", 
1292
+				"Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".htmlentities($crea, ENT_COMPAT, 'UTF-8')."'.", 
1293 1293
 				"alert-success");
1294 1294
 		}
1295 1295
 		else if ($_POST['action'] == "mail") {
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
 		}
1356 1356
 
1357 1357
 		Notification::requestClosed($request, $crea);
1358
-		BootstrapSkin::displayAlertBox("Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as '" . htmlentities($crea, ENT_COMPAT, 'UTF-8') . "'.", "alert-success");
1358
+		BootstrapSkin::displayAlertBox("Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".htmlentities($crea, ENT_COMPAT, 'UTF-8')."'.", "alert-success");
1359 1359
 		
1360 1360
 		$towhom = $request->getEmail();
1361 1361
 		if ($gem != "0") {
@@ -1524,7 +1524,7 @@  discard block
 block discarded – undo
1524 1524
 			if (!isset($_GET['confclosed'])) {
1525 1525
 				if ($request->getStatus() == "Closed") {
1526 1526
 					// FIXME: bootstrappify properly
1527
-					throw new TransactionException('This request is currently closed. Are you sure you wish to reserve it?<br /><ul><li><a href="' . $_SERVER["REQUEST_URI"] . '&confclosed=yes">Yes, reserve this closed request</a></li><li><a href="' . $baseurl . '/acc.php">No, return to main request interface</a></li></ul>', "Request closed", "alert-info");
1527
+					throw new TransactionException('This request is currently closed. Are you sure you wish to reserve it?<br /><ul><li><a href="'.$_SERVER["REQUEST_URI"].'&confclosed=yes">Yes, reserve this closed request</a></li><li><a href="'.$baseurl.'/acc.php">No, return to main request interface</a></li></ul>', "Request closed", "alert-info");
1528 1528
 				}
1529 1529
 			}	
1530 1530
         
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 			}
1596 1596
 		}
1597 1597
 		else {
1598
-			echo "You cannot break " . htmlentities($reservedUser->getUsername()) . "'s reservation";
1598
+			echo "You cannot break ".htmlentities($reservedUser->getUsername())."'s reservation";
1599 1599
 		}
1600 1600
 	}
1601 1601
 	else {
@@ -1695,7 +1695,7 @@  discard block
 block discarded – undo
1695 1695
 	}
1696 1696
     
1697 1697
 	if (!isset($_POST['comment']) || $_POST['comment'] == "") {
1698
-		header("Location: acc.php?action=zoom&id=" . $request->getId());
1698
+		header("Location: acc.php?action=zoom&id=".$request->getId());
1699 1699
 		die(); 
1700 1700
 	}
1701 1701
     
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
     
1729 1729
 	Notification::commentCreated($comment);
1730 1730
     
1731
-	header("Location: acc.php?action=zoom&id=" . $request->getId());
1731
+	header("Location: acc.php?action=zoom&id=".$request->getId());
1732 1732
 }
1733 1733
 elseif ($action == "changepassword") {
1734 1734
 	if ((!isset($_POST['oldpassword'])) || $_POST['oldpassword'] == "") {
@@ -1806,7 +1806,7 @@  discard block
 block discarded – undo
1806 1806
 			Notification::commentEdited($comment);
1807 1807
         
1808 1808
 			SessionAlert::success("Comment has been saved successfully");
1809
-			header("Location: $baseurl/acc.php?action=zoom&id=" . $comment->getRequest());
1809
+			header("Location: $baseurl/acc.php?action=zoom&id=".$comment->getRequest());
1810 1810
 		});
1811 1811
         
1812 1812
 		die();    
Please login to merge, or discard this patch.
includes/DataObjects/Request.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 		if ($this->isNew) {
64 64
 // insert
65 65
 			$statement = $this->dbObject->prepare(
66
-				"INSERT INTO `request` (" .
67
-				"email, ip, name, comment, status, date, checksum, emailsent, emailconfirm, reserved, useragent, forwardedip" .
68
-				") VALUES (" .
69
-				":email, :ip, :name, :comment, :status, CURRENT_TIMESTAMP(), :checksum, :emailsent," .
70
-				":emailconfirm, :reserved, :useragent, :forwardedip" .
66
+				"INSERT INTO `request` (".
67
+				"email, ip, name, comment, status, date, checksum, emailsent, emailconfirm, reserved, useragent, forwardedip".
68
+				") VALUES (".
69
+				":email, :ip, :name, :comment, :status, CURRENT_TIMESTAMP(), :checksum, :emailsent,".
70
+				":emailconfirm, :reserved, :useragent, :forwardedip".
71 71
 				");");
72 72
 			$statement->bindValue(":email", $this->email);
73 73
 			$statement->bindValue(":ip", $this->ip);
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 		}
91 91
 		else {
92 92
 // update
93
-			$statement = $this->dbObject->prepare("UPDATE `request` SET " .
94
-				"status = :status, checksum = :checksum, emailsent = :emailsent, emailconfirm = :emailconfirm, " .
95
-				"reserved = :reserved " .
93
+			$statement = $this->dbObject->prepare("UPDATE `request` SET ".
94
+				"status = :status, checksum = :checksum, emailsent = :emailsent, emailconfirm = :emailconfirm, ".
95
+				"reserved = :reserved ".
96 96
 				"WHERE id = :id;");
97 97
 			$statement->bindValue(":id", $this->id);
98 98
 			$statement->bindValue(":status", $this->status);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 	public function updateChecksum()
198 198
 	{
199
-		$this->checksum = md5($this->id . $this->name . $this->email . microtime());
199
+		$this->checksum = md5($this->id.$this->name.$this->email.microtime());
200 200
 	}
201 201
 
202 202
 	public function getEmailSent()
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			$query = $this->dbObject->prepare("SELECT * FROM request WHERE (ip = :ip OR forwardedip LIKE :forwarded) AND ip != :clearedip AND id != :id AND emailconfirm = 'Confirmed';");
324 324
 
325 325
 			$trustedIp = $this->getTrustedIp();
326
-			$trustedFilter = '%' . $trustedIp . '%';
326
+			$trustedFilter = '%'.$trustedIp.'%';
327 327
 
328 328
 			$query->bindValue(":id", $this->id);
329 329
 			$query->bindValue(":ip", $trustedIp);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 			return false;
352 352
 		}
353 353
 
354
-		$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=" . urlencode($this->name) . "&tbaction=new-account&tbnooverride&format=php");
354
+		$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=".urlencode($this->name)."&tbaction=new-account&tbnooverride&format=php");
355 355
 
356 356
 		$data = unserialize($apiResult);
357 357
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	
424 424
 	public function getObjectDescription()
425 425
 	{
426
-		return '<a href="acc.php?action=zoom&amp;id=' . $this->getId() . '">Request #' . $this->getId() . " (" . htmlentities($this->name) . ")</a>";
426
+		return '<a href="acc.php?action=zoom&amp;id='.$this->getId().'">Request #'.$this->getId()." (".htmlentities($this->name).")</a>";
427 427
 	}
428 428
 
429 429
 	public function getClosureReason()
Please login to merge, or discard this patch.
includes/StatisticsPage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	public static function Create($pageName)
24 24
 	{
25 25
 		// calculate the name of the statistics page
26
-		$statsPage = "Stats" . $pageName;
26
+		$statsPage = "Stats".$pageName;
27 27
 
28 28
 		global $filepath;
29 29
 		// check the stats page definition exists...
30
-		if (file_exists($filepath . "/includes/statistics/Stats" . $pageName . ".php")) {
30
+		if (file_exists($filepath."/includes/statistics/Stats".$pageName.".php")) {
31 31
 		// and include it.
32
-			require_once($filepath . "/includes/statistics/Stats" . $pageName . ".php");
32
+			require_once($filepath."/includes/statistics/Stats".$pageName.".php");
33 33
 		}
34 34
 		else {
35 35
 			// class def doesn't exist: error
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		}
57 57
 		else {
58 58
 			// file exists, but no definition of the class
59
-			die("No definition for statistics page: " . $statsPage);
59
+			die("No definition for statistics page: ".$statsPage);
60 60
 		}
61 61
 	}
62 62
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 
147 147
 		// not protected or access allowed
148
-		echo '<div class="page-header"><h1>' . $this->getPageTitle() . '</h1></div>';
148
+		echo '<div class="page-header"><h1>'.$this->getPageTitle().'</h1></div>';
149 149
 
150 150
 		if ($this->requiresSimpleHtmlEnvironment()) {
151 151
 			echo '<div class="row-fluid"><div class="span12">';
Please login to merge, or discard this patch.
config.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 $BUbasefile = "backup"; // The basefile's name.
143 143
 $BUdir = "/home/project/a/c/c/acc/backups"; // The directory where backups should be stored.
144
-$BUmonthdir = $BUdir . "/monthly"; // The directory where monthly backups should be stored.
144
+$BUmonthdir = $BUdir."/monthly"; // The directory where monthly backups should be stored.
145 145
 $BUdumper = "/opt/ts/mysql/5.1/bin/mysqldump --defaults-file=~/.my.cnf p_acc_live"; // Add parameters here if they are needed.
146 146
 $BUgzip = "/usr/bin/gzip"; // Add the gzip parameters here if needed.
147 147
 $BUtar = "/bin/tar -cvf"; // Add the tar parameters here if needed.
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
 
280 280
 $cDatabaseConfig = array(
281 281
 	"acc" => array(
282
-		"dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
282
+		"dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database,
283 283
 		"username" => $toolserver_username,
284 284
 		"password" => $toolserver_password,
285 285
 		"options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
286 286
 	),
287 287
 	"wikipedia" => array(
288
-		"dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
288
+		"dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db,
289 289
 		"username" => $toolserver_username,
290 290
 		"password" => $toolserver_password,
291 291
 		"options"  => array(),
292 292
 	),
293 293
 	"notifications" => array(
294
-		"dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
294
+		"dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database,
295 295
 		"username" => $notifications_username,
296 296
 		"password" => $notifications_password,
297 297
 		"options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
 	"openssl", // email confirmation hash gen, oauth stuff
315 315
 	) as $x) {if (!extension_loaded($x)) {die("extension $x is required."); }}
316 316
 
317
-require_once($filepath . "includes/AutoLoader.php");
317
+require_once($filepath."includes/AutoLoader.php");
318 318
 
319 319
 spl_autoload_register("AutoLoader::load");
320 320
 
321 321
 // Extra includes which are just plain awkward wherever they are.
322
-require_once($filepath . 'oauth/OAuthUtility.php');
323
-require_once($filepath . 'lib/mediawiki-extensions-OAuth/lib/OAuth.php');
324
-require_once($filepath . 'lib/mediawiki-extensions-OAuth/lib/JWT.php');
322
+require_once($filepath.'oauth/OAuthUtility.php');
323
+require_once($filepath.'lib/mediawiki-extensions-OAuth/lib/OAuth.php');
324
+require_once($filepath.'lib/mediawiki-extensions-OAuth/lib/JWT.php');
Please login to merge, or discard this patch.
redir.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	'bgpview' => 'https://bgpview.io/ip/%DATA%'
14 14
 );
15 15
 
16
-if(!isset($_GET['tool'])
16
+if (!isset($_GET['tool'])
17 17
 	|| !isset($toolList[$_GET['tool']])
18 18
 	|| !isset($_GET['data'])
19 19
 )
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 }
24 24
 
25 25
 if (isset($_GET['round2'])) {
26
-	echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])) . '</script>';
26
+	echo '<script>window.location.href='.json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])).'</script>';
27 27
 }
28 28
 else {
29
-	header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
29
+	header("Location: ".$_SERVER["REQUEST_URI"]."&round2=true");
30 30
 }
Please login to merge, or discard this patch.