Skip to content

Commit

Permalink
Merge pull request #598 from it-novum/ITC-1171
Browse files Browse the repository at this point in the history
ITC-1171 remove strtotime
  • Loading branch information
nook24 authored Jun 27, 2017
2 parents 6114360 + 33033cd commit 5ae696c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/View/Hostgroups/extended.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ use itnovum\openITCOCKPIT\Core\HumanTime;
<td search="status_since">
<?php
if ($hoststatus->getLastHardStateChange()):
echo h(HumanTime::secondsInHumanShort(time() - strtotime($hoststatus->getLastHardStateChange())));
echo h(HumanTime::secondsInHumanShort(time() - $hoststatus->getLastHardStateChange()));
else:
echo __('N/A');
endif;
Expand Down
2 changes: 1 addition & 1 deletion app/View/Hostgroups/load_services_by_host_id.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ foreach ($services as $service):
<td search="status_since">
<?php
if ($servicestatus->getLastHardStateChange()):
echo h(HumanTime::secondsInHumanShort(time() - strtotime($servicestatus->getLastHardStateChange())));
echo h(HumanTime::secondsInHumanShort(time() - $servicestatus->getLastHardStateChange()));
else:
echo __('N/A');
endif;
Expand Down
4 changes: 2 additions & 2 deletions app/View/Hosts/browser.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ $Hoststatus = new Hoststatus($hoststatus['Hoststatus']);
<td><strong><?php echo __('Next check in'); ?>:</strong></td>
<td>
<?php if ($host['Host']['active_checks_enabled'] == 1 && $host['Host']['satellite_id'] == 0 && $Hoststatus->isActiveChecksEnabled() !== null): ?>
<?php echo h($this->Time->timeAgoInWords(strtotime($Hoststatus->getNextCheck()), ['timezone' => $this->Auth->user('timezone')])); ?>
<?php echo h($this->Time->timeAgoInWords($Hoststatus->getNextCheck(), ['timezone' => $this->Auth->user('timezone')])); ?>
<?php if ($Hoststatus->getLatency() > 1): ?>
<span class="text-muted"
title="<?php echo __('Check latency'); ?>">
Expand Down Expand Up @@ -638,7 +638,7 @@ $Hoststatus = new Hoststatus($hoststatus['Hoststatus']);
<td data-original-title="<?php echo h($this->Time->format($Servicestatus->getLastStateChange(), $this->Auth->user('dateformat'), false, $this->Auth->user('timezone'))); ?>"
data-placement="bottom" rel="tooltip"
data-container="body">
<?php echo h($this->Utils->secondsInHumanShort(time() - strtotime($Servicestatus->getLastStateChange()))); ?>
<?php echo h($this->Utils->secondsInHumanShort(time() - $Servicestatus->getLastStateChange())); ?>
</td>
<td><?php echo h($Servicestatus->getOutput()); ?></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion app/View/Services/browser.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ $Servicestatus = new Servicestatus($servicestatus['Servicestatus']);
<td>
<?php if ($Servicestatus->isActiveChecksEnabled() && $service['Host']['satellite_id'] == 0): ?>
<?php echo $this->Time->timeAgoInWords(
strtotime($Servicestatus->getNextCheck()),
$Servicestatus->getNextCheck(),
['timezone' => $this->Auth->user('timezone')]
); ?>
<?php if ($Servicestatus->getLatency() > 1): ?>
Expand Down

0 comments on commit 5ae696c

Please sign in to comment.