Skip to content

Commit

Permalink
LugMap.Linux.it: gestione errori in generazione mappa
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Mar 20, 2014
1 parent 4da03f4 commit 879b25b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mappa/generator.php
Expand Up @@ -226,7 +226,17 @@ function write_geo_file ($name, $contents) {
continue;

$lugs = file ('http://github.com/Gelma/LugMap/raw/master/db/' . $region . '.txt', FILE_IGNORE_NEW_LINES);
if ($lugs == false) {
notify_mail ("Impossibile scaricare file per la regione $region");
continue;
}

$cities = file ('liste_comuni/' . $region . '.txt', FILE_IGNORE_NEW_LINES);
if ($cities == false) {
notify_mail ("Impossibile aprire file delle citta' per $region");
continue;
}

$found_cities = array ();

foreach ($lugs as $lug) {
Expand Down

0 comments on commit 879b25b

Please sign in to comment.