Show expire time for flexbile downtimes where missing

This commit is contained in:
Eric Lippmann 2019-07-11 14:07:05 +02:00
parent 5145de6b50
commit b5bfd0c620
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@
)) ?>
</span>
<?php if (! $downtime->is_in_effect && $downtime->start >= time()): ?>
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->end, false, true)) ?></span>
<span><?= sprintf($this->translate('expires %s'), $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true)) ?></span>
<?php endif ?>
<span class="comment-icons">
<?php if ($downtime->is_flexible): ?>

View File

@ -74,7 +74,7 @@ if (empty($object->comments) && ! $addLink) {
}
$state .= ' ' . sprintf(
$this->translate('expires %s', 'Last format parameter represents the downtime expire time'),
$this->timeUntil($downtime->end, false, true)
$this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true)
);
}
}