Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1033 → Rev 1034

/trunk/modules/pdf_export/PdfExport.php
20,6 → 20,7
class PdfExport extends aControleur {
 
const DUREE_DE_VIE_PDF = 86400;// 3600 * 24 * 2 = 172 800
const DUREE_DE_VIE_HTML = 60;
 
private $Conteneur;
private $parametres = array();
192,16 → 193,16
foreach ($objets as $objet) {
$chemin = $dossierStockage.$objet;
if (is_file($chemin)) {
if (substr($chemin, -5) == '.html') {
unlink($chemin);
} else {
$filemtime = @filemtime($chemin);
if ($filemtime !== false) {
$filemtime = @filemtime($chemin);
if ($filemtime !== false) {
if (substr($chemin, -5) == '.html') {
$suppression = (time() - $filemtime >= self::DUREE_DE_VIE_HTML) ? true : false;
} else {
$suppression = (time() - $filemtime >= self::DUREE_DE_VIE_PDF) ? true : false;
if ($suppression === true) {
unlink($chemin);
}
}
if ($suppression === true) {
unlink($chemin);
}
}
}
}