Passed
Push — external-js ( 0a937c )
by Simon
07:02
created
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
@@ -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.
acc.php 3 patches
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.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 elseif ($action == "sreg") {
106 106
 	global $useOauthSignup, $smarty, $allowRegistration;
107 107
 
108
-	if(!$allowRegistration) {
108
+	if (!$allowRegistration) {
109 109
 		$smarty->display("registration/registerdisabled.tpl");
110 110
 		BootstrapSkin::displayInternalFooter();
111 111
 		die();
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 }
215 215
 elseif ($action == "register") {
216 216
 	global $useOauthSignup, $smarty, $allowRegistration;
217
-	if($allowRegistration) {
217
+	if ($allowRegistration) {
218 218
 		$smarty->assign("useOauthSignup", $useOauthSignup);
219 219
 		$smarty->display("registration/register.tpl");
220 220
 	} else {
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 	$user = User::getByUsername($_POST['username'], gGetDb());
360 360
     
361 361
 	if ($user == false || !$user->authenticate($_POST['password'])) {
362
-		header("Location: $baseurl/acc.php?error=authfail&tplUsername=" . urlencode($_POST['username']));
362
+		header("Location: $baseurl/acc.php?error=authfail&tplUsername=".urlencode($_POST['username']));
363 363
 		die();
364 364
 	}
365 365
     
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 				Logger::unbanned($database, $ban, $_POST['unbanreason']);
913 913
 			});
914 914
         
915
-			BootstrapSkin::displayAlertBox("Unbanned " . $ban->getTarget(), "alert-info", "", false, false);
915
+			BootstrapSkin::displayAlertBox("Unbanned ".$ban->getTarget(), "alert-info", "", false, false);
916 916
 			BootstrapSkin::displayInternalFooter();
917 917
 			Notification::unbanned($ban, $_POST['unbanreason']);
918 918
 			die();
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
         
1045 1045
 		if ($request->getStatus() == $_GET['target']) {
1046 1046
 			SessionAlert::error(
1047
-				"Cannot set status, target already deferred to " . htmlentities($_GET['target']), 
1047
+				"Cannot set status, target already deferred to ".htmlentities($_GET['target']), 
1048 1048
 				"Error");
1049 1049
 			header("Location: acc.php?action=zoom&id={$request->getId()}");
1050 1050
 			die();
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 	if ($request->getEmailSent() == "1" && !isset($_GET['override']) && $gem != 0) {
1161 1161
 		$alertContent = "<p>This request has already been closed in a manner that has generated an e-mail to the user, Proceed?</p><br />";
1162 1162
 		$alertContent .= "<div class=\"row-fluid\">";
1163
-		$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>";
1163
+		$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>";
1164 1164
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1165 1165
 		$alertContent .= "</div>";
1166 1166
         
@@ -1171,9 +1171,9 @@  discard block
 block discarded – undo
1171 1171
 	
1172 1172
 	// check the request is not reserved by someone else
1173 1173
 	if ($request->getReserved() != 0 && !isset($_GET['reserveoverride']) && $request->getReserved() != User::getCurrent()->getId()) {
1174
-		$alertContent = "<p>This request is currently marked as being handled by " . $request->getReservedObject()->getUsername() . ", Proceed?</p><br />";
1174
+		$alertContent = "<p>This request is currently marked as being handled by ".$request->getReservedObject()->getUsername().", Proceed?</p><br />";
1175 1175
 		$alertContent .= "<div class=\"row-fluid\">";
1176
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&reserveoverride=yes\">Yes</a>";
1176
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&reserveoverride=yes\">Yes</a>";
1177 1177
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1178 1178
 		$alertContent .= "</div>";
1179 1179
         
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 	}
1190 1190
 	
1191 1191
 	// Checks whether the username is already in use on Wikipedia.
1192
-	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=" . urlencode($request->getName()) . "&format=php");
1192
+	$userexist = file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=users&ususers=".urlencode($request->getName())."&format=php");
1193 1193
 	$ue = unserialize($userexist);
1194 1194
 	if (!isset ($ue['query']['users']['0']['missing'])) {
1195 1195
 		$exists = true;
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 	if ($isForCreated && !$exists && !isset($_GET['createoverride'])) {
1211 1211
 		$alertContent = "<p>You have chosen to mark this request as \"created\", but the account does not exist on the English Wikipedia, proceed?</p><br />";
1212 1212
 		$alertContent .= "<div class=\"row-fluid\">";
1213
-		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?" . $_SERVER["QUERY_STRING"] . "&amp;createoverride=yes\">Yes</a>";
1213
+		$alertContent .= "<a class=\"btn btn-success offset3 span3\"  href=\"$baseurl/acc.php?".$_SERVER["QUERY_STRING"]."&amp;createoverride=yes\">Yes</a>";
1214 1214
 		$alertContent .= "<a class=\"btn btn-danger span3\" href=\"$baseurl/acc.php\">No</a>";
1215 1215
 		$alertContent .= "</div>";
1216 1216
         
@@ -1255,26 +1255,26 @@  discard block
 block discarded – undo
1255 1255
 			die();
1256 1256
 		}
1257 1257
 
1258
-		$headers = 'From: [email protected]' . "\r\n";
1258
+		$headers = 'From: [email protected]'."\r\n";
1259 1259
 
1260 1260
 		// CC mailing list option
1261 1261
 		if (User::getCurrent()->isAdmin() || User::getCurrent()->isCheckuser()) {
1262 1262
 			// these people get the choice
1263 1263
 			if (isset($_POST['ccmailist']) && $_POST['ccmailist'] == "on") {
1264
-				$headers .= 'Cc: [email protected]' . "\r\n";
1264
+				$headers .= 'Cc: [email protected]'."\r\n";
1265 1265
 			}
1266 1266
 		} else {
1267 1267
 			// these people do not.
1268
-			$headers .= 'Cc: [email protected]' . "\r\n";
1268
+			$headers .= 'Cc: [email protected]'."\r\n";
1269 1269
 		}
1270 1270
 
1271
-		$headers .= 'X-ACC-Request: ' . $request->getId() . "\r\n";
1272
-		$headers .= 'X-ACC-UserID: ' . User::getCurrent()->getId() . "\r\n";
1271
+		$headers .= 'X-ACC-Request: '.$request->getId()."\r\n";
1272
+		$headers .= 'X-ACC-UserID: '.User::getCurrent()->getId()."\r\n";
1273 1273
 
1274 1274
 		// Get the closing user's Email signature and append it to the Email.
1275 1275
 		if (User::getCurrent()->getEmailSig() != "") {
1276 1276
 			$emailsig = html_entity_decode(User::getCurrent()->getEmailSig(), ENT_QUOTES, "UTF-8");
1277
-			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'] . "\n\n" . $emailsig, $headers);
1277
+			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody']."\n\n".$emailsig, $headers);
1278 1278
 		}
1279 1279
 		else {
1280 1280
 			mail($request->getEmail(), "RE: [ACC #{$request->getId()}] English Wikipedia Account Request", $_POST['msgbody'], $headers);
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
 			
1300 1300
 			Notification::requestClosed($request, $crea);
1301 1301
 			BootstrapSkin::displayAlertBox(
1302
-				"Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as '" . htmlentities($crea, ENT_COMPAT, 'UTF-8') . "'.", 
1302
+				"Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".htmlentities($crea, ENT_COMPAT, 'UTF-8')."'.", 
1303 1303
 				"alert-success");
1304 1304
 		}
1305 1305
 		else if ($_POST['action'] == "mail") {
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
 		}
1366 1366
 
1367 1367
 		Notification::requestClosed($request, $crea);
1368
-		BootstrapSkin::displayAlertBox("Request " . $request->getId() . " (" . htmlentities($request->getName(), ENT_COMPAT, 'UTF-8') . ") marked as '" . htmlentities($crea, ENT_COMPAT, 'UTF-8') . "'.", "alert-success");
1368
+		BootstrapSkin::displayAlertBox("Request ".$request->getId()." (".htmlentities($request->getName(), ENT_COMPAT, 'UTF-8').") marked as '".htmlentities($crea, ENT_COMPAT, 'UTF-8')."'.", "alert-success");
1369 1369
 		
1370 1370
 		$towhom = $request->getEmail();
1371 1371
 		if ($gem != "0") {
@@ -1534,7 +1534,7 @@  discard block
 block discarded – undo
1534 1534
 			if (!isset($_GET['confclosed'])) {
1535 1535
 				if ($request->getStatus() == "Closed") {
1536 1536
 					// FIXME: bootstrappify properly
1537
-					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");
1537
+					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");
1538 1538
 				}
1539 1539
 			}	
1540 1540
         
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 			}
1606 1606
 		}
1607 1607
 		else {
1608
-			echo "You cannot break " . htmlentities($reservedUser->getUsername()) . "'s reservation";
1608
+			echo "You cannot break ".htmlentities($reservedUser->getUsername())."'s reservation";
1609 1609
 		}
1610 1610
 	}
1611 1611
 	else {
@@ -1705,7 +1705,7 @@  discard block
 block discarded – undo
1705 1705
 	}
1706 1706
     
1707 1707
 	if (!isset($_POST['comment']) || $_POST['comment'] == "") {
1708
-		header("Location: acc.php?action=zoom&id=" . $request->getId());
1708
+		header("Location: acc.php?action=zoom&id=".$request->getId());
1709 1709
 		die(); 
1710 1710
 	}
1711 1711
     
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
     
1739 1739
 	Notification::commentCreated($comment);
1740 1740
     
1741
-	header("Location: acc.php?action=zoom&id=" . $request->getId());
1741
+	header("Location: acc.php?action=zoom&id=".$request->getId());
1742 1742
 }
1743 1743
 elseif ($action == "changepassword") {
1744 1744
 	if ((!isset($_POST['oldpassword'])) || $_POST['oldpassword'] == "") {
@@ -1816,7 +1816,7 @@  discard block
 block discarded – undo
1816 1816
 			Notification::commentEdited($comment);
1817 1817
         
1818 1818
 			SessionAlert::success("Comment has been saved successfully");
1819
-			header("Location: $baseurl/acc.php?action=zoom&id=" . $comment->getRequest());
1819
+			header("Location: $baseurl/acc.php?action=zoom&id=".$comment->getRequest());
1820 1820
 		});
1821 1821
         
1822 1822
 		die();    
Please login to merge, or discard this patch.
Braces   +26 added lines, -37 removed lines patch added patch discarded remove patch
@@ -158,8 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 	$database = gGetDb();
160 160
     
161
-	$database->transactionally(function() use ($database, $useOauthSignup)
162
-	{
161
+	$database->transactionally(function() use ($database, $useOauthSignup) {
163 162
     
164 163
 		$newUser = new User();
165 164
 		$newUser->setDatabase($database);
@@ -217,7 +216,8 @@  discard block
 block discarded – undo
217 216
 	if($allowRegistration) {
218 217
 		$smarty->assign("useOauthSignup", $useOauthSignup);
219 218
 		$smarty->display("registration/register.tpl");
220
-	} else {
219
+	}
220
+	else {
221 221
 		$smarty->display("registration/registerdisabled.tpl");
222 222
 	}
223 223
 	BootstrapSkin::displayInternalFooter();
@@ -491,8 +491,7 @@  discard block
 block discarded – undo
491 491
         
492 492
 		$database = gGetDb();
493 493
         
494
-		$database->transactionally(function() use ($database)
495
-		{
494
+		$database->transactionally(function() use ($database) {
496 495
 			global $smarty;
497 496
             
498 497
 			$message = InterfaceMessage::getById($_GET['edit'], $database);
@@ -580,8 +579,7 @@  discard block
 block discarded – undo
580 579
             
581 580
 			$database = gGetDb();
582 581
             
583
-			$database->transactionally(function() use ($database, $baseurl)
584
-			{
582
+			$database->transactionally(function() use ($database, $baseurl) {
585 583
 				$template = new WelcomeTemplate();
586 584
 				$template->setDatabase($database);
587 585
 				$template->setUserCode($_POST['usercode']);
@@ -666,8 +664,7 @@  discard block
 block discarded – undo
666 664
 			die();
667 665
 		}
668 666
         
669
-		$database->transactionally(function() use($database, $template)
670
-		{
667
+		$database->transactionally(function() use($database, $template) {
671 668
 			$tid = $template->getId();
672 669
             
673 670
 			$database
@@ -703,8 +700,7 @@  discard block
 block discarded – undo
703 700
 		}
704 701
 
705 702
 		if (isset($_POST['submit'])) {
706
-			$database->transactionally(function() use($database, $template)
707
-			{
703
+			$database->transactionally(function() use($database, $template) {
708 704
 				$template->setUserCode($_POST['usercode']);
709 705
 				$template->setBotCode($_POST['botcode']);
710 706
 				$template->save();
@@ -835,8 +831,7 @@  discard block
 block discarded – undo
835 831
     
836 832
 	$currentUsername = User::getCurrent()->getUsername();
837 833
     
838
-	$database->transactionally(function() use ($database, $ban, $duration, $currentUsername)
839
-	{
834
+	$database->transactionally(function() use ($database, $ban, $duration, $currentUsername) {
840 835
 		$ban->setDatabase($database);
841 836
 		$ban->setActive(1);
842 837
 		$ban->setType($_POST['type']);
@@ -901,8 +896,7 @@  discard block
 block discarded – undo
901 896
 		else {
902 897
 			$database = gGetDb();
903 898
             
904
-			$database->transactionally(function() use ($database, $ban)
905
-			{
899
+			$database->transactionally(function() use ($database, $ban) {
906 900
 				$ban->setActive(0);
907 901
 				$ban->save();
908 902
                 
@@ -1051,8 +1045,7 @@  discard block
 block discarded – undo
1051 1045
 		}
1052 1046
         
1053 1047
 		$database = gGetDb();
1054
-		$database->transactionally(function() use ($database, $request)
1055
-		{
1048
+		$database->transactionally(function() use ($database, $request) {
1056 1049
 			global $availableRequestStates;
1057 1050
                 
1058 1051
 			$request->setReserved(0);
@@ -1202,7 +1195,8 @@  discard block
 block discarded – undo
1202 1195
 	$emailTemplate = EmailTemplate::getById($gem, gGetDb());
1203 1196
 	if ($emailTemplate instanceof EmailTemplate) {
1204 1197
 		$isForCreated = $emailTemplate->getDefaultAction() === EmailTemplate::CREATED;
1205
-	} else {
1198
+	}
1199
+	else {
1206 1200
 		$isForCreated = false;
1207 1201
 	}
1208 1202
 
@@ -1263,7 +1257,8 @@  discard block
 block discarded – undo
1263 1257
 			if (isset($_POST['ccmailist']) && $_POST['ccmailist'] == "on") {
1264 1258
 				$headers .= 'Cc: [email protected]' . "\r\n";
1265 1259
 			}
1266
-		} else {
1260
+		}
1261
+		else {
1267 1262
 			// these people do not.
1268 1263
 			$headers .= 'Cc: [email protected]' . "\r\n";
1269 1264
 		}
@@ -1479,8 +1474,7 @@  discard block
 block discarded – undo
1479 1474
 elseif ($action == "reserve") {
1480 1475
 	$database = gGetDb();
1481 1476
     
1482
-	$database->transactionally(function() use ($database)
1483
-	{
1477
+	$database->transactionally(function() use ($database) {
1484 1478
 		$request = Request::getById($_GET['resid'], $database);
1485 1479
         
1486 1480
 		if ($request == false) {
@@ -1583,8 +1577,7 @@  discard block
 block discarded – undo
1583 1577
 	if ($reservedUser->getId() != User::getCurrent()->getId()) {
1584 1578
 		if (User::getCurrent()->isAdmin()) {
1585 1579
 			if (isset($_GET['confirm']) && $_GET['confirm'] == 1) {
1586
-				$database->transactionally(function() use($database, $request)
1587
-				{
1580
+				$database->transactionally(function() use($database, $request) {
1588 1581
 					$request->setReserved(0);
1589 1582
 					$request->save();
1590 1583
 
@@ -1609,8 +1602,7 @@  discard block
 block discarded – undo
1609 1602
 		}
1610 1603
 	}
1611 1604
 	else {
1612
-		$database->transactionally(function() use ($database, $request)
1613
-		{
1605
+		$database->transactionally(function() use ($database, $request) {
1614 1606
 			$request->setReserved(0);
1615 1607
 			$request->save();
1616 1608
 
@@ -1803,8 +1795,7 @@  discard block
 block discarded – undo
1803 1795
 	
1804 1796
 	if ($_SERVER['REQUEST_METHOD'] == 'POST') {
1805 1797
 		$database = gGetDb();
1806
-		$database->transactionally(function() use ($database, $comment, $baseurl)
1807
-		{
1798
+		$database->transactionally(function() use ($database, $comment, $baseurl) {
1808 1799
             
1809 1800
 			$comment->setComment($_POST['newcomment']);
1810 1801
 			$comment->setVisibility($_POST['visibility']);
@@ -1852,8 +1843,7 @@  discard block
 block discarded – undo
1852 1843
 		die();
1853 1844
 	}
1854 1845
     
1855
-	$database->transactionally(function() use ($database, $user, $requestObject, $curuser)
1856
-	{
1846
+	$database->transactionally(function() use ($database, $user, $requestObject, $curuser) {
1857 1847
 		$updateStatement = $database->prepare("UPDATE request SET reserved = :userid WHERE id = :request;");
1858 1848
 		$updateStatement->bindValue(":userid", $user->getId());
1859 1849
 		$updateStatement->bindValue(":request", $requestObject->getId());
@@ -1881,8 +1871,7 @@  discard block
 block discarded – undo
1881 1871
 		}
1882 1872
 		if (isset($_POST['submit'])) {
1883 1873
 			$database = gGetDb();
1884
-			$database->transactionally(function() use ($database)
1885
-			{
1874
+			$database->transactionally(function() use ($database) {
1886 1875
 				global $baseurl;
1887 1876
                 
1888 1877
 				$emailTemplate = new EmailTemplate();
@@ -1960,8 +1949,7 @@  discard block
 block discarded – undo
1960 1949
 				die();
1961 1950
 			}
1962 1951
 
1963
-			$database->transactionally(function() use ($database, $emailTemplate)
1964
-			{
1952
+			$database->transactionally(function() use ($database, $emailTemplate) {
1965 1953
 				$emailTemplate->save();
1966 1954
                 
1967 1955
 				Logger::editedEmail($database, $emailTemplate);
@@ -2026,8 +2014,7 @@  discard block
 block discarded – undo
2026 2014
 }
2027 2015
 elseif ($action == "oauthattach") {
2028 2016
 	$database = gGetDb();
2029
-	$database->transactionally(function() use ($database)
2030
-	{
2017
+	$database->transactionally(function() use ($database) {
2031 2018
 		try {
2032 2019
 			global $oauthConsumerToken, $oauthSecretToken, $oauthBaseUrl, $oauthBaseUrlInternal;
2033 2020
             
@@ -2062,7 +2049,8 @@  discard block
 block discarded – undo
2062 2049
 
2063 2050
 	    if ($enableEmailConfirm == 1) {
2064 2051
 	        $query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';";
2065
-	    } else {
2052
+	    }
2053
+	    else {
2066 2054
 	        $query = "SELECT * FROM request WHERE status = :type;";
2067 2055
 	    }
2068 2056
 
@@ -2082,7 +2070,8 @@  discard block
 block discarded – undo
2082 2070
         $smarty->assign("showStatus", false);
2083 2071
         $html = $smarty->fetch("mainpage/requesttable.tpl");
2084 2072
         echo $html;
2085
-    } else {
2073
+    }
2074
+    else {
2086 2075
         echo defaultpage();
2087 2076
     }
2088 2077
 
Please login to merge, or discard this patch.
search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			die();
83 83
 		}			
84 84
 
85
-		$qterm = '%' . $term . '%';
85
+		$qterm = '%'.$term.'%';
86 86
         
87 87
 		$statement = gGetDb()->prepare("SELECT * FROM request WHERE email LIKE :term;");
88 88
 		$statement->bindValue(":term", $qterm);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$smarty->display("search/searchresult.tpl");
101 101
 	}
102 102
 	elseif ($_GET['type'] == 'IP') {
103
-		$qterm = '%' . $term . '%';
103
+		$qterm = '%'.$term.'%';
104 104
         
105 105
 		$statement = gGetDb()->prepare("SELECT * FROM request WHERE email <> '[email protected]' and ip <> '127.0.0.1' and ip LIKE :term or forwardedip LIKE :term2;");
106 106
 		$statement->bindValue(":term", $qterm);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		$smarty->display("search/searchresult.tpl");
120 120
 	}
121 121
 	elseif ($_GET['type'] == 'Request') {
122
-		$qterm = '%' . $term . '%';
122
+		$qterm = '%'.$term.'%';
123 123
         
124 124
 		$statement = gGetDb()->prepare("SELECT * FROM request WHERE name LIKE :term;");
125 125
 		$statement->bindValue(":term", $qterm);
Please login to merge, or discard this patch.
PrecacheGeolocation.php 3 patches
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.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,13 +62,15 @@
 block discarded – undo
62 62
         echo ". IP location fetch complete.\n";
63 63
         $database->commit();
64 64
         echo ". Committed txn.\n";
65
-    } catch (Exception $ex) {
65
+    }
66
+    catch (Exception $ex) {
66 67
         echo ". Encountered exception: " . $ex->getMessage(). "\n";
67 68
         $database->rollBack();
68 69
         echo ". Rolled back txn\n";
69 70
         throw $ex;
70
-    } finally {
71
-        if($database->hasActiveTransaction()){
71
+    }
72
+    finally {
73
+        if($database->hasActiveTransaction()) {
72 74
             $database->rollBack();
73 75
             echo ". Rolled back txn\n";
74 76
         }
Please login to merge, or discard this patch.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (isset($_SERVER['REQUEST_METHOD'])) {
4
-    die();
4
+	die();
5 5
 } // Web clients die.
6 6
 
7 7
 ini_set('display_errors', 1);
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
 $locationProvider = new IpLocationProvider($database, $locationProviderApiKey);
18 18
 
19 19
 while (true) {
20
-    echo "Beginning txn\n";
21
-    $database->beginTransaction();
20
+	echo "Beginning txn\n";
21
+	$database->beginTransaction();
22 22
 
23
-    try {
24
-        echo ". Fetching data...\n";
23
+	try {
24
+		echo ". Fetching data...\n";
25 25
 
26
-        // fetch a bunch of un-geolocated IPs from the database.
27
-        // note we have to parse the forwardedip field in the database so we can test against the geolocation table.
28
-        // This guarantees we get ten unlocated IPs back, unless there actually aren't 10 available.
29
-        // Alternatives include downloading a small set of forwarded IPs, splitting it in PHP, constructing an IN()
30
-        // clause dynamically, sending that back to the database to check if there are geolocation entries, then repeating
31
-        // until we have 10 to process - and the fact that we'd have to potentially retrieve all IPs from the database
32
-        // before we find any at all. This way keeps all of that legwork in the database, at the cost of a more complex
33
-        // query.
34
-        $statement = $database->query(<<<SQL
26
+		// fetch a bunch of un-geolocated IPs from the database.
27
+		// note we have to parse the forwardedip field in the database so we can test against the geolocation table.
28
+		// This guarantees we get ten unlocated IPs back, unless there actually aren't 10 available.
29
+		// Alternatives include downloading a small set of forwarded IPs, splitting it in PHP, constructing an IN()
30
+		// clause dynamically, sending that back to the database to check if there are geolocation entries, then repeating
31
+		// until we have 10 to process - and the fact that we'd have to potentially retrieve all IPs from the database
32
+		// before we find any at all. This way keeps all of that legwork in the database, at the cost of a more complex
33
+		// query.
34
+		$statement = $database->query(<<<SQL
35 35
             SELECT p.prox
36 36
             FROM (
37 37
               SELECT trim(substring_index(substring_index(r.forwardedip, ',', n.n), ',', -1)) prox
@@ -48,38 +48,38 @@  discard block
 block discarded – undo
48 48
             WHERE NOT EXISTS (SELECT 1 FROM geolocation g WHERE g.address = p.prox FOR UPDATE)
49 49
             LIMIT 10;
50 50
 SQL
51
-        );
51
+		);
52 52
 
53
-        $missingIps = $statement->fetchAll(PDO::FETCH_COLUMN);
53
+		$missingIps = $statement->fetchAll(PDO::FETCH_COLUMN);
54 54
 
55
-        $count = count($missingIps);
56
-        if ($count === 0) {
57
-            echo ". Found nothing to do.\n";
58
-            break;
59
-        }
55
+		$count = count($missingIps);
56
+		if ($count === 0) {
57
+			echo ". Found nothing to do.\n";
58
+			break;
59
+		}
60 60
 
61
-        echo ". Picked {$count} IP addresses\n";
61
+		echo ". Picked {$count} IP addresses\n";
62 62
 
63
-        foreach ($missingIps as $ip) {
64
-            echo ". . Getting location for {$ip}...\n";
65
-            $data = json_encode($locationProvider->getIpLocation($ip));
66
-            echo ". . . {$data}\n";
67
-        }
63
+		foreach ($missingIps as $ip) {
64
+			echo ". . Getting location for {$ip}...\n";
65
+			$data = json_encode($locationProvider->getIpLocation($ip));
66
+			echo ". . . {$data}\n";
67
+		}
68 68
 
69
-        echo ". IP location fetch complete.\n";
70
-        $database->commit();
71
-        echo ". Committed txn.\n";
72
-    } catch (Exception $ex) {
73
-        echo ". Encountered exception: " . $ex->getMessage(). "\n";
74
-        $database->rollBack();
75
-        echo ". Rolled back txn\n";
76
-        throw $ex;
77
-    } finally {
78
-        if($database->hasActiveTransaction()){
79
-            $database->rollBack();
80
-            echo ". Rolled back txn\n";
81
-        }
82
-    }
69
+		echo ". IP location fetch complete.\n";
70
+		$database->commit();
71
+		echo ". Committed txn.\n";
72
+	} catch (Exception $ex) {
73
+		echo ". Encountered exception: " . $ex->getMessage(). "\n";
74
+		$database->rollBack();
75
+		echo ". Rolled back txn\n";
76
+		throw $ex;
77
+	} finally {
78
+		if($database->hasActiveTransaction()){
79
+			$database->rollBack();
80
+			echo ". Rolled back txn\n";
81
+		}
82
+	}
83 83
 }
84 84
 
85 85
 echo "Done.\n";
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, $enableEmailConfirm;
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.
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.
includes/statistics/StatsIdUsers.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@  discard block
 block discarded – undo
14 14
 
15 15
 class StatsIdUsers extends StatisticsPage
16 16
 {
17
-    protected function execute()
18
-    {
19
-        return $this->getUserList();
20
-    }
17
+	protected function execute()
18
+	{
19
+		return $this->getUserList();
20
+	}
21 21
 
22
-    public function getPageTitle()
23
-    {
24
-        return "User identification status";
25
-    }
22
+	public function getPageTitle()
23
+	{
24
+		return "User identification status";
25
+	}
26 26
 
27
-    public function getPageName()
28
-    {
29
-        return "IdUsers";
30
-    }
27
+	public function getPageName()
28
+	{
29
+		return "IdUsers";
30
+	}
31 31
 
32
-    public function isProtected()
33
-    {
34
-        return true;
35
-    }
32
+	public function isProtected()
33
+	{
34
+		return true;
35
+	}
36 36
 
37
-    private function getUserList()
38
-    {
39
-        global $currentIdentificationVersion, $forceIdentification;
37
+	private function getUserList()
38
+	{
39
+		global $currentIdentificationVersion, $forceIdentification;
40 40
 
41
-        $query = <<<SQL
41
+		$query = <<<SQL
42 42
 select username, status, checkuser, identified, case 
43 43
     when coalesce(identified, 0) = 0 then 'Not identified'
44 44
     when identified < ${forceIdentification} then 'Expired'
@@ -51,16 +51,16 @@  discard block
 block discarded – undo
51 51
 order by username;
52 52
 SQL;
53 53
 
54
-        $qb = new QueryBrowser();
55
-        $qb->rowFetchMode = PDO::FETCH_NUM;
56
-        $qb->overrideTableTitles = array("User name", "Access level", "Checkuser?", "Version", "Identification status");
57
-        $r = $qb->executeQueryToTable($query);
54
+		$qb = new QueryBrowser();
55
+		$qb->rowFetchMode = PDO::FETCH_NUM;
56
+		$qb->overrideTableTitles = array("User name", "Access level", "Checkuser?", "Version", "Identification status");
57
+		$r = $qb->executeQueryToTable($query);
58 58
 
59
-        return $r;
60
-    }
59
+		return $r;
60
+	}
61 61
 
62
-    public function requiresWikiDatabase()
63
-    {
64
-        return false;
65
-    }
62
+	public function requiresWikiDatabase()
63
+	{
64
+		return false;
65
+	}
66 66
 }
Please login to merge, or discard this patch.