Managing unavailable ics in interface + updated does not append the first time (to replace last content)
This commit is contained in:
parent
98c518eac6
commit
b357363998
|
@ -45,7 +45,12 @@
|
||||||
/* [2] Display the links
|
/* [2] Display the links
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
foreach($diplomes as $id=>$name){
|
foreach($diplomes as $id=>$name){
|
||||||
echo "<a href='/ics/$id'>$name</a><br>";
|
|
||||||
|
|
||||||
|
if( !file_exists(__ROOT__."/tmp/$id.ics") )
|
||||||
|
echo "<span>$name</span><br>";
|
||||||
|
else
|
||||||
|
echo "<a href='/ics/$id' disabled>$name</a><br>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
foreach($this->config->getDiplomes() as $d_id=>$d_name){
|
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
|
/* (1) Browse each date
|
||||||
---------------------------------------------------------*/
|
---------------------------------------------------------*/
|
||||||
|
@ -61,8 +61,6 @@
|
||||||
/* (4) Add to file */
|
/* (4) Add to file */
|
||||||
file_put_contents(__ROOT__."/tmp/$d_id.ics", $EVENTS, FILE_APPEND);
|
file_put_contents(__ROOT__."/tmp/$d_id.ics", $EVENTS, FILE_APPEND);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents(__ROOT__."/tmp/$d_id.ics", "END:VCALENDAR", FILE_APPEND);
|
file_put_contents(__ROOT__."/tmp/$d_id.ics", "END:VCALENDAR", FILE_APPEND);
|
||||||
|
|
Loading…
Reference in New Issue