Completed
Push — stwalkerster-patch-lwcu ( 2fb764 )
by Simon
01:42
created
includes/Providers/IpLocationProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 	{
55 55
 		try {
56 56
 			if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
57
-				$xml = @file_get_contents($this->getApiBase() . '?key=' . $this->apikey . '&ip=' . $ip . '&format=xml');
57
+				$xml = @file_get_contents($this->getApiBase().'?key='.$this->apikey.'&ip='.$ip.'&format=xml');
58 58
 
59 59
 				$response = @new SimpleXMLElement($xml);
60 60
 
Please login to merge, or discard this patch.
includes/Providers/CachedApiAntispoofProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		$cacheResult = AntiSpoofCache::getByUsername($username, gGetDb());
16 16
 		if ($cacheResult == false) {
17 17
 			// get the data from the API
18
-			$data = file_get_contents($mediawikiWebServiceEndpoint . "?action=antispoof&format=php&username=" . urlencode($username));
18
+			$data = file_get_contents($mediawikiWebServiceEndpoint."?action=antispoof&format=php&username=".urlencode($username));
19 19
 
20 20
 			$cacheEntry = new AntiSpoofCache();
21 21
 			$cacheEntry->setDatabase(gGetDb());
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			$cacheResult->delete();
36 36
 
37 37
 			if (isset($result['error']['info'])) {
38
-				throw new Exception("Unrecognised API response to query: " . $result['error']['info']);
38
+				throw new Exception("Unrecognised API response to query: ".$result['error']['info']);
39 39
 			}
40 40
 
41 41
 			throw new Exception("Unrecognised API response to query.");
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 		if ($result['antispoof']['result'] == "error") {
55 55
 			// we've got conflicts, let's do something with them.
56
-			throw new Exception("Encountered error while getting result: " . $result['antispoof']['error']);
56
+			throw new Exception("Encountered error while getting result: ".$result['antispoof']['error']);
57 57
 		}
58 58
 
59 59
 		throw new Exception("Unrecognised API response to query.");
Please login to merge, or discard this patch.
includes/DataObjects/Notification.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$blacklist = array("DCC", "CCTP", "PRIVMSG");
99 99
 		$message = str_replace($blacklist, "(IRC Blacklist)", $message); //Lets stop DCC etc
100 100
 
101
-		$msg = IrcColourCode::RESET . IrcColourCode::BOLD . "[$whichami]" . IrcColourCode::RESET . ": $message";
101
+		$msg = IrcColourCode::RESET.IrcColourCode::BOLD."[$whichami]".IrcColourCode::RESET.": $message";
102 102
 
103 103
 		try {
104 104
 			$database = gGetDb('notifications');
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public static function userApproved(User $user)
138 138
 	{
139
-		self::send("{$user->getUsername()} approved by " . User::getCurrent()->getUsername());
139
+		self::send("{$user->getUsername()} approved by ".User::getCurrent()->getUsername());
140 140
 	}
141 141
 
142 142
 	/**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 */
146 146
 	public static function userPromoted(User $user)
147 147
 	{
148
-		self::send("{$user->getUsername()} promoted to tool admin by " . User::getCurrent()->getUsername());
148
+		self::send("{$user->getUsername()} promoted to tool admin by ".User::getCurrent()->getUsername());
149 149
 	}
150 150
 
151 151
 	/**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public static function userDeclined(User $user, $reason)
157 157
 	{
158
-		self::send("{$user->getUsername()} declined by " . User::getCurrent()->getUsername() . " ($reason)");
158
+		self::send("{$user->getUsername()} declined by ".User::getCurrent()->getUsername()." ($reason)");
159 159
 	}
160 160
 
161 161
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public static function userDemoted(User $user, $reason)
167 167
 	{
168
-		self::send("{$user->getUsername()} demoted by " . User::getCurrent()->getUsername() . " ($reason)");
168
+		self::send("{$user->getUsername()} demoted by ".User::getCurrent()->getUsername()." ($reason)");
169 169
 	}
170 170
 
171 171
 	/**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	public static function userSuspended(User $user, $reason)
177 177
 	{
178
-		self::send("{$user->getUsername()} suspended by " . User::getCurrent()->getUsername() . " ($reason)");
178
+		self::send("{$user->getUsername()} suspended by ".User::getCurrent()->getUsername()." ($reason)");
179 179
 	}
180 180
 
181 181
 	/**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public static function userPrefChange(User $user)
186 186
 	{
187
-		self::send("{$user->getUsername()}'s preferences were changed by " . User::getCurrent()->getUsername());
187
+		self::send("{$user->getUsername()}'s preferences were changed by ".User::getCurrent()->getUsername());
188 188
 	}
189 189
 
190 190
 	/**
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 */
195 195
 	public static function userRenamed(User $user, $old)
196 196
 	{
197
-		self::send(User::getCurrent()->getUsername() . " renamed $old to {$user->getUsername()}");
197
+		self::send(User::getCurrent()->getUsername()." renamed $old to {$user->getUsername()}");
198 198
 	}
199 199
 
200 200
 	#endregion
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	public static function interfaceMessageEdited(InterfaceMessage $message)
209 209
 	{
210
-		self::send("Message {$message->getDescription()} ({$message->getId()}) edited by " . User::getCurrent()->getUsername());
210
+		self::send("Message {$message->getDescription()} ({$message->getId()}) edited by ".User::getCurrent()->getUsername());
211 211
 	}
212 212
 	#endregion
213 213
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 */
219 219
 	public static function welcomeTemplateCreated(WelcomeTemplate $template)
220 220
 	{
221
-		self::send("Welcome template {$template->getId()} created by " . User::getCurrent()->getUsername());
221
+		self::send("Welcome template {$template->getId()} created by ".User::getCurrent()->getUsername());
222 222
 	}
223 223
 
224 224
 	/**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	public static function welcomeTemplateDeleted($templateid)
229 229
 	{
230
-		self::send("Welcome template {$templateid} deleted by " . User::getCurrent()->getUsername());
230
+		self::send("Welcome template {$templateid} deleted by ".User::getCurrent()->getUsername());
231 231
 	}
232 232
 
233 233
 	/**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	public static function welcomeTemplateEdited(WelcomeTemplate $template)
238 238
 	{
239
-		self::send("Welcome template {$template->getId()} edited by " . User::getCurrent()->getUsername());
239
+		self::send("Welcome template {$template->getId()} edited by ".User::getCurrent()->getUsername());
240 240
 	}
241 241
 
242 242
 	#endregion
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			$duration = "indefinitely";
253 253
 		}
254 254
 		else {
255
-			$duration = "until " . date("F j, Y, g:i a", $ban->getDuration());
255
+			$duration = "until ".date("F j, Y, g:i a", $ban->getDuration());
256 256
 		}
257 257
 
258 258
 		$username = User::getCurrent()->getUsername();
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public static function unbanned(Ban $ban, $unbanreason)
269 269
 	{
270
-		self::send($ban->getTarget() . " unbanned by " . User::getCurrent()->getUsername() . " (" . $unbanreason . ")");
270
+		self::send($ban->getTarget()." unbanned by ".User::getCurrent()->getUsername()." (".$unbanreason.")");
271 271
 	}
272 272
 
273 273
 	#endregion
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
 		global $baseurl;
284 284
 
285 285
 		self::send(
286
-			IrcColourCode::DARK_GREY . "[["
287
-			. IrcColourCode::DARK_GREEN . "acc:"
288
-			. IrcColourCode::ORANGE . $request->getId()
289
-			. IrcColourCode::DARK_GREY . "]]"
290
-			. IrcColourCode::RED . " N "
291
-			. IrcColourCode::DARK_BLUE . $baseurl . "/acc.php?action=zoom&id={$request->getId()} "
292
-			. IrcColourCode::DARK_RED . "* "
293
-			. IrcColourCode::DARK_GREEN . $request->getName()
294
-			. IrcColourCode::DARK_RED . " * "
286
+			IrcColourCode::DARK_GREY."[["
287
+			. IrcColourCode::DARK_GREEN."acc:"
288
+			. IrcColourCode::ORANGE.$request->getId()
289
+			. IrcColourCode::DARK_GREY."]]"
290
+			. IrcColourCode::RED." N "
291
+			. IrcColourCode::DARK_BLUE.$baseurl."/acc.php?action=zoom&id={$request->getId()} "
292
+			. IrcColourCode::DARK_RED."* "
293
+			. IrcColourCode::DARK_GREEN.$request->getName()
294
+			. IrcColourCode::DARK_RED." * "
295 295
 			. IrcColourCode::RESET
296 296
 			);
297 297
 	}
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 	 */
435 435
 	public static function emailCreated(EmailTemplate $template)
436 436
 	{
437
-		self::send("Email {$template->getId()} ({$template->getName()}) created by " . User::getCurrent()->getUsername());
437
+		self::send("Email {$template->getId()} ({$template->getName()}) created by ".User::getCurrent()->getUsername());
438 438
 	}
439 439
 
440 440
 	/**
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	public static function emailEdited(EmailTemplate $template)
445 445
 	{
446
-		self::send("Email {$template->getId()} ({$template->getName()}) edited by " . User::getCurrent()->getUsername());
446
+		self::send("Email {$template->getId()} ({$template->getName()}) edited by ".User::getCurrent()->getUsername());
447 447
 	}
448 448
 
449 449
 	#endregion
Please login to merge, or discard this patch.
includes/DataObjects/Ban.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,6 +258,6 @@
 block discarded – undo
258 258
 	
259 259
 	public function getObjectDescription()
260 260
 	{
261
-		return 'Ban #' . $this->getId() . " (" . htmlentities($this->target) . ")</a>";
261
+		return 'Ban #'.$this->getId()." (".htmlentities($this->target).")</a>";
262 262
 	}
263 263
 }
Please login to merge, or discard this patch.
includes/DataObjects/InterfaceMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,6 +118,6 @@
 block discarded – undo
118 118
 	
119 119
 	public function getObjectDescription()
120 120
 	{
121
-		return '<a href="acc.php?action=messagemgmt&amp;view=' . $this->getId() . '">' . htmlentities($this->description) . "</a>";
121
+		return '<a href="acc.php?action=messagemgmt&amp;view='.$this->getId().'">'.htmlentities($this->description)."</a>";
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
includes/DataObjects/WelcomeTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,6 +108,6 @@
 block discarded – undo
108 108
 	
109 109
 	public function getObjectDescription()
110 110
 	{
111
-		return '<a href="acc.php?action=templatemgmt&amp;view=' . $this->getId() . '">' . htmlentities($this->usercode) . "</a>";
111
+		return '<a href="acc.php?action=templatemgmt&amp;view='.$this->getId().'">'.htmlentities($this->usercode)."</a>";
112 112
 	}
113 113
 }
Please login to merge, or discard this patch.
includes/BootstrapSkin.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 
119 119
 		// not equal to one, as zero uses the plural form too.
120 120
 		if ($resultSetCount != 1) {
121
-			$onlinemessage = $resultSetCount . " Account Creators currently online (past 5 minutes): $creators";
121
+			$onlinemessage = $resultSetCount." Account Creators currently online (past 5 minutes): $creators";
122 122
 		}
123 123
 		else {
124
-			$onlinemessage = $resultSetCount . " Account Creator currently online (past 5 minutes): $creators";
124
+			$onlinemessage = $resultSetCount." Account Creator currently online (past 5 minutes): $creators";
125 125
 		}
126 126
 
127
-		$online = '<p class="span6 text-right"><small>' . $onlinemessage . '</small></p>';
127
+		$online = '<p class="span6 text-right"><small>'.$onlinemessage.'</small></p>';
128 128
 
129 129
 		if (isset($_SESSION['user'])) {
130 130
 			$smarty->assign("onlineusers", $online);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$returnData = $smarty->fetch("alert.tpl");
172 172
 
173 173
 		if ($centre) {
174
-			$returnData = '<div class="row-fluid"><div class="span8 offset2">' . $returnData . '</div></div>';
174
+			$returnData = '<div class="row-fluid"><div class="span8 offset2">'.$returnData.'</div></div>';
175 175
 		}
176 176
 
177 177
 		if ($return) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@
 block discarded – undo
102 102
 		$creators = implode(
103 103
 			", ",
104 104
 			array_map(
105
-				function($arg)
106
-				{
105
+				function($arg) {
107 106
 					/** @var User $arg */
108 107
 					return
109 108
 						"<a href=\"statistics.php?page=Users&amp;user="
Please login to merge, or discard this patch.
includes/StatisticsPage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 	public static function Create($pageName)
24 24
 	{
25 25
 		// calculate the name of the statistics page
26
-		$statsPage = "Stats" . $pageName;
26
+		$statsPage = "Stats".$pageName;
27 27
 
28 28
 		global $filepath;
29 29
 		// check the stats page definition exists...
30
-		if (file_exists($filepath . "/includes/statistics/Stats" . $pageName . ".php")) {
30
+		if (file_exists($filepath."/includes/statistics/Stats".$pageName.".php")) {
31 31
 		// and include it.
32
-			require_once($filepath . "/includes/statistics/Stats" . $pageName . ".php");
32
+			require_once($filepath."/includes/statistics/Stats".$pageName.".php");
33 33
 		}
34 34
 		else {
35 35
 			// class def doesn't exist: error
36
-			die("Unknown statistics page: " . $statsPage);
36
+			die("Unknown statistics page: ".$statsPage);
37 37
 		}
38 38
 
39 39
 		// ok, so the file where the class def should be exists, but we need to check the class
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		}
57 57
 		else {
58 58
 			// file exists, but no definition of the class
59
-			die("No definition for statistics page: " . $statsPage);
59
+			die("No definition for statistics page: ".$statsPage);
60 60
 		}
61 61
 	}
62 62
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		}
146 146
 
147 147
 		// not protected or access allowed
148
-		echo '<div class="page-header"><h1>' . $this->getPageTitle() . '</h1></div>';
148
+		echo '<div class="page-header"><h1>'.$this->getPageTitle().'</h1></div>';
149 149
 
150 150
 		if ($this->requiresSimpleHtmlEnvironment()) {
151 151
 			echo '<div class="row-fluid"><div class="span12">';
Please login to merge, or discard this patch.
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.