@@ -2760,7 +2760,7 @@ discard block |
||
| 2760 | 2760 | * @since 1.0 |
| 2761 | 2761 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
| 2762 | 2762 | * @link http://www.georss.org/ GeoRSS |
| 2763 | - * @return string|null |
|
| 2763 | + * @return double|null |
|
| 2764 | 2764 | */ |
| 2765 | 2765 | public function get_latitude() |
| 2766 | 2766 | { |
@@ -2789,7 +2789,7 @@ discard block |
||
| 2789 | 2789 | * @since 1.0 |
| 2790 | 2790 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
| 2791 | 2791 | * @link http://www.georss.org/ GeoRSS |
| 2792 | - * @return string|null |
|
| 2792 | + * @return double|null |
|
| 2793 | 2793 | */ |
| 2794 | 2794 | public function get_longitude() |
| 2795 | 2795 | { |
@@ -2930,7 +2930,7 @@ discard block |
||
| 2930 | 2930 | * Uses `<image><width>` or defaults to 88.0 if no width is specified and |
| 2931 | 2931 | * the feed is an RSS 2.0 feed. |
| 2932 | 2932 | * |
| 2933 | - * @return int|float|null |
|
| 2933 | + * @return double|null |
|
| 2934 | 2934 | */ |
| 2935 | 2935 | public function get_image_width() |
| 2936 | 2936 | { |
@@ -2956,7 +2956,7 @@ discard block |
||
| 2956 | 2956 | * Uses `<image><height>` or defaults to 31.0 if no height is specified and |
| 2957 | 2957 | * the feed is an RSS 2.0 feed. |
| 2958 | 2958 | * |
| 2959 | - * @return int|float|null |
|
| 2959 | + * @return double|null |
|
| 2960 | 2960 | */ |
| 2961 | 2961 | public function get_image_height() |
| 2962 | 2962 | { |
@@ -3185,7 +3185,7 @@ discard block |
||
| 3185 | 3185 | * @access private |
| 3186 | 3186 | * @param SimplePie $a |
| 3187 | 3187 | * @param SimplePie $b |
| 3188 | - * @return boolean |
|
| 3188 | + * @return integer |
|
| 3189 | 3189 | */ |
| 3190 | 3190 | public static function sort_items($a, $b) |
| 3191 | 3191 | { |
@@ -4384,7 +4384,7 @@ discard block |
||
| 4384 | 4384 | /** |
| 4385 | 4385 | * Retrieve the last modified time for the cache |
| 4386 | 4386 | * |
| 4387 | - * @return int Timestamp |
|
| 4387 | + * @return false|string Timestamp |
|
| 4388 | 4388 | */ |
| 4389 | 4389 | public function mtime() |
| 4390 | 4390 | { |
@@ -4504,7 +4504,6 @@ discard block |
||
| 4504 | 4504 | * |
| 4505 | 4505 | * @param string $location Location string (from SimplePie::$cache_location) |
| 4506 | 4506 | * @param string $name Unique ID for the cache |
| 4507 | - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
|
| 4508 | 4507 | */ |
| 4509 | 4508 | public function __construct($location, $name, $options = null) { |
| 4510 | 4509 | //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance(); |
@@ -5461,7 +5460,7 @@ discard block |
||
| 5461 | 5460 | * Consume the next byte |
| 5462 | 5461 | * |
| 5463 | 5462 | * @access private |
| 5464 | - * @return mixed The next byte, or false, if there is no more data |
|
| 5463 | + * @return string|false The next byte, or false, if there is no more data |
|
| 5465 | 5464 | */ |
| 5466 | 5465 | public function consume() |
| 5467 | 5466 | { |
@@ -5481,7 +5480,7 @@ discard block |
||
| 5481 | 5480 | * |
| 5482 | 5481 | * @access private |
| 5483 | 5482 | * @param string $chars Characters to consume |
| 5484 | - * @return mixed A series of characters that match the range, or false |
|
| 5483 | + * @return string|false A series of characters that match the range, or false |
|
| 5485 | 5484 | */ |
| 5486 | 5485 | public function consume_range($chars) |
| 5487 | 5486 | { |
@@ -6571,7 +6570,7 @@ discard block |
||
| 6571 | 6570 | /** |
| 6572 | 6571 | * Get length |
| 6573 | 6572 | * |
| 6574 | - * @return float Length in bytes |
|
| 6573 | + * @return string|null Length in bytes |
|
| 6575 | 6574 | */ |
| 6576 | 6575 | public function get_length() |
| 6577 | 6576 | { |
@@ -8279,7 +8278,7 @@ discard block |
||
| 8279 | 8278 | * |
| 8280 | 8279 | * Returns false if $base is not absolute, otherwise an IRI. |
| 8281 | 8280 | * |
| 8282 | - * @param IRI|string $base (Absolute) Base IRI |
|
| 8281 | + * @param SimplePie_IRI $base (Absolute) Base IRI |
|
| 8283 | 8282 | * @param IRI|string $relative Relative IRI |
| 8284 | 8283 | * @return IRI|false |
| 8285 | 8284 | */ |
@@ -9068,7 +9067,7 @@ discard block |
||
| 9068 | 9067 | * Set the ipath. |
| 9069 | 9068 | * |
| 9070 | 9069 | * @param string $ipath |
| 9071 | - * @return bool |
|
| 9070 | + * @return null|boolean |
|
| 9072 | 9071 | */ |
| 9073 | 9072 | public function set_path($ipath, $clear_cache = false) |
| 9074 | 9073 | { |
@@ -9145,6 +9144,7 @@ discard block |
||
| 9145 | 9144 | /** |
| 9146 | 9145 | * Convert an IRI to a URI (or parts thereof) |
| 9147 | 9146 | * |
| 9147 | + * @param false|string $string |
|
| 9148 | 9148 | * @return string |
| 9149 | 9149 | */ |
| 9150 | 9150 | public function to_uri($string) |
@@ -10114,7 +10114,7 @@ discard block |
||
| 10114 | 10114 | * @since 1.0 |
| 10115 | 10115 | * |
| 10116 | 10116 | * @param string $date_format Supports any PHP date format from {@see http://php.net/strftime} (empty for the raw data) |
| 10117 | - * @return int|string|null |
|
| 10117 | + * @return string|null |
|
| 10118 | 10118 | */ |
| 10119 | 10119 | public function get_local_date($date_format = '%c') |
| 10120 | 10120 | { |
@@ -10137,7 +10137,7 @@ discard block |
||
| 10137 | 10137 | * |
| 10138 | 10138 | * @see get_date |
| 10139 | 10139 | * @param string $date_format Supports any PHP date format from {@see http://php.net/date} |
| 10140 | - * @return int|string|null |
|
| 10140 | + * @return null|string |
|
| 10141 | 10141 | */ |
| 10142 | 10142 | public function get_gmdate($date_format = 'j F Y, g:i a') |
| 10143 | 10143 | { |
@@ -10155,7 +10155,7 @@ discard block |
||
| 10155 | 10155 | * |
| 10156 | 10156 | * @see get_updated_date |
| 10157 | 10157 | * @param string $date_format Supports any PHP date format from {@see http://php.net/date} |
| 10158 | - * @return int|string|null |
|
| 10158 | + * @return null|string |
|
| 10159 | 10159 | */ |
| 10160 | 10160 | public function get_updated_gmdate($date_format = 'j F Y, g:i a') |
| 10161 | 10161 | { |
@@ -12159,7 +12159,7 @@ discard block |
||
| 12159 | 12159 | * @since 1.0 |
| 12160 | 12160 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
| 12161 | 12161 | * @link http://www.georss.org/ GeoRSS |
| 12162 | - * @return string|null |
|
| 12162 | + * @return double|null |
|
| 12163 | 12163 | */ |
| 12164 | 12164 | public function get_latitude() |
| 12165 | 12165 | { |
@@ -12187,7 +12187,7 @@ discard block |
||
| 12187 | 12187 | * @since 1.0 |
| 12188 | 12188 | * @link http://www.w3.org/2003/01/geo/ W3C WGS84 Basic Geo |
| 12189 | 12189 | * @link http://www.georss.org/ GeoRSS |
| 12190 | - * @return string|null |
|
| 12190 | + * @return double|null |
|
| 12191 | 12191 | */ |
| 12192 | 12192 | public function get_longitude() |
| 12193 | 12193 | { |
@@ -12403,6 +12403,9 @@ discard block |
||
| 12403 | 12403 | } |
| 12404 | 12404 | } |
| 12405 | 12405 | |
| 12406 | + /** |
|
| 12407 | + * @param string $name |
|
| 12408 | + */ |
|
| 12406 | 12409 | protected function search_elements_by_tag($name, &$done, $feeds) |
| 12407 | 12410 | { |
| 12408 | 12411 | if ($this->dom === null) |
@@ -12621,6 +12624,9 @@ discard block |
||
| 12621 | 12624 | */ |
| 12622 | 12625 | class SimplePie_Misc |
| 12623 | 12626 | { |
| 12627 | + /** |
|
| 12628 | + * @param integer $seconds |
|
| 12629 | + */ |
|
| 12624 | 12630 | public static function time_hms($seconds) |
| 12625 | 12631 | { |
| 12626 | 12632 | $time = ''; |
@@ -12923,6 +12929,11 @@ discard block |
||
| 12923 | 12929 | } |
| 12924 | 12930 | } |
| 12925 | 12931 | |
| 12932 | + /** |
|
| 12933 | + * @param string $data |
|
| 12934 | + * @param string $input |
|
| 12935 | + * @param string $output |
|
| 12936 | + */ |
|
| 12926 | 12937 | protected static function change_encoding_mbstring($data, $input, $output) |
| 12927 | 12938 | { |
| 12928 | 12939 | if ($input === 'windows-949') |
@@ -12961,6 +12972,11 @@ discard block |
||
| 12961 | 12972 | return false; |
| 12962 | 12973 | } |
| 12963 | 12974 | |
| 12975 | + /** |
|
| 12976 | + * @param string $data |
|
| 12977 | + * @param string $input |
|
| 12978 | + * @param string $output |
|
| 12979 | + */ |
|
| 12964 | 12980 | protected static function change_encoding_iconv($data, $input, $output) |
| 12965 | 12981 | { |
| 12966 | 12982 | return @iconv($input, $output, $data); |
@@ -14301,6 +14317,9 @@ discard block |
||
| 14301 | 14317 | } |
| 14302 | 14318 | } |
| 14303 | 14319 | |
| 14320 | + /** |
|
| 14321 | + * @return string |
|
| 14322 | + */ |
|
| 14304 | 14323 | public static function get_curl_version() |
| 14305 | 14324 | { |
| 14306 | 14325 | if (is_array($curl = curl_version())) |
@@ -14368,7 +14387,6 @@ discard block |
||
| 14368 | 14387 | /** |
| 14369 | 14388 | * Remove RFC822 comments |
| 14370 | 14389 | * |
| 14371 | - * @param string $data Data to strip comments from |
|
| 14372 | 14390 | * @return string Comment stripped string |
| 14373 | 14391 | */ |
| 14374 | 14392 | public static function uncomment_rfc822($string) |
@@ -14624,7 +14642,7 @@ discard block |
||
| 14624 | 14642 | * @todo Add support for EBCDIC |
| 14625 | 14643 | * @param string $data XML data |
| 14626 | 14644 | * @param SimplePie_Registry $registry Class registry |
| 14627 | - * @return array Possible encodings |
|
| 14645 | + * @return string[] Possible encodings |
|
| 14628 | 14646 | */ |
| 14629 | 14647 | public static function xml_encoding($data, $registry) |
| 14630 | 14648 | { |
@@ -14997,7 +15015,7 @@ discard block |
||
| 14997 | 15015 | * 0:0:0:0:0:FFFF:129.144.52.38 |
| 14998 | 15016 | * |
| 14999 | 15017 | * @param string $ip An IPv6 address |
| 15000 | - * @return array [0] contains the IPv6 represented part, and [1] the IPv4 represented part |
|
| 15018 | + * @return string[] [0] contains the IPv6 represented part, and [1] the IPv4 represented part |
|
| 15001 | 15019 | */ |
| 15002 | 15020 | private static function split_v6_v4($ip) |
| 15003 | 15021 | { |
@@ -15744,7 +15762,6 @@ discard block |
||
| 15744 | 15762 | * Remove RFC822 comments |
| 15745 | 15763 | * |
| 15746 | 15764 | * @access protected |
| 15747 | - * @param string $data Data to strip comments from |
|
| 15748 | 15765 | * @return string Comment stripped string |
| 15749 | 15766 | */ |
| 15750 | 15767 | public function remove_rfc2822_comments($string) |
@@ -16258,6 +16275,9 @@ discard block |
||
| 16258 | 16275 | return $this->data; |
| 16259 | 16276 | } |
| 16260 | 16277 | |
| 16278 | + /** |
|
| 16279 | + * @param string $tag |
|
| 16280 | + */ |
|
| 16261 | 16281 | public function tag_open($parser, $tag, $attributes) |
| 16262 | 16282 | { |
| 16263 | 16283 | list($this->namespace[], $this->element[]) = $this->split_ns($tag); |
@@ -16325,6 +16345,9 @@ discard block |
||
| 16325 | 16345 | } |
| 16326 | 16346 | } |
| 16327 | 16347 | |
| 16348 | + /** |
|
| 16349 | + * @param string $cdata |
|
| 16350 | + */ |
|
| 16328 | 16351 | public function cdata($parser, $cdata) |
| 16329 | 16352 | { |
| 16330 | 16353 | if ($this->current_xhtml_construct >= 0) |
@@ -16337,6 +16360,9 @@ discard block |
||
| 16337 | 16360 | } |
| 16338 | 16361 | } |
| 16339 | 16362 | |
| 16363 | + /** |
|
| 16364 | + * @param string $tag |
|
| 16365 | + */ |
|
| 16340 | 16366 | public function tag_close($parser, $tag) |
| 16341 | 16367 | { |
| 16342 | 16368 | if ($this->current_xhtml_construct >= 0) |
@@ -16422,6 +16448,9 @@ discard block |
||
| 16422 | 16448 | return isset($data['value']) ? $data['value'] : ''; |
| 16423 | 16449 | } |
| 16424 | 16450 | |
| 16451 | + /** |
|
| 16452 | + * @param string $url |
|
| 16453 | + */ |
|
| 16425 | 16454 | private function parse_microformats(&$data, $url) { |
| 16426 | 16455 | $feed_title = ''; |
| 16427 | 16456 | $feed_author = NULL; |
@@ -16953,6 +16982,8 @@ discard block |
||
| 16953 | 16982 | * |
| 16954 | 16983 | * For documentation on all the parameters, see the corresponding |
| 16955 | 16984 | * properties and their accessors |
| 16985 | + * @param string $relationship |
|
| 16986 | + * @param string $value |
|
| 16956 | 16987 | */ |
| 16957 | 16988 | public function __construct($relationship = null, $type = null, $value = null) |
| 16958 | 16989 | { |
@@ -17390,6 +17421,9 @@ discard block |
||
| 17390 | 17421 | return $data; |
| 17391 | 17422 | } |
| 17392 | 17423 | |
| 17424 | + /** |
|
| 17425 | + * @param string $html |
|
| 17426 | + */ |
|
| 17393 | 17427 | protected function preprocess($html, $type) |
| 17394 | 17428 | { |
| 17395 | 17429 | $ret = ''; |
@@ -17414,6 +17448,9 @@ discard block |
||
| 17414 | 17448 | return $ret; |
| 17415 | 17449 | } |
| 17416 | 17450 | |
| 17451 | + /** |
|
| 17452 | + * @param DOMDocument $document |
|
| 17453 | + */ |
|
| 17417 | 17454 | public function replace_urls($document, $tag, $attributes) |
| 17418 | 17455 | { |
| 17419 | 17456 | if (!is_array($attributes)) |
@@ -17466,6 +17503,10 @@ discard block |
||
| 17466 | 17503 | } |
| 17467 | 17504 | } |
| 17468 | 17505 | |
| 17506 | + /** |
|
| 17507 | + * @param DOMDocument $document |
|
| 17508 | + * @param DOMXPath $xpath |
|
| 17509 | + */ |
|
| 17469 | 17510 | protected function strip_tag($tag, $document, $xpath, $type) |
| 17470 | 17511 | { |
| 17471 | 17512 | $elements = $xpath->query('body//' . $tag); |
@@ -17550,6 +17591,9 @@ discard block |
||
| 17550 | 17591 | } |
| 17551 | 17592 | } |
| 17552 | 17593 | |
| 17594 | + /** |
|
| 17595 | + * @param DOMXPath $xpath |
|
| 17596 | + */ |
|
| 17553 | 17597 | protected function strip_attr($attrib, $xpath) |
| 17554 | 17598 | { |
| 17555 | 17599 | $elements = $xpath->query('//*[@' . $attrib . ']'); |
@@ -17560,6 +17604,9 @@ discard block |
||
| 17560 | 17604 | } |
| 17561 | 17605 | } |
| 17562 | 17606 | |
| 17607 | + /** |
|
| 17608 | + * @param DOMDocument $document |
|
| 17609 | + */ |
|
| 17563 | 17610 | protected function add_attr($tag, $valuePairs, $document) |
| 17564 | 17611 | { |
| 17565 | 17612 | $elements = $document->getElementsByTagName($tag); |
@@ -17605,6 +17652,10 @@ discard block |
||
| 17605 | 17652 | return md5(serialize($this->data)); |
| 17606 | 17653 | } |
| 17607 | 17654 | |
| 17655 | + /** |
|
| 17656 | + * @param string $namespace |
|
| 17657 | + * @param string $tag |
|
| 17658 | + */ |
|
| 17608 | 17659 | public function get_source_tags($namespace, $tag) |
| 17609 | 17660 | { |
| 17610 | 17661 | if (isset($this->data['child'][$namespace][$tag])) |
@@ -17617,6 +17668,9 @@ discard block |
||
| 17617 | 17668 | } |
| 17618 | 17669 | } |
| 17619 | 17670 | |
| 17671 | + /** |
|
| 17672 | + * @return string |
|
| 17673 | + */ |
|
| 17620 | 17674 | public function get_base($element = array()) |
| 17621 | 17675 | { |
| 17622 | 17676 | return $this->item->get_base($element); |
@@ -868,7 +868,6 @@ discard block |
||
| 868 | 868 | * This tells SimplePie to ignore any file errors and fall back to cache |
| 869 | 869 | * instead. This only works if caching is enabled and cached content |
| 870 | 870 | * still exists. |
| 871 | - |
|
| 872 | 871 | * @param bool $enable Force use of cache on fail. |
| 873 | 872 | */ |
| 874 | 873 | public function force_cache_fallback($enable = false) |
@@ -1663,7 +1662,7 @@ discard block |
||
| 1663 | 1662 | // Now also do feed discovery, but if microformats were found don't |
| 1664 | 1663 | // overwrite the current value of file. |
| 1665 | 1664 | $discovered = $locate->find($this->autodiscovery, |
| 1666 | - $this->all_discovered_feeds); |
|
| 1665 | + $this->all_discovered_feeds); |
|
| 1667 | 1666 | if ($microformats) |
| 1668 | 1667 | { |
| 1669 | 1668 | if ($hub = $locate->get_rel_link('hub')) |
@@ -1928,8 +1927,8 @@ discard block |
||
| 1928 | 1927 | { |
| 1929 | 1928 | // sanitize encodes ampersands which are required when used in a url. |
| 1930 | 1929 | return str_replace('&', '&', |
| 1931 | - $this->sanitize($this->permanent_url, |
|
| 1932 | - SIMPLEPIE_CONSTRUCT_IRI)); |
|
| 1930 | + $this->sanitize($this->permanent_url, |
|
| 1931 | + SIMPLEPIE_CONSTRUCT_IRI)); |
|
| 1933 | 1932 | } |
| 1934 | 1933 | } |
| 1935 | 1934 | else |
@@ -1937,8 +1936,8 @@ discard block |
||
| 1937 | 1936 | if ($this->feed_url !== null) |
| 1938 | 1937 | { |
| 1939 | 1938 | return str_replace('&', '&', |
| 1940 | - $this->sanitize($this->feed_url, |
|
| 1941 | - SIMPLEPIE_CONSTRUCT_IRI)); |
|
| 1939 | + $this->sanitize($this->feed_url, |
|
| 1940 | + SIMPLEPIE_CONSTRUCT_IRI)); |
|
| 1942 | 1941 | } |
| 1943 | 1942 | } |
| 1944 | 1943 | return null; |
@@ -2597,8 +2596,8 @@ discard block |
||
| 2597 | 2596 | } |
| 2598 | 2597 | |
| 2599 | 2598 | if (isset($this->data['headers']['link']) && |
| 2600 | - preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/', |
|
| 2601 | - $this->data['headers']['link'], $match)) |
|
| 2599 | + preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/', |
|
| 2600 | + $this->data['headers']['link'], $match)) |
|
| 2602 | 2601 | { |
| 2603 | 2602 | return array($match[1]); |
| 2604 | 2603 | } |
@@ -3937,112 +3936,112 @@ discard block |
||
| 3937 | 3936 | */ |
| 3938 | 3937 | class SimplePie_Cache_Memcached implements SimplePie_Cache_Base |
| 3939 | 3938 | { |
| 3940 | - /** |
|
| 3941 | - * Memcached instance |
|
| 3942 | - * @var Memcached |
|
| 3943 | - */ |
|
| 3944 | - protected $cache; |
|
| 3945 | - |
|
| 3946 | - /** |
|
| 3947 | - * Options |
|
| 3948 | - * @var array |
|
| 3949 | - */ |
|
| 3950 | - protected $options; |
|
| 3951 | - |
|
| 3952 | - /** |
|
| 3953 | - * Cache name |
|
| 3954 | - * @var string |
|
| 3955 | - */ |
|
| 3956 | - protected $name; |
|
| 3957 | - |
|
| 3958 | - /** |
|
| 3959 | - * Create a new cache object |
|
| 3960 | - * @param string $location Location string (from SimplePie::$cache_location) |
|
| 3961 | - * @param string $name Unique ID for the cache |
|
| 3962 | - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
|
| 3963 | - */ |
|
| 3964 | - public function __construct($location, $name, $type) { |
|
| 3965 | - $this->options = array( |
|
| 3966 | - 'host' => '127.0.0.1', |
|
| 3967 | - 'port' => 11211, |
|
| 3968 | - 'extras' => array( |
|
| 3969 | - 'timeout' => 3600, // one hour |
|
| 3970 | - 'prefix' => 'simplepie_', |
|
| 3971 | - ), |
|
| 3972 | - ); |
|
| 3973 | - $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); |
|
| 3974 | - |
|
| 3975 | - $this->name = $this->options['extras']['prefix'] . md5("$name:$type"); |
|
| 3976 | - |
|
| 3977 | - $this->cache = new Memcached(); |
|
| 3978 | - $this->cache->addServer($this->options['host'], (int)$this->options['port']); |
|
| 3979 | - } |
|
| 3980 | - |
|
| 3981 | - /** |
|
| 3982 | - * Save data to the cache |
|
| 3983 | - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property |
|
| 3984 | - * @return bool Successfulness |
|
| 3985 | - */ |
|
| 3986 | - public function save($data) { |
|
| 3987 | - if ($data instanceof SimplePie) { |
|
| 3988 | - $data = $data->data; |
|
| 3989 | - } |
|
| 3990 | - |
|
| 3991 | - return $this->setData(serialize($data)); |
|
| 3992 | - } |
|
| 3993 | - |
|
| 3994 | - /** |
|
| 3995 | - * Retrieve the data saved to the cache |
|
| 3996 | - * @return array Data for SimplePie::$data |
|
| 3997 | - */ |
|
| 3998 | - public function load() { |
|
| 3999 | - $data = $this->cache->get($this->name); |
|
| 4000 | - |
|
| 4001 | - if ($data !== false) { |
|
| 4002 | - return unserialize($data); |
|
| 4003 | - } |
|
| 4004 | - return false; |
|
| 4005 | - } |
|
| 4006 | - |
|
| 4007 | - /** |
|
| 4008 | - * Retrieve the last modified time for the cache |
|
| 4009 | - * @return int Timestamp |
|
| 4010 | - */ |
|
| 4011 | - public function mtime() { |
|
| 4012 | - $data = $this->cache->get($this->name . '_mtime'); |
|
| 4013 | - return (int) $data; |
|
| 4014 | - } |
|
| 4015 | - |
|
| 4016 | - /** |
|
| 4017 | - * Set the last modified time to the current time |
|
| 4018 | - * @return bool Success status |
|
| 4019 | - */ |
|
| 4020 | - public function touch() { |
|
| 4021 | - $data = $this->cache->get($this->name); |
|
| 4022 | - return $this->setData($data); |
|
| 4023 | - } |
|
| 4024 | - |
|
| 4025 | - /** |
|
| 4026 | - * Remove the cache |
|
| 4027 | - * @return bool Success status |
|
| 4028 | - */ |
|
| 4029 | - public function unlink() { |
|
| 4030 | - return $this->cache->delete($this->name, 0); |
|
| 4031 | - } |
|
| 4032 | - |
|
| 4033 | - /** |
|
| 4034 | - * Set the last modified time and data to Memcached |
|
| 4035 | - * @return bool Success status |
|
| 4036 | - */ |
|
| 4037 | - private function setData($data) { |
|
| 4038 | - |
|
| 4039 | - if ($data !== false) { |
|
| 4040 | - $this->cache->set($this->name . '_mtime', time(), (int)$this->options['extras']['timeout']); |
|
| 4041 | - return $this->cache->set($this->name, $data, (int)$this->options['extras']['timeout']); |
|
| 4042 | - } |
|
| 4043 | - |
|
| 4044 | - return false; |
|
| 4045 | - } |
|
| 3939 | + /** |
|
| 3940 | + * Memcached instance |
|
| 3941 | + * @var Memcached |
|
| 3942 | + */ |
|
| 3943 | + protected $cache; |
|
| 3944 | + |
|
| 3945 | + /** |
|
| 3946 | + * Options |
|
| 3947 | + * @var array |
|
| 3948 | + */ |
|
| 3949 | + protected $options; |
|
| 3950 | + |
|
| 3951 | + /** |
|
| 3952 | + * Cache name |
|
| 3953 | + * @var string |
|
| 3954 | + */ |
|
| 3955 | + protected $name; |
|
| 3956 | + |
|
| 3957 | + /** |
|
| 3958 | + * Create a new cache object |
|
| 3959 | + * @param string $location Location string (from SimplePie::$cache_location) |
|
| 3960 | + * @param string $name Unique ID for the cache |
|
| 3961 | + * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
|
| 3962 | + */ |
|
| 3963 | + public function __construct($location, $name, $type) { |
|
| 3964 | + $this->options = array( |
|
| 3965 | + 'host' => '127.0.0.1', |
|
| 3966 | + 'port' => 11211, |
|
| 3967 | + 'extras' => array( |
|
| 3968 | + 'timeout' => 3600, // one hour |
|
| 3969 | + 'prefix' => 'simplepie_', |
|
| 3970 | + ), |
|
| 3971 | + ); |
|
| 3972 | + $this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location)); |
|
| 3973 | + |
|
| 3974 | + $this->name = $this->options['extras']['prefix'] . md5("$name:$type"); |
|
| 3975 | + |
|
| 3976 | + $this->cache = new Memcached(); |
|
| 3977 | + $this->cache->addServer($this->options['host'], (int)$this->options['port']); |
|
| 3978 | + } |
|
| 3979 | + |
|
| 3980 | + /** |
|
| 3981 | + * Save data to the cache |
|
| 3982 | + * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property |
|
| 3983 | + * @return bool Successfulness |
|
| 3984 | + */ |
|
| 3985 | + public function save($data) { |
|
| 3986 | + if ($data instanceof SimplePie) { |
|
| 3987 | + $data = $data->data; |
|
| 3988 | + } |
|
| 3989 | + |
|
| 3990 | + return $this->setData(serialize($data)); |
|
| 3991 | + } |
|
| 3992 | + |
|
| 3993 | + /** |
|
| 3994 | + * Retrieve the data saved to the cache |
|
| 3995 | + * @return array Data for SimplePie::$data |
|
| 3996 | + */ |
|
| 3997 | + public function load() { |
|
| 3998 | + $data = $this->cache->get($this->name); |
|
| 3999 | + |
|
| 4000 | + if ($data !== false) { |
|
| 4001 | + return unserialize($data); |
|
| 4002 | + } |
|
| 4003 | + return false; |
|
| 4004 | + } |
|
| 4005 | + |
|
| 4006 | + /** |
|
| 4007 | + * Retrieve the last modified time for the cache |
|
| 4008 | + * @return int Timestamp |
|
| 4009 | + */ |
|
| 4010 | + public function mtime() { |
|
| 4011 | + $data = $this->cache->get($this->name . '_mtime'); |
|
| 4012 | + return (int) $data; |
|
| 4013 | + } |
|
| 4014 | + |
|
| 4015 | + /** |
|
| 4016 | + * Set the last modified time to the current time |
|
| 4017 | + * @return bool Success status |
|
| 4018 | + */ |
|
| 4019 | + public function touch() { |
|
| 4020 | + $data = $this->cache->get($this->name); |
|
| 4021 | + return $this->setData($data); |
|
| 4022 | + } |
|
| 4023 | + |
|
| 4024 | + /** |
|
| 4025 | + * Remove the cache |
|
| 4026 | + * @return bool Success status |
|
| 4027 | + */ |
|
| 4028 | + public function unlink() { |
|
| 4029 | + return $this->cache->delete($this->name, 0); |
|
| 4030 | + } |
|
| 4031 | + |
|
| 4032 | + /** |
|
| 4033 | + * Set the last modified time and data to Memcached |
|
| 4034 | + * @return bool Success status |
|
| 4035 | + */ |
|
| 4036 | + private function setData($data) { |
|
| 4037 | + |
|
| 4038 | + if ($data !== false) { |
|
| 4039 | + $this->cache->set($this->name . '_mtime', time(), (int)$this->options['extras']['timeout']); |
|
| 4040 | + return $this->cache->set($this->name, $data, (int)$this->options['extras']['timeout']); |
|
| 4041 | + } |
|
| 4042 | + |
|
| 4043 | + return false; |
|
| 4044 | + } |
|
| 4046 | 4045 | } |
| 4047 | 4046 | |
| 4048 | 4047 | /** |
@@ -4471,143 +4470,143 @@ discard block |
||
| 4471 | 4470 | * @uses Redis |
| 4472 | 4471 | */ |
| 4473 | 4472 | class SimplePie_Cache_Redis implements SimplePie_Cache_Base { |
| 4474 | - /** |
|
| 4475 | - * Redis instance |
|
| 4476 | - * |
|
| 4477 | - * @var \Redis |
|
| 4478 | - */ |
|
| 4479 | - protected $cache; |
|
| 4480 | - |
|
| 4481 | - /** |
|
| 4482 | - * Options |
|
| 4483 | - * |
|
| 4484 | - * @var array |
|
| 4485 | - */ |
|
| 4486 | - protected $options; |
|
| 4487 | - |
|
| 4488 | - /** |
|
| 4489 | - * Cache name |
|
| 4490 | - * |
|
| 4491 | - * @var string |
|
| 4492 | - */ |
|
| 4493 | - protected $name; |
|
| 4494 | - |
|
| 4495 | - /** |
|
| 4496 | - * Cache Data |
|
| 4497 | - * |
|
| 4498 | - * @var type |
|
| 4499 | - */ |
|
| 4500 | - protected $data; |
|
| 4501 | - |
|
| 4502 | - /** |
|
| 4503 | - * Create a new cache object |
|
| 4504 | - * |
|
| 4505 | - * @param string $location Location string (from SimplePie::$cache_location) |
|
| 4506 | - * @param string $name Unique ID for the cache |
|
| 4507 | - * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
|
| 4508 | - */ |
|
| 4509 | - public function __construct($location, $name, $options = null) { |
|
| 4510 | - //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance(); |
|
| 4511 | - $parsed = SimplePie_Cache::parse_URL($location); |
|
| 4512 | - $redis = new Redis(); |
|
| 4513 | - $redis->connect($parsed['host'], $parsed['port']); |
|
| 4514 | - $this->cache = $redis; |
|
| 4515 | - |
|
| 4516 | - if (!is_null($options) && is_array($options)) { |
|
| 4517 | - $this->options = $options; |
|
| 4518 | - } else { |
|
| 4519 | - $this->options = array ( |
|
| 4520 | - 'prefix' => 'rss:simple_primary:', |
|
| 4521 | - 'expire' => 0, |
|
| 4522 | - ); |
|
| 4523 | - } |
|
| 4524 | - |
|
| 4525 | - $this->name = $this->options['prefix'] . $name; |
|
| 4526 | - } |
|
| 4527 | - |
|
| 4528 | - /** |
|
| 4529 | - * @param \Redis $cache |
|
| 4530 | - */ |
|
| 4531 | - public function setRedisClient(\Redis $cache) { |
|
| 4532 | - $this->cache = $cache; |
|
| 4533 | - } |
|
| 4534 | - |
|
| 4535 | - /** |
|
| 4536 | - * Save data to the cache |
|
| 4537 | - * |
|
| 4538 | - * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property |
|
| 4539 | - * @return bool Successfulness |
|
| 4540 | - */ |
|
| 4541 | - public function save($data) { |
|
| 4542 | - if ($data instanceof SimplePie) { |
|
| 4543 | - $data = $data->data; |
|
| 4544 | - } |
|
| 4545 | - $response = $this->cache->set($this->name, serialize($data)); |
|
| 4546 | - if ($this->options['expire']) { |
|
| 4547 | - $this->cache->expire($this->name, $this->options['expire']); |
|
| 4548 | - } |
|
| 4549 | - |
|
| 4550 | - return $response; |
|
| 4551 | - } |
|
| 4552 | - |
|
| 4553 | - /** |
|
| 4554 | - * Retrieve the data saved to the cache |
|
| 4555 | - * |
|
| 4556 | - * @return array Data for SimplePie::$data |
|
| 4557 | - */ |
|
| 4558 | - public function load() { |
|
| 4559 | - $data = $this->cache->get($this->name); |
|
| 4560 | - |
|
| 4561 | - if ($data !== false) { |
|
| 4562 | - return unserialize($data); |
|
| 4563 | - } |
|
| 4564 | - return false; |
|
| 4565 | - } |
|
| 4566 | - |
|
| 4567 | - /** |
|
| 4568 | - * Retrieve the last modified time for the cache |
|
| 4569 | - * |
|
| 4570 | - * @return int Timestamp |
|
| 4571 | - */ |
|
| 4572 | - public function mtime() { |
|
| 4573 | - |
|
| 4574 | - $data = $this->cache->get($this->name); |
|
| 4575 | - |
|
| 4576 | - if ($data !== false) { |
|
| 4577 | - return time(); |
|
| 4578 | - } |
|
| 4579 | - |
|
| 4580 | - return false; |
|
| 4581 | - } |
|
| 4582 | - |
|
| 4583 | - /** |
|
| 4584 | - * Set the last modified time to the current time |
|
| 4585 | - * |
|
| 4586 | - * @return bool Success status |
|
| 4587 | - */ |
|
| 4588 | - public function touch() { |
|
| 4589 | - |
|
| 4590 | - $data = $this->cache->get($this->name); |
|
| 4591 | - |
|
| 4592 | - if ($data !== false) { |
|
| 4593 | - $return = $this->cache->set($this->name, $data); |
|
| 4594 | - if ($this->options['expire']) { |
|
| 4595 | - return $this->cache->expire($this->name, $this->ttl); |
|
| 4596 | - } |
|
| 4597 | - return $return; |
|
| 4598 | - } |
|
| 4599 | - |
|
| 4600 | - return false; |
|
| 4601 | - } |
|
| 4602 | - |
|
| 4603 | - /** |
|
| 4604 | - * Remove the cache |
|
| 4605 | - * |
|
| 4606 | - * @return bool Success status |
|
| 4607 | - */ |
|
| 4608 | - public function unlink() { |
|
| 4609 | - return $this->cache->set($this->name, null); |
|
| 4610 | - } |
|
| 4473 | + /** |
|
| 4474 | + * Redis instance |
|
| 4475 | + * |
|
| 4476 | + * @var \Redis |
|
| 4477 | + */ |
|
| 4478 | + protected $cache; |
|
| 4479 | + |
|
| 4480 | + /** |
|
| 4481 | + * Options |
|
| 4482 | + * |
|
| 4483 | + * @var array |
|
| 4484 | + */ |
|
| 4485 | + protected $options; |
|
| 4486 | + |
|
| 4487 | + /** |
|
| 4488 | + * Cache name |
|
| 4489 | + * |
|
| 4490 | + * @var string |
|
| 4491 | + */ |
|
| 4492 | + protected $name; |
|
| 4493 | + |
|
| 4494 | + /** |
|
| 4495 | + * Cache Data |
|
| 4496 | + * |
|
| 4497 | + * @var type |
|
| 4498 | + */ |
|
| 4499 | + protected $data; |
|
| 4500 | + |
|
| 4501 | + /** |
|
| 4502 | + * Create a new cache object |
|
| 4503 | + * |
|
| 4504 | + * @param string $location Location string (from SimplePie::$cache_location) |
|
| 4505 | + * @param string $name Unique ID for the cache |
|
| 4506 | + * @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
|
| 4507 | + */ |
|
| 4508 | + public function __construct($location, $name, $options = null) { |
|
| 4509 | + //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance(); |
|
| 4510 | + $parsed = SimplePie_Cache::parse_URL($location); |
|
| 4511 | + $redis = new Redis(); |
|
| 4512 | + $redis->connect($parsed['host'], $parsed['port']); |
|
| 4513 | + $this->cache = $redis; |
|
| 4514 | + |
|
| 4515 | + if (!is_null($options) && is_array($options)) { |
|
| 4516 | + $this->options = $options; |
|
| 4517 | + } else { |
|
| 4518 | + $this->options = array ( |
|
| 4519 | + 'prefix' => 'rss:simple_primary:', |
|
| 4520 | + 'expire' => 0, |
|
| 4521 | + ); |
|
| 4522 | + } |
|
| 4523 | + |
|
| 4524 | + $this->name = $this->options['prefix'] . $name; |
|
| 4525 | + } |
|
| 4526 | + |
|
| 4527 | + /** |
|
| 4528 | + * @param \Redis $cache |
|
| 4529 | + */ |
|
| 4530 | + public function setRedisClient(\Redis $cache) { |
|
| 4531 | + $this->cache = $cache; |
|
| 4532 | + } |
|
| 4533 | + |
|
| 4534 | + /** |
|
| 4535 | + * Save data to the cache |
|
| 4536 | + * |
|
| 4537 | + * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property |
|
| 4538 | + * @return bool Successfulness |
|
| 4539 | + */ |
|
| 4540 | + public function save($data) { |
|
| 4541 | + if ($data instanceof SimplePie) { |
|
| 4542 | + $data = $data->data; |
|
| 4543 | + } |
|
| 4544 | + $response = $this->cache->set($this->name, serialize($data)); |
|
| 4545 | + if ($this->options['expire']) { |
|
| 4546 | + $this->cache->expire($this->name, $this->options['expire']); |
|
| 4547 | + } |
|
| 4548 | + |
|
| 4549 | + return $response; |
|
| 4550 | + } |
|
| 4551 | + |
|
| 4552 | + /** |
|
| 4553 | + * Retrieve the data saved to the cache |
|
| 4554 | + * |
|
| 4555 | + * @return array Data for SimplePie::$data |
|
| 4556 | + */ |
|
| 4557 | + public function load() { |
|
| 4558 | + $data = $this->cache->get($this->name); |
|
| 4559 | + |
|
| 4560 | + if ($data !== false) { |
|
| 4561 | + return unserialize($data); |
|
| 4562 | + } |
|
| 4563 | + return false; |
|
| 4564 | + } |
|
| 4565 | + |
|
| 4566 | + /** |
|
| 4567 | + * Retrieve the last modified time for the cache |
|
| 4568 | + * |
|
| 4569 | + * @return int Timestamp |
|
| 4570 | + */ |
|
| 4571 | + public function mtime() { |
|
| 4572 | + |
|
| 4573 | + $data = $this->cache->get($this->name); |
|
| 4574 | + |
|
| 4575 | + if ($data !== false) { |
|
| 4576 | + return time(); |
|
| 4577 | + } |
|
| 4578 | + |
|
| 4579 | + return false; |
|
| 4580 | + } |
|
| 4581 | + |
|
| 4582 | + /** |
|
| 4583 | + * Set the last modified time to the current time |
|
| 4584 | + * |
|
| 4585 | + * @return bool Success status |
|
| 4586 | + */ |
|
| 4587 | + public function touch() { |
|
| 4588 | + |
|
| 4589 | + $data = $this->cache->get($this->name); |
|
| 4590 | + |
|
| 4591 | + if ($data !== false) { |
|
| 4592 | + $return = $this->cache->set($this->name, $data); |
|
| 4593 | + if ($this->options['expire']) { |
|
| 4594 | + return $this->cache->expire($this->name, $this->ttl); |
|
| 4595 | + } |
|
| 4596 | + return $return; |
|
| 4597 | + } |
|
| 4598 | + |
|
| 4599 | + return false; |
|
| 4600 | + } |
|
| 4601 | + |
|
| 4602 | + /** |
|
| 4603 | + * Remove the cache |
|
| 4604 | + * |
|
| 4605 | + * @return bool Success status |
|
| 4606 | + */ |
|
| 4607 | + public function unlink() { |
|
| 4608 | + return $this->cache->set($this->name, null); |
|
| 4609 | + } |
|
| 4611 | 4610 | |
| 4612 | 4611 | } |
| 4613 | 4612 | |
@@ -8269,9 +8268,9 @@ discard block |
||
| 8269 | 8268 | * Clean up |
| 8270 | 8269 | */ |
| 8271 | 8270 | public function __destruct() { |
| 8272 | - $this->set_iri(null, true); |
|
| 8273 | - $this->set_path(null, true); |
|
| 8274 | - $this->set_authority(null, true); |
|
| 8271 | + $this->set_iri(null, true); |
|
| 8272 | + $this->set_path(null, true); |
|
| 8273 | + $this->set_authority(null, true); |
|
| 8275 | 8274 | } |
| 8276 | 8275 | |
| 8277 | 8276 | /** |
@@ -8794,9 +8793,9 @@ discard block |
||
| 8794 | 8793 | // Relative urls cannot have a colon in the first path segment (and the |
| 8795 | 8794 | // slashes themselves are not included so skip the first character). |
| 8796 | 8795 | if (!$this->scheme && !$isauthority && |
| 8797 | - strpos($this->ipath, ':') !== false && |
|
| 8798 | - strpos($this->ipath, '/', 1) !== false && |
|
| 8799 | - strpos($this->ipath, ':') < strpos($this->ipath, '/', 1)) return false; |
|
| 8796 | + strpos($this->ipath, ':') !== false && |
|
| 8797 | + strpos($this->ipath, '/', 1) !== false && |
|
| 8798 | + strpos($this->ipath, ':') < strpos($this->ipath, '/', 1)) return false; |
|
| 8800 | 8799 | |
| 8801 | 8800 | return true; |
| 8802 | 8801 | } |
@@ -9469,7 +9468,7 @@ discard block |
||
| 9469 | 9468 | $fn = 'md5'; |
| 9470 | 9469 | } |
| 9471 | 9470 | return call_user_func($fn, |
| 9472 | - $this->get_permalink().$this->get_title().$this->get_content()); |
|
| 9471 | + $this->get_permalink().$this->get_title().$this->get_content()); |
|
| 9473 | 9472 | } |
| 9474 | 9473 | |
| 9475 | 9474 | /** |
@@ -9538,47 +9537,47 @@ discard block |
||
| 9538 | 9537 | public function get_description($description_only = false) |
| 9539 | 9538 | { |
| 9540 | 9539 | if (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary')) && |
| 9541 | - ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9540 | + ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9542 | 9541 | { |
| 9543 | 9542 | return $return; |
| 9544 | 9543 | } |
| 9545 | 9544 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'summary')) && |
| 9546 | - ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9545 | + ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9547 | 9546 | { |
| 9548 | 9547 | return $return; |
| 9549 | 9548 | } |
| 9550 | 9549 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) && |
| 9551 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($tags[0])))) |
|
| 9550 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($tags[0])))) |
|
| 9552 | 9551 | { |
| 9553 | 9552 | return $return; |
| 9554 | 9553 | } |
| 9555 | 9554 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) && |
| 9556 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9555 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9557 | 9556 | { |
| 9558 | 9557 | return $return; |
| 9559 | 9558 | } |
| 9560 | 9559 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) && |
| 9561 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9560 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9562 | 9561 | { |
| 9563 | 9562 | return $return; |
| 9564 | 9563 | } |
| 9565 | 9564 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) && |
| 9566 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9565 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9567 | 9566 | { |
| 9568 | 9567 | return $return; |
| 9569 | 9568 | } |
| 9570 | 9569 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) && |
| 9571 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9570 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9572 | 9571 | { |
| 9573 | 9572 | return $return; |
| 9574 | 9573 | } |
| 9575 | 9574 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) && |
| 9576 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9575 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT))) |
|
| 9577 | 9576 | { |
| 9578 | 9577 | return $return; |
| 9579 | 9578 | } |
| 9580 | 9579 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) && |
| 9581 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML))) |
|
| 9580 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML))) |
|
| 9582 | 9581 | { |
| 9583 | 9582 | return $return; |
| 9584 | 9583 | } |
@@ -9610,17 +9609,17 @@ discard block |
||
| 9610 | 9609 | public function get_content($content_only = false) |
| 9611 | 9610 | { |
| 9612 | 9611 | if (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'content')) && |
| 9613 | - ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9612 | + ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_10_content_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9614 | 9613 | { |
| 9615 | 9614 | return $return; |
| 9616 | 9615 | } |
| 9617 | 9616 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'content')) && |
| 9618 | - ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9617 | + ($return = $this->sanitize($tags[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($tags[0]['attribs'])), $this->get_base($tags[0])))) |
|
| 9619 | 9618 | { |
| 9620 | 9619 | return $return; |
| 9621 | 9620 | } |
| 9622 | 9621 | elseif (($tags = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT, 'encoded')) && |
| 9623 | - ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9622 | + ($return = $this->sanitize($tags[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($tags[0])))) |
|
| 9624 | 9623 | { |
| 9625 | 9624 | return $return; |
| 9626 | 9625 | } |
@@ -12335,8 +12334,8 @@ discard block |
||
| 12335 | 12334 | $sniffer = $this->registry->create('Content_Type_Sniffer', array($file)); |
| 12336 | 12335 | $sniffed = $sniffer->get_type(); |
| 12337 | 12336 | $mime_types = array('application/rss+xml', 'application/rdf+xml', |
| 12338 | - 'text/rdf', 'application/atom+xml', 'text/xml', |
|
| 12339 | - 'application/xml', 'application/x-rss+xml'); |
|
| 12337 | + 'text/rdf', 'application/atom+xml', 'text/xml', |
|
| 12338 | + 'application/xml', 'application/x-rss+xml'); |
|
| 12340 | 12339 | if ($check_html) |
| 12341 | 12340 | { |
| 12342 | 12341 | $mime_types[] = 'text/html'; |
@@ -12510,12 +12509,12 @@ discard block |
||
| 12510 | 12509 | if ($this->dom === null) |
| 12511 | 12510 | { |
| 12512 | 12511 | throw new SimplePie_Exception('DOMDocument not found, unable to use '. |
| 12513 | - 'locator'); |
|
| 12512 | + 'locator'); |
|
| 12514 | 12513 | } |
| 12515 | 12514 | if (!class_exists('DOMXpath')) |
| 12516 | 12515 | { |
| 12517 | 12516 | throw new SimplePie_Exception('DOMXpath not found, unable to use '. |
| 12518 | - 'get_rel_link'); |
|
| 12517 | + 'get_rel_link'); |
|
| 12519 | 12518 | } |
| 12520 | 12519 | |
| 12521 | 12520 | $xpath = new DOMXpath($this->dom); |
@@ -12525,22 +12524,22 @@ discard block |
||
| 12525 | 12524 | $href = trim($link->getAttribute('href')); |
| 12526 | 12525 | $parsed = $this->registry->call('Misc', 'parse_url', array($href)); |
| 12527 | 12526 | if ($parsed['scheme'] === '' || |
| 12528 | - preg_match('/^https?$/i', $parsed['scheme'])) |
|
| 12527 | + preg_match('/^https?$/i', $parsed['scheme'])) |
|
| 12529 | 12528 | { |
| 12530 | 12529 | if (method_exists($link, 'getLineNo') && |
| 12531 | - $this->base_location < $link->getLineNo()) |
|
| 12530 | + $this->base_location < $link->getLineNo()) |
|
| 12532 | 12531 | { |
| 12533 | 12532 | $href = |
| 12534 | 12533 | $this->registry->call('Misc', 'absolutize_url', |
| 12535 | - array(trim($link->getAttribute('href')), |
|
| 12536 | - $this->base)); |
|
| 12534 | + array(trim($link->getAttribute('href')), |
|
| 12535 | + $this->base)); |
|
| 12537 | 12536 | } |
| 12538 | 12537 | else |
| 12539 | 12538 | { |
| 12540 | 12539 | $href = |
| 12541 | 12540 | $this->registry->call('Misc', 'absolutize_url', |
| 12542 | - array(trim($link->getAttribute('href')), |
|
| 12543 | - $this->http_base)); |
|
| 12541 | + array(trim($link->getAttribute('href')), |
|
| 12542 | + $this->http_base)); |
|
| 12544 | 12543 | } |
| 12545 | 12544 | if ($href === false) |
| 12546 | 12545 | { |
@@ -16630,9 +16629,9 @@ discard block |
||
| 16630 | 16629 | } |
| 16631 | 16630 | $channel = array('channel' => array(array('child' => array('' => |
| 16632 | 16631 | array('link' => $link, 'image' => $image, 'title' => $feed_title, |
| 16633 | - 'item' => $items))))); |
|
| 16632 | + 'item' => $items))))); |
|
| 16634 | 16633 | $rss = array(array('attribs' => array('' => array('version' => '2.0')), |
| 16635 | - 'child' => array('' => $channel))); |
|
| 16634 | + 'child' => array('' => $channel))); |
|
| 16636 | 16635 | $this->data = array('child' => array('' => array('rss' => $rss))); |
| 16637 | 16636 | return true; |
| 16638 | 16637 | } |
@@ -345,14 +345,14 @@ discard block |
||
| 345 | 345 | </tr> |
| 346 | 346 | <!-- |
| 347 | 347 | <?php |
| 348 | - if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 349 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 350 | - $Connection = new Connection(); |
|
| 348 | + if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 349 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 350 | + $Connection = new Connection(); |
|
| 351 | 351 | ?> |
| 352 | 352 | --> |
| 353 | 353 | <?php |
| 354 | 354 | if ($Connection->db != NULL) { |
| 355 | - if ($Connection->tableExists('source_location')) { |
|
| 355 | + if ($Connection->tableExists('source_location')) { |
|
| 356 | 356 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
| 357 | 357 | $Source = new Source(); |
| 358 | 358 | //$alllocations = $Source->getAllLocationInfo(); |
@@ -372,9 +372,9 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | <?php |
| 374 | 374 | } |
| 375 | - } |
|
| 375 | + } |
|
| 376 | + } |
|
| 376 | 377 | } |
| 377 | - } |
|
| 378 | 378 | ?> |
| 379 | 379 | |
| 380 | 380 | <tr> |
@@ -484,12 +484,12 @@ discard block |
||
| 484 | 484 | ?> |
| 485 | 485 | <tr> |
| 486 | 486 | <?php |
| 487 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 487 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 488 | 488 | ?> |
| 489 | 489 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 490 | 490 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 491 | 491 | <?php |
| 492 | - } else { |
|
| 492 | + } else { |
|
| 493 | 493 | $hostport = explode(':',$source['host']); |
| 494 | 494 | if (isset($hostport[1])) { |
| 495 | 495 | $host = $hostport[0]; |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 503 | 503 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
| 504 | 504 | <?php |
| 505 | - } |
|
| 505 | + } |
|
| 506 | 506 | ?> |
| 507 | 507 | <td> |
| 508 | 508 | <select name="format[]" id="format"> |
@@ -639,9 +639,9 @@ discard block |
||
| 639 | 639 | </thead> |
| 640 | 640 | <tbody> |
| 641 | 641 | <?php |
| 642 | - if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 642 | + if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 643 | 643 | foreach ($globalNewsFeeds as $type => $feedslng) { |
| 644 | - foreach ($feedslng as $lng => $feeds) { |
|
| 644 | + foreach ($feedslng as $lng => $feeds) { |
|
| 645 | 645 | foreach ($feeds as $feed) { |
| 646 | 646 | ?> |
| 647 | 647 | <tr> |
@@ -666,9 +666,9 @@ discard block |
||
| 666 | 666 | |
| 667 | 667 | <?php |
| 668 | 668 | } |
| 669 | - } |
|
| 669 | + } |
|
| 670 | + } |
|
| 670 | 671 | } |
| 671 | - } |
|
| 672 | 672 | ?> |
| 673 | 673 | <tr> |
| 674 | 674 | <td><input type="url" name="newsurl[]" /></td> |
@@ -1009,7 +1009,7 @@ discard block |
||
| 1009 | 1009 | <br /> |
| 1010 | 1010 | <p> |
| 1011 | 1011 | <?php |
| 1012 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1012 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1013 | 1013 | ?> |
| 1014 | 1014 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1015 | 1015 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -1019,11 +1019,11 @@ discard block |
||
| 1019 | 1019 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 1020 | 1020 | <?php |
| 1021 | 1021 | } |
| 1022 | - } else { |
|
| 1022 | + } else { |
|
| 1023 | 1023 | ?> |
| 1024 | 1024 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 1025 | 1025 | <?php |
| 1026 | - } |
|
| 1026 | + } |
|
| 1027 | 1027 | ?> |
| 1028 | 1028 | </p> |
| 1029 | 1029 | <br /> |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | </p> |
| 1048 | 1048 | <?php |
| 1049 | 1049 | require('../footer.php'); |
| 1050 | - exit; |
|
| 1050 | + exit; |
|
| 1051 | 1051 | } |
| 1052 | 1052 | // ' |
| 1053 | 1053 | $settings = array(); |
@@ -1138,8 +1138,8 @@ discard block |
||
| 1138 | 1138 | |
| 1139 | 1139 | $sources = array(); |
| 1140 | 1140 | foreach ($source_name as $keys => $name) { |
| 1141 | - if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 1142 | - else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 1141 | + if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 1142 | + else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 1143 | 1143 | } |
| 1144 | 1144 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1145 | 1145 | |
@@ -1149,13 +1149,13 @@ discard block |
||
| 1149 | 1149 | |
| 1150 | 1150 | $newsfeeds = array(); |
| 1151 | 1151 | foreach($newsurl as $newskey => $url) { |
| 1152 | - if ($url != '') { |
|
| 1152 | + if ($url != '') { |
|
| 1153 | 1153 | $type = $newstype[$newskey]; |
| 1154 | 1154 | $lng = $newslng[$newskey]; |
| 1155 | 1155 | if (isset($newsfeeds[$type][$lng])) { |
| 1156 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1156 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1157 | 1157 | } else $newsfeeds[$type][$lng] = array($url); |
| 1158 | - } |
|
| 1158 | + } |
|
| 1159 | 1159 | } |
| 1160 | 1160 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
| 1161 | 1161 | |
@@ -1567,14 +1567,14 @@ discard block |
||
| 1567 | 1567 | |
| 1568 | 1568 | // Set some defaults values... |
| 1569 | 1569 | if (!isset($globalAircraftImageSources)) { |
| 1570 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1571 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1570 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1571 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1572 | 1572 | } |
| 1573 | 1573 | |
| 1574 | 1574 | if (!isset($globalSchedulesSources)) { |
| 1575 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1576 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1577 | - } |
|
| 1575 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1576 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1577 | + } |
|
| 1578 | 1578 | |
| 1579 | 1579 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1580 | 1580 | |
@@ -1622,21 +1622,21 @@ discard block |
||
| 1622 | 1622 | $popi = false; |
| 1623 | 1623 | $popw = false; |
| 1624 | 1624 | foreach ($_SESSION['done'] as $done) { |
| 1625 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1626 | - if ($done == 'Create database') $pop = true; |
|
| 1627 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1628 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1629 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1625 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1626 | + if ($done == 'Create database') $pop = true; |
|
| 1627 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1628 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1629 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1630 | 1630 | } |
| 1631 | 1631 | if ($pop) { |
| 1632 | - sleep(5); |
|
| 1633 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1632 | + sleep(5); |
|
| 1633 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1634 | 1634 | } else if ($popi) { |
| 1635 | - sleep(5); |
|
| 1636 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1635 | + sleep(5); |
|
| 1636 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1637 | 1637 | } else if ($popw) { |
| 1638 | - sleep(5); |
|
| 1639 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1638 | + sleep(5); |
|
| 1639 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1640 | 1640 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1641 | 1641 | print '</div></ul>'; |
| 1642 | 1642 | print '<div id="error"></div>'; |
@@ -1702,7 +1702,7 @@ discard block |
||
| 1702 | 1702 | unset($_COOKIE['install']); |
| 1703 | 1703 | print '<div class="info column"><ul>'; |
| 1704 | 1704 | foreach ($_SESSION['done'] as $done) { |
| 1705 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1705 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1706 | 1706 | } |
| 1707 | 1707 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1708 | 1708 | print '</ul></div>'; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // When button "Remove all filters" is clicked |
| 34 | 34 | if (isset($_POST['removefilters'])) { |
| 35 | 35 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
| 36 | - return strpos($key,'filter_') === 0; |
|
| 36 | + return strpos($key,'filter_') === 0; |
|
| 37 | 37 | }); |
| 38 | 38 | foreach ($allfilters as $filt) { |
| 39 | 39 | unset($_COOKIE[$filt]); |
@@ -165,17 +165,17 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | ?> |
| 167 | 167 | <?php |
| 168 | - if (isset($_POST['archive'])) { |
|
| 168 | + if (isset($_POST['archive'])) { |
|
| 169 | 169 | ?> |
| 170 | 170 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 171 | 171 | <?php |
| 172 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 172 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 173 | 173 | ?> |
| 174 | 174 | |
| 175 | 175 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script> |
| 176 | 176 | <?php |
| 177 | - } |
|
| 178 | - } else { |
|
| 177 | + } |
|
| 178 | + } else { |
|
| 179 | 179 | ?> |
| 180 | 180 | <?php |
| 181 | 181 | /* if (isset($globalBeta) && $globalBeta) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | ?> |
| 189 | 189 | <?php |
| 190 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 190 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 191 | 191 | ?> |
| 192 | 192 | <?php |
| 193 | 193 | // if (isset($globalBeta) && $globalBeta) { |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | <script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>"></script> |
| 219 | 219 | <?php |
| 220 | 220 | } |
| 221 | - } |
|
| 221 | + } |
|
| 222 | 222 | ?> |
| 223 | 223 | <?php |
| 224 | 224 | // } |
| 225 | 225 | ?> |
| 226 | 226 | <?php |
| 227 | - } |
|
| 227 | + } |
|
| 228 | 228 | } |
| 229 | 229 | ?> |
| 230 | 230 | <?php |
@@ -401,34 +401,34 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | <ul class="nav navbar-nav"> |
| 403 | 403 | <?php |
| 404 | - if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
| 404 | + if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
| 405 | 405 | ?> |
| 406 | 406 | <li><a href="<?php print $globalURL; ?>/news"><?php echo _("News"); ?></a></li> |
| 407 | 407 | <?php |
| 408 | - } |
|
| 408 | + } |
|
| 409 | 409 | ?> |
| 410 | 410 | |
| 411 | 411 | <?php |
| 412 | - $sub = false; |
|
| 413 | - if ( |
|
| 412 | + $sub = false; |
|
| 413 | + if ( |
|
| 414 | 414 | ( |
| 415 | - (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 415 | + (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 416 | 416 | ) || |
| 417 | 417 | ( |
| 418 | - isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 418 | + isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 419 | 419 | ) || |
| 420 | 420 | ( |
| 421 | - isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 421 | + isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
| 422 | 422 | ) || |
| 423 | 423 | ( |
| 424 | - isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 424 | + isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
| 425 | 425 | ) |
| 426 | - ) { |
|
| 426 | + ) { |
|
| 427 | 427 | $sub = true; |
| 428 | - } |
|
| 428 | + } |
|
| 429 | 429 | ?> |
| 430 | 430 | <?php |
| 431 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 431 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 432 | 432 | ?> |
| 433 | 433 | <li class="dropdown"> |
| 434 | 434 | <?php |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | <ul class="dropdown-menu multi-level"> |
| 440 | 440 | <li class="dropdown-submenu"> |
| 441 | 441 | <?php |
| 442 | - } |
|
| 442 | + } |
|
| 443 | 443 | ?> |
| 444 | 444 | <?php |
| 445 | 445 | if (isset($globalNewsFeeds['aircraft']) && !empty($globalNewsFeeds['aircraft'])) { |
@@ -454,25 +454,25 @@ discard block |
||
| 454 | 454 | <ul class="dropdown-menu"> |
| 455 | 455 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
| 456 | 456 | <?php |
| 457 | - if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 457 | + if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
| 458 | 458 | ?> |
| 459 | 459 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
| 460 | 460 | <?php |
| 461 | - } |
|
| 461 | + } |
|
| 462 | 462 | ?> |
| 463 | 463 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
| 464 | 464 | <?php |
| 465 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 465 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 466 | 466 | ?> |
| 467 | 467 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
| 468 | 468 | <?php |
| 469 | - } |
|
| 470 | - if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 469 | + } |
|
| 470 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 471 | 471 | |
| 472 | 472 | ?> |
| 473 | 473 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
| 474 | 474 | <?php |
| 475 | - } |
|
| 475 | + } |
|
| 476 | 476 | ?> |
| 477 | 477 | <li><hr /></li> |
| 478 | 478 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -480,43 +480,43 @@ discard block |
||
| 480 | 480 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 481 | 481 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 482 | 482 | <?php |
| 483 | - if ($globalACARS) { |
|
| 484 | - if (isset($globalDemo) && $globalDemo) { |
|
| 485 | - ?> |
|
| 483 | + if ($globalACARS) { |
|
| 484 | + if (isset($globalDemo) && $globalDemo) { |
|
| 485 | + ?> |
|
| 486 | 486 | <li><hr /></li> |
| 487 | 487 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
| 488 | 488 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
| 489 | 489 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
| 490 | 490 | <?php |
| 491 | - } else { |
|
| 492 | - ?> |
|
| 491 | + } else { |
|
| 492 | + ?> |
|
| 493 | 493 | <li><hr /></li> |
| 494 | 494 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 495 | 495 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 496 | 496 | <?php |
| 497 | - } |
|
| 498 | - } |
|
| 499 | - ?> |
|
| 497 | + } |
|
| 498 | + } |
|
| 499 | + ?> |
|
| 500 | 500 | <?php |
| 501 | - if (isset($globalAccidents) && $globalAccidents) { |
|
| 502 | - ?> |
|
| 501 | + if (isset($globalAccidents) && $globalAccidents) { |
|
| 502 | + ?> |
|
| 503 | 503 | <li><hr /></li> |
| 504 | 504 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
| 505 | 505 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
| 506 | 506 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
| 507 | 507 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
| 508 | 508 | <?php |
| 509 | - } |
|
| 510 | - ?> |
|
| 509 | + } |
|
| 510 | + ?> |
|
| 511 | 511 | <li><hr /></li> |
| 512 | 512 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 513 | 513 | <?php |
| 514 | 514 | if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) { |
| 515 | - ?> |
|
| 515 | + ?> |
|
| 516 | 516 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
| 517 | 517 | <?php |
| 518 | 518 | } |
| 519 | - ?> |
|
| 519 | + ?> |
|
| 520 | 520 | </ul> |
| 521 | 521 | </li> |
| 522 | 522 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
@@ -543,14 +543,14 @@ discard block |
||
| 543 | 543 | </ul> |
| 544 | 544 | <?php |
| 545 | 545 | } |
| 546 | - } |
|
| 546 | + } |
|
| 547 | 547 | ?> |
| 548 | 548 | <?php |
| 549 | - if (isset($globalMarine) && $globalMarine) { |
|
| 549 | + if (isset($globalMarine) && $globalMarine) { |
|
| 550 | 550 | ?> |
| 551 | 551 | <li class="dropdown"> |
| 552 | 552 | <?php |
| 553 | - if ($sub) { |
|
| 553 | + if ($sub) { |
|
| 554 | 554 | ?> |
| 555 | 555 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Marines"); ?> <b class="caret"></b></a> |
| 556 | 556 | <ul class="dropdown-menu multi-level"> |
@@ -584,14 +584,14 @@ discard block |
||
| 584 | 584 | } |
| 585 | 585 | ?> |
| 586 | 586 | <?php |
| 587 | - } |
|
| 587 | + } |
|
| 588 | 588 | ?> |
| 589 | 589 | <?php |
| 590 | - if (isset($globalTracker) && $globalTracker) { |
|
| 590 | + if (isset($globalTracker) && $globalTracker) { |
|
| 591 | 591 | ?> |
| 592 | 592 | <li class="dropdown"> |
| 593 | 593 | <?php |
| 594 | - if ($sub) { |
|
| 594 | + if ($sub) { |
|
| 595 | 595 | ?> |
| 596 | 596 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
| 597 | 597 | <ul class="dropdown-menu multi-level"> |
@@ -625,14 +625,14 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | ?> |
| 627 | 627 | <?php |
| 628 | - } |
|
| 628 | + } |
|
| 629 | 629 | ?> |
| 630 | 630 | <?php |
| 631 | - if (isset($globalSatellite) && $globalSatellite) { |
|
| 631 | + if (isset($globalSatellite) && $globalSatellite) { |
|
| 632 | 632 | ?> |
| 633 | 633 | <li class="dropdown"> |
| 634 | 634 | <?php |
| 635 | - if ($sub) { |
|
| 635 | + if ($sub) { |
|
| 636 | 636 | ?> |
| 637 | 637 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a> |
| 638 | 638 | <ul class="dropdown-menu multi-level"> |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | } |
| 669 | 669 | ?> |
| 670 | 670 | <?php |
| 671 | - } |
|
| 671 | + } |
|
| 672 | 672 | ?> |
| 673 | 673 | |
| 674 | 674 | <li class="dropdown"> |
@@ -677,12 +677,12 @@ discard block |
||
| 677 | 677 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
| 678 | 678 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
| 679 | 679 | <?php |
| 680 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 680 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 681 | 681 | ?> |
| 682 | 682 | <li><hr /></li> |
| 683 | 683 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
| 684 | 684 | <?php |
| 685 | - } |
|
| 685 | + } |
|
| 686 | 686 | ?> |
| 687 | 687 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
| 688 | 688 | <li><hr /></li> |
@@ -703,14 +703,14 @@ discard block |
||
| 703 | 703 | <form> |
| 704 | 704 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 705 | 705 | <?php |
| 706 | - $Language = new Language(); |
|
| 707 | - $alllang = $Language->getLanguages(); |
|
| 708 | - foreach ($alllang as $key => $lang) { |
|
| 709 | - print '<option value="'.$key.'"'; |
|
| 710 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 711 | - print '>'.$lang[0].'</option>'; |
|
| 712 | - } |
|
| 713 | - ?> |
|
| 706 | + $Language = new Language(); |
|
| 707 | + $alllang = $Language->getLanguages(); |
|
| 708 | + foreach ($alllang as $key => $lang) { |
|
| 709 | + print '<option value="'.$key.'"'; |
|
| 710 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 711 | + print '>'.$lang[0].'</option>'; |
|
| 712 | + } |
|
| 713 | + ?> |
|
| 714 | 714 | </select> |
| 715 | 715 | </form> |
| 716 | 716 | </div> |
@@ -742,18 +742,18 @@ discard block |
||
| 742 | 742 | ?> |
| 743 | 743 | <div class="top-header clear" role="main"> |
| 744 | 744 | <?php |
| 745 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 745 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 746 | 746 | ?> |
| 747 | 747 | <div id="archive-map"></div> |
| 748 | 748 | <?php |
| 749 | - } |
|
| 749 | + } |
|
| 750 | 750 | ?> |
| 751 | 751 | </div> |
| 752 | 752 | <?php |
| 753 | 753 | } |
| 754 | 754 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 755 | 755 | { |
| 756 | - ?> |
|
| 756 | + ?> |
|
| 757 | 757 | <div class="top-header clear" role="main"> |
| 758 | 758 | <div id="map"></div> |
| 759 | 759 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -764,15 +764,15 @@ discard block |
||
| 764 | 764 | var zoom = 13; |
| 765 | 765 | //create the map |
| 766 | 766 | <?php |
| 767 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 767 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 768 | 768 | ?> |
| 769 | 769 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 770 | 770 | <?php |
| 771 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 771 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 772 | 772 | ?> |
| 773 | 773 | map = L.map('map', { zoomControl:true }); |
| 774 | 774 | <?php |
| 775 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 775 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 776 | 776 | ?> |
| 777 | 777 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 778 | 778 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -780,22 +780,22 @@ discard block |
||
| 780 | 780 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 781 | 781 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 782 | 782 | <?php |
| 783 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 783 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
| 784 | 784 | ?> |
| 785 | 785 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 786 | 786 | <?php |
| 787 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 787 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 788 | 788 | ?> |
| 789 | 789 | map = L.map('map', { zoomControl:true }); |
| 790 | 790 | <?php |
| 791 | - } |
|
| 791 | + } |
|
| 792 | 792 | ?> |
| 793 | 793 | //initialize the layer group for the aircrft markers |
| 794 | 794 | var layer_data = L.layerGroup(); |
| 795 | 795 | |
| 796 | 796 | //a few title layers |
| 797 | 797 | <?php |
| 798 | - if ($globalMapProvider == 'Mapbox') { |
|
| 798 | + if ($globalMapProvider == 'Mapbox') { |
|
| 799 | 799 | ?> |
| 800 | 800 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 801 | 801 | maxZoom: 18, |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | token : '<?php print $globalMapboxToken; ?>' |
| 807 | 807 | }).addTo(map); |
| 808 | 808 | <?php |
| 809 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 809 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 810 | 810 | ?> |
| 811 | 811 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 812 | 812 | maxZoom: 18, |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 816 | 816 | }).addTo(map); |
| 817 | 817 | <?php |
| 818 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 818 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 819 | 819 | ?> |
| 820 | 820 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 821 | 821 | maxZoom: 18, |
@@ -824,27 +824,27 @@ discard block |
||
| 824 | 824 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 825 | 825 | }).addTo(map); |
| 826 | 826 | <?php |
| 827 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 827 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 828 | 828 | ?> |
| 829 | 829 | var googleLayer = new L.Google('ROADMAP'); |
| 830 | 830 | map.addLayer(googleLayer); |
| 831 | 831 | <?php |
| 832 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 832 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 833 | 833 | ?> |
| 834 | 834 | var googleLayer = new L.Google('SATELLITE'); |
| 835 | 835 | map.addLayer(googleLayer); |
| 836 | 836 | <?php |
| 837 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 837 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 838 | 838 | ?> |
| 839 | 839 | var googleLayer = new L.Google('HYBRID'); |
| 840 | 840 | map.addLayer(googleLayer); |
| 841 | 841 | <?php |
| 842 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 842 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 843 | 843 | ?> |
| 844 | 844 | var googleLayer = new L.Google('Terrain'); |
| 845 | 845 | map.addLayer(googleLayer); |
| 846 | 846 | <?php |
| 847 | - } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 847 | + } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 848 | 848 | $customid = $globalMapProvider; |
| 849 | 849 | ?> |
| 850 | 850 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
@@ -854,8 +854,8 @@ discard block |
||
| 854 | 854 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 855 | 855 | }).addTo(map); |
| 856 | 856 | <?php |
| 857 | - //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 858 | - } else { |
|
| 857 | + //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 858 | + } else { |
|
| 859 | 859 | ?> |
| 860 | 860 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 861 | 861 | maxZoom: 18, |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | }).addTo(map); |
| 865 | 865 | |
| 866 | 866 | <?php |
| 867 | - } |
|
| 867 | + } |
|
| 868 | 868 | ?> |
| 869 | 869 | </script> |
| 870 | 870 | </div> |