@@ -523,7 +523,6 @@ discard block |
||
| 523 | 523 | /** |
| 524 | 524 | * Copy image. |
| 525 | 525 | * Used when imagecopyresample() is not available. |
| 526 | - |
|
| 527 | 526 | * @param resource $dst_img The destination image - a GD image resource |
| 528 | 527 | * @param resource $src_img The source image - a GD image resource |
| 529 | 528 | * @param int $dst_x The "x" coordinate of the destination image |
@@ -754,7 +753,6 @@ discard block |
||
| 754 | 753 | |
| 755 | 754 | /** |
| 756 | 755 | * Writes a gif file to disk as a png file. |
| 757 | - |
|
| 758 | 756 | * @param resource $gif A gif image resource |
| 759 | 757 | * @param string $lpszFileName The name of the file |
| 760 | 758 | * @param int $background_color The background color |
@@ -273,7 +273,6 @@ |
||
| 273 | 273 | * Modify any setting related to topics. |
| 274 | 274 | * Requires the admin_forum permission. |
| 275 | 275 | * Accessed from ?action=admin;area=postsettings;sa=topics. |
| 276 | - |
|
| 277 | 276 | * @param bool $return_config Whether or not to return the config_vars array (used for admin search) |
| 278 | 277 | * @return void|array Returns nothing or returns $config_vars if $return_config is true |
| 279 | 278 | * @uses Admin template, edit_topic_settings sub-template. |
@@ -130,7 +130,6 @@ |
||
| 130 | 130 | * |
| 131 | 131 | * @param int $closed 1 for counting closed reports, 0 for open ones. |
| 132 | 132 | * @return integer How many reports. |
| 133 | - |
|
| 134 | 133 | */ |
| 135 | 134 | function countReports($closed = 0) |
| 136 | 135 | { |
@@ -5370,7 +5370,6 @@ discard block |
||
| 5370 | 5370 | |
| 5371 | 5371 | /** |
| 5372 | 5372 | * Tries different modes to make file/dirs writable. Wrapper function for chmod() |
| 5373 | - |
|
| 5374 | 5373 | * @param string $file The file/dir full path. |
| 5375 | 5374 | * @param int $value Not needed, added for legacy reasons. |
| 5376 | 5375 | * @return boolean true if the file/dir is already writable or the function was able to make it writable, false if the function couldn't make the file/dir writable. |
@@ -5410,7 +5409,6 @@ discard block |
||
| 5410 | 5409 | |
| 5411 | 5410 | /** |
| 5412 | 5411 | * Wrapper function for json_decode() with error handling. |
| 5413 | - |
|
| 5414 | 5412 | * @param string $json The string to decode. |
| 5415 | 5413 | * @param bool $returnAsArray To return the decoded string as an array or an object, SMF only uses Arrays but to keep on compatibility with json_decode its set to false as default. |
| 5416 | 5414 | * @param bool $logIt To specify if the error will be logged if theres any. |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * Determine if the browser is Opera or not |
|
| 105 | - * @return boolean Whether or not this is Opera |
|
| 106 | - */ |
|
| 104 | + * Determine if the browser is Opera or not |
|
| 105 | + * @return boolean Whether or not this is Opera |
|
| 106 | + */ |
|
| 107 | 107 | function isOpera() |
| 108 | 108 | { |
| 109 | 109 | if (!isset($this->_browsers['is_opera'])) |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | - * Determine if the browser is IE or not |
|
| 116 | - * @return boolean true Whether or not the browser is IE |
|
| 117 | - */ |
|
| 115 | + * Determine if the browser is IE or not |
|
| 116 | + * @return boolean true Whether or not the browser is IE |
|
| 117 | + */ |
|
| 118 | 118 | function isIe() |
| 119 | 119 | { |
| 120 | 120 | // I'm IE, Yes I'm the real IE; All you other IEs are just imitating. |
@@ -124,9 +124,9 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
| 127 | - * Determine if the browser is IE11 or not |
|
| 128 | - * @return boolean Whether or not the browser is IE11 |
|
| 129 | - */ |
|
| 127 | + * Determine if the browser is IE11 or not |
|
| 128 | + * @return boolean Whether or not the browser is IE11 |
|
| 129 | + */ |
|
| 130 | 130 | function isIe11() |
| 131 | 131 | { |
| 132 | 132 | // IE11 is a bit different than earlier versions |
@@ -137,9 +137,9 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | - * Determine if the browser is Edge or not |
|
| 141 | - * @return boolean Whether or not the browser is Edge |
|
| 142 | - */ |
|
| 140 | + * Determine if the browser is Edge or not |
|
| 141 | + * @return boolean Whether or not the browser is Edge |
|
| 142 | + */ |
|
| 143 | 143 | function isEdge() |
| 144 | 144 | { |
| 145 | 145 | if (!isset($this->_browsers['is_edge'])) |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * Determine if the browser is a Webkit based one or not |
|
| 152 | - * @return boolean Whether or not this is a Webkit-based browser |
|
| 153 | - */ |
|
| 151 | + * Determine if the browser is a Webkit based one or not |
|
| 152 | + * @return boolean Whether or not this is a Webkit-based browser |
|
| 153 | + */ |
|
| 154 | 154 | function isWebkit() |
| 155 | 155 | { |
| 156 | 156 | if (!isset($this->_browsers['is_webkit'])) |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | - * Determine if the browser is Firefox or one of its variants |
|
| 163 | - * @return boolean Whether or not this is Firefox (or one of its variants) |
|
| 164 | - */ |
|
| 162 | + * Determine if the browser is Firefox or one of its variants |
|
| 163 | + * @return boolean Whether or not this is Firefox (or one of its variants) |
|
| 164 | + */ |
|
| 165 | 165 | function isFirefox() |
| 166 | 166 | { |
| 167 | 167 | if (!isset($this->_browsers['is_firefox'])) |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | - * Determine if the browser is WebTv or not |
|
| 174 | - * @return boolean Whether or not this is WebTV |
|
| 175 | - */ |
|
| 173 | + * Determine if the browser is WebTv or not |
|
| 174 | + * @return boolean Whether or not this is WebTV |
|
| 175 | + */ |
|
| 176 | 176 | function isWebTv() |
| 177 | 177 | { |
| 178 | 178 | if (!isset($this->_browsers['is_web_tv'])) |
@@ -181,9 +181,9 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | /** |
| 184 | - * Determine if the browser is konqueror or not |
|
| 185 | - * @return boolean Whether or not this is Konqueror |
|
| 186 | - */ |
|
| 184 | + * Determine if the browser is konqueror or not |
|
| 185 | + * @return boolean Whether or not this is Konqueror |
|
| 186 | + */ |
|
| 187 | 187 | function isKonqueror() |
| 188 | 188 | { |
| 189 | 189 | if (!isset($this->_browsers['is_konqueror'])) |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * Determine if the browser is Gecko or not |
|
| 196 | - * @return boolean Whether or not this is a Gecko-based browser |
|
| 197 | - */ |
|
| 195 | + * Determine if the browser is Gecko or not |
|
| 196 | + * @return boolean Whether or not this is a Gecko-based browser |
|
| 197 | + */ |
|
| 198 | 198 | function isGecko() |
| 199 | 199 | { |
| 200 | 200 | if (!isset($this->_browsers['is_gecko'])) |
@@ -203,9 +203,9 @@ discard block |
||
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
| 206 | - * Determine if the browser is Opera Mini or not |
|
| 207 | - * @return boolean Whether or not this is Opera Mini |
|
| 208 | - */ |
|
| 206 | + * Determine if the browser is Opera Mini or not |
|
| 207 | + * @return boolean Whether or not this is Opera Mini |
|
| 208 | + */ |
|
| 209 | 209 | function isOperaMini() |
| 210 | 210 | { |
| 211 | 211 | if (!isset($this->_browsers['is_opera_mini'])) |
@@ -216,9 +216,9 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
| 219 | - * Determine if the browser is Opera Mobile or not |
|
| 220 | - * @return boolean Whether or not this is Opera Mobile |
|
| 221 | - */ |
|
| 219 | + * Determine if the browser is Opera Mobile or not |
|
| 220 | + * @return boolean Whether or not this is Opera Mobile |
|
| 221 | + */ |
|
| 222 | 222 | function isOperaMobi() |
| 223 | 223 | { |
| 224 | 224 | if (!isset($this->_browsers['is_opera_mobi'])) |
@@ -694,7 +694,6 @@ |
||
| 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() |
@@ -59,13 +59,13 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -272,13 +272,13 @@ |
||
| 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}', |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | if (!$this->connection) |
| 794 | 794 | { |
| 795 | 795 | $this->error = 'bad_server'; |
| 796 | - $this->last_message = 'Invalid Server'; |
|
| 796 | + $this->last_message = 'Invalid Server'; |
|
| 797 | 797 | return; |
| 798 | 798 | } |
| 799 | 799 | |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | if (!$this->check_response(220)) |
| 802 | 802 | { |
| 803 | 803 | $this->error = 'bad_response'; |
| 804 | - $this->last_message = 'Bad Response'; |
|
| 804 | + $this->last_message = 'Bad Response'; |
|
| 805 | 805 | return; |
| 806 | 806 | } |
| 807 | 807 | |