@@ -1572,6 +1572,7 @@ |
||
| 1572 | 1572 | /** |
| 1573 | 1573 | * Actually connect to the server and call the requested methods, parsing the result |
| 1574 | 1574 | * You should never have to call this function manually |
| 1575 | + * @param string $method |
|
| 1575 | 1576 | */ |
| 1576 | 1577 | function callServer($method, $params) { |
| 1577 | 1578 | //Always include the apikey if we are not logging in |
@@ -668,6 +668,9 @@ discard block |
||
| 668 | 668 | return defined('MODULE_PAYMENT_SAGE_PAY_DIRECT_STATUS'); |
| 669 | 669 | } |
| 670 | 670 | |
| 671 | + /** |
|
| 672 | + * @param string $parameter |
|
| 673 | + */ |
|
| 671 | 674 | function install($parameter = null) { |
| 672 | 675 | $OSCOM_Db = Registry::get('Db'); |
| 673 | 676 | |
@@ -867,6 +870,10 @@ discard block |
||
| 867 | 870 | return $params; |
| 868 | 871 | } |
| 869 | 872 | |
| 873 | + /** |
|
| 874 | + * @param string $url |
|
| 875 | + * @param string $parameters |
|
| 876 | + */ |
|
| 870 | 877 | function sendTransactionToGateway($url, $parameters) { |
| 871 | 878 | $server = parse_url($url); |
| 872 | 879 | |
@@ -985,6 +992,9 @@ discard block |
||
| 985 | 992 | return !empty($this->_cards); |
| 986 | 993 | } |
| 987 | 994 | |
| 995 | + /** |
|
| 996 | + * @param string $key |
|
| 997 | + */ |
|
| 988 | 998 | function isCard($key) { |
| 989 | 999 | if (!isset($this->_cards)) { |
| 990 | 1000 | $this->getCardTypes(); |
@@ -346,6 +346,9 @@ discard block |
||
| 346 | 346 | return defined('MODULE_PAYMENT_SAGE_PAY_FORM_STATUS'); |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | + /** |
|
| 350 | + * @param string $parameter |
|
| 351 | + */ |
|
| 349 | 352 | function install($parameter = null) { |
| 350 | 353 | $OSCOM_Db = Registry::get('Db'); |
| 351 | 354 | |
@@ -517,6 +520,9 @@ discard block |
||
| 517 | 520 | return $order_total_array; |
| 518 | 521 | } |
| 519 | 522 | |
| 523 | + /** |
|
| 524 | + * @param string $string |
|
| 525 | + */ |
|
| 520 | 526 | function encryptParams($string) { |
| 521 | 527 | // pad pkcs5 |
| 522 | 528 | $blocksize = 16; |
@@ -35,6 +35,10 @@ discard block |
||
| 35 | 35 | var $portable_hashes; |
| 36 | 36 | var $random_state; |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param integer $iteration_count_log2 |
|
| 40 | + * @param boolean $portable_hashes |
|
| 41 | + */ |
|
| 38 | 42 | function PasswordHash($iteration_count_log2, $portable_hashes) |
| 39 | 43 | { |
| 40 | 44 | $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
@@ -84,6 +88,9 @@ discard block |
||
| 84 | 88 | return $output; |
| 85 | 89 | } |
| 86 | 90 | |
| 91 | + /** |
|
| 92 | + * @param integer $count |
|
| 93 | + */ |
|
| 87 | 94 | function encode64($input, $count) |
| 88 | 95 | { |
| 89 | 96 | $output = ''; |
@@ -107,6 +114,9 @@ discard block |
||
| 107 | 114 | return $output; |
| 108 | 115 | } |
| 109 | 116 | |
| 117 | + /** |
|
| 118 | + * @param string $input |
|
| 119 | + */ |
|
| 110 | 120 | function gensalt_private($input) |
| 111 | 121 | { |
| 112 | 122 | $output = '$P$'; |
@@ -155,6 +165,9 @@ discard block |
||
| 155 | 165 | return $output; |
| 156 | 166 | } |
| 157 | 167 | |
| 168 | + /** |
|
| 169 | + * @param string $input |
|
| 170 | + */ |
|
| 158 | 171 | function gensalt_extended($input) |
| 159 | 172 | { |
| 160 | 173 | $count_log2 = min($this->iteration_count_log2 + 8, 24); |
@@ -173,6 +186,9 @@ discard block |
||
| 173 | 186 | return $output; |
| 174 | 187 | } |
| 175 | 188 | |
| 189 | + /** |
|
| 190 | + * @param string $input |
|
| 191 | + */ |
|
| 176 | 192 | function gensalt_blowfish($input) |
| 177 | 193 | { |
| 178 | 194 | # This one needs to use a different order of characters and a |
@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_EXT_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -32,6 +32,9 @@ |
||
| 32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_EXT_DIRECTORY_LISTING_HTTP_200; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param null|string $url |
|
| 37 | + */ |
|
| 35 | 38 | function getHttpRequest($url) { |
| 36 | 39 | $server = parse_url($url); |
| 37 | 40 | |
@@ -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 | |
@@ -167,6 +167,9 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | + /** |
|
| 171 | + * @param string $raw_datetime |
|
| 172 | + */ |
|
| 170 | 173 | function tep_datetime_short($raw_datetime) { |
| 171 | 174 | if ( ($raw_datetime == '0000-00-00 00:00:00') || ($raw_datetime == '') ) return false; |
| 172 | 175 | |
@@ -277,6 +280,10 @@ discard block |
||
| 277 | 280 | return $image; |
| 278 | 281 | } |
| 279 | 282 | |
| 283 | + /** |
|
| 284 | + * @param string $string |
|
| 285 | + * @param integer $len |
|
| 286 | + */ |
|
| 280 | 287 | function tep_break_string($string, $len, $break_char = '-') { |
| 281 | 288 | $l = 0; |
| 282 | 289 | $output = ''; |
@@ -334,6 +341,9 @@ discard block |
||
| 334 | 341 | } |
| 335 | 342 | } |
| 336 | 343 | |
| 344 | + /** |
|
| 345 | + * @param string $component |
|
| 346 | + */ |
|
| 337 | 347 | function tep_browser_detect($component) { |
| 338 | 348 | global $HTTP_USER_AGENT; |
| 339 | 349 | |
@@ -379,6 +389,11 @@ discard block |
||
| 379 | 389 | return $geo_zone_name; |
| 380 | 390 | } |
| 381 | 391 | |
| 392 | + /** |
|
| 393 | + * @param boolean $html |
|
| 394 | + * @param string $boln |
|
| 395 | + * @param string $eoln |
|
| 396 | + */ |
|
| 382 | 397 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { |
| 383 | 398 | $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'"); |
| 384 | 399 | $address_format = tep_db_fetch_array($address_format_query); |
@@ -476,6 +491,9 @@ discard block |
||
| 476 | 491 | return $state_prov_code; |
| 477 | 492 | } |
| 478 | 493 | |
| 494 | + /** |
|
| 495 | + * @param string $params |
|
| 496 | + */ |
|
| 479 | 497 | function tep_get_uprid($prid, $params) { |
| 480 | 498 | $uprid = $prid; |
| 481 | 499 | if ( (is_array($params)) && (!strstr($prid, '{')) ) { |
@@ -573,6 +591,9 @@ discard block |
||
| 573 | 591 | //// |
| 574 | 592 | // Wrapper for class_exists() function |
| 575 | 593 | // This function is not available in all PHP versions so we test it before using it. |
| 594 | + /** |
|
| 595 | + * @param string $class_name |
|
| 596 | + */ |
|
| 576 | 597 | function tep_class_exists($class_name) { |
| 577 | 598 | if (function_exists('class_exists')) { |
| 578 | 599 | return class_exists($class_name); |
@@ -732,6 +753,9 @@ discard block |
||
| 732 | 753 | |
| 733 | 754 | //// |
| 734 | 755 | // Sets the status of a banner |
| 756 | + /** |
|
| 757 | + * @param string $status |
|
| 758 | + */ |
|
| 735 | 759 | function tep_set_banner_status($banners_id, $status) { |
| 736 | 760 | if ($status == '1') { |
| 737 | 761 | return tep_db_query("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . $banners_id . "'"); |
@@ -768,6 +792,9 @@ discard block |
||
| 768 | 792 | |
| 769 | 793 | //// |
| 770 | 794 | // Sets the status of a product on special |
| 795 | + /** |
|
| 796 | + * @param string $status |
|
| 797 | + */ |
|
| 771 | 798 | function tep_set_specials_status($specials_id, $status) { |
| 772 | 799 | if ($status == '1') { |
| 773 | 800 | return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); |
@@ -1018,6 +1045,9 @@ discard block |
||
| 1018 | 1045 | tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'"); |
| 1019 | 1046 | } |
| 1020 | 1047 | |
| 1048 | + /** |
|
| 1049 | + * @param string $cache_block |
|
| 1050 | + */ |
|
| 1021 | 1051 | function tep_reset_cache_block($cache_block) { |
| 1022 | 1052 | global $cache_blocks; |
| 1023 | 1053 | |
@@ -1161,6 +1191,11 @@ discard block |
||
| 1161 | 1191 | return $value; |
| 1162 | 1192 | } |
| 1163 | 1193 | |
| 1194 | + /** |
|
| 1195 | + * @param string $to_name |
|
| 1196 | + * @param string $email_subject |
|
| 1197 | + * @param string $email_text |
|
| 1198 | + */ |
|
| 1164 | 1199 | function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { |
| 1165 | 1200 | if (SEND_EMAILS != 'true') return false; |
| 1166 | 1201 | |
@@ -1213,6 +1248,9 @@ discard block |
||
| 1213 | 1248 | |
| 1214 | 1249 | //// |
| 1215 | 1250 | // Wrapper function for round() for php3 compatibility |
| 1251 | + /** |
|
| 1252 | + * @return double |
|
| 1253 | + */ |
|
| 1216 | 1254 | function tep_round($value, $precision) { |
| 1217 | 1255 | return round($value, $precision); |
| 1218 | 1256 | } |
@@ -1329,6 +1367,10 @@ discard block |
||
| 1329 | 1367 | |
| 1330 | 1368 | //// |
| 1331 | 1369 | // Return a random value |
| 1370 | + /** |
|
| 1371 | + * @param integer $min |
|
| 1372 | + * @param integer $max |
|
| 1373 | + */ |
|
| 1332 | 1374 | function tep_rand($min = null, $max = null) { |
| 1333 | 1375 | static $seeded; |
| 1334 | 1376 | |
@@ -1352,6 +1394,9 @@ discard block |
||
| 1352 | 1394 | } |
| 1353 | 1395 | |
| 1354 | 1396 | // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) |
| 1397 | + /** |
|
| 1398 | + * @param string[] $from |
|
| 1399 | + */ |
|
| 1355 | 1400 | function tep_convert_linefeeds($from, $to, $string) { |
| 1356 | 1401 | if ((PHP_VERSION < "4.0.5") && is_array($from)) { |
| 1357 | 1402 | return preg_replace('/(' . implode('|', $from) . ')/', $to, $string); |