Completed
Push — createmessage ( a9f324 )
by Dat
02:21
created
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 '". $crea . "'.", 
1292
+				"Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".$crea."'.", 
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 '" . $crea . "'.", "alert-success");
1358
+		BootstrapSkin::displayAlertBox("Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".$crea."'.", "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.