@@ -70,6 +70,9 @@ |
||
70 | 70 | $this->set_language($lng); |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $language |
|
75 | + */ |
|
73 | 76 | function set_language($language) { |
74 | 77 | if ( (tep_not_null($language)) && (isset($this->catalog_languages[$language])) ) { |
75 | 78 | $this->language = $this->catalog_languages[$language]; |
@@ -45,6 +45,10 @@ |
||
45 | 45 | return '<span class="smallText">Parse Time: ' . $this->timer_total . 's</span>'; |
46 | 46 | } |
47 | 47 | |
48 | + /** |
|
49 | + * @param string $message |
|
50 | + * @param string $type |
|
51 | + */ |
|
48 | 52 | function write($message, $type) { |
49 | 53 | error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' [' . $type . '] ' . $message . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); |
50 | 54 | } |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | if (!function_exists('checkdnsrr')) { |
58 | + |
|
59 | + /** |
|
60 | + * @param string $type |
|
61 | + */ |
|
58 | 62 | function checkdnsrr($host, $type) { |
59 | 63 | if(tep_not_null($host) && tep_not_null($type)) { |
60 | 64 | @exec("nslookup -type=" . escapeshellarg($type) . " " . escapeshellarg($host), $output); |
@@ -74,6 +78,11 @@ discard block |
||
74 | 78 | */ |
75 | 79 | |
76 | 80 | if ( !function_exists('http_build_query') && (PHP_VERSION >= 4)) { |
81 | + |
|
82 | + /** |
|
83 | + * @param string $numeric_prefix |
|
84 | + * @param string $arg_separator |
|
85 | + */ |
|
77 | 86 | function http_build_query($formdata, $numeric_prefix = null, $arg_separator = null) { |
78 | 87 | // If $formdata is an object, convert it to an array |
79 | 88 | if ( is_object($formdata) ) { |
@@ -125,6 +134,9 @@ discard block |
||
125 | 134 | } |
126 | 135 | |
127 | 136 | // Helper function |
137 | + /** |
|
138 | + * @param string $name |
|
139 | + */ |
|
128 | 140 | function http_build_query_helper($array, $name, $arg_separator) { |
129 | 141 | $tmp = array(); |
130 | 142 |
@@ -32,6 +32,10 @@ discard block |
||
32 | 32 | return mysqli_close($$link); |
33 | 33 | } |
34 | 34 | |
35 | + /** |
|
36 | + * @param integer $errno |
|
37 | + * @param string $error |
|
38 | + */ |
|
35 | 39 | function tep_db_error($query, $errno, $error) { |
36 | 40 | global $logger; |
37 | 41 | |
@@ -55,6 +59,9 @@ discard block |
||
55 | 59 | return $result; |
56 | 60 | } |
57 | 61 | |
62 | + /** |
|
63 | + * @param string $table |
|
64 | + */ |
|
58 | 65 | function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') { |
59 | 66 | reset($data); |
60 | 67 | if ($action == 'insert') { |
@@ -205,6 +212,9 @@ discard block |
||
205 | 212 | return mysql_error($link); |
206 | 213 | } |
207 | 214 | |
215 | + /** |
|
216 | + * @param string $charset |
|
217 | + */ |
|
208 | 218 | function mysqli_set_charset($link, $charset) { |
209 | 219 | if ( function_exists('mysql_set_charset') ) { |
210 | 220 | return mysql_set_charset($charset, $link); |
@@ -235,6 +245,9 @@ discard block |
||
235 | 245 | return mysql_error($link); |
236 | 246 | } |
237 | 247 | |
248 | + /** |
|
249 | + * @param integer $type |
|
250 | + */ |
|
238 | 251 | function mysqli_fetch_array($query, $type) { |
239 | 252 | return mysql_fetch_array($query, $type); |
240 | 253 | } |
@@ -109,6 +109,9 @@ discard block |
||
109 | 109 | //// |
110 | 110 | // The HTML form submit button wrapper function |
111 | 111 | // Outputs a button in the selected language |
112 | + /** |
|
113 | + * @param string $image |
|
114 | + */ |
|
112 | 115 | function tep_image_submit($image, $alt = '', $parameters = '') { |
113 | 116 | global $language; |
114 | 117 | |
@@ -176,6 +179,9 @@ discard block |
||
176 | 179 | |
177 | 180 | //// |
178 | 181 | // Output a form |
182 | + /** |
|
183 | + * @param string $name |
|
184 | + */ |
|
179 | 185 | function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') { |
180 | 186 | $form = '<form name="' . tep_output_string($name) . '" action="'; |
181 | 187 | if (tep_not_null($parameters)) { |
@@ -238,6 +244,9 @@ discard block |
||
238 | 244 | |
239 | 245 | //// |
240 | 246 | // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() |
247 | + /** |
|
248 | + * @param string $type |
|
249 | + */ |
|
241 | 250 | function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') { |
242 | 251 | global $HTTP_GET_VARS, $HTTP_POST_VARS; |
243 | 252 | |
@@ -256,6 +265,9 @@ discard block |
||
256 | 265 | |
257 | 266 | //// |
258 | 267 | // Output a form checkbox field |
268 | + /** |
|
269 | + * @param string $name |
|
270 | + */ |
|
259 | 271 | function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') { |
260 | 272 | return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare); |
261 | 273 | } |
@@ -269,6 +281,10 @@ discard block |
||
269 | 281 | //// |
270 | 282 | // Output a form textarea field |
271 | 283 | // The $wrap parameter is no longer used in the core xhtml template |
284 | + /** |
|
285 | + * @param string $name |
|
286 | + * @param string|false $wrap |
|
287 | + */ |
|
272 | 288 | function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { |
273 | 289 | global $HTTP_GET_VARS, $HTTP_POST_VARS; |
274 | 290 | |
@@ -365,6 +381,12 @@ discard block |
||
365 | 381 | |
366 | 382 | //// |
367 | 383 | // Output a jQuery UI Button |
384 | + /** |
|
385 | + * @param string $title |
|
386 | + * @param string $icon |
|
387 | + * @param string $link |
|
388 | + * @param string $priority |
|
389 | + */ |
|
368 | 390 | function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { |
369 | 391 | static $button_counter = 1; |
370 | 392 |
@@ -12,6 +12,11 @@ |
||
12 | 12 | /* Ensure the http_build_query is defined */ |
13 | 13 | |
14 | 14 | if (!function_exists('http_build_query')) { |
15 | + |
|
16 | + /** |
|
17 | + * @param string $prefix |
|
18 | + * @param string $sep |
|
19 | + */ |
|
15 | 20 | function http_build_query($data, $prefix='', $sep='', $key='') { |
16 | 21 | $ret = array(); |
17 | 22 | foreach ((array)$data as $k => $v) { |
@@ -69,6 +69,9 @@ |
||
69 | 69 | return $this->doMigrationCheck($this->_pm_code) || $this->doMigrationCheck($this->_pm_pf_code); |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $class |
|
74 | + */ |
|
72 | 75 | function doMigrationCheck($class) { |
73 | 76 | if ( file_exists(DIR_FS_CATALOG . 'includes/modules/payment/' . $class . '.php') ) { |
74 | 77 | if ( !class_exists($class) ) { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | $this->register('global'); |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $group |
|
25 | + */ |
|
23 | 26 | function register($group) { |
24 | 27 | $group = basename($group); |
25 | 28 |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /** |
111 | 111 | * addHeader |
112 | 112 | * set a unique request header |
113 | - * @param headerName the header name |
|
113 | + * @param headerName string header name |
|
114 | 114 | * @param headerValue the header value, ( unencoded) |
115 | 115 | **/ |
116 | 116 | function addHeader($headerName, $headerValue) { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | /** |
121 | 121 | * removeHeader |
122 | 122 | * unset a request header |
123 | - * @param headerName the header name |
|
123 | + * @param headerName string header name |
|
124 | 124 | **/ |
125 | 125 | function removeHeader($headerName) { |
126 | 126 | unset($this->requestHeaders[$headerName]); |
@@ -172,6 +172,7 @@ discard block |
||
172 | 172 | * get |
173 | 173 | * issue a GET http request |
174 | 174 | * @param uri URI (path on server) or full URL of the document |
175 | + * @param string $url |
|
175 | 176 | * @return string response status code (200 if ok) |
176 | 177 | * @seeAlso getHeaders(), getBody() |
177 | 178 | **/ |
@@ -309,7 +310,8 @@ discard block |
||
309 | 310 | * a) the command |
310 | 311 | * b) the request headers if they are defined |
311 | 312 | * c) the request body if defined |
312 | - * @return string the server repsonse status code |
|
313 | + * @param string $command |
|
314 | + * @return boolean|null the server repsonse status code |
|
313 | 315 | **/ |
314 | 316 | function sendCommand($command) { |
315 | 317 | $this->responseHeaders = array(); |
@@ -433,7 +435,7 @@ discard block |
||
433 | 435 | /** |
434 | 436 | * Calculate and return the URI to be sent ( proxy purpose ) |
435 | 437 | * @param the local URI |
436 | - * @return URI to be used in the HTTP request |
|
438 | + * @return string to be used in the HTTP request |
|
437 | 439 | * @scope private |
438 | 440 | **/ |
439 | 441 | function makeUri($uri) { |