@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | while ($nCurPos < mb_strlen($str)) { |
231 | 231 | $nNextSep = mb_strlen($str); |
232 | - for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos ++) { |
|
232 | + for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos++) { |
|
233 | 233 | $nThisPos = mb_strpos($str, mb_substr($sep, $nSepPos, 1), $nCurPos); |
234 | 234 | if ($nThisPos !== false) { |
235 | 235 | if ($nNextSep > $nThisPos) { |
@@ -308,9 +308,9 @@ discard block |
||
308 | 308 | $retval = 'E '; |
309 | 309 | } |
310 | 310 | |
311 | - $retval = $retval . sprintf("%03d", floor($lon)) . '° '; |
|
311 | + $retval = $retval.sprintf("%03d", floor($lon)).'° '; |
|
312 | 312 | $lon = $lon - floor($lon); |
313 | - $retval = $retval . sprintf("%06.3f", round($lon * 60, 3)) . '\''; |
|
313 | + $retval = $retval.sprintf("%06.3f", round($lon * 60, 3)).'\''; |
|
314 | 314 | |
315 | 315 | return $retval; |
316 | 316 | } |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | $retval = 'N '; |
326 | 326 | } |
327 | 327 | |
328 | - $retval = $retval . sprintf("%02d", floor($lat)) . '° '; |
|
328 | + $retval = $retval.sprintf("%02d", floor($lat)).'° '; |
|
329 | 329 | $lat = $lat - floor($lat); |
330 | - $retval = $retval . sprintf("%06.3f", round($lat * 60, 3)) . '\''; |
|
330 | + $retval = $retval.sprintf("%06.3f", round($lat * 60, 3)).'\''; |
|
331 | 331 | |
332 | 332 | return $retval; |
333 | 333 | } |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | |
144 | 144 | } |
145 | 145 | $fnl = strlen($filename); |
146 | - $fh = "\x14\x00"; // ver needed to extract |
|
147 | - $fh .= "\x00\x00"; // gen purpose bit flag |
|
148 | - $fh .= "\x08\x00"; // compression method |
|
146 | + $fh = "\x14\x00"; // ver needed to extract |
|
147 | + $fh .= "\x00\x00"; // gen purpose bit flag |
|
148 | + $fh .= "\x08\x00"; // compression method |
|
149 | 149 | $fh .= "\x00\x00\x00\x00"; // last mod time and date |
150 | 150 | $fh .= pack( |
151 | 151 | "V3v2", |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | //local file header |
161 | 161 | $lfh = "PK\x03\x04"; |
162 | - $lfh .= $fh . $filename; |
|
162 | + $lfh .= $fh.$filename; |
|
163 | 163 | $zipdata = $lfh; |
164 | 164 | $zipdata .= $gzdata; |
165 | 165 | $zipdata .= pack("V3", $crc, $gzsize, $datasize); |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | "va*v3V2", |
171 | 171 | 0, |
172 | 172 | $fh, |
173 | - 0, // file comment length |
|
174 | - 0, // disk number start |
|
175 | - 0, // internal file attributes |
|
176 | - $attr, // external file attributes - 'archive/directory' bit set |
|
173 | + 0, // file comment length |
|
174 | + 0, // disk number start |
|
175 | + 0, // internal file attributes |
|
176 | + $attr, // external file attributes - 'archive/directory' bit set |
|
177 | 177 | $this->offset |
178 | - ) . $filename; |
|
178 | + ).$filename; |
|
179 | 179 | |
180 | 180 | $this->offset += 42 + $fnl + $gzsize; |
181 | 181 | $this->cdir[] = $cdir; |
182 | - $this->cnt ++; |
|
182 | + $this->cnt++; |
|
183 | 183 | $this->idx = $this->cnt - 1; |
184 | 184 | } |
185 | 185 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $cdsl, // size of central dir |
229 | 229 | $zdsl, // offset to start of central dir |
230 | 230 | 0 |
231 | - ); // .zip file comment length |
|
231 | + ); // .zip file comment length |
|
232 | 232 | return $this->zipfile; |
233 | 233 | } |
234 | 234 |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | // |
24 | 24 | |
25 | 25 | // }}} |
26 | -require_once __DIR__ . '/IDNA2/Exception.php'; |
|
27 | -require_once __DIR__ . '/IDNA2/Exception/Nameprep.php'; |
|
26 | +require_once __DIR__.'/IDNA2/Exception.php'; |
|
27 | +require_once __DIR__.'/IDNA2/Exception/Nameprep.php'; |
|
28 | 28 | // adjusted paths for OC distribution |
29 | 29 | |
30 | 30 | /** |
@@ -272,16 +272,16 @@ discard block |
||
272 | 272 | * @access private |
273 | 273 | */ |
274 | 274 | private static $_np_prohibit_ranges = array( |
275 | - array(0x80, 0x9F ), |
|
276 | - array(0x2060, 0x206F ), |
|
277 | - array(0x1D173, 0x1D17A ), |
|
278 | - array(0xE000, 0xF8FF ), |
|
279 | - array(0xF0000, 0xFFFFD ), |
|
275 | + array(0x80, 0x9F), |
|
276 | + array(0x2060, 0x206F), |
|
277 | + array(0x1D173, 0x1D17A), |
|
278 | + array(0xE000, 0xF8FF), |
|
279 | + array(0xF0000, 0xFFFFD), |
|
280 | 280 | array(0x100000, 0x10FFFD), |
281 | - array(0xFDD0, 0xFDEF ), |
|
282 | - array(0xD800, 0xDFFF ), |
|
283 | - array(0x2FF0, 0x2FFB ), |
|
284 | - array(0xE0020, 0xE007F ) |
|
281 | + array(0xFDD0, 0xFDEF), |
|
282 | + array(0xD800, 0xDFFF), |
|
283 | + array(0x2FF0, 0x2FFB), |
|
284 | + array(0xE0020, 0xE007F) |
|
285 | 285 | ); |
286 | 286 | |
287 | 287 | /** |
@@ -2328,8 +2328,7 @@ 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': |
|
2332 | - $decoded = $this->_utf8_to_ucs4($decoded); |
|
2331 | + case 'utf8' : $decoded = $this->_utf8_to_ucs4($decoded); |
|
2333 | 2332 | break; |
2334 | 2333 | case 'ucs4_string': |
2335 | 2334 | $decoded = $this->_ucs4_string_to_ucs4($decoded); |
@@ -2349,7 +2348,7 @@ discard block |
||
2349 | 2348 | |
2350 | 2349 | foreach ($decoded as $k => $v) { |
2351 | 2350 | // Make sure to use just the plain dot |
2352 | - switch($v) { |
|
2351 | + switch ($v) { |
|
2353 | 2352 | case 0x3002: |
2354 | 2353 | case 0xFF0E: |
2355 | 2354 | case 0xFF61: |
@@ -2370,11 +2369,11 @@ discard block |
||
2370 | 2369 | // Skip first char |
2371 | 2370 | if ($k) { |
2372 | 2371 | $encoded = ''; |
2373 | - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2372 | + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2374 | 2373 | if ($encoded) { |
2375 | 2374 | $output .= $encoded; |
2376 | 2375 | } else { |
2377 | - $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin))); |
|
2376 | + $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k) - $last_begin))); |
|
2378 | 2377 | } |
2379 | 2378 | $output .= chr($decoded[$k]); |
2380 | 2379 | } |
@@ -2385,11 +2384,11 @@ discard block |
||
2385 | 2384 | if ($last_begin) { |
2386 | 2385 | $inp_len = sizeof($decoded); |
2387 | 2386 | $encoded = ''; |
2388 | - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len)-$last_begin))); |
|
2387 | + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); |
|
2389 | 2388 | if ($encoded) { |
2390 | 2389 | $output .= $encoded; |
2391 | 2390 | } else { |
2392 | - $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len)-$last_begin))); |
|
2391 | + $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); |
|
2393 | 2392 | } |
2394 | 2393 | return $output; |
2395 | 2394 | } |
@@ -2440,7 +2439,7 @@ discard block |
||
2440 | 2439 | $conv = $this->_decode($v); |
2441 | 2440 | if ($conv) $arr[$k] = $conv; |
2442 | 2441 | } |
2443 | - $return = $email_pref . '@' . join('.', $arr); |
|
2442 | + $return = $email_pref.'@'.join('.', $arr); |
|
2444 | 2443 | } elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters) |
2445 | 2444 | // No no in strict mode |
2446 | 2445 | if ($this->_strict_mode) { |
@@ -2473,8 +2472,7 @@ discard block |
||
2473 | 2472 | // The output is UTF-8 by default, other output formats need conversion here |
2474 | 2473 | // If one time encoding is given, use this, else the objects property |
2475 | 2474 | switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { |
2476 | - case 'utf8': |
|
2477 | - return $return; |
|
2475 | + case 'utf8' : return $return; |
|
2478 | 2476 | break; |
2479 | 2477 | case 'ucs4_string': |
2480 | 2478 | return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); |
@@ -2507,20 +2505,20 @@ discard block |
||
2507 | 2505 | if (!empty($parts_arr['user'])) { |
2508 | 2506 | $ret_url .= $parts_arr['user']; |
2509 | 2507 | if (!empty($parts_arr['pass'])) { |
2510 | - $ret_url .= ':' . $parts_arr['pass']; |
|
2508 | + $ret_url .= ':'.$parts_arr['pass']; |
|
2511 | 2509 | } |
2512 | 2510 | $ret_url .= '@'; |
2513 | 2511 | } |
2514 | 2512 | $ret_url .= $parts_arr['host']; |
2515 | 2513 | if (!empty($parts_arr['port'])) { |
2516 | - $ret_url .= ':' . $parts_arr['port']; |
|
2514 | + $ret_url .= ':'.$parts_arr['port']; |
|
2517 | 2515 | } |
2518 | 2516 | $ret_url .= $parts_arr['path']; |
2519 | 2517 | if (!empty($parts_arr['query'])) { |
2520 | - $ret_url .= '?' . $parts_arr['query']; |
|
2518 | + $ret_url .= '?'.$parts_arr['query']; |
|
2521 | 2519 | } |
2522 | 2520 | if (!empty($parts_arr['fragment'])) { |
2523 | - $ret_url .= '#' . $parts_arr['fragment']; |
|
2521 | + $ret_url .= '#'.$parts_arr['fragment']; |
|
2524 | 2522 | } |
2525 | 2523 | return $ret_url; |
2526 | 2524 | } |
@@ -2598,7 +2596,7 @@ discard block |
||
2598 | 2596 | } |
2599 | 2597 | |
2600 | 2598 | // Start with the prefix; copy it to output |
2601 | - $encoded = $this->_punycode_prefix . $encoded; |
|
2599 | + $encoded = $this->_punycode_prefix.$encoded; |
|
2602 | 2600 | |
2603 | 2601 | // If we have basic code points in output, add an hyphen to the end |
2604 | 2602 | if ($codecount) { |
@@ -2629,9 +2627,8 @@ discard block |
||
2629 | 2627 | $delta++; |
2630 | 2628 | } else if ($decoded[$i] == $cur_code) { |
2631 | 2629 | for ($q = $delta, $k = $this->_base; 1; $k += $this->_base) { |
2632 | - $t = ($k <= $bias)? |
|
2633 | - $this->_tmin : |
|
2634 | - (($k >= $bias + $this->_tmax)? $this->_tmax : $k - $bias); |
|
2630 | + $t = ($k <= $bias) ? |
|
2631 | + $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias); |
|
2635 | 2632 | |
2636 | 2633 | if ($q < $t) { |
2637 | 2634 | break; |
@@ -2668,11 +2665,11 @@ discard block |
||
2668 | 2665 | private function _decode($encoded) |
2669 | 2666 | { |
2670 | 2667 | // We do need to find the Punycode prefix |
2671 | - if (!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded)) { |
|
2668 | + if (!preg_match('!^'.preg_quote($this->_punycode_prefix, '!').'!', $encoded)) { |
|
2672 | 2669 | return false; |
2673 | 2670 | } |
2674 | 2671 | |
2675 | - $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded); |
|
2672 | + $encode_test = preg_replace('!^'.preg_quote($this->_punycode_prefix, '!').'!', '', $encoded); |
|
2676 | 2673 | |
2677 | 2674 | // If nothing left after removing the prefix, it is hopeless |
2678 | 2675 | if (!$encode_test) { |
@@ -2699,14 +2696,13 @@ discard block |
||
2699 | 2696 | $idx = 0; |
2700 | 2697 | $char = $this->_initial_n; |
2701 | 2698 | |
2702 | - for ($enco_idx = ($delim_pos)? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) { |
|
2703 | - for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) { |
|
2699 | + for ($enco_idx = ($delim_pos) ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) { |
|
2700 | + for ($old_idx = $idx, $w = 1, $k = $this->_base; 1; $k += $this->_base) { |
|
2704 | 2701 | $digit = $this->_decodeDigit($encoded{$enco_idx++}); |
2705 | 2702 | $idx += $digit * $w; |
2706 | 2703 | |
2707 | 2704 | $t = ($k <= $bias) ? |
2708 | - $this->_tmin : |
|
2709 | - (($k >= $bias + $this->_tmax)? $this->_tmax : ($k - $bias)); |
|
2705 | + $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); |
|
2710 | 2706 | |
2711 | 2707 | if ($digit < $t) { |
2712 | 2708 | break; |
@@ -2717,7 +2713,7 @@ discard block |
||
2717 | 2713 | |
2718 | 2714 | $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first); |
2719 | 2715 | $is_first = false; |
2720 | - $char += (int) ($idx / ($deco_len + 1)); |
|
2716 | + $char += (int)($idx / ($deco_len + 1)); |
|
2721 | 2717 | $idx %= ($deco_len + 1); |
2722 | 2718 | |
2723 | 2719 | if ($deco_len > 0) { |
@@ -2745,14 +2741,14 @@ discard block |
||
2745 | 2741 | */ |
2746 | 2742 | private function _adapt($delta, $npoints, $is_first) |
2747 | 2743 | { |
2748 | - $delta = (int) ($is_first ? ($delta / $this->_damp) : ($delta / 2)); |
|
2749 | - $delta += (int) ($delta / $npoints); |
|
2744 | + $delta = (int)($is_first ? ($delta / $this->_damp) : ($delta / 2)); |
|
2745 | + $delta += (int)($delta / $npoints); |
|
2750 | 2746 | |
2751 | 2747 | for ($k = 0; $delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2; $k += $this->_base) { |
2752 | - $delta = (int) ($delta / ($this->_base - $this->_tmin)); |
|
2748 | + $delta = (int)($delta / ($this->_base - $this->_tmin)); |
|
2753 | 2749 | } |
2754 | 2750 | |
2755 | - return (int) ($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); |
|
2751 | + return (int)($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); |
|
2756 | 2752 | } |
2757 | 2753 | |
2758 | 2754 | /** |
@@ -2779,7 +2775,7 @@ discard block |
||
2779 | 2775 | private function _decodeDigit($cp) |
2780 | 2776 | { |
2781 | 2777 | $cp = ord($cp); |
2782 | - return ($cp - 48 < 10)? $cp - 22 : (($cp - 65 < 26)? $cp - 65 : (($cp - 97 < 26)? $cp - 97 : $this->_base)); |
|
2778 | + return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base)); |
|
2783 | 2779 | } |
2784 | 2780 | |
2785 | 2781 | /** |
@@ -2807,12 +2803,12 @@ discard block |
||
2807 | 2803 | |
2808 | 2804 | // Try to find prohibited input |
2809 | 2805 | if (in_array($v, self::$_np_prohibit) || in_array($v, self::$_general_prohibited)) { |
2810 | - throw new Net_IDNA2_Exception_Nameprep('Prohibited input U+' . sprintf('%08X', $v)); |
|
2806 | + throw new Net_IDNA2_Exception_Nameprep('Prohibited input U+'.sprintf('%08X', $v)); |
|
2811 | 2807 | } |
2812 | 2808 | |
2813 | 2809 | foreach (self::$_np_prohibit_ranges as $range) { |
2814 | 2810 | if ($range[0] <= $v && $v <= $range[1]) { |
2815 | - throw new Net_IDNA2_Exception_Nameprep('Prohibited input U+' . sprintf('%08X', $v)); |
|
2811 | + throw new Net_IDNA2_Exception_Nameprep('Prohibited input U+'.sprintf('%08X', $v)); |
|
2816 | 2812 | } |
2817 | 2813 | } |
2818 | 2814 | |
@@ -2862,7 +2858,7 @@ discard block |
||
2862 | 2858 | // Rewind the for loop by one, since there can be more possible compositions |
2863 | 2859 | $i--; |
2864 | 2860 | $out_len--; |
2865 | - $last_class = ($i == $last_starter)? 0 : $this->_getCombiningClass($output[$i - 1]); |
|
2861 | + $last_class = ($i == $last_starter) ? 0 : $this->_getCombiningClass($output[$i - 1]); |
|
2866 | 2862 | |
2867 | 2863 | continue; |
2868 | 2864 | } |
@@ -2899,7 +2895,7 @@ discard block |
||
2899 | 2895 | |
2900 | 2896 | $result = array(); |
2901 | 2897 | $T = $this->_tbase + $sindex % $this->_tcount; |
2902 | - $result[] = (int)($this->_lbase + $sindex / $this->_ncount); |
|
2898 | + $result[] = (int)($this->_lbase + $sindex / $this->_ncount); |
|
2903 | 2899 | $result[] = (int)($this->_vbase + ($sindex % $this->_ncount) / $this->_tcount); |
2904 | 2900 | |
2905 | 2901 | if ($T != $this->_tbase) { |
@@ -2985,7 +2981,7 @@ discard block |
||
2985 | 2981 | */ |
2986 | 2982 | private function _getCombiningClass($char) |
2987 | 2983 | { |
2988 | - return isset(self::$_np_norm_combcls[$char])? self::$_np_norm_combcls[$char] : 0; |
|
2984 | + return isset(self::$_np_norm_combcls[$char]) ? self::$_np_norm_combcls[$char] : 0; |
|
2989 | 2985 | } |
2990 | 2986 | |
2991 | 2987 | /** |
@@ -3146,7 +3142,7 @@ discard block |
||
3146 | 3142 | throw new UnexpectedValueException('This might be UTF-8, but I don\'t understand it at byte '.$k); |
3147 | 3143 | } |
3148 | 3144 | if ('add' == $mode) { |
3149 | - $output[$out_len] = (int) $v; |
|
3145 | + $output[$out_len] = (int)$v; |
|
3150 | 3146 | ++$out_len; |
3151 | 3147 | continue; |
3152 | 3148 | } |
@@ -3205,14 +3201,14 @@ discard block |
||
3205 | 3201 | // 4 bytes |
3206 | 3202 | $output .= chr(240 + ($v >> 18)) |
3207 | 3203 | . chr(128 + (($v >> 12) & 63)) |
3208 | - . chr(128 + (($v >> 6) & 63)) |
|
3204 | + . chr(128 + (($v >> 6) & 63)) |
|
3209 | 3205 | . chr(128 + ($v & 63)); |
3210 | 3206 | } else if ($v < 1 << 26) { |
3211 | 3207 | // 5 bytes |
3212 | 3208 | $output .= chr(248 + ($v >> 24)) |
3213 | 3209 | . chr(128 + (($v >> 18) & 63)) |
3214 | 3210 | . chr(128 + (($v >> 12) & 63)) |
3215 | - . chr(128 + (($v >> 6) & 63)) |
|
3211 | + . chr(128 + (($v >> 6) & 63)) |
|
3216 | 3212 | . chr(128 + ($v & 63)); |
3217 | 3213 | } else if ($v < 1 << 31) { |
3218 | 3214 | // 6 bytes |
@@ -3220,7 +3216,7 @@ discard block |
||
3220 | 3216 | . chr(128 + (($v >> 24) & 63)) |
3221 | 3217 | . chr(128 + (($v >> 18) & 63)) |
3222 | 3218 | . chr(128 + (($v >> 12) & 63)) |
3223 | - . chr(128 + (($v >> 6) & 63)) |
|
3219 | + . chr(128 + (($v >> 6) & 63)) |
|
3224 | 3220 | . chr(128 + ($v & 63)); |
3225 | 3221 | } else { |
3226 | 3222 | throw new UnexpectedValueException('Conversion from UCS-4 to UTF-8 failed: malformed input'); |
@@ -3245,7 +3241,7 @@ discard block |
||
3245 | 3241 | // Take array values and split output to 4 bytes per value |
3246 | 3242 | // The bit mask is 255, which reads &11111111 |
3247 | 3243 | foreach ($input as $v) { |
3248 | - $output .= ($v & (255 << 24) >> 24) . ($v & (255 << 16) >> 16) . ($v & (255 << 8) >> 8) . ($v & 255); |
|
3244 | + $output .= ($v & (255 << 24) >> 24).($v & (255 << 16) >> 16).($v & (255 << 8) >> 8).($v & 255); |
|
3249 | 3245 | } |
3250 | 3246 | return $output; |
3251 | 3247 | } |
@@ -3280,7 +3276,7 @@ discard block |
||
3280 | 3276 | $out_len++; |
3281 | 3277 | $output[$out_len] = 0; |
3282 | 3278 | } |
3283 | - $output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) ); |
|
3279 | + $output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4))); |
|
3284 | 3280 | } |
3285 | 3281 | return $output; |
3286 | 3282 | } |
@@ -3331,7 +3327,7 @@ discard block |
||
3331 | 3327 | $return = ''; |
3332 | 3328 | |
3333 | 3329 | for ($i = $w; $i > -1; $i--) { |
3334 | - $return .= ($octet & (1 << $i))? '1' : '0'; |
|
3330 | + $return .= ($octet & (1 << $i)) ? '1' : '0'; |
|
3335 | 3331 | } |
3336 | 3332 | |
3337 | 3333 | return $return; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../Exception.php'; |
|
2 | +require_once __DIR__.'/../Exception.php'; |
|
3 | 3 | // adjusted path for OC distribution |
4 | 4 | |
5 | 5 | class Net_IDNA2_Exception_Nameprep extends Net_IDNA2_Exception |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __construct($name) |
17 | 17 | { |
18 | 18 | global $opt; |
19 | - $this->pidfile_path = $opt['rootpath'] . "cache2/$name.pid"; |
|
19 | + $this->pidfile_path = $opt['rootpath']."cache2/$name.pid"; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | if (file_exists($this->pidfile_path)) { |
32 | - echo "Error: Pidfile (" . $this->pidfile_path . ") already present\n"; |
|
32 | + echo "Error: Pidfile (".$this->pidfile_path.") already present\n"; |
|
33 | 33 | |
34 | 34 | return false; |
35 | 35 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | return true; |
41 | 41 | } else { |
42 | - echo "can't create Pidfile " . $this->pidfile_path . "\n"; |
|
42 | + echo "can't create Pidfile ".$this->pidfile_path."\n"; |
|
43 | 43 | |
44 | 44 | return false; |
45 | 45 | } |
@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | |
60 | 60 | // bad PID file, e.g. due to system malfunction while creating the file? |
61 | 61 | if ($pid_daemon <= 0) { |
62 | - echo "removing bad pid_file (" . $this->pidfile_path . ")\n"; |
|
62 | + echo "removing bad pid_file (".$this->pidfile_path.")\n"; |
|
63 | 63 | unlink($this->pidfile_path); |
64 | 64 | |
65 | 65 | return false; |
66 | 66 | } // process running? |
67 | 67 | elseif (posix_kill($pid_daemon, 0)) { |
68 | 68 | // yes, good bye |
69 | - echo "Error: process for " . $this->pidfile_path . " is already running with pid=$pid_daemon\n"; |
|
69 | + echo "Error: process for ".$this->pidfile_path." is already running with pid=$pid_daemon\n"; |
|
70 | 70 | |
71 | 71 | return false; |
72 | 72 | } else { |
73 | 73 | // no, remove pid_file |
74 | - echo "process not running, removing old pid_file (" . $this->pidfile_path . ")\n"; |
|
74 | + echo "process not running, removing old pid_file (".$this->pidfile_path.")\n"; |
|
75 | 75 | unlink($this->pidfile_path); |
76 | 76 | |
77 | 77 | return true; |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | unlink($this->pidfile_path); |
94 | 94 | } |
95 | 95 | } else { |
96 | - echo "Error: can't delete own pidfile (" . $this->pidfile_path . ")\n"; |
|
96 | + echo "Error: can't delete own pidfile (".$this->pidfile_path.")\n"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if ($message) { |
100 | - echo $message . "\n"; |
|
100 | + echo $message."\n"; |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 |
@@ -19,23 +19,23 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | // chicken-egg problem ... |
22 | -require_once $opt['rootpath'] . 'lib2/const.inc.php'; |
|
22 | +require_once $opt['rootpath'].'lib2/const.inc.php'; |
|
23 | 23 | |
24 | 24 | // do all output in HTML format |
25 | 25 | $opt['gui'] = GUI_HTML; |
26 | 26 | |
27 | 27 | // include the main library |
28 | -require_once $opt['rootpath'] . 'lib2/common.inc.php'; |
|
28 | +require_once $opt['rootpath'].'lib2/common.inc.php'; |
|
29 | 29 | |
30 | 30 | // enforce http or https? |
31 | 31 | if ($opt['page']['https']['mode'] == HTTPS_DISABLED) { |
32 | 32 | if ($opt['page']['https']['active']) { |
33 | - $tpl->redirect('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
33 | + $tpl->redirect('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
34 | 34 | } |
35 | 35 | $opt['page']['force_https_login'] = false; |
36 | 36 | } elseif ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { |
37 | 37 | if (!$opt['page']['https']['active']) { |
38 | - $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
38 | + $tpl->redirect('https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
39 | 39 | } |
40 | 40 | $opt['page']['force_https_login'] = true; |
41 | 41 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (substr($helppage, 0, 1) == "!") { |
84 | 84 | substr($helppage, 1); |
85 | 85 | } elseif ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki'])) { |
86 | - return $opt['locale'][$help_locale]['helpwiki'] . str_replace(' ', '_', $helppage); |
|
86 | + return $opt['locale'][$help_locale]['helpwiki'].str_replace(' ', '_', $helppage); |
|
87 | 87 | } else { |
88 | 88 | return ""; |
89 | 89 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | return ""; |
99 | 99 | } else { |
100 | 100 | $imgtitle = $translate->t($title, '', basename(__FILE__), __LINE__); |
101 | - $imgtitle = "alt='" . $imgtitle . "' title='" . $imgtitle . "'"; |
|
101 | + $imgtitle = "alt='".$imgtitle."' title='".$imgtitle."'"; |
|
102 | 102 | |
103 | - return "<a class='nooutline' href='" . $helpurl . "' " . $imgtitle . " target='_blank'>"; |
|
103 | + return "<a class='nooutline' href='".$helpurl."' ".$imgtitle." target='_blank'>"; |
|
104 | 104 | } |
105 | 105 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Shortcut for cachelist search |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require __DIR__ . '/lib2/web.inc.php'; |
|
10 | +require __DIR__.'/lib2/web.inc.php'; |
|
11 | 11 | |
12 | 12 | $id = isset($_REQUEST['id']) ? $_REQUEST['id'] + 0 : 0; |
13 | 13 | $password = isset($_REQUEST['key']) ? $_REQUEST['key'] : ''; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | - $tpl->redirect("search.php?searchto=searchbylist&listid=" . $id . |
|
37 | - ($password != "" ? "&listkey=" . urlencode($password) : "") . |
|
38 | - "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname" . $invalid_waypoints); |
|
36 | + $tpl->redirect("search.php?searchto=searchbylist&listid=".$id. |
|
37 | + ($password != "" ? "&listkey=".urlencode($password) : ""). |
|
38 | + "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname".$invalid_waypoints); |
|
39 | 39 | } else { |
40 | 40 | $tpl->redirect("cachelists.php"); |
41 | 41 | } |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
12 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
13 | 13 | $opt['gui'] = GUI_HTML; |
14 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
15 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
14 | +require_once __DIR__.'/lib/common.inc.php'; |
|
15 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
16 | 16 | |
17 | 17 | $no_tpl_build = false; |
18 | 18 | |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | |
34 | 34 | //set here the template to process |
35 | 35 | $tplname = 'newcache'; |
36 | - require_once $stylepath . '/' . $tplname . '.inc.php'; |
|
36 | + require_once $stylepath.'/'.$tplname.'.inc.php'; |
|
37 | 37 | |
38 | 38 | //set template replacements |
39 | - tpl_set_var('reset', $reset); // obsolete |
|
39 | + tpl_set_var('reset', $reset); // obsolete |
|
40 | 40 | tpl_set_var('submit', $submit); |
41 | 41 | tpl_set_var('general_message', ''); |
42 | 42 | tpl_set_var('hidden_since_message', ''); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | tpl_set_var('diff_message', ''); |
54 | 54 | tpl_set_var('safari_message', ''); |
55 | 55 | |
56 | - $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
56 | + $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
57 | 57 | if (!isset($_POST['size'])) { |
58 | 58 | if ($sel_type == 4 || $sel_type == 5) { |
59 | 59 | $sel_size = 7; |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | $sel_size = - 1; |
62 | 62 | } |
63 | 63 | } else { |
64 | - $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
64 | + $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
65 | 65 | } |
66 | 66 | $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; |
67 | - $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
67 | + $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
68 | 68 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
69 | 69 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
70 | 70 | |
71 | 71 | //coords |
72 | - $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
72 | + $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
73 | 73 | if ($lonEW == 'E') { |
74 | 74 | tpl_set_var('lonEsel', ' selected="selected"'); |
75 | 75 | tpl_set_var('lonWsel', ''); |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | tpl_set_var('lonEsel', ''); |
78 | 78 | tpl_set_var('lonWsel', ' selected="selected"'); |
79 | 79 | } |
80 | - $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
80 | + $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
81 | 81 | tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8')); |
82 | 82 | |
83 | - $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
83 | + $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
84 | 84 | tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8')); |
85 | 85 | |
86 | - $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
86 | + $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
87 | 87 | if ($latNS == 'N') { |
88 | 88 | tpl_set_var('latNsel', ' selected="selected"'); |
89 | 89 | tpl_set_var('latSsel', ''); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | tpl_set_var('latNsel', ''); |
92 | 92 | tpl_set_var('latSsel', ' selected="selected"'); |
93 | 93 | } |
94 | - $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
94 | + $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
95 | 95 | tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8')); |
96 | 96 | |
97 | - $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
97 | + $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
98 | 98 | tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8')); |
99 | 99 | |
100 | 100 | //name |
101 | - $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
101 | + $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
102 | 102 | tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8')); |
103 | 103 | |
104 | 104 | //shortdesc |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $oldDescMode = $descMode; |
121 | 121 | } |
122 | 122 | } else { |
123 | - if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) { |
|
123 | + if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) { |
|
124 | 124 | $descMode = 1; |
125 | 125 | } else { |
126 | 126 | $descMode = 3; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | // fuer alte Versionen von OCProp |
132 | 132 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
133 | - $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
133 | + $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
134 | 134 | $_POST['submitform'] = $_POST['submit']; |
135 | 135 | |
136 | 136 | $short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc); |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | |
153 | 153 | tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8')); |
154 | 154 | |
155 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
155 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
156 | 156 | if ($descMode == 3) { |
157 | 157 | // TinyMCE |
158 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
159 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang=' . strtolower($locale) . '"></script>' . "\n"; |
|
158 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
159 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang='.strtolower($locale).'"></script>'."\n"; |
|
160 | 160 | } |
161 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
161 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
162 | 162 | tpl_set_var('htmlheaders', $headers); |
163 | 163 | |
164 | 164 | //effort |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $st_hours = floor($search_time); |
183 | 183 | $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60); |
184 | 184 | |
185 | - tpl_set_var('search_time', $st_hours . ':' . $st_minutes); |
|
185 | + tpl_set_var('search_time', $st_hours.':'.$st_minutes); |
|
186 | 186 | tpl_set_var('way_length', $way_length); |
187 | 187 | |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | //tos |
199 | - $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
199 | + $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
200 | 200 | if ($tos == 1) { |
201 | 201 | tpl_set_var('toschecked', ' checked="checked"'); |
202 | 202 | } else { |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | //hidden_since |
207 | - $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | - $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | - $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
207 | + $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | + $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | + $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
210 | 210 | tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8')); |
211 | 211 | tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8')); |
212 | 212 | tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8')); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | tpl_set_var('publish_later_checked', ''); |
224 | 224 | tpl_set_var('publish_notnow_checked', ''); |
225 | 225 | |
226 | - $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
226 | + $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
227 | 227 | if ($publish == 'now2') { |
228 | 228 | tpl_set_var('publish_now_checked', 'checked'); |
229 | 229 | } elseif ($publish == 'later') { |
@@ -237,11 +237,11 @@ discard block |
||
237 | 237 | // fill activate hours |
238 | 238 | $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0; |
239 | 239 | $activation_hours = ''; |
240 | - for ($i = 0; $i <= 23; $i ++) { |
|
240 | + for ($i = 0; $i <= 23; $i++) { |
|
241 | 241 | if ($activate_hour == $i) { |
242 | - $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
|
242 | + $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'; |
|
243 | 243 | } else { |
244 | - $activation_hours .= '<option value="' . $i . '">' . $i . '</option>'; |
|
244 | + $activation_hours .= '<option value="'.$i.'">'.$i.'</option>'; |
|
245 | 245 | } |
246 | 246 | $activation_hours .= "\n"; |
247 | 247 | } |
@@ -253,30 +253,30 @@ discard block |
||
253 | 253 | |
254 | 254 | // gc- and nc-waypoints |
255 | 255 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
256 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop |
|
256 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop |
|
257 | 257 | tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8')); |
258 | 258 | |
259 | 259 | //difficulty |
260 | - $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | - $difficulty_options = '<option value="1">' . $sel_message . '</option>'; |
|
262 | - for ($i = 2; $i <= 10; $i ++) { |
|
260 | + $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | + $difficulty_options = '<option value="1">'.$sel_message.'</option>'; |
|
262 | + for ($i = 2; $i <= 10; $i++) { |
|
263 | 263 | if ($difficulty == $i) { |
264 | - $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
264 | + $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
265 | 265 | } else { |
266 | - $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
266 | + $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
267 | 267 | } |
268 | 268 | $difficulty_options .= "\n"; |
269 | 269 | } |
270 | 270 | tpl_set_var('difficulty_options', $difficulty_options); |
271 | 271 | |
272 | 272 | //terrain |
273 | - $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | - $terrain_options = '<option value="1">' . $sel_message . '</option>'; |
|
275 | - for ($i = 2; $i <= 10; $i ++) { |
|
273 | + $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | + $terrain_options = '<option value="1">'.$sel_message.'</option>'; |
|
275 | + for ($i = 2; $i <= 10; $i++) { |
|
276 | 276 | if ($terrain == $i) { |
277 | - $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
277 | + $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
278 | 278 | } else { |
279 | - $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
279 | + $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
280 | 280 | } |
281 | 281 | $terrain_options .= "\n"; |
282 | 282 | } |
@@ -284,34 +284,34 @@ discard block |
||
284 | 284 | |
285 | 285 | //sizeoptions |
286 | 286 | $sSelected = ($sel_size == - 1) ? ' selected="selected"' : ''; |
287 | - $sizes = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
287 | + $sizes = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
288 | 288 | $rsSizes = sql( |
289 | 289 | "SELECT `cache_size`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_size`.`name`) AS `name` |
290 | 290 | FROM `cache_size` |
291 | 291 | LEFT JOIN `sys_trans` ON `cache_size`.`trans_id`=`sys_trans`.`id` |
292 | 292 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
293 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
293 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
294 | 294 | ORDER BY `cache_size`.`ordinal` ASC" |
295 | 295 | ); |
296 | 296 | while ($rSize = sql_fetch_assoc($rsSizes)) { |
297 | 297 | $sSelected = ($rSize['id'] == $sel_size) ? ' selected="selected"' : ''; |
298 | - $sizes .= '<option value="' . $rSize['id'] . '"' . $sSelected . '>' . htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
298 | + $sizes .= '<option value="'.$rSize['id'].'"'.$sSelected.'>'.htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
299 | 299 | } |
300 | 300 | sql_free_result($rsSizes); |
301 | 301 | tpl_set_var('sizeoptions', $sizes); |
302 | 302 | |
303 | 303 | //typeoptions |
304 | 304 | $sSelected = ($sel_type == - 1) ? ' selected="selected"' : ''; |
305 | - $types = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
305 | + $types = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
306 | 306 | $rsTypes = sql("SELECT `cache_type`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_type`.`en`) AS `name` |
307 | 307 | FROM `cache_type` |
308 | 308 | LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id` |
309 | 309 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
310 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
310 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
311 | 311 | ORDER BY `cache_type`.`ordinal` ASC"); |
312 | 312 | while ($rType = sql_fetch_assoc($rsTypes)) { |
313 | 313 | $sSelected = ($rType['id'] == $sel_type) ? ' selected="selected"' : ''; |
314 | - $types .= '<option value="' . $rType['id'] . '"' . $sSelected . '>' . htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
314 | + $types .= '<option value="'.$rType['id'].'"'.$sSelected.'>'.htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
315 | 315 | } |
316 | 316 | sql_free_result($rsTypes); |
317 | 317 | tpl_set_var('typeoptions', $types); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | tpl_set_var('show_all_langs', '0'); |
343 | 343 | tpl_set_var( |
344 | 344 | 'show_all_langs_submit', |
345 | - '<input type="submit" name="show_all_langs_submit" value="' . $show_all . '"/>' |
|
345 | + '<input type="submit" name="show_all_langs_submit" value="'.$show_all.'"/>' |
|
346 | 346 | ); |
347 | 347 | |
348 | 348 | $rs = sql( |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | while ($record = sql_fetch_assoc($rs)) { |
378 | 378 | $sSelected = ($record['short'] == $sel_lang) ? ' selected="selected"' : ''; |
379 | - $langsoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
379 | + $langsoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | tpl_set_var('langoptions', $langsoptions); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | if ($show_all_countries == 0) { |
401 | 401 | tpl_set_var('show_all_countries', '0'); |
402 | - tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="' . $show_all . '" onclick="submitbutton(\'showallcountries\')" />'); |
|
402 | + tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="'.$show_all.'" onclick="submitbutton(\'showallcountries\')" />'); |
|
403 | 403 | |
404 | 404 | $rs = sql( |
405 | 405 | "SELECT `countries`.`short`, IFNULL(`sys_trans_text`.`text`, `countries`.`name`) AS `name` |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | // build the "country" dropdown list, preselect $sel_country |
435 | 435 | while ($record = sql_fetch_array($rs)) { |
436 | 436 | $sSelected = ($record['short'] == $sel_country) ? ' selected="selected"' : ''; |
437 | - $countriesoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
437 | + $countriesoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
438 | 438 | } |
439 | 439 | sql_free_result($rs); |
440 | 440 | |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | LEFT JOIN `sys_trans_text` AS `ttdesc` |
489 | 489 | ON `tdesc`.`id`=`ttdesc`.`trans_id` |
490 | 490 | AND `ttdesc`.`lang`='&1' |
491 | - WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0) . " |
|
491 | + WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0)." |
|
492 | 492 | AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1 |
493 | 493 | AND `cache_attrib`.`selectable`!=0 |
494 | 494 | ORDER BY `cache_attrib`.`group_id`, `cache_attrib`.`id`", |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
509 | 509 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
510 | 510 | $group_line .= $line; |
511 | - $nLineAttrCount ++; |
|
511 | + $nLineAttrCount++; |
|
512 | 512 | |
513 | 513 | $line = $cache_attrib_js; |
514 | 514 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -674,8 +674,8 @@ discard block |
||
674 | 674 | "SELECT MIN(wp_oc) |
675 | 675 | FROM `caches` |
676 | 676 | WHERE `status`=1 |
677 | - AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude) . "',6) |
|
678 | - AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude) . "',6)", |
|
677 | + AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude)."',6) |
|
678 | + AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude)."',6)", |
|
679 | 679 | null |
680 | 680 | ); |
681 | 681 | if ($duplicate_wpoc) { |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $activation_column = ' '; |
814 | 814 | } elseif ($publish == 'later') { |
815 | 815 | $sel_status = 5; |
816 | - $activation_date = "'" . date( |
|
816 | + $activation_date = "'".date( |
|
817 | 817 | 'Y-m-d H:i:s', |
818 | 818 | mktime( |
819 | 819 | $activate_hour, |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | $activate_month, |
823 | 823 | $activate_day, |
824 | 824 | $activate_year |
825 | - )). "'"; |
|
825 | + ))."'"; |
|
826 | 826 | } elseif ($publish == 'notnow') { |
827 | 827 | $sel_status = 5; |
828 | 828 | $activation_date = 'NULL'; |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | ); |
903 | 903 | |
904 | 904 | // insert cache-attributes |
905 | - for ($i = 0; $i < count($cache_attribs); $i ++) { |
|
905 | + for ($i = 0; $i < count($cache_attribs); $i++) { |
|
906 | 906 | if (($cache_attribs[$i] + 0) > 0) { |
907 | 907 | sql( |
908 | 908 | "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')", |
@@ -915,14 +915,14 @@ discard block |
||
915 | 915 | // only if cache is published NOW or activate_date is in the past |
916 | 916 | if ($publish == 'now2' || ($publish == 'later' && mktime($activate_hour, 0, 0, $activate_month, $activate_day, $activate_year) <= $today)) { |
917 | 917 | //do event handling |
918 | - include_once(__DIR__ . '/lib/eventhandler.inc.php'); |
|
918 | + include_once(__DIR__.'/lib/eventhandler.inc.php'); |
|
919 | 919 | |
920 | 920 | event_notify_new_cache($cache_id + 0); |
921 | 921 | event_new_cache($usr['userid'] + 0); |
922 | 922 | } |
923 | 923 | |
924 | 924 | // redirection |
925 | - tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id)); |
|
925 | + tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id)); |
|
926 | 926 | } else { |
927 | 927 | tpl_set_var('general_message', $error_general); |
928 | 928 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require_once __DIR__ . '/./lib2/web.inc.php'; |
|
8 | +require_once __DIR__.'/./lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'mystatpic'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_DATA_STATPIC; |