@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public $compile_id = null; |
24 | 24 | |
25 | - public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
25 | + public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id. |
|
26 | 26 | |
27 | 27 | public $title = ''; |
28 | 28 |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | <?php |
155 | 155 | foreach ($opt['template']['locales'] AS $k => $lang) { |
156 | 156 | if ($lang['status'] == OC_LOCALE_ACTIVE) { |
157 | - echo '<a style="text-decoration: none;" href="'.$langUrl . $k . '"><img src="' . $lang['flag'] . |
|
157 | + echo '<a style="text-decoration: none;" href="' . $langUrl . $k . '"><img src="' . $lang['flag'] . |
|
158 | 158 | '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> '; |
159 | 159 | } |
160 | 160 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | $nLastGroup = $tpl_usercountries[$i]['group']; |
187 | 187 | |
188 | - echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry==$tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
188 | + echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry == $tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
189 | 189 | } |
190 | 190 | ?> |
191 | 191 | </select> |
@@ -506,6 +506,9 @@ |
||
506 | 506 | return mysql_fetch_assoc($rs); |
507 | 507 | } |
508 | 508 | |
509 | +/** |
|
510 | + * @param resource $rs |
|
511 | + */ |
|
509 | 512 | function sql_fetch_row($rs) |
510 | 513 | { |
511 | 514 | return mysql_fetch_row($rs); |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | /** |
494 | 494 | * @param integer $byte |
495 | 495 | * @param $start |
496 | - * @param $len |
|
496 | + * @param integer $len |
|
497 | 497 | * |
498 | 498 | * @return number |
499 | 499 | */ |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * @param $d |
|
577 | + * @param integer $d |
|
578 | 578 | * |
579 | 579 | * @return string |
580 | 580 | */ |
@@ -40,9 +40,9 @@ |
||
40 | 40 | * translate the given string |
41 | 41 | * |
42 | 42 | * @param $message |
43 | - * @param $style |
|
44 | - * @param $resource_name |
|
45 | - * @param $line |
|
43 | + * @param string $style |
|
44 | + * @param string $resource_name |
|
45 | + * @param string $line |
|
46 | 46 | * @param string $plural |
47 | 47 | * @param int $count |
48 | 48 | * @param null $lang |
@@ -298,7 +298,7 @@ |
||
298 | 298 | * @param $message |
299 | 299 | * @param $attrs |
300 | 300 | * @param $smarty |
301 | - * @param $line |
|
301 | + * @param integer $line |
|
302 | 302 | * |
303 | 303 | * @return string |
304 | 304 | */ |
@@ -34,8 +34,7 @@ |
||
34 | 34 | public $cdir = []; |
35 | 35 | |
36 | 36 | /** constructor |
37 | - |
|
38 | -* |
|
37 | + * |
|
39 | 38 | *@param string $zipFile if not empty must contain path to valid zip file, ss_zip will try to open and parse it. |
40 | 39 | * If this parameter is empty, the new empty zip archive is created. This parameter has no meaning in |
41 | 40 | * LIGHT verion, please upgrade to PROfessional version. |
@@ -2273,38 +2273,38 @@ discard block |
||
2273 | 2273 | |
2274 | 2274 | foreach ($option as $k => $v) { |
2275 | 2275 | switch ($k) { |
2276 | - case 'encoding': |
|
2277 | - switch ($v) { |
|
2278 | - case 'utf8': |
|
2279 | - case 'ucs4_string': |
|
2280 | - case 'ucs4_array': |
|
2281 | - $this->_api_encoding = $v; |
|
2282 | - break; |
|
2276 | + case 'encoding': |
|
2277 | + switch ($v) { |
|
2278 | + case 'utf8': |
|
2279 | + case 'ucs4_string': |
|
2280 | + case 'ucs4_array': |
|
2281 | + $this->_api_encoding = $v; |
|
2282 | + break; |
|
2283 | 2283 | |
2284 | - default: |
|
2285 | - throw new InvalidArgumentException('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); |
|
2286 | - } |
|
2284 | + default: |
|
2285 | + throw new InvalidArgumentException('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); |
|
2286 | + } |
|
2287 | 2287 | |
2288 | 2288 | break; |
2289 | 2289 | |
2290 | - case 'overlong': |
|
2291 | - $this->_allow_overlong = ($v) ? true : false; |
|
2292 | - break; |
|
2290 | + case 'overlong': |
|
2291 | + $this->_allow_overlong = ($v) ? true : false; |
|
2292 | + break; |
|
2293 | 2293 | |
2294 | - case 'strict': |
|
2295 | - $this->_strict_mode = ($v) ? true : false; |
|
2296 | - break; |
|
2294 | + case 'strict': |
|
2295 | + $this->_strict_mode = ($v) ? true : false; |
|
2296 | + break; |
|
2297 | 2297 | |
2298 | - case 'version': |
|
2299 | - if (in_array($v, array('2003', '2008'))) { |
|
2300 | - $this->_version = $v; |
|
2301 | - } else { |
|
2302 | - throw new InvalidArgumentException('Set Parameter: Invalid parameter ' . $v . ' for option ' . $k); |
|
2303 | - } |
|
2304 | - break; |
|
2298 | + case 'version': |
|
2299 | + if (in_array($v, array('2003', '2008'))) { |
|
2300 | + $this->_version = $v; |
|
2301 | + } else { |
|
2302 | + throw new InvalidArgumentException('Set Parameter: Invalid parameter ' . $v . ' for option ' . $k); |
|
2303 | + } |
|
2304 | + break; |
|
2305 | 2305 | |
2306 | - default: |
|
2307 | - return false; |
|
2306 | + default: |
|
2307 | + return false; |
|
2308 | 2308 | } |
2309 | 2309 | } |
2310 | 2310 | |
@@ -2328,14 +2328,14 @@ discard block |
||
2328 | 2328 | // Forcing conversion of input to UCS4 array |
2329 | 2329 | // If one time encoding is given, use this, else the objects property |
2330 | 2330 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2331 | - case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded); |
|
2332 | - break; |
|
2333 | - case 'ucs4_string': |
|
2334 | - $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2335 | - case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2336 | - break; |
|
2337 | - default: |
|
2338 | - throw new InvalidArgumentException('Unsupported input format'); |
|
2331 | + case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded); |
|
2332 | + break; |
|
2333 | + case 'ucs4_string': |
|
2334 | + $decoded = $this->_ucs4_string_to_ucs4($decoded); |
|
2335 | + case 'ucs4_array': // No break; before this line. Catch case, but do nothing |
|
2336 | + break; |
|
2337 | + default: |
|
2338 | + throw new InvalidArgumentException('Unsupported input format'); |
|
2339 | 2339 | } |
2340 | 2340 | |
2341 | 2341 | // No input, no output, what else did you expect? |
@@ -2351,35 +2351,35 @@ discard block |
||
2351 | 2351 | foreach ($decoded as $k => $v) { |
2352 | 2352 | // Make sure to use just the plain dot |
2353 | 2353 | switch ($v) { |
2354 | - case 0x3002: |
|
2355 | - case 0xFF0E: |
|
2356 | - case 0xFF61: |
|
2357 | - $decoded[$k] = 0x2E; |
|
2358 | - // It's right, no break here |
|
2359 | - // The codepoints above have to be converted to dots anyway |
|
2360 | - |
|
2361 | - // Stumbling across an anchoring character |
|
2362 | - case 0x2E: |
|
2363 | - case 0x2F: |
|
2364 | - case 0x3A: |
|
2365 | - case 0x3F: |
|
2366 | - case 0x40: |
|
2367 | - // Neither email addresses nor URLs allowed in strict mode |
|
2368 | - if ($this->_strict_mode) { |
|
2369 | - throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2370 | - } |
|
2371 | - // Skip first char |
|
2372 | - if ($k) { |
|
2373 | - $encoded = ''; |
|
2374 | - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2375 | - if ($encoded) { |
|
2376 | - $output .= $encoded; |
|
2377 | - } else { |
|
2378 | - $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2354 | + case 0x3002: |
|
2355 | + case 0xFF0E: |
|
2356 | + case 0xFF61: |
|
2357 | + $decoded[$k] = 0x2E; |
|
2358 | + // It's right, no break here |
|
2359 | + // The codepoints above have to be converted to dots anyway |
|
2360 | + |
|
2361 | + // Stumbling across an anchoring character |
|
2362 | + case 0x2E: |
|
2363 | + case 0x2F: |
|
2364 | + case 0x3A: |
|
2365 | + case 0x3F: |
|
2366 | + case 0x40: |
|
2367 | + // Neither email addresses nor URLs allowed in strict mode |
|
2368 | + if ($this->_strict_mode) { |
|
2369 | + throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.'); |
|
2379 | 2370 | } |
2380 | - $output .= chr($decoded[$k]); |
|
2381 | - } |
|
2382 | - $last_begin = $k + 1; |
|
2371 | + // Skip first char |
|
2372 | + if ($k) { |
|
2373 | + $encoded = ''; |
|
2374 | + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2375 | + if ($encoded) { |
|
2376 | + $output .= $encoded; |
|
2377 | + } else { |
|
2378 | + $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2379 | + } |
|
2380 | + $output .= chr($decoded[$k]); |
|
2381 | + } |
|
2382 | + $last_begin = $k + 1; |
|
2383 | 2383 | } |
2384 | 2384 | } |
2385 | 2385 | // Catch the rest of the string |
@@ -2417,12 +2417,12 @@ discard block |
||
2417 | 2417 | // Optionally set |
2418 | 2418 | if ($one_time_encoding) { |
2419 | 2419 | switch ($one_time_encoding) { |
2420 | - case 'utf8': |
|
2421 | - case 'ucs4_string': |
|
2422 | - case 'ucs4_array': |
|
2423 | - break; |
|
2424 | - default: |
|
2425 | - throw new InvalidArgumentException('Unknown encoding ' . $one_time_encoding); |
|
2420 | + case 'utf8': |
|
2421 | + case 'ucs4_string': |
|
2422 | + case 'ucs4_array': |
|
2423 | + break; |
|
2424 | + default: |
|
2425 | + throw new InvalidArgumentException('Unknown encoding ' . $one_time_encoding); |
|
2426 | 2426 | } |
2427 | 2427 | } |
2428 | 2428 | // Make sure to drop any newline characters around |
@@ -2480,16 +2480,16 @@ discard block |
||
2480 | 2480 | // The output is UTF-8 by default, other output formats need conversion here |
2481 | 2481 | // If one time encoding is given, use this, else the objects property |
2482 | 2482 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2483 | - case 'utf8' : return $return; |
|
2484 | - break; |
|
2485 | - case 'ucs4_string': |
|
2486 | - return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2487 | - break; |
|
2488 | - case 'ucs4_array': |
|
2489 | - return $this->_utf8_to_ucs4($return); |
|
2490 | - break; |
|
2491 | - default: |
|
2492 | - throw new InvalidArgumentException('Unsupported output format'); |
|
2483 | + case 'utf8' : return $return; |
|
2484 | + break; |
|
2485 | + case 'ucs4_string': |
|
2486 | + return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
|
2487 | + break; |
|
2488 | + case 'ucs4_array': |
|
2489 | + return $this->_utf8_to_ucs4($return); |
|
2490 | + break; |
|
2491 | + default: |
|
2492 | + throw new InvalidArgumentException('Unsupported output format'); |
|
2493 | 2493 | } |
2494 | 2494 | } |
2495 | 2495 |