|
|
|
@ -176,13 +176,12 @@ class Download { |
|
|
|
|
|
|
|
static function listByState($state) |
|
|
|
{ |
|
|
|
$tmpDT = new DateTime(); |
|
|
|
$db = DbMongo::get(); |
|
|
|
$coll = $db->download; |
|
|
|
$retour = []; |
|
|
|
|
|
|
|
foreach ($coll->find(['cstate' => $state]) as $element) { |
|
|
|
$element['time'] = $tmpDT->setTimestamp($element['timestamp']); |
|
|
|
$element['time'] = DateTime::createFromFormat('U', $element['timestamp']); |
|
|
|
|
|
|
|
if (file_exists(DOWNLOADEDDIR.DIRECTORY_SEPARATOR.$element['filename'])) { |
|
|
|
$element['href'] = true; |
|
|
|
|