Completed
Pull Request — release-2.1 (#4471)
by Scott
08:27
created
Sources/tasks/GroupReq-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 class GroupReq_Notify_Background extends SMF_BackgroundTask
21 21
 {
22 22
 	/**
23
-     * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed.
23
+	 * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed.
24 24
 	 * @return bool Always returns true.
25 25
 	 */
26 26
 	public function execute()
Please login to merge, or discard this patch.
Sources/ManageBans.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 		)
785 785
 	);
786 786
 	while ($row = $smcFunc['db_fetch_assoc']($request))
787
-	    $error_ips[] = inet_dtop($row['ip']);
787
+		$error_ips[] = inet_dtop($row['ip']);
788 788
 	$smcFunc['db_free_result']($request);
789 789
 
790 790
 	return $error_ips;
@@ -2168,9 +2168,9 @@  discard block
 block discarded – undo
2168 2168
 
2169 2169
 	if ($low == '255.255.255.255') return 'unknown';
2170 2170
 	if ($low == $high)
2171
-	    return $low;
2171
+		return $low;
2172 2172
 	else
2173
-	    return $low . '-' . $high;
2173
+		return $low . '-' . $high;
2174 2174
 }
2175 2175
 
2176 2176
 /**
Please login to merge, or discard this patch.
Sources/Who.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -673,7 +673,7 @@
 block discarded – undo
673 673
 						'Nikola "Dzonny" Novaković',
674 674
 						// Localizers
675 675
 						'Dr. Deejay',
676
-                        			'd3vcho',
676
+									'd3vcho',
677 677
 						// Former Localizers
678 678
 						'Relyana',
679 679
 					),
Please login to merge, or discard this patch.
other/upgrade.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
 // The helper is crucial. Include it first thing.
84 84
 if (!file_exists($upgrade_path . '/upgrade-helper.php'))
85
-    die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.');
85
+	die('upgrade-helper.php not found where it was expected: ' . $upgrade_path . '/upgrade-helper.php! Make sure you have uploaded ALL files from the upgrade package. The upgrader cannot continue.');
86 86
 
87 87
 require_once($upgrade_path . '/upgrade-helper.php');
88 88
 
Please login to merge, or discard this patch.
Sources/Class-CurlFetchWeb.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
 	public $headers;
95 95
 
96 96
 	/**
97
-	* Start the curl object
98
-	* - allow for user override values
99
-	*
100
-	* @param array $options An array of cURL options
101
-	* @param int $max_redirect Maximum number of redirects
102
-	*/
97
+	 * Start the curl object
98
+	 * - allow for user override values
99
+	 *
100
+	 * @param array $options An array of cURL options
101
+	 * @param int $max_redirect Maximum number of redirects
102
+	 */
103 103
 	public function __construct($options = array(), $max_redirect = 3)
104 104
 	{
105 105
 		// Initialize class variables
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
 	}
109 109
 
110 110
 	/**
111
-	* Main calling function,
112
-	*  - will request the page data from a given $url
113
-	*  - optionally will post data to the page form if post data is supplied
114
-	*  - passed arrays will be converted to a post string joined with &'s
115
-	*  - calls set_options to set the curl opts array values based on the defaults and user input
116
-	*
117
-	* @param string $url the site we are going to fetch
118
-	* @param array $post_data any post data as form name => value
119
-	* @return object An instance of the curl_fetch_web_data class
120
-	*/
111
+	 * Main calling function,
112
+	 *  - will request the page data from a given $url
113
+	 *  - optionally will post data to the page form if post data is supplied
114
+	 *  - passed arrays will be converted to a post string joined with &'s
115
+	 *  - calls set_options to set the curl opts array values based on the defaults and user input
116
+	 *
117
+	 * @param string $url the site we are going to fetch
118
+	 * @param array $post_data any post data as form name => value
119
+	 * @return object An instance of the curl_fetch_web_data class
120
+	 */
121 121
 	public function get_url_data($url, $post_data = array())
122 122
 	{
123 123
 		// POSTing some data perhaps?
@@ -134,14 +134,14 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	* Makes the actual cURL call
138
-	*  - stores responses (url, code, error, headers, body) in the response array
139
-	*  - detects 301, 302, 307 codes and will redirect to the given response header location
140
-	*
141
-	* @param string $url The site to fetch
142
-	* @param bool $redirect Whether or not this was a redirect request
143
-	* @return void|bool Sets various properties of the class or returns false if the URL isn't specified
144
-	*/
137
+	 * Makes the actual cURL call
138
+	 *  - stores responses (url, code, error, headers, body) in the response array
139
+	 *  - detects 301, 302, 307 codes and will redirect to the given response header location
140
+	 *
141
+	 * @param string $url The site to fetch
142
+	 * @param bool $redirect Whether or not this was a redirect request
143
+	 * @return void|bool Sets various properties of the class or returns false if the URL isn't specified
144
+	 */
145 145
 	private function curl_request($url, $redirect = false)
146 146
 	{
147 147
 		// we do have a url I hope
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
 	}
194 194
 
195 195
 	/**
196
-	* Used if being redirected to ensure we have a fully qualified address
197
-	*
198
-	* @param string $last_url The URL we went to
199
-	* @param string $new_url The URL we were redirected to
200
-	* @return string The new URL that was in the HTTP header
201
-	*/
196
+	 * Used if being redirected to ensure we have a fully qualified address
197
+	 *
198
+	 * @param string $last_url The URL we went to
199
+	 * @param string $new_url The URL we were redirected to
200
+	 * @return string The new URL that was in the HTTP header
201
+	 */
202 202
 	private function get_redirect_url($last_url = '', $new_url = '')
203 203
 	{
204 204
 		// Get the elements for these urls
@@ -216,13 +216,13 @@  discard block
 block discarded – undo
216 216
 	}
217 217
 
218 218
 	/**
219
-	* Used to return the results to the calling program
220
-	*  - called as ->result() will return the full final array
221
-	*  - called as ->result('body') to just return the page source of the result
222
-	*
223
-	* @param string $area Used to return an area such as body, header, error
224
-	* @return string The response
225
-	*/
219
+	 * Used to return the results to the calling program
220
+	 *  - called as ->result() will return the full final array
221
+	 *  - called as ->result('body') to just return the page source of the result
222
+	 *
223
+	 * @param string $area Used to return an area such as body, header, error
224
+	 * @return string The response
225
+	 */
226 226
 	public function result($area = '')
227 227
 	{
228 228
 		$max_result = count($this->response) - 1;
@@ -235,13 +235,13 @@  discard block
 block discarded – undo
235 235
 	}
236 236
 
237 237
 	/**
238
-	* Will return all results from all loops (redirects)
239
-	*  - Can be called as ->result_raw(x) where x is a specific loop results.
240
-	*  - Call as ->result_raw() for everything.
241
-	*
242
-	* @param string $response_number Which response we want to get
243
-	* @return array|string The entire response array or just the specified response
244
-	*/
238
+	 * Will return all results from all loops (redirects)
239
+	 *  - Can be called as ->result_raw(x) where x is a specific loop results.
240
+	 *  - Call as ->result_raw() for everything.
241
+	 *
242
+	 * @param string $response_number Which response we want to get
243
+	 * @return array|string The entire response array or just the specified response
244
+	 */
245 245
 	public function result_raw($response_number = '')
246 246
 	{
247 247
 		if (!is_numeric($response_number))
@@ -254,13 +254,13 @@  discard block
 block discarded – undo
254 254
 	}
255 255
 
256 256
 	/**
257
-	* Takes supplied POST data and url encodes it
258
-	*  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
259
-	*  - drops vars with @ since we don't support sending files (uploading)
260
-	*
261
-	* @param array|string $post_data The raw POST data
262
-	* @return string A string of post data
263
-	*/
257
+	 * Takes supplied POST data and url encodes it
258
+	 *  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
259
+	 *  - drops vars with @ since we don't support sending files (uploading)
260
+	 *
261
+	 * @param array|string $post_data The raw POST data
262
+	 * @return string A string of post data
263
+	 */
264 264
 	private function build_post_data($post_data)
265 265
 	{
266 266
 		if (is_array($post_data))
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
 	}
280 280
 
281 281
 	/**
282
-	* Sets the final cURL options for the current call
283
-	*  - overwrites our default values with user supplied ones or appends new user ones to what we have
284
-	*  - sets the callback function now that $this is existing
285
-	* @return void
286
-	*/
282
+	 * Sets the final cURL options for the current call
283
+	 *  - overwrites our default values with user supplied ones or appends new user ones to what we have
284
+	 *  - sets the callback function now that $this is existing
285
+	 * @return void
286
+	 */
287 287
 	private function set_options()
288 288
 	{
289 289
 		// Callback to parse the returned headers, if any
@@ -308,12 +308,12 @@  discard block
 block discarded – undo
308 308
 	}
309 309
 
310 310
 	/**
311
-	* Called to initiate a redirect from a 301, 302 or 307 header
312
-	*  - resets the cURL options for the loop, sets the referrer flag
313
-	*
314
-	* @param string $target_url The URL we want to redirect to
315
-	* @param string $referer_url The URL that we're redirecting from
316
-	*/
311
+	 * Called to initiate a redirect from a 301, 302 or 307 header
312
+	 *  - resets the cURL options for the loop, sets the referrer flag
313
+	 *
314
+	 * @param string $target_url The URL we want to redirect to
315
+	 * @param string $referer_url The URL that we're redirecting from
316
+	 */
317 317
 	private function redirect($target_url, $referer_url)
318 318
 	{
319 319
 		// no no I last saw that over there ... really, 301, 302, 307
@@ -323,13 +323,13 @@  discard block
 block discarded – undo
323 323
 	}
324 324
 
325 325
 	/**
326
-	* Callback function to parse returned headers
327
-	*  - lowercases everything to make it consistent
328
-	*
329
-	* @param type $cr Not sure what this is used for?
330
-	* @param string $header The header
331
-	* @return int The length of the header
332
-	*/
326
+	 * Callback function to parse returned headers
327
+	 *  - lowercases everything to make it consistent
328
+	 *
329
+	 * @param type $cr Not sure what this is used for?
330
+	 * @param string $header The header
331
+	 * @return int The length of the header
332
+	 */
333 333
 	private function header_callback($cr, $header)
334 334
 	{
335 335
 		$_header = trim($header);
Please login to merge, or discard this patch.
Sources/News.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 			{
838 838
 				uasort($loaded_attachments, function($a, $b) {
839 839
 					if ($a['filesize'] == $b['filesize'])
840
-					        return 0;
840
+							return 0;
841 841
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
842 842
 				});
843 843
 			}
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 			{
1243 1243
 				uasort($loaded_attachments, function($a, $b) {
1244 1244
 					if ($a['filesize'] == $b['filesize'])
1245
-					        return 0;
1245
+							return 0;
1246 1246
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
1247 1247
 				});
1248 1248
 			}
Please login to merge, or discard this patch.
Sources/Subs-Sound.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 	cache_put_data('wave_file/' . $user_info['ip2'], $ip2 ? $ip2 + 1 : 1, 20);
39 39
 
40 40
 	// Fixate randomization for this word.
41
-    $tmp = unpack('n', md5($word . session_id()));
41
+	$tmp = unpack('n', md5($word . session_id()));
42 42
 	mt_srand(end($tmp));
43 43
 
44 44
 	// Try to see if there's a sound font in the user's language.
Please login to merge, or discard this patch.
Sources/tasks/CreatePost-Notify.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 class CreatePost_Notify_Background extends SMF_BackgroundTask
19 19
 {
20 20
 	/**
21
-     * This handles notifications when a new post is created - new topic, reply, quotes and mentions.
21
+	 * This handles notifications when a new post is created - new topic, reply, quotes and mentions.
22 22
 	 * @return bool Always returns true
23 23
 	 */
24 24
 	public function execute()
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 			// Don't send a notification if the watching member ignored the member who made the action.
108 108
 			if (!empty($data['pm_ignore_list']) && in_array($data['id_member_updated'], explode(',', $data['pm_ignore_list'])))
109
-			    continue;
109
+				continue;
110 110
 			if (!in_array($type, array('reply', 'topic')) && $notify_types == 2 && $member != $data['id_member_started'])
111 111
 				continue;
112 112
 			elseif (in_array($type, array('reply', 'topic')) && $member == $posterOptions['id'])
Please login to merge, or discard this patch.
proxy.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 
119 119
 		// Right, image not cached? Simply redirect, then.
120 120
 		if (!$response)
121
-		    redirectexit($request);
121
+			redirectexit($request);
122 122
 
123 123
 		// Make sure we're serving an image
124 124
 		$contentParts = explode('/', !empty($cached['content_type']) ? $cached['content_type'] : '');
Please login to merge, or discard this patch.