Skip to content

Commit

Permalink
Fix fsd whazzup.txt parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Iunusov committed Nov 4, 2020
1 parent c4f7c61 commit a028d1e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vatsim_parser/parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ function trytoparse($url)
error_log("file_get_contents($url) fails");
return false;
}
$pattern = isIvao() ? "/!CLIENTS\n(.*?)" . EOL__ . "!AIRPORTS" . "/s" : "/!CLIENTS:(.*?)" . EOL__ . ";" . EOL__ . ";" . EOL__ . "/s";
preg_match($pattern, $data, $clients_container);
$pattern = isIvao() ? "/!CLIENTS\n(.*?)" . EOL__ . "!" . "/s" : "/!CLIENTS:(.*?)" . EOL__ . ";" . EOL__ . ";" . EOL__ . "/s";
preg_match($pattern, $data, $clients_container);

if (!isset($clients_container[1]))
Expand All @@ -195,7 +194,7 @@ function trytoparse($url)
$timestamp_from_memcache = db\getTimestamp(STATUS_URL_TYPE);
if ($timestamp && $timestamp_from_memcache && ($timestamp <= $timestamp_from_memcache))
{
//error_log('old data, skip');
error_log('old data, skip');
return false;

}
Expand Down

0 comments on commit a028d1e

Please sign in to comment.