Completed
Push — sessionstart ( 52a658 )
by Simon
03:37
created
includes/Helpers/DebugHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
 			$output .= "#{$count}: ";
27 27
             
28 28
 			if (isset($line['type']) && $line['type'] != "") {
29
-				$output .= $line['class'] . $line['type'];
29
+				$output .= $line['class'].$line['type'];
30 30
 			}
31 31
             
32
-			$output .= $line['function'] . "(...)";
32
+			$output .= $line['function']."(...)";
33 33
 			$output .= " [{$line['file']}#{$line['line']}\r\n";
34 34
             
35 35
 			$count++;
Please login to merge, or discard this patch.
includes/Validation/RequestValidationHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		}
62 62
 
63 63
 		// username can't contain #@/<>[]|{}
64
-		if (preg_match("/[" . preg_quote("#@/<>[]|{}", "/") . "]/", $this->request->getName()) === 1) {
64
+		if (preg_match("/[".preg_quote("#@/<>[]|{}", "/")."]/", $this->request->getName()) === 1) {
65 65
 			$errorList[ValidationError::NAME_INVALIDCHAR] = new ValidationError(ValidationError::NAME_INVALIDCHAR);
66 66
 		}
67 67
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	{
177 177
 		global $enableTitleblacklist;
178 178
 		if ($enableTitleblacklist == 1) {
179
-			$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=" . urlencode($this->request->getName()) . "&tbaction=new-account&tbnooverride&format=php");
179
+			$apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=".urlencode($this->request->getName())."&tbaction=new-account&tbnooverride&format=php");
180 180
 
181 181
 			$data = unserialize($apiResult);
182 182
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	{
193 193
 		global $mediawikiWebServiceEndpoint;
194 194
 
195
-		$userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&list=users&ususers=" . urlencode($this->request->getName()) . "&format=php");
195
+		$userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&list=users&ususers=".urlencode($this->request->getName())."&format=php");
196 196
 		$ue = unserialize($userexist);
197 197
 		if (!isset ($ue['query']['users']['0']['missing']) && isset ($ue['query']['users']['0']['userid'])) {
198 198
 			return true;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		global $mediawikiWebServiceEndpoint;
207 207
 
208 208
 		$reqname = str_replace("_", " ", $this->request->getName());
209
-		$userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&meta=globaluserinfo&guiuser=" . urlencode($reqname) . "&format=php");
209
+		$userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&meta=globaluserinfo&guiuser=".urlencode($reqname)."&format=php");
210 210
 		$ue = unserialize($userexist);
211 211
 		if (isset ($ue['query']['globaluserinfo']['id'])) {
212 212
 			return true;
Please login to merge, or discard this patch.
acc.php 3 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 	$user = User::getByUsername($_POST['username'], gGetDb());
352 352
     
353 353
 	if ($user == false || !$user->authenticate($_POST['password'])) {
354
-		header("Location: $baseurl/acc.php?error=authfail&tplUsername=" . urlencode($_POST['username']));
354
+		header("Location: $baseurl/acc.php?error=authfail&tplUsername=".urlencode($_POST['username']));
355 355
 		die();
356 356
 	}
357 357
     
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 				Logger::unbanned($database, $ban, $_POST['unbanreason']);
905 905
 			});
906 906
         
907
-			BootstrapSkin::displayAlertBox("Unbanned " . $ban->getTarget(), "alert-info", "", false, false);
907
+			BootstrapSkin::displayAlertBox("Unbanned ".$ban->getTarget(), "alert-info", "", false, false);
908 908
 			BootstrapSkin::displayInternalFooter();
909 909
 			Notification::unbanned($ban, $_POST['unbanreason']);
910 910
 			die();
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
         
1037 1037
 		if ($request->getStatus() == $_GET['target']) {
1038 1038
 			SessionAlert::error(
1039
-				"Cannot set status, target already deferred to " . htmlentities($_GET['target']), 
1039
+				"Cannot set status, target already deferred to ".htmlentities($_GET['target']), 
1040 1040
 				"Error");
1041 1041
 			header("Location: acc.php?action=zoom&id={$request->getId()}");
1042 1042
 			die();
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
 	if ($request->getEmailSent() == "1" && !isset($_GET['override']) && $gem != 0) {
1153 1153
 		$alertContent = "<p>This request has already been closed in a manner that has generated an e-mail to the user, Proceed?</p><br />";
1154 1154
 		$alertContent .= "<div class=\"row-fluid\">";
1155
-		$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>";
1155
+		$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>";
1156 1156
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1157 1157
 		$alertContent .= "</div>";
1158 1158
         
@@ -1163,9 +1163,9 @@  discard block
 block discarded – undo
1163 1163
 	
1164 1164
 	// check the request is not reserved by someone else
1165 1165
 	if ($request->getReserved() != 0 && !isset($_GET['reserveoverride']) && $request->getReserved() != User::getCurrent()->getId()) {
1166
-		$alertContent = "<p>This request is currently marked as being handled by " . $request->getReservedObject()->getUsername() . ", Proceed?</p><br />";
1166
+		$alertContent = "<p>This request is currently marked as being handled by ".$request->getReservedObject()->getUsername().", Proceed?</p><br />";
1167 1167
 		$alertContent .= "<div class=\"row-fluid\">";
1168
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&reserveoverride=yes\">Yes</a>";
1168
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&reserveoverride=yes\">Yes</a>";
1169 1169
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1170 1170
 		$alertContent .= "</div>";
1171 1171
         
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 	}
1182 1182
 	
1183 1183
 	// Checks whether the username is already in use on Wikipedia.
1184
-	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=" . urlencode($request->getName()) . "&format=php");
1184
+	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=".urlencode($request->getName())."&format=php");
1185 1185
 	$ue = unserialize($userexist);
1186 1186
 	if (!isset ($ue['query']['users']['0']['missing'])) {
1187 1187
 		$exists = true;
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 	if ($isForCreated && !$exists && !isset($_GET['createoverride'])) {
1203 1203
 		$alertContent = "<p>You have chosen to mark this request as \"created\", but the account does not exist on the English Wikipedia, proceed?</p><br />";
1204 1204
 		$alertContent .= "<div class=\"row-fluid\">";
1205
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&amp;createoverride=yes\">Yes</a>";
1205
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&amp;createoverride=yes\">Yes</a>";
1206 1206
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1207 1207
 		$alertContent .= "</div>";
1208 1208
         
@@ -1247,18 +1247,18 @@  discard block
 block discarded – undo
1247 1247
 			die();
1248 1248
 		}
1249 1249
 
1250
-		$headers = 'From: [email protected]' . "\r\n";
1250
+		$headers = 'From: [email protected]'."\r\n";
1251 1251
 		if (!User::getCurrent()->isAdmin() || isset($_POST['ccmailist']) && $_POST['ccmailist'] == "on") {
1252
-			$headers .= 'Cc: [email protected]' . "\r\n";
1252
+			$headers .= 'Cc: [email protected]'."\r\n";
1253 1253
 		}
1254 1254
 
1255
-		$headers .= 'X-ACC-Request: ' . $request->getId() . "\r\n";
1256
-		$headers .= 'X-ACC-UserID: ' . User::getCurrent()->getId() . "\r\n";
1255
+		$headers .= 'X-ACC-Request: '.$request->getId()."\r\n";
1256
+		$headers .= 'X-ACC-UserID: '.User::getCurrent()->getId()."\r\n";
1257 1257
 
1258 1258
 		// Get the closing user's Email signature and append it to the Email.
1259 1259
 		if (User::getCurrent()->getEmailSig() != "") {
1260 1260
 			$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
1261
-			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'] . "\n\n" . $emailsig, $headers);
1261
+			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody']."\n\n".$emailsig, $headers);
1262 1262
 		}
1263 1263
 		else {
1264 1264
 			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'], $headers);
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 			
1284 1284
 			Notification::requestClosed($request, $crea);
1285 1285
 			BootstrapSkin::displayAlertBox(
1286
-				"Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as 'Done'.", 
1286
+				"Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as 'Done'.", 
1287 1287
 				"alert-success");
1288 1288
 		}
1289 1289
 		else if ($_POST['action'] == "mail") {
@@ -1349,7 +1349,7 @@  discard block
 block discarded – undo
1349 1349
 		}
1350 1350
 
1351 1351
 		Notification::requestClosed($request, $crea);
1352
-		BootstrapSkin::displayAlertBox("Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as 'Done'.", "alert-success");
1352
+		BootstrapSkin::displayAlertBox("Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as 'Done'.", "alert-success");
1353 1353
 		
1354 1354
 		$towhom = $request->getEmail();
1355 1355
 		if ($gem != "0") {
@@ -1518,7 +1518,7 @@  discard block
 block discarded – undo
1518 1518
 			if (!isset($_GET['confclosed'])) {
1519 1519
 				if ($request->getStatus() == "Closed") {
1520 1520
 					// FIXME: bootstrappify properly
1521
-					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");
1521
+					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");
1522 1522
 				}
1523 1523
 			}	
1524 1524
         
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
 			}
1590 1590
 		}
1591 1591
 		else {
1592
-			echo "You cannot break " . htmlentities($reservedUser->getUsername()) . "'s reservation";
1592
+			echo "You cannot break ".htmlentities($reservedUser->getUsername())."'s reservation";
1593 1593
 		}
1594 1594
 	}
1595 1595
 	else {
@@ -1689,7 +1689,7 @@  discard block
 block discarded – undo
1689 1689
 	}
1690 1690
     
1691 1691
 	if (!isset($_POST['comment']) || $_POST['comment'] == "") {
1692
-		header("Location: acc.php?action=zoom&id=" . $request->getId());
1692
+		header("Location: acc.php?action=zoom&id=".$request->getId());
1693 1693
 		die(); 
1694 1694
 	}
1695 1695
     
@@ -1722,7 +1722,7 @@  discard block
 block discarded – undo
1722 1722
     
1723 1723
 	Notification::commentCreated($comment);
1724 1724
     
1725
-	header("Location: acc.php?action=zoom&id=" . $request->getId());
1725
+	header("Location: acc.php?action=zoom&id=".$request->getId());
1726 1726
 }
1727 1727
 elseif ($action == "changepassword") {
1728 1728
 	if ((!isset($_POST['oldpassword'])) || $_POST['oldpassword'] == "") {
@@ -1800,7 +1800,7 @@  discard block
 block discarded – undo
1800 1800
 			Notification::commentEdited($comment);
1801 1801
         
1802 1802
 			SessionAlert::success("Comment has been saved successfully");
1803
-			header("Location: $baseurl/acc.php?action=zoom&id=" . $comment->getRequest());
1803
+			header("Location: $baseurl/acc.php?action=zoom&id=".$comment->getRequest());
1804 1804
 		});
1805 1805
         
1806 1806
 		die();    
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -2036,41 +2036,41 @@
 block discarded – undo
2036 2036
 	});
2037 2037
 }
2038 2038
 elseif ($action == "listall") {
2039
-    global $availableRequestStates, $enableEmailConfirm;
2039
+	global $availableRequestStates, $enableEmailConfirm;
2040 2040
 
2041 2041
 	if (isset($_GET['status']) && isset($availableRequestStates[$_GET['status']])) {
2042 2042
 		$type = $_GET['status']; // safe, we've verified it's sane in the above if statement.
2043 2043
 
2044
-	    $database = gGetDb();
2044
+		$database = gGetDb();
2045 2045
 
2046
-	    if ($enableEmailConfirm == 1) {
2047
-	        $query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';";
2048
-	    } else {
2049
-	        $query = "SELECT * FROM request WHERE status = :type;";
2050
-	    }
2046
+		if ($enableEmailConfirm == 1) {
2047
+			$query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';";
2048
+		} else {
2049
+			$query = "SELECT * FROM request WHERE status = :type;";
2050
+		}
2051 2051
 
2052
-	    $statement = $database->prepare($query);
2052
+		$statement = $database->prepare($query);
2053 2053
 
2054
-        $statement->bindValue(":type", $type);
2055
-        $statement->execute();
2054
+		$statement->bindValue(":type", $type);
2055
+		$statement->execute();
2056 2056
 
2057
-        $requests = $statement->fetchAll(PDO::FETCH_CLASS, "Request");
2058
-        foreach ($requests as $req) {
2059
-        	/** @var Request $req */
2060
-            $req->setDatabase($database);
2061
-        }
2057
+		$requests = $statement->fetchAll(PDO::FETCH_CLASS, "Request");
2058
+		foreach ($requests as $req) {
2059
+			/** @var Request $req */
2060
+			$req->setDatabase($database);
2061
+		}
2062 2062
 
2063
-        global $smarty;
2064
-        $smarty->assign("requests", $requests);
2065
-        $smarty->assign("showStatus", false);
2066
-        $html = $smarty->fetch("mainpage/requesttable.tpl");
2067
-        echo $html;
2068
-    } else {
2069
-        echo defaultpage();
2070
-    }
2063
+		global $smarty;
2064
+		$smarty->assign("requests", $requests);
2065
+		$smarty->assign("showStatus", false);
2066
+		$html = $smarty->fetch("mainpage/requesttable.tpl");
2067
+		echo $html;
2068
+	} else {
2069
+		echo defaultpage();
2070
+	}
2071 2071
 
2072
-    BootstrapSkin::displayInternalFooter();
2073
-    die();
2072
+	BootstrapSkin::displayInternalFooter();
2073
+	die();
2074 2074
 }
2075 2075
 # If the action specified does not exist, goto the default page.
2076 2076
 else {
Please login to merge, or discard this patch.
Braces   +22 added lines, -35 removed lines patch added patch discarded remove patch
@@ -154,8 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 	$database = gGetDb();
156 156
     
157
-	$database->transactionally(function() use ($database, $useOauthSignup)
158
-	{
157
+	$database->transactionally(function() use ($database, $useOauthSignup) {
159 158
     
160 159
 		$newUser = new User();
161 160
 		$newUser->setDatabase($database);
@@ -483,8 +482,7 @@  discard block
 block discarded – undo
483 482
         
484 483
 		$database = gGetDb();
485 484
         
486
-		$database->transactionally(function() use ($database)
487
-		{
485
+		$database->transactionally(function() use ($database) {
488 486
 			global $smarty;
489 487
             
490 488
 			$message = InterfaceMessage::getById($_GET['edit'], $database);
@@ -572,8 +570,7 @@  discard block
 block discarded – undo
572 570
             
573 571
 			$database = gGetDb();
574 572
             
575
-			$database->transactionally(function() use ($database, $baseurl)
576
-			{
573
+			$database->transactionally(function() use ($database, $baseurl) {
577 574
 				$template = new WelcomeTemplate();
578 575
 				$template->setDatabase($database);
579 576
 				$template->setUserCode($_POST['usercode']);
@@ -658,8 +655,7 @@  discard block
 block discarded – undo
658 655
 			die();
659 656
 		}
660 657
         
661
-		$database->transactionally(function() use($database, $template)
662
-		{
658
+		$database->transactionally(function() use($database, $template) {
663 659
 			$tid = $template->getId();
664 660
             
665 661
 			$database
@@ -695,8 +691,7 @@  discard block
 block discarded – undo
695 691
 		}
696 692
 
697 693
 		if (isset($_POST['submit'])) {
698
-			$database->transactionally(function() use($database, $template)
699
-			{
694
+			$database->transactionally(function() use($database, $template) {
700 695
 				$template->setUserCode($_POST['usercode']);
701 696
 				$template->setBotCode($_POST['botcode']);
702 697
 				$template->save();
@@ -827,8 +822,7 @@  discard block
 block discarded – undo
827 822
     
828 823
 	$currentUsername = User::getCurrent()->getUsername();
829 824
     
830
-	$database->transactionally(function() use ($database, $ban, $duration, $currentUsername)
831
-	{
825
+	$database->transactionally(function() use ($database, $ban, $duration, $currentUsername) {
832 826
 		$ban->setDatabase($database);
833 827
 		$ban->setActive(1);
834 828
 		$ban->setType($_POST['type']);
@@ -893,8 +887,7 @@  discard block
 block discarded – undo
893 887
 		else {
894 888
 			$database = gGetDb();
895 889
             
896
-			$database->transactionally(function() use ($database, $ban)
897
-			{
890
+			$database->transactionally(function() use ($database, $ban) {
898 891
 				$ban->setActive(0);
899 892
 				$ban->save();
900 893
                 
@@ -1043,8 +1036,7 @@  discard block
 block discarded – undo
1043 1036
 		}
1044 1037
         
1045 1038
 		$database = gGetDb();
1046
-		$database->transactionally(function() use ($database, $request)
1047
-		{
1039
+		$database->transactionally(function() use ($database, $request) {
1048 1040
 			global $availableRequestStates;
1049 1041
                 
1050 1042
 			$request->setReserved(0);
@@ -1194,7 +1186,8 @@  discard block
 block discarded – undo
1194 1186
 	$emailTemplate = EmailTemplate::getById($gem, gGetDb());
1195 1187
 	if ($emailTemplate instanceof EmailTemplate) {
1196 1188
 		$isForCreated = $emailTemplate->getDefaultAction() === EmailTemplate::CREATED;
1197
-	} else {
1189
+	}
1190
+	else {
1198 1191
 		$isForCreated = false;
1199 1192
 	}
1200 1193
 
@@ -1463,8 +1456,7 @@  discard block
 block discarded – undo
1463 1456
 elseif ($action == "reserve") {
1464 1457
 	$database = gGetDb();
1465 1458
     
1466
-	$database->transactionally(function() use ($database)
1467
-	{
1459
+	$database->transactionally(function() use ($database) {
1468 1460
 		$request = Request::getById($_GET['resid'], $database);
1469 1461
         
1470 1462
 		if ($request == false) {
@@ -1567,8 +1559,7 @@  discard block
 block discarded – undo
1567 1559
 	if ($reservedUser->getId() != User::getCurrent()->getId()) {
1568 1560
 		if (User::getCurrent()->isAdmin()) {
1569 1561
 			if (isset($_GET['confirm']) && $_GET['confirm'] == 1) {
1570
-				$database->transactionally(function() use($database, $request)
1571
-				{
1562
+				$database->transactionally(function() use($database, $request) {
1572 1563
 					$request->setReserved(0);
1573 1564
 					$request->save();
1574 1565
 
@@ -1593,8 +1584,7 @@  discard block
 block discarded – undo
1593 1584
 		}
1594 1585
 	}
1595 1586
 	else {
1596
-		$database->transactionally(function() use ($database, $request)
1597
-		{
1587
+		$database->transactionally(function() use ($database, $request) {
1598 1588
 			$request->setReserved(0);
1599 1589
 			$request->save();
1600 1590
 
@@ -1787,8 +1777,7 @@  discard block
 block discarded – undo
1787 1777
 	
1788 1778
 	if ($_SERVER['REQUEST_METHOD'] == 'POST') {
1789 1779
 		$database = gGetDb();
1790
-		$database->transactionally(function() use ($database, $comment, $baseurl)
1791
-		{
1780
+		$database->transactionally(function() use ($database, $comment, $baseurl) {
1792 1781
             
1793 1782
 			$comment->setComment($_POST['newcomment']);
1794 1783
 			$comment->setVisibility($_POST['visibility']);
@@ -1836,8 +1825,7 @@  discard block
 block discarded – undo
1836 1825
 		die();
1837 1826
 	}
1838 1827
     
1839
-	$database->transactionally(function() use ($database, $user, $requestObject, $curuser)
1840
-	{
1828
+	$database->transactionally(function() use ($database, $user, $requestObject, $curuser) {
1841 1829
 		$updateStatement = $database->prepare("UPDATE request SET reserved = :userid WHERE id = :request LIMIT 1;");
1842 1830
 		$updateStatement->bindValue(":userid", $user->getId());
1843 1831
 		$updateStatement->bindValue(":request", $requestObject->getId());
@@ -1865,8 +1853,7 @@  discard block
 block discarded – undo
1865 1853
 		}
1866 1854
 		if (isset($_POST['submit'])) {
1867 1855
 			$database = gGetDb();
1868
-			$database->transactionally(function() use ($database)
1869
-			{
1856
+			$database->transactionally(function() use ($database) {
1870 1857
 				global $baseurl;
1871 1858
                 
1872 1859
 				$emailTemplate = new EmailTemplate();
@@ -1944,8 +1931,7 @@  discard block
 block discarded – undo
1944 1931
 				die();
1945 1932
 			}
1946 1933
 
1947
-			$database->transactionally(function() use ($database, $emailTemplate)
1948
-			{
1934
+			$database->transactionally(function() use ($database, $emailTemplate) {
1949 1935
 				$emailTemplate->save();
1950 1936
                 
1951 1937
 				Logger::editedEmail($database, $emailTemplate);
@@ -2010,8 +1996,7 @@  discard block
 block discarded – undo
2010 1996
 }
2011 1997
 elseif ($action == "oauthattach") {
2012 1998
 	$database = gGetDb();
2013
-	$database->transactionally(function() use ($database)
2014
-	{
1999
+	$database->transactionally(function() use ($database) {
2015 2000
 		try {
2016 2001
 			global $oauthConsumerToken, $oauthSecretToken, $oauthBaseUrl, $oauthBaseUrlInternal;
2017 2002
             
@@ -2046,7 +2031,8 @@  discard block
 block discarded – undo
2046 2031
 
2047 2032
 	    if ($enableEmailConfirm == 1) {
2048 2033
 	        $query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';";
2049
-	    } else {
2034
+	    }
2035
+	    else {
2050 2036
 	        $query = "SELECT * FROM request WHERE status = :type;";
2051 2037
 	    }
2052 2038
 
@@ -2066,7 +2052,8 @@  discard block
 block discarded – undo
2066 2052
         $smarty->assign("showStatus", false);
2067 2053
         $html = $smarty->fetch("mainpage/requesttable.tpl");
2068 2054
         echo $html;
2069
-    } else {
2055
+    }
2056
+    else {
2070 2057
         echo defaultpage();
2071 2058
     }
2072 2059
 
Please login to merge, or discard this patch.
functions.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	// Get the closing user's Email signature and append it to the Email.
38 38
 	if (User::getCurrent()->getEmailSig() != "") {
39 39
 		$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
40
-		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText() . "\n\n" . $emailsig, $headers);
40
+		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText()."\n\n".$emailsig, $headers);
41 41
 	}
42 42
 	else {
43 43
 		mail($target, "RE: [ACC #$id] English Wikipedia Account Request", $template->getText(), $headers);
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 		}
107 107
 		else {
108 108
 			// This is the login form, not the request form. We need protection here.
109
-			$path = 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
110
-			header("Location: " . $path);
109
+			$path = 'https://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
110
+			header("Location: ".$path);
111 111
 		}
112 112
 	}
113 113
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 function displayPreview($wikicode)
205 205
 {
206
-	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text=' . urlencode($wikicode)));
206
+	$parseresult = unserialize(file_get_contents('http://en.wikipedia.org/w/api.php?action=parse&format=php&text='.urlencode($wikicode)));
207 207
 	$out = "<br />\n<h3>Preview</h3>\n<div style=\"border: 2px dashed rgb(26, 79, 133);\">\n<div style=\"margin: 20px;\">";
208 208
 	$out .= $parseresult['parse']['text']['*'];
209 209
 	$out .= '</div></div>';
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
  */
294 294
 function welcomerbotRenderSig($creator, $sig)
295 295
 {
296
-	$signature = html_entity_decode($sig) . ' ~~~~~';
297
-	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*" . $creator . "[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
296
+	$signature = html_entity_decode($sig).' ~~~~~';
297
+	if (!preg_match("/((\[\[[ ]*(w:)?[ ]*(en:)?)|(\{\{subst:))[ ]*User[ ]*:[ ]*".$creator."[ ]*(\]\]|\||\}\}|\/)/i", $signature)) {
298 298
 		$signature = "--[[User:$creator|$creator]] ([[User talk:$creator|talk]]) ~~~~~";
299 299
 	}
300 300
 	return $signature;
@@ -332,25 +332,25 @@  discard block
 block discarded – undo
332 332
 		$pluralise = false;
333 333
 	}
334 334
 	elseif ($secs > 10 && $secs < $minuteCut) {
335
-		$output = round($secs / $second) . " second";
335
+		$output = round($secs / $second)." second";
336 336
 	}
337 337
 	elseif ($secs >= $minuteCut && $secs < $hourCut) {
338
-		$output = round($secs / $minute) . " minute";
338
+		$output = round($secs / $minute)." minute";
339 339
 	}
340 340
 	elseif ($secs >= $hourCut && $secs < $dayCut) {
341
-		$output = round($secs / $hour) . " hour";
341
+		$output = round($secs / $hour)." hour";
342 342
 	}
343 343
 	elseif ($secs >= $dayCut && $secs < $weekCut) {
344
-		$output = round($secs / $day) . " day";
344
+		$output = round($secs / $day)." day";
345 345
 	}
346 346
 	elseif ($secs >= $weekCut && $secs < $month) {
347
-		$output = round($secs / $week) . " week";
347
+		$output = round($secs / $week)." week";
348 348
 	}
349 349
 	elseif ($secs >= $month && $secs < $year) {
350
-		$output = round($secs / $month) . " month";
350
+		$output = round($secs / $month)." month";
351 351
 	}
352 352
 	elseif ($secs >= $year && $secs < $year * 10) {
353
-		$output = round($secs / $year) . " year";
353
+		$output = round($secs / $year)." year";
354 354
 	}
355 355
 	else {
356 356
 		$output = "a long time ago";
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	}
359 359
     
360 360
 	if ($pluralise) {
361
-		$output = (substr($output, 0, 2) <> "1 ") ? $output . "s ago" : $output . " ago";
361
+		$output = (substr($output, 0, 2) <> "1 ") ? $output."s ago" : $output." ago";
362 362
 	}
363 363
 
364 364
 	return $output;
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
 {
405 405
 	$userList = "";
406 406
 	foreach ($users as $v) {
407
-		$userList .= "\"" . htmlentities($v) . "\", ";
407
+		$userList .= "\"".htmlentities($v)."\", ";
408 408
 	}
409
-	$userList = "[" . rtrim($userList, ", ") . "]";
409
+	$userList = "[".rtrim($userList, ", ")."]";
410 410
 	$tailscript = <<<JS
411 411
 $('.username-typeahead').typeahead({
412 412
 	source: {$userList}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 /** Initialises the PHP Session */
30 30
 function initialiseSession() {
31
-    session_start();
31
+	session_start();
32 32
 }
33 33
 
34 34
 /**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			"requests" => $requests, 
161 161
 			"total" => $totalRequests, 
162 162
 			"api" => $v['api'],
163
-            "type" => $type);
163
+			"type" => $type);
164 164
 	}
165 165
     
166 166
 	global $smarty;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
 $session = new session();
28 28
 
29 29
 /** Initialises the PHP Session */
30
-function initialiseSession() {
30
+function initialiseSession()
31
+{
31 32
     session_start();
32 33
 }
33 34
 
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
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	$user->approve();
109 109
 
110 110
 	BootstrapSkin::displayAlertBox(
111
-		"Approved user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
111
+		"Approved user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
112 112
 		"alert-info", 
113 113
 		"", 
114 114
 		false);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 	$headers = 'From: [email protected]';
119 119
 	// TODO: move to template?
120
-	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.\n- The English Wikipedia Account Creation Team", $headers);
120
+	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.\n- The English Wikipedia Account Creation Team", $headers);
121 121
 	BootstrapSkin::displayInternalFooter();
122 122
 	die();
123 123
 }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		$user->demote($_POST['reason']);
162 162
 
163 163
 		BootstrapSkin::displayAlertBox( 
164
-			"Changed " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8') . "'s access to 'User'", 
164
+			"Changed ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')."'s access to 'User'", 
165 165
 			"alert-info", 
166 166
 			"", 
167 167
 			false);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$headers = 'From: [email protected]';
172 172
         
173 173
 		// TODO: move to template?
174
-		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);
174
+		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);
175 175
 		BootstrapSkin::displayInternalFooter();
176 176
 		die();
177 177
 	}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
 		Notification::userSuspended($user, $_POST['reason']);
217 217
 		BootstrapSkin::displayAlertBox(
218
-			"Suspended user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
218
+			"Suspended user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
219 219
 			"alert-info", 
220 220
 			"", 
221 221
 			false);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		$headers = 'From: [email protected]';
224 224
         
225 225
 		// TODO: move to template?
226
-		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);
226
+		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);
227 227
 		BootstrapSkin::displayInternalFooter();
228 228
 		die();
229 229
 	}
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	Notification::userPromoted($user);
260 260
 
261 261
 	BootstrapSkin::displayAlertBox(
262
-		htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8') . " promoted to 'Admin'", 
262
+		htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8')." promoted to 'Admin'", 
263 263
 		"alert-info", 
264 264
 		"", 
265 265
 		false);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	$headers = 'From: [email protected]';
268 268
     
269 269
 	// TODO: move to template?
270
-	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);
270
+	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);
271 271
 	die();
272 272
 }
273 273
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 		Notification::userDeclined($user, $_POST['reason']);
311 311
 
312 312
 		BootstrapSkin::displayAlertBox(
313
-			"Declined user " . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
313
+			"Declined user ".htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'), 
314 314
 			"alert-info", 
315 315
 			"", 
316 316
 			false);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 		$headers = 'From: [email protected]';
319 319
         
320 320
 		// TODO: move to template?
321
-		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);
321
+		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);
322 322
 		BootstrapSkin::displayInternalFooter();
323 323
 		die();
324 324
 	}
Please login to merge, or discard this patch.
zoompage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	$viewableDataStatement->bindValue(":email", $request->getEmail());
66 66
 	$viewableDataStatement->bindValue(":reserved", User::getCurrent()->getId());
67 67
 	$viewableDataStatement->bindValue(":trustedIp", $request->getTrustedIp());
68
-	$viewableDataStatement->bindValue(":trustedProxy", '%' . $request->getTrustedIp() . '%');
68
+	$viewableDataStatement->bindValue(":trustedProxy", '%'.$request->getTrustedIp().'%');
69 69
     
70 70
 	$viewableDataStatement->execute();
71 71
     
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 	#endregion
78 78
 	
79 79
 	if ($request->getStatus() == "Closed") {
80
-		$hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp() . microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums.
80
+		$hash = md5($request->getId().$request->getEmail().$request->getTrustedIp().microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums.
81 81
 		$smarty->assign("isclosed", true);
82 82
 	}
83 83
 	else {
84
-		$hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp());
84
+		$hash = md5($request->getId().$request->getEmail().$request->getTrustedIp());
85 85
 		$smarty->assign("isclosed", false);
86 86
 	}
87 87
 	$smarty->assign("hash", $hash);
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
 	$userListData = $userListResult->fetchAll(PDO::FETCH_COLUMN);
258 258
 	$userListProcessedData = array();
259 259
 	foreach ($userListData as $userListItem) {
260
-		$userListProcessedData[] = "\"" . htmlentities($userListItem) . "\"";
260
+		$userListProcessedData[] = "\"".htmlentities($userListItem)."\"";
261 261
 	}
262 262
     
263
-	$userList = '[' . implode(",", $userListProcessedData) . ']';	
263
+	$userList = '['.implode(",", $userListProcessedData).']';	
264 264
 	$smarty->assign("jsuserlist", $userList);
265 265
 	// end: assign to user
266 266
     
Please login to merge, or discard this patch.
oauth/OAuthUtility.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		global $toolUserAgent;
26 26
 
27
-		$endpoint = $this->baseUrlInternal . '/initiate&format=json&oauth_callback=oob';
27
+		$endpoint = $this->baseUrlInternal.'/initiate&format=json&oauth_callback=oob';
28 28
 
29 29
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
30 30
 		$parsed = parse_url($endpoint);
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$data = curl_exec($ch);
44 44
 
45 45
 		if (!$data) {
46
-			throw new Exception('Curl error: ' . curl_error($ch));
46
+			throw new Exception('Curl error: '.curl_error($ch));
47 47
 		}
48 48
 
49 49
 		$token = json_decode($data);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	{
65 65
 		global $toolUserAgent;
66 66
 
67
-		$endpoint = $this->baseUrlInternal . '/token&format=json';
67
+		$endpoint = $this->baseUrlInternal.'/token&format=json';
68 68
 
69 69
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
70 70
 		$rc = new OAuthConsumer($requestToken, $requestSecret);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$data = curl_exec($ch);
89 89
 
90 90
 		if (!$data) {
91
-			throw new Exception('Curl error: ' . curl_error($ch));
91
+			throw new Exception('Curl error: '.curl_error($ch));
92 92
 		}
93 93
 
94 94
 		$token = json_decode($data);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 		$ch = curl_init();
122 122
 		if ($method == "GET") {
123
-			curl_setopt($ch, CURLOPT_URL, $mediawikiWebServiceEndpoint . "?" . http_build_query($apiParams));
123
+			curl_setopt($ch, CURLOPT_URL, $mediawikiWebServiceEndpoint."?".http_build_query($apiParams));
124 124
 		}
125 125
         
126 126
 		if ($method == "POST") {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$data = curl_exec($ch);
139 139
 
140 140
 		if (!$data) {
141
-			throw new Exception('Curl error: ' . curl_error($ch));
141
+			throw new Exception('Curl error: '.curl_error($ch));
142 142
 		}
143 143
 
144 144
 		return json_decode($data);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
 		global $toolUserAgent;
151 151
 
152
-		$endpoint = $this->baseUrlInternal . '/identify&format=json';
152
+		$endpoint = $this->baseUrlInternal.'/identify&format=json';
153 153
 
154 154
 		$c = new OAuthConsumer($this->consumerToken, $this->consumerSecret);
155 155
 		$rc = new OAuthToken($accessToken, $accessSecret);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		$data = curl_exec($ch);
173 173
 
174 174
 		if (!$data) {
175
-			throw new Exception('Curl error: ' . curl_error($ch));
175
+			throw new Exception('Curl error: '.curl_error($ch));
176 176
 		}
177 177
 
178 178
 		$decodedData = json_decode($data);
Please login to merge, or discard this patch.
redir.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 if(!isset($_GET['tool'])
13 13
 	|| !isset($toolList[$_GET['tool']])
14 14
 	|| !isset($_GET['data'])
15
-)
16
-{
15
+) {
17 16
 	header("HTTP/1.1 403 Forbidden");
18 17
 	return;
19 18
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 	'google' => 'https://www.google.com/search?q=%DATA%',
12 12
 );
13 13
 
14
-if(!isset($_GET['tool'])
14
+if (!isset($_GET['tool'])
15 15
 	|| !isset($toolList[$_GET['tool']])
16 16
 	|| !isset($_GET['data'])
17 17
 )
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 }
22 22
 
23 23
 if (isset($_GET['round2'])) {
24
-	echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])) . '</script>';
24
+	echo '<script>window.location.href='.json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])).'</script>';
25 25
 }
26 26
 else {
27
-	header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
27
+	header("Location: ".$_SERVER["REQUEST_URI"]."&round2=true");
28 28
 }
Please login to merge, or discard this patch.
ClearOldData.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 
11 11
 $db = gGetDb( );
12 12
 
13
-$db->transactionally(function() use ($db)
14
-{
13
+$db->transactionally(function() use ($db) {
15 14
 	global $cDataClearIp, $cDataClearEmail, $dataclear_interval;
16 15
     
17 16
 	$query = $db->prepare("UPDATE request SET ip = :ip, forwardedip = null, email = :mail, useragent = '' WHERE date < DATE_SUB(curdate(), INTERVAL $dataclear_interval) AND status = 'Closed';");
Please login to merge, or discard this patch.