From fa347933101ca1b181ecc47e5563211558c65d3a Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 13 Nov 2012 23:23:53 +0100 Subject: [PATCH] Update site --- config/site/update_indexes.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/config/site/update_indexes.php b/config/site/update_indexes.php index 75560c70ef..20fadabdc9 100644 --- a/config/site/update_indexes.php +++ b/config/site/update_indexes.php @@ -129,15 +129,18 @@ function updateGoogleCodeIndexes($update=false) { $size= number_format((filesize($filename) / (1024.0*1024.0)), 1, '.', ''); $zip->close(); if($local_file) { - echo 'Local : '.$indexName.' '.$date.' '.$size.'
'; - } + echo 'Local : '.$indexName.' '.$date.' '.$size.'
'; + } 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;