@@ -32,6 +32,9 @@ |
||
32 | 32 | return MODULE_SECURITY_CHECK_EXTENDED_ADMIN_INCLUDES_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_IMAGES_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_INCLUDES_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 |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | private $_config; |
29 | 29 | private $_http; |
30 | 30 | |
31 | + /** |
|
32 | + * @param Gateway $gateway |
|
33 | + */ |
|
31 | 34 | public function __construct($gateway) |
32 | 35 | { |
33 | 36 | $this->_gateway = $gateway; |
@@ -220,7 +223,7 @@ discard block |
||
220 | 223 | * |
221 | 224 | * @ignore |
222 | 225 | * @param string $subPath |
223 | - * @return mixed |
|
226 | + * @return Result\Successful |
|
224 | 227 | */ |
225 | 228 | public function _doDelete($subPath) |
226 | 229 | { |
@@ -312,7 +315,6 @@ discard block |
||
312 | 315 | * verifies that a valid payment method identifier is being used |
313 | 316 | * @ignore |
314 | 317 | * @param string $identifier |
315 | - * @param Optional $string $identifierType type of identifier supplied, default 'token' |
|
316 | 318 | * @throws InvalidArgumentException |
317 | 319 | */ |
318 | 320 | private function _validateId($identifier = null, $identifierType = 'token') |
@@ -20,6 +20,9 @@ discard block |
||
20 | 20 | var $_identifier = 'osCommerce_PPapp_v5'; |
21 | 21 | var $_definitions = array(); |
22 | 22 | |
23 | + /** |
|
24 | + * @param integer $result |
|
25 | + */ |
|
23 | 26 | function log($module, $action, $result, $request, $response, $server, $is_ipn = false) { |
24 | 27 | global $customer_id; |
25 | 28 | |
@@ -160,6 +163,9 @@ discard block |
||
160 | 163 | return false; |
161 | 164 | } |
162 | 165 | |
166 | + /** |
|
167 | + * @param string $info |
|
168 | + */ |
|
163 | 169 | function getModuleInfo($module, $info) { |
164 | 170 | $class = 'OSCOM_PayPal_' . $module; |
165 | 171 | |
@@ -174,6 +180,10 @@ discard block |
||
174 | 180 | return $m->{'_' . $info}; |
175 | 181 | } |
176 | 182 | |
183 | + /** |
|
184 | + * @param string $module |
|
185 | + * @param string $type |
|
186 | + */ |
|
177 | 187 | function hasCredentials($module, $type = null) { |
178 | 188 | if ( !defined('OSCOM_APP_PAYPAL_' . $module . '_STATUS') ) { |
179 | 189 | return false; |
@@ -212,6 +222,10 @@ discard block |
||
212 | 222 | return true; |
213 | 223 | } |
214 | 224 | |
225 | + /** |
|
226 | + * @param string $module |
|
227 | + * @param string $type |
|
228 | + */ |
|
215 | 229 | function getCredentials($module, $type) { |
216 | 230 | if ( constant('OSCOM_APP_PAYPAL_' . $module . '_STATUS') == '1' ) { |
217 | 231 | if ( $type == 'email') { |
@@ -359,6 +373,11 @@ discard block |
||
359 | 373 | } |
360 | 374 | |
361 | 375 | // APP calls require $server to be "live" or "sandbox" |
376 | + /** |
|
377 | + * @param string $module |
|
378 | + * @param string $call |
|
379 | + * @param string $server |
|
380 | + */ |
|
362 | 381 | function getApiResult($module, $call, $extra_params = null, $server = null, $is_ipn = false) { |
363 | 382 | if ( $module == 'APP' ) { |
364 | 383 | $function = 'OSCOM_PayPal_Api_' . $call; |
@@ -385,6 +404,9 @@ discard block |
||
385 | 404 | return $result['res']; |
386 | 405 | } |
387 | 406 | |
407 | + /** |
|
408 | + * @param string $parameters |
|
409 | + */ |
|
388 | 410 | function makeApiCall($url, $parameters = null, $headers = null, $opts = null) { |
389 | 411 | $server = parse_url($url); |
390 | 412 | |
@@ -467,6 +489,10 @@ discard block |
||
467 | 489 | return $result; |
468 | 490 | } |
469 | 491 | |
492 | + /** |
|
493 | + * @param string $link |
|
494 | + * @param string $type |
|
495 | + */ |
|
470 | 496 | function drawButton($title = null, $link = null, $type = null, $params = null, $force_css = false) { |
471 | 497 | $colours = array('success' => '#1cb841', |
472 | 498 | 'error' => '#ca3c3c', |
@@ -762,6 +788,9 @@ discard block |
||
762 | 788 | } |
763 | 789 | } |
764 | 790 | |
791 | + /** |
|
792 | + * @param string $filename |
|
793 | + */ |
|
765 | 794 | public function loadLanguageFile($filename, $lang = null) { |
766 | 795 | global $language; |
767 | 796 | |
@@ -803,6 +832,9 @@ discard block |
||
803 | 832 | } |
804 | 833 | } |
805 | 834 | |
835 | + /** |
|
836 | + * @param string $key |
|
837 | + */ |
|
806 | 838 | function getDef($key, $values = null) { |
807 | 839 | $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key; |
808 | 840 | |
@@ -873,6 +905,9 @@ discard block |
||
873 | 905 | return str_replace('/', DIRECTORY_SEPARATOR, $pathname); |
874 | 906 | } |
875 | 907 | // OSCOM v2.2rc2a compatibility |
908 | + /** |
|
909 | + * @return string |
|
910 | + */ |
|
876 | 911 | function getIpAddress() { |
877 | 912 | if ( function_exists('tep_get_ip_address') ) { |
878 | 913 | return tep_get_ip_address(); |
@@ -301,6 +301,9 @@ discard block |
||
301 | 301 | } |
302 | 302 | } |
303 | 303 | |
304 | + /** |
|
305 | + * @param string $which_input_file |
|
306 | + */ |
|
304 | 307 | function SetInputFile($which_input_file) { |
305 | 308 | //$this->SetFileFormat($which_frmt); |
306 | 309 | $size = GetImageSize($which_input_file); |
@@ -343,6 +346,9 @@ discard block |
||
343 | 346 | |
344 | 347 | } |
345 | 348 | |
349 | + /** |
|
350 | + * @param string $which_output_file |
|
351 | + */ |
|
346 | 352 | function SetOutputFile($which_output_file) { |
347 | 353 | $this->output_file = $which_output_file; |
348 | 354 | return true; |
@@ -718,11 +724,18 @@ discard block |
||
718 | 724 | $this->ndx_plot_bg_color); |
719 | 725 | } |
720 | 726 | |
727 | + /** |
|
728 | + * @param integer[] $which_color |
|
729 | + */ |
|
721 | 730 | function SetBackgroundColor($which_color) { |
722 | 731 | $this->bg_color= $which_color; |
723 | 732 | $this->ndx_bg_color= $this->SetIndexColor($which_color); |
724 | 733 | return true; |
725 | 734 | } |
735 | + |
|
736 | + /** |
|
737 | + * @param integer[] $which_color |
|
738 | + */ |
|
726 | 739 | function SetPlotBgColor($which_color) { |
727 | 740 | $this->plot_bg_color= $which_color; |
728 | 741 | $this->ndx_plot_bg_color= $this->SetIndexColor($which_color); |
@@ -734,36 +747,54 @@ discard block |
||
734 | 747 | return true; |
735 | 748 | } |
736 | 749 | |
750 | + /** |
|
751 | + * @param integer[] $which_color |
|
752 | + */ |
|
737 | 753 | function SetTitleColor($which_color) { |
738 | 754 | $this->title_color= $which_color; |
739 | 755 | $this->ndx_title_color= $this->SetIndexColor($which_color); |
740 | 756 | return true; |
741 | 757 | } |
742 | 758 | |
759 | + /** |
|
760 | + * @param string $which_color |
|
761 | + */ |
|
743 | 762 | function SetTickColor ($which_color) { |
744 | 763 | $this->tick_color= $which_color; |
745 | 764 | $this->ndx_tick_color= $this->SetIndexColor($which_color); |
746 | 765 | return true; |
747 | 766 | } |
748 | 767 | |
768 | + /** |
|
769 | + * @param string $which_color |
|
770 | + */ |
|
749 | 771 | function SetLabelColor ($which_color) { |
750 | 772 | $this->label_color= $which_color; |
751 | 773 | $this->ndx_label_color= $this->SetIndexColor($which_color); |
752 | 774 | return true; |
753 | 775 | } |
754 | 776 | |
777 | + /** |
|
778 | + * @param string $which_color |
|
779 | + */ |
|
755 | 780 | function SetTextColor ($which_color) { |
756 | 781 | $this->text_color= $which_color; |
757 | 782 | $this->ndx_text_color= $this->SetIndexColor($which_color); |
758 | 783 | return true; |
759 | 784 | } |
760 | 785 | |
786 | + /** |
|
787 | + * @param integer[] $which_color |
|
788 | + */ |
|
761 | 789 | function SetLightGridColor ($which_color) { |
762 | 790 | $this->light_grid_color= $which_color; |
763 | 791 | $this->ndx_light_grid_color= $this->SetIndexColor($which_color); |
764 | 792 | return true; |
765 | 793 | } |
766 | 794 | |
795 | + /** |
|
796 | + * @param string $which_color |
|
797 | + */ |
|
767 | 798 | function SetGridColor ($which_color) { |
768 | 799 | $this->grid_color = $which_color; |
769 | 800 | $this->ndx_grid_color= $this->SetIndexColor($which_color); |
@@ -993,6 +1024,12 @@ discard block |
||
993 | 1024 | return true; |
994 | 1025 | } |
995 | 1026 | |
1027 | + /** |
|
1028 | + * @param string $x1 |
|
1029 | + * @param string $y1 |
|
1030 | + * @param string $x2 |
|
1031 | + * @param string $y2 |
|
1032 | + */ |
|
996 | 1033 | function SetPlotAreaPixels($x1,$y1,$x2,$y2) { |
997 | 1034 | //Like in GD 0,0 is upper left |
998 | 1035 | if (!$this->x_tot_margin) { |
@@ -1013,6 +1050,12 @@ discard block |
||
1013 | 1050 | |
1014 | 1051 | } |
1015 | 1052 | |
1053 | + /** |
|
1054 | + * @param string $xmin |
|
1055 | + * @param string $ymin |
|
1056 | + * @param string $xmax |
|
1057 | + * @param string $ymax |
|
1058 | + */ |
|
1016 | 1059 | function SetPlotAreaWorld($xmin,$ymin,$xmax,$ymax) { |
1017 | 1060 | if (($xmin == "") && ($xmax == "")) { |
1018 | 1061 | //For automatic setting of data we need $this->max_x |
@@ -1077,6 +1120,9 @@ discard block |
||
1077 | 1120 | die; |
1078 | 1121 | } |
1079 | 1122 | |
1123 | + /** |
|
1124 | + * @param string $error_message |
|
1125 | + */ |
|
1080 | 1126 | function DrawError($error_message) { |
1081 | 1127 | // prints the error message inline into |
1082 | 1128 | // the generated image |
@@ -1204,6 +1250,9 @@ discard block |
||
1204 | 1250 | return true; |
1205 | 1251 | } |
1206 | 1252 | |
1253 | + /** |
|
1254 | + * @param integer $which_ps |
|
1255 | + */ |
|
1207 | 1256 | function SetPointSize($which_ps) { |
1208 | 1257 | //in pixels |
1209 | 1258 | SetType($which_ps,'integer'); |
@@ -1234,6 +1283,9 @@ discard block |
||
1234 | 1283 | } |
1235 | 1284 | |
1236 | 1285 | //////////////COLORS |
1286 | + /** |
|
1287 | + * @param string $which_color_array |
|
1288 | + */ |
|
1237 | 1289 | function SetRGBArray ($which_color_array) { |
1238 | 1290 | if ( is_array($which_color_array) ) { |
1239 | 1291 | //User Defined Array |
@@ -1329,6 +1381,10 @@ discard block |
||
1329 | 1381 | return $ret_val; |
1330 | 1382 | } |
1331 | 1383 | |
1384 | + /** |
|
1385 | + * @param string[] $which_data |
|
1386 | + * @param string[] $which_border |
|
1387 | + */ |
|
1332 | 1388 | function SetDataColors($which_data,$which_border) { |
1333 | 1389 | //Set the data to be displayed in a particular color |
1334 | 1390 | if (!$which_data) { |
@@ -1824,6 +1880,9 @@ discard block |
||
1824 | 1880 | |
1825 | 1881 | } |
1826 | 1882 | |
1883 | + /** |
|
1884 | + * @param double $xpos |
|
1885 | + */ |
|
1827 | 1886 | function DrawXDataLabel($xlab,$xpos) { |
1828 | 1887 | //xpos comes in in PIXELS not in world coordinates. |
1829 | 1888 | //Draw an x data label centered at xlab |
@@ -2065,6 +2124,9 @@ discard block |
||
2065 | 2124 | |
2066 | 2125 | } //function DrawThinBarLines |
2067 | 2126 | |
2127 | + /** |
|
2128 | + * @param string $error_bar_type |
|
2129 | + */ |
|
2068 | 2130 | function DrawYErrorBar($x_world,$y_world,$error_height,$error_bar_type,$color) { |
2069 | 2131 | $x1 = $this->xtr($x_world); |
2070 | 2132 | $y1 = $this->ytr($y_world); |
@@ -2087,6 +2149,9 @@ discard block |
||
2087 | 2149 | return true; |
2088 | 2150 | } |
2089 | 2151 | |
2152 | + /** |
|
2153 | + * @param string $dot_type |
|
2154 | + */ |
|
2090 | 2155 | function DrawDot($x_world,$y_world,$dot_type,$color) { |
2091 | 2156 | $half_point = $this->point_size / 2; |
2092 | 2157 | $x1 = $this->xtr($x_world) - $half_point; |
@@ -2314,6 +2379,14 @@ discard block |
||
2314 | 2379 | return false; |
2315 | 2380 | } //function DrawLineSeries |
2316 | 2381 | |
2382 | + /** |
|
2383 | + * @param double $x1pix |
|
2384 | + * @param double $y1pix |
|
2385 | + * @param double $x2pix |
|
2386 | + * @param double $y2pix |
|
2387 | + * @param integer $dash_length |
|
2388 | + * @param integer $dash_space |
|
2389 | + */ |
|
2317 | 2390 | function DrawDashedLine($x1pix,$y1pix,$x2pix,$y2pix,$dash_length,$dash_space,$color) { |
2318 | 2391 | //Code based on work by Ariel Garza and James Pine |
2319 | 2392 | //I've decided to have this be in pixels only as a replacement for ImageLine |
@@ -2402,6 +2475,11 @@ discard block |
||
2402 | 2475 | } |
2403 | 2476 | } //function DrawBars |
2404 | 2477 | |
2478 | + /** |
|
2479 | + * @param string $which_x1 |
|
2480 | + * @param string $which_y1 |
|
2481 | + * @param string $which_boxtype |
|
2482 | + */ |
|
2405 | 2483 | function DrawLegend($which_x1,$which_y1,$which_boxtype) { |
2406 | 2484 | //Base code submitted by Marlin Viss |
2407 | 2485 | $max_legend_length=0; |
@@ -70,6 +70,10 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | if (!function_exists('checkdnsrr')) { |
73 | + |
|
74 | + /** |
|
75 | + * @param string $type |
|
76 | + */ |
|
73 | 77 | function checkdnsrr($host, $type) { |
74 | 78 | if(tep_not_null($host) && tep_not_null($type)) { |
75 | 79 | @exec("nslookup -type=" . escapeshellarg($type) . " " . escapeshellarg($host), $output); |
@@ -89,6 +93,10 @@ discard block |
||
89 | 93 | */ |
90 | 94 | |
91 | 95 | if ( !function_exists('http_build_query') && (PHP_VERSION >= 4)) { |
96 | + |
|
97 | + /** |
|
98 | + * @param string $arg_separator |
|
99 | + */ |
|
92 | 100 | function http_build_query($formdata, $numeric_prefix = null, $arg_separator = null) { |
93 | 101 | // If $formdata is an object, convert it to an array |
94 | 102 | if ( is_object($formdata) ) { |
@@ -140,6 +148,9 @@ discard block |
||
140 | 148 | } |
141 | 149 | |
142 | 150 | // Helper function |
151 | + /** |
|
152 | + * @param string $name |
|
153 | + */ |
|
143 | 154 | function http_build_query_helper($array, $name, $arg_separator) { |
144 | 155 | $tmp = array(); |
145 | 156 |
@@ -34,6 +34,10 @@ discard block |
||
34 | 34 | return mysqli_close($$link); |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param integer $errno |
|
39 | + * @param string $error |
|
40 | + */ |
|
37 | 41 | function tep_db_error($query, $errno, $error) { |
38 | 42 | global $logger; |
39 | 43 | |
@@ -57,6 +61,9 @@ discard block |
||
57 | 61 | return $result; |
58 | 62 | } |
59 | 63 | |
64 | + /** |
|
65 | + * @param string $table |
|
66 | + */ |
|
60 | 67 | function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') { |
61 | 68 | if ($action == 'insert') { |
62 | 69 | $query = 'insert into ' . $table . ' ('; |
@@ -204,6 +211,9 @@ discard block |
||
204 | 211 | return mysql_error($link); |
205 | 212 | } |
206 | 213 | |
214 | + /** |
|
215 | + * @param string $charset |
|
216 | + */ |
|
207 | 217 | function mysqli_set_charset($link, $charset) { |
208 | 218 | if ( function_exists('mysql_set_charset') ) { |
209 | 219 | return mysql_set_charset($charset, $link); |
@@ -234,6 +244,9 @@ discard block |
||
234 | 244 | return mysql_error($link); |
235 | 245 | } |
236 | 246 | |
247 | + /** |
|
248 | + * @param integer $type |
|
249 | + */ |
|
237 | 250 | function mysqli_fetch_array($query, $type) { |
238 | 251 | return mysql_fetch_array($query, $type); |
239 | 252 | } |
@@ -174,6 +174,9 @@ discard block |
||
174 | 174 | |
175 | 175 | } |
176 | 176 | |
177 | + /** |
|
178 | + * @param string $raw_datetime |
|
179 | + */ |
|
177 | 180 | function tep_datetime_short($raw_datetime) { |
178 | 181 | if ( ($raw_datetime == '0000-00-00 00:00:00') || ($raw_datetime == '') ) return false; |
179 | 182 | |
@@ -288,6 +291,10 @@ discard block |
||
288 | 291 | return $image; |
289 | 292 | } |
290 | 293 | |
294 | + /** |
|
295 | + * @param string $string |
|
296 | + * @param integer $len |
|
297 | + */ |
|
291 | 298 | function tep_break_string($string, $len, $break_char = '-') { |
292 | 299 | $l = 0; |
293 | 300 | $output = ''; |
@@ -345,6 +352,9 @@ discard block |
||
345 | 352 | } |
346 | 353 | } |
347 | 354 | |
355 | + /** |
|
356 | + * @param string $component |
|
357 | + */ |
|
348 | 358 | function tep_browser_detect($component) { |
349 | 359 | return stristr(getenv('HTTP_USER_AGENT'), $component); |
350 | 360 | } |
@@ -388,6 +398,11 @@ discard block |
||
388 | 398 | return $geo_zone_name; |
389 | 399 | } |
390 | 400 | |
401 | + /** |
|
402 | + * @param boolean $html |
|
403 | + * @param string $boln |
|
404 | + * @param string $eoln |
|
405 | + */ |
|
391 | 406 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { |
392 | 407 | $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'"); |
393 | 408 | $address_format = tep_db_fetch_array($address_format_query); |
@@ -485,6 +500,9 @@ discard block |
||
485 | 500 | return $state_prov_code; |
486 | 501 | } |
487 | 502 | |
503 | + /** |
|
504 | + * @param string $params |
|
505 | + */ |
|
488 | 506 | function tep_get_uprid($prid, $params) { |
489 | 507 | $uprid = $prid; |
490 | 508 | if ( (is_array($params)) && (!strstr($prid, '{')) ) { |
@@ -584,6 +602,9 @@ discard block |
||
584 | 602 | //// |
585 | 603 | // Wrapper for class_exists() function |
586 | 604 | // This function is not available in all PHP versions so we test it before using it. |
605 | + /** |
|
606 | + * @param string $class_name |
|
607 | + */ |
|
587 | 608 | function tep_class_exists($class_name) { |
588 | 609 | if (function_exists('class_exists')) { |
589 | 610 | return class_exists($class_name); |
@@ -743,6 +764,9 @@ discard block |
||
743 | 764 | |
744 | 765 | //// |
745 | 766 | // Sets the status of a banner |
767 | + /** |
|
768 | + * @param string $status |
|
769 | + */ |
|
746 | 770 | function tep_set_banner_status($banners_id, $status) { |
747 | 771 | if ($status == '1') { |
748 | 772 | return tep_db_query("update " . TABLE_BANNERS . " set status = '1', expires_impressions = NULL, expires_date = NULL, date_status_change = NULL where banners_id = '" . (int)$banners_id . "'"); |
@@ -779,6 +803,9 @@ discard block |
||
779 | 803 | |
780 | 804 | //// |
781 | 805 | // Sets the status of a product on special |
806 | + /** |
|
807 | + * @param string $status |
|
808 | + */ |
|
782 | 809 | function tep_set_specials_status($specials_id, $status) { |
783 | 810 | if ($status == '1') { |
784 | 811 | return tep_db_query("update " . TABLE_SPECIALS . " set status = '1', expires_date = NULL, date_status_change = NULL where specials_id = '" . (int)$specials_id . "'"); |
@@ -1028,6 +1055,9 @@ discard block |
||
1028 | 1055 | tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "'"); |
1029 | 1056 | } |
1030 | 1057 | |
1058 | + /** |
|
1059 | + * @param string $cache_block |
|
1060 | + */ |
|
1031 | 1061 | function tep_reset_cache_block($cache_block) { |
1032 | 1062 | global $cache_blocks; |
1033 | 1063 | |
@@ -1171,6 +1201,11 @@ discard block |
||
1171 | 1201 | return $value; |
1172 | 1202 | } |
1173 | 1203 | |
1204 | + /** |
|
1205 | + * @param string $to_name |
|
1206 | + * @param string $email_subject |
|
1207 | + * @param string $email_text |
|
1208 | + */ |
|
1174 | 1209 | function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { |
1175 | 1210 | if (SEND_EMAILS != 'true') return false; |
1176 | 1211 | |
@@ -1223,6 +1258,9 @@ discard block |
||
1223 | 1258 | |
1224 | 1259 | //// |
1225 | 1260 | // Wrapper function for round() for php3 compatibility |
1261 | + /** |
|
1262 | + * @return double |
|
1263 | + */ |
|
1226 | 1264 | function tep_round($value, $precision) { |
1227 | 1265 | return round($value, $precision); |
1228 | 1266 | } |
@@ -1339,6 +1377,10 @@ discard block |
||
1339 | 1377 | |
1340 | 1378 | //// |
1341 | 1379 | // Return a random value |
1380 | + /** |
|
1381 | + * @param integer $min |
|
1382 | + * @param integer $max |
|
1383 | + */ |
|
1342 | 1384 | function tep_rand($min = null, $max = null) { |
1343 | 1385 | static $seeded; |
1344 | 1386 | |
@@ -1362,6 +1404,9 @@ discard block |
||
1362 | 1404 | } |
1363 | 1405 | |
1364 | 1406 | // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n) |
1407 | + /** |
|
1408 | + * @param string[] $from |
|
1409 | + */ |
|
1365 | 1410 | function tep_convert_linefeeds($from, $to, $string) { |
1366 | 1411 | if ((PHP_VERSION < "4.0.5") && is_array($from)) { |
1367 | 1412 | return preg_replace('/(' . implode('|', $from) . ')/', $to, $string); |