Rename timeUnless to timeUntil

refs #5981
This commit is contained in:
Gunnar Beutner 2014-05-29 12:38:59 +02:00
parent d01a98b7e6
commit 7b0a48bef5
5 changed files with 9 additions and 9 deletions

View File

@ -21,16 +21,16 @@ $this->addHelperFunction('timeSincePrefix', function ($timestamp) {
. ' </span>';
});
$this->addHelperFunction('timeUnless', function ($timestamp) {
$this->addHelperFunction('timeUntil', function ($timestamp) {
if (! $timestamp) return '';
return '<span class="timeunless">'
return '<span class="timeuntil">'
. Format::timeUntil($timestamp)
. '</span>';
});
$this->addHelperFunction('timeUnlessPrefix', function ($timestamp) {
$this->addHelperFunction('timeUntilPrefix', function ($timestamp) {
if (! $timestamp) return '';
return '<span class="timeunless">'
return '<span class="timeuntil">'
. $this->translate(Format::timeUntilPrefix($timestamp))
. '</span>';
});

View File

@ -58,7 +58,7 @@ foreach ($comments as $comment):
<?php if ($comment->persistent): ?>Comment is persistent<br /><?php endif ?>
<b>Expires: </b> <?=
($comment->expiration) ?
$this->timeUnless($comment->expiration) :
$this->timeUntil($comment->expiration) :
'Never'
?>
</td>

View File

@ -43,7 +43,7 @@ $cf = $this->getHelper('CommandForm');
<?php if ($ps->notifications_enabled === '1'): ?>
<a rel="tooltip" title="Disable notifications for a specific time on a program-wide basis" href="<?= $this->href('monitoring/command/disablenotificationswithexpire') ?>" data-base-target="_next">Temporarily disable</a>
<?php elseif ($ps->disable_notif_expire_time): ?>
Will be re-enabled in <strong><?= $this->timeUnless($ps->disable_notif_expire_time) ?></strong>
Will be re-enabled in <strong><?= $this->timeUntil($ps->disable_notif_expire_time) ?></strong>
</div>
<?php endif; ?>
</td>

View File

@ -25,7 +25,7 @@ $cf = $this->getHelper('CommandForm');
'host' => $object->host_name,
'service' => $object->service_description
)
) ?>"><?= $this->img('img/icons/reschedule_petrol.png') ?> <?= $this->translate('Reschedule') ?></a> <?= $this->timeUnless($object->next_check) ?></td>
) ?>"><?= $this->img('img/icons/reschedule_petrol.png') ?> <?= $this->translate('Reschedule') ?></a> <?= $this->timeUntil($object->next_check) ?></td>
</tr>
<?php if ($object->check_execution_time): ?>
<tr>

View File

@ -18,9 +18,9 @@ foreach ($object->downtimes as $downtime) {
$state = 'in downtime since ' . $this->timeSince($downtime->start);
} else {
if ($downtime->is_fixed) {
$state = 'scheduled ' . $this->timeUnless($downtime->start);
$state = 'scheduled ' . $this->timeUntil($downtime->start);
} else {
$state = 'scheduled flexible ' . $this->timeUnless($downtime->start);
$state = 'scheduled flexible ' . $this->timeUntil($downtime->start);
}
}