Browse Source

correction affichage heure

master
Cabillot Julien 6 years ago
parent
commit
d953690f62
3 changed files with 5 additions and 4 deletions
  1. 3
      lib/Download.php
  2. 4
      lib/Stream.php
  3. 2
      templates/status.php

3
lib/Download.php

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

4
lib/Stream.php

@ -102,12 +102,14 @@ class Stream {
static function listByState($state)
{
$tmpDT = new DateTime();
$db = DbMongo::get();
$coll = $db->stream;
$retour = [];
// TODO : lister statut possible
foreach ($coll->find(['cstate' => $state]) as $element) {
$element['time'] = $tmpDT->setTimestamp($element['timestamp']);
$retour[] = $element;
}
@ -121,4 +123,4 @@ class Stream {
$coll->remove(['cstate' => $state]);
}
}
}

2
templates/status.php

@ -151,7 +151,7 @@ if (!empty($listDupp)) {
if (!empty($streamBegin)) {
?>
<div class="$streamBegin">
Stream en cours : <br>
Stream en cours ou non fini : <br>
<table>
<thead>
<tr>

Loading…
Cancel
Save