diff --git a/build/router/controller/page.php b/build/router/controller/page.php index 026c9fc..778ec1b 100644 --- a/build/router/controller/page.php +++ b/build/router/controller/page.php @@ -45,7 +45,12 @@ /* [2] Display the links =========================================================*/ foreach($diplomes as $id=>$name){ - echo "$name
"; + + + if( !file_exists(__ROOT__."/tmp/$id.ics") ) + echo "$name
"; + else + echo "$name
"; } diff --git a/build/service/Updater.php b/build/service/Updater.php index c4367be..58fca82 100644 --- a/build/service/Updater.php +++ b/build/service/Updater.php @@ -43,7 +43,7 @@ =========================================================*/ foreach($this->config->getDiplomes() as $d_id=>$d_name){ - file_put_contents(__ROOT__."/tmp/$d_id.ics", "BEGIN:VCALENDAR\nVERSION:2.0\n", FILE_APPEND); + file_put_contents(__ROOT__."/tmp/$d_id.ics", "BEGIN:VCALENDAR\nVERSION:2.0\n"); /* (1) Browse each date ---------------------------------------------------------*/ @@ -61,8 +61,6 @@ /* (4) Add to file */ file_put_contents(__ROOT__."/tmp/$d_id.ics", $EVENTS, FILE_APPEND); - - } file_put_contents(__ROOT__."/tmp/$d_id.ics", "END:VCALENDAR", FILE_APPEND);