Try to solve loading of csv files
This commit is contained in:
parent
22cb199c6f
commit
50e0a8691e
@ -33,7 +33,9 @@ class TelechargementController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
// Suppression du fichier si le temps de cache est depasse
|
||||
if (file_exists($this->path.'/'.$file)){
|
||||
if ( $this->filetime == 0 && file_exists($this->path.'/'.$file) ){
|
||||
unlink($this->path.'/'.$file);
|
||||
} elseif ( file_exists($this->path.'/'.$file) ) {
|
||||
$dateFile = filemtime($this->path.'/'.$file);
|
||||
$now = mktime(date('G'), date('i'), date('s'),
|
||||
date('m') , date('d'), date('Y'));
|
||||
@ -81,7 +83,7 @@ class TelechargementController extends Zend_Controller_Action
|
||||
*/
|
||||
public function consommationAction()
|
||||
{
|
||||
$this->filetime = 1;
|
||||
$this->filetime = 0;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$start = $request->getParam('start', false);
|
||||
|
@ -19,7 +19,7 @@ $(document).ready(function(){
|
||||
ConsoDetails = $('input[name=ConsoDetails]').prop('checked') ? 1 : 0;
|
||||
ConsoMois = $('select[name=ConsoMois]').val();
|
||||
checkFile();
|
||||
holdTheInterval = setInterval(checkFile, 4000);
|
||||
holdTheInterval = setInterval(checkFile, 8000);
|
||||
});
|
||||
|
||||
function checkFile() {
|
||||
|
Loading…
Reference in New Issue
Block a user