Update site

This commit is contained in:
Victor Shcherb 2012-11-13 23:23:53 +01:00
parent cd1bdfdceb
commit fa34793310

View file

@ -134,10 +134,13 @@ function updateGoogleCodeIndexes($update=false) {
if (isset($mapNodes[$indexName])) {
$exdate = DateTime::createFromFormat('d.m.Y', $mapNodes[$indexName]->getAttribute("date"));
$localdate = DateTime::createFromFormat('d.m.Y', $date);
$out = $mapNodes[$indexName];
if (file_exists('road-indexes/'.$indexName)) {
$out -> setAttribute("road_file", "yes");
}
if($localdate->getTimestamp() <= $exdate->getTimestamp()) {
continue;
}
$out = $mapNodes[$indexName];
if($out -> getAttribute("parts")) {
$outputIndexes->removeChild($out);
$out = $output->createElement( "region" );
@ -147,14 +150,14 @@ function updateGoogleCodeIndexes($update=false) {
$out = $output->createElement( "region" );
$outputIndexes->appendChild($out);
}
if (file_exists('road-indexes/'.$indexName)) {
$out -> setAttribute("road_file", "yes");
}
$out -> setAttribute("date", $date);
$out -> setAttribute("local", "true");
$out -> setAttribute("size", $size);
$out -> setAttribute("name", $indexName);
if (file_exists('road-indexes/'.$filename)) {
$out -> setAttribute("road_file", "yes");
}
$out -> setAttribute("description", $description);
//$mapNodes[$indexName] = $out;