@@ 220-238 (lines=19) @@ | ||
217 | return $image; |
|
218 | } |
|
219 | ||
220 | function tep_break_string($string, $len, $break_char = '-') { |
|
221 | $l = 0; |
|
222 | $output = ''; |
|
223 | for ($i=0, $n=strlen($string); $i<$n; $i++) { |
|
224 | $char = substr($string, $i, 1); |
|
225 | if ($char != ' ') { |
|
226 | $l++; |
|
227 | } else { |
|
228 | $l = 0; |
|
229 | } |
|
230 | if ($l > $len) { |
|
231 | $l = 1; |
|
232 | $output .= $break_char; |
|
233 | } |
|
234 | $output .= $char; |
|
235 | } |
|
236 | ||
237 | return $output; |
|
238 | } |
|
239 | ||
240 | function tep_get_country_name($country_id) { |
|
241 | $Qcountry = Registry::get('Db')->get('countries', 'countries_name', ['countries_id' => (int)$country_id]); |
@@ 78-96 (lines=19) @@ | ||
75 | ||
76 | //// |
|
77 | // Break a word in a string if it is longer than a specified length ($len) |
|
78 | function tep_break_string($string, $len, $break_char = '-') { |
|
79 | $l = 0; |
|
80 | $output = ''; |
|
81 | for ($i=0, $n=strlen($string); $i<$n; $i++) { |
|
82 | $char = substr($string, $i, 1); |
|
83 | if ($char != ' ') { |
|
84 | $l++; |
|
85 | } else { |
|
86 | $l = 0; |
|
87 | } |
|
88 | if ($l > $len) { |
|
89 | $l = 1; |
|
90 | $output .= $break_char; |
|
91 | } |
|
92 | $output .= $char; |
|
93 | } |
|
94 | ||
95 | return $output; |
|
96 | } |
|
97 | ||
98 | //// |
|
99 | // Return all $_GET variables, except those passed as a parameter |