Completed
Branch release-2.1 (4c82a0)
by Rick
15:44
created
Sources/Class-CurlFetchWeb.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 	);
60 60
 
61 61
 	/**
62
-	* Start the curl object
63
-	* - allow for user override values
64
-	*
65
-	* @param array $options An array of cURL options
66
-	* @param int $max_redirect Maximum number of redirects
67
-	* @return void
68
-	*/
62
+	 * Start the curl object
63
+	 * - allow for user override values
64
+	 *
65
+	 * @param array $options An array of cURL options
66
+	 * @param int $max_redirect Maximum number of redirects
67
+	 * @return void
68
+	 */
69 69
 	public function __construct($options = array(), $max_redirect = 3)
70 70
 	{
71 71
 		// Initialize class variables
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	/**
77
-	* Main calling function,
78
-	*  - will request the page data from a given $url
79
-	*  - optionally will post data to the page form if post data is supplied
80
-	*  - passed arrays will be converted to a post string joined with &'s
81
-	*  - calls set_options to set the curl opts array values based on the defaults and user input
82
-	*
83
-	* @param string $url the site we are going to fetch
84
-	* @param array $post_data any post data as form name => value
85
-	* @return object An instance of the curl_fetch_web_data class
86
-	*/
77
+	 * Main calling function,
78
+	 *  - will request the page data from a given $url
79
+	 *  - optionally will post data to the page form if post data is supplied
80
+	 *  - passed arrays will be converted to a post string joined with &'s
81
+	 *  - calls set_options to set the curl opts array values based on the defaults and user input
82
+	 *
83
+	 * @param string $url the site we are going to fetch
84
+	 * @param array $post_data any post data as form name => value
85
+	 * @return object An instance of the curl_fetch_web_data class
86
+	 */
87 87
 	public function get_url_data($url, $post_data = array())
88 88
 	{
89 89
 		// POSTing some data perhaps?
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	}
101 101
 
102 102
 	/**
103
-	* Makes the actual cURL call
104
-	*  - stores responses (url, code, error, headers, body) in the response array
105
-	*  - detects 301, 302, 307 codes and will redirect to the given response header location
106
-	*
107
-	* @param string $url The site to fetch
108
-	* @param bool $redirect Whether or not this was a redirect request
109
-	* @return void|bool Sets various properties of the class or returns false if the URL isn't specified
110
-	*/
103
+	 * Makes the actual cURL call
104
+	 *  - stores responses (url, code, error, headers, body) in the response array
105
+	 *  - detects 301, 302, 307 codes and will redirect to the given response header location
106
+	 *
107
+	 * @param string $url The site to fetch
108
+	 * @param bool $redirect Whether or not this was a redirect request
109
+	 * @return void|bool Sets various properties of the class or returns false if the URL isn't specified
110
+	 */
111 111
 	private function curl_request($url, $redirect = false)
112 112
 	{
113 113
 		// we do have a url I hope
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
 	}
160 160
 
161 161
 	/**
162
-	* Used if being redirected to ensure we have a fully qualified address
163
-	*
164
-	* @param string $last_url The URL we went to
165
-	* @param string $new_url The URL we were redirected to
166
-	* @return string The new URL that was in the HTTP header
167
-	*/
162
+	 * Used if being redirected to ensure we have a fully qualified address
163
+	 *
164
+	 * @param string $last_url The URL we went to
165
+	 * @param string $new_url The URL we were redirected to
166
+	 * @return string The new URL that was in the HTTP header
167
+	 */
168 168
 	private function get_redirect_url($last_url = '', $new_url = '')
169 169
 	{
170 170
 		// Get the elements for these urls
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
 	}
183 183
 
184 184
 	/**
185
-	* Used to return the results to the calling program
186
-	*  - called as ->result() will return the full final array
187
-	*  - called as ->result('body') to just return the page source of the result
188
-	*
189
-	* @param string $area Used to return an area such as body, header, error
190
-	* @return string The response
191
-	*/
185
+	 * Used to return the results to the calling program
186
+	 *  - called as ->result() will return the full final array
187
+	 *  - called as ->result('body') to just return the page source of the result
188
+	 *
189
+	 * @param string $area Used to return an area such as body, header, error
190
+	 * @return string The response
191
+	 */
192 192
 	public function result($area = '')
193 193
 	{
194 194
 		$max_result = count($this->response) - 1;
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
 	}
202 202
 
203 203
 	/**
204
-	* Will return all results from all loops (redirects)
205
-	*  - Can be called as ->result_raw(x) where x is a specific loop results.
206
-	*  - Call as ->result_raw() for everything.
207
-	*
208
-	* @param string $response_number Which response we want to get
209
-	* @return array|string The entire response array or just the specified response
210
-	*/
204
+	 * Will return all results from all loops (redirects)
205
+	 *  - Can be called as ->result_raw(x) where x is a specific loop results.
206
+	 *  - Call as ->result_raw() for everything.
207
+	 *
208
+	 * @param string $response_number Which response we want to get
209
+	 * @return array|string The entire response array or just the specified response
210
+	 */
211 211
 	public function result_raw($response_number = '')
212 212
 	{
213 213
 		if (!is_numeric($response_number))
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
 	}
221 221
 
222 222
 	/**
223
-	* Takes supplied POST data and url encodes it
224
-	*  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
225
-	*  - drops vars with @ since we don't support sending files (uploading)
226
-	*
227
-	* @param array|string $post_data The raw POST data
228
-	* @return string A string of post data
229
-	*/
223
+	 * Takes supplied POST data and url encodes it
224
+	 *  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
225
+	 *  - drops vars with @ since we don't support sending files (uploading)
226
+	 *
227
+	 * @param array|string $post_data The raw POST data
228
+	 * @return string A string of post data
229
+	 */
230 230
 	private function build_post_data($post_data)
231 231
 	{
232 232
 		if (is_array($post_data))
@@ -245,11 +245,11 @@  discard block
 block discarded – undo
245 245
 	}
246 246
 
247 247
 	/**
248
-	* Sets the final cURL options for the current call
249
-	*  - overwrites our default values with user supplied ones or appends new user ones to what we have
250
-	*  - sets the callback function now that $this is existing
251
-	* @return void
252
-	*/
248
+	 * Sets the final cURL options for the current call
249
+	 *  - overwrites our default values with user supplied ones or appends new user ones to what we have
250
+	 *  - sets the callback function now that $this is existing
251
+	 * @return void
252
+	 */
253 253
 	private function set_options()
254 254
 	{
255 255
 		// Callback to parse the returned headers, if any
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
 	}
275 275
 
276 276
 	/**
277
-	* Called to initiate a redirect from a 301, 302 or 307 header
278
-	*  - resets the cURL options for the loop, sets the referrer flag
279
-	*
280
-	* @param string $target_url The URL we want to redirect to
281
-	* @param string $referer_url The URL that we're redirecting from
282
-	*/
277
+	 * Called to initiate a redirect from a 301, 302 or 307 header
278
+	 *  - resets the cURL options for the loop, sets the referrer flag
279
+	 *
280
+	 * @param string $target_url The URL we want to redirect to
281
+	 * @param string $referer_url The URL that we're redirecting from
282
+	 */
283 283
 	private function redirect($target_url, $referer_url)
284 284
 	{
285 285
 		// no no I last saw that over there ... really, 301, 302, 307
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
 	}
290 290
 
291 291
 	/**
292
-	* Callback function to parse returned headers
293
-	*  - lowercases everything to make it consistent
294
-	*
295
-	* @param type $cr Not sure what this is used for?
296
-	* @param string $header The header
297
-	* @return int The length of the header
298
-	*/
292
+	 * Callback function to parse returned headers
293
+	 *  - lowercases everything to make it consistent
294
+	 *
295
+	 * @param type $cr Not sure what this is used for?
296
+	 * @param string $header The header
297
+	 * @return int The length of the header
298
+	 */
299 299
 	private function header_callback($cr, $header)
300 300
 	{
301 301
 		$_header = trim($header);
Please login to merge, or discard this patch.
Sources/ManageMaintenance.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -694,7 +694,6 @@
 block discarded – undo
694 694
  * It shows as the maintain_forum admin area.
695 695
  * It is accessed from ?action=admin;area=maintain;sa=database;activity=optimize.
696 696
  * It also updates the optimize scheduled task such that the tables are not automatically optimized again too soon.
697
-
698 697
  * @uses the optimize sub template
699 698
  */
700 699
 function OptimizeTables()
Please login to merge, or discard this patch.
Sources/Xml.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -272,13 +272,13 @@
 block discarded – undo
272 272
 				$context['post_error']['messages'][] = $txt['mc_warning_template_error_no_body'];
273 273
 			// Add in few replacements.
274 274
 			/**
275
-			* These are the defaults:
276
-			* - {MEMBER} - Member Name. => current user for review
277
-			* - {MESSAGE} - Link to Offending Post. (If Applicable) => not applicable here, so not replaced
278
-			* - {FORUMNAME} - Forum Name.
279
-			* - {SCRIPTURL} - Web address of forum.
280
-			* - {REGARDS} - Standard email sign-off.
281
-			*/
275
+			 * These are the defaults:
276
+			 * - {MEMBER} - Member Name. => current user for review
277
+			 * - {MESSAGE} - Link to Offending Post. (If Applicable) => not applicable here, so not replaced
278
+			 * - {FORUMNAME} - Forum Name.
279
+			 * - {SCRIPTURL} - Web address of forum.
280
+			 * - {REGARDS} - Standard email sign-off.
281
+			 */
282 282
 			$find = array(
283 283
 				'{MEMBER}',
284 284
 				'{FORUMNAME}',
Please login to merge, or discard this patch.
Sources/Class-BrowserDetect.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	/**
100
-	* Determine if the browser is Opera or not
101
-	* @return boolean Whether or not this is Opera
102
-	*/
100
+	 * Determine if the browser is Opera or not
101
+	 * @return boolean Whether or not this is Opera
102
+	 */
103 103
 	function isOpera()
104 104
 	{
105 105
 		if (!isset($this->_browsers['is_opera']))
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	}
109 109
 
110 110
 	/**
111
-	* Determine if the browser is IE or not
112
-	* @return boolean true Whether or not the browser is IE
113
-	*/
111
+	 * Determine if the browser is IE or not
112
+	 * @return boolean true Whether or not the browser is IE
113
+	 */
114 114
 	function isIe()
115 115
 	{
116 116
 		// I'm IE, Yes I'm the real IE; All you other IEs are just imitating.
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 	}
121 121
 
122 122
 	/**
123
-	* Determine if the browser is IE11 or not
124
-	* @return boolean Whether or not the browser is IE11
125
-	*/
123
+	 * Determine if the browser is IE11 or not
124
+	 * @return boolean Whether or not the browser is IE11
125
+	 */
126 126
 	function isIe11()
127 127
 	{
128 128
 		// IE11 is a bit different than earlier versions
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
  	}
134 134
 
135 135
 	/**
136
-	* Determine if the browser is a Webkit based one or not
137
-	* @return boolean Whether or not this is a Webkit-based browser
138
-	*/
136
+	 * Determine if the browser is a Webkit based one or not
137
+	 * @return boolean Whether or not this is a Webkit-based browser
138
+	 */
139 139
 	function isWebkit()
140 140
 	{
141 141
 		if (!isset($this->_browsers['is_webkit']))
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 	}
145 145
 
146 146
 	/**
147
-	* Determine if the browser is Firefox or one of its variants
148
-	* @return boolean Whether or not this is Firefox (or one of its variants)
149
-	*/
147
+	 * Determine if the browser is Firefox or one of its variants
148
+	 * @return boolean Whether or not this is Firefox (or one of its variants)
149
+	 */
150 150
 	function isFirefox()
151 151
 	{
152 152
 		if (!isset($this->_browsers['is_firefox']))
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 	}
156 156
 
157 157
 	/**
158
-	* Determine if the browser is WebTv or not
159
-	* @return boolean Whether or not this is WebTV
160
-	*/
158
+	 * Determine if the browser is WebTv or not
159
+	 * @return boolean Whether or not this is WebTV
160
+	 */
161 161
 	function isWebTv()
162 162
 	{
163 163
 		if (!isset($this->_browsers['is_web_tv']))
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 	}
167 167
 
168 168
 	/**
169
-	* Determine if the browser is konqueror or not
170
-	* @return boolean Whether or not this is Konqueror
171
-	*/
169
+	 * Determine if the browser is konqueror or not
170
+	 * @return boolean Whether or not this is Konqueror
171
+	 */
172 172
 	function isKonqueror()
173 173
 	{
174 174
 		if (!isset($this->_browsers['is_konqueror']))
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 	}
178 178
 
179 179
 	/**
180
-	* Determine if the browser is Gecko or not
181
-	* @return boolean Whether or not this is a Gecko-based browser
182
-	*/
180
+	 * Determine if the browser is Gecko or not
181
+	 * @return boolean Whether or not this is a Gecko-based browser
182
+	 */
183 183
 	function isGecko()
184 184
 	{
185 185
 		if (!isset($this->_browsers['is_gecko']))
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 	}
189 189
 
190 190
 	/**
191
-	* Determine if the browser is Opera Mini or not
192
-	* @return boolean Whether or not this is Opera Mini
193
-	*/
191
+	 * Determine if the browser is Opera Mini or not
192
+	 * @return boolean Whether or not this is Opera Mini
193
+	 */
194 194
 	function isOperaMini()
195 195
 	{
196 196
 		if (!isset($this->_browsers['is_opera_mini']))
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
 	}
202 202
 
203 203
 	/**
204
-	* Determine if the browser is Opera Mobile or not
205
-	* @return boolean Whether or not this is Opera Mobile
206
-	*/
204
+	 * Determine if the browser is Opera Mobile or not
205
+	 * @return boolean Whether or not this is Opera Mobile
206
+	 */
207 207
 	function isOperaMobi()
208 208
 	{
209 209
 		if (!isset($this->_browsers['is_opera_mobi']))
Please login to merge, or discard this patch.
Sources/tasks/Register-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 class MsgReport_Notify_Background extends SMF_BackgroundTask
20 20
 {
21 21
 	/**
22
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
22
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23 23
 	 * @return bool Always returns true.
24 24
 	 */
25 25
 	public function execute()
Please login to merge, or discard this patch.
Sources/tasks/Likes-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 class MsgReport_Notify_Background extends SMF_BackgroundTask
20 20
 {
21 21
 	/**
22
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
22
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23 23
 	 * @return bool Always returns true.
24 24
 	 */
25 25
 	public function execute()
Please login to merge, or discard this patch.
Sources/tasks/MemberReport-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 class MsgReport_Notify_Background extends SMF_BackgroundTask
20 20
 {
21 21
 	/**
22
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
22
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23 23
 	 * @return bool Always returns true.
24 24
 	 */
25 25
 	public function execute()
Please login to merge, or discard this patch.
Sources/tasks/MsgReportReply-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 class MsgReport_Notify_Background extends SMF_BackgroundTask
20 20
 {
21 21
 	/**
22
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
22
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23 23
 	 * @return bool Always returns true.
24 24
 	 */
25 25
 	public function execute()
Please login to merge, or discard this patch.
Sources/tasks/EventNew-Notify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 class MsgReport_Notify_Background extends SMF_BackgroundTask
20 20
 {
21 21
 	/**
22
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
22
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23 23
 	 * @return bool Always returns true.
24 24
 	 */
25 25
 	public function execute()
Please login to merge, or discard this patch.