[icinga-checkins] icinga.org: icinga-web/mhein/default: * Fixed wrong time format in date commands
git at icinga.org
git at icinga.org
Tue Nov 23 15:26:01 CET 2010
Module: icinga-web
Branch: mhein/default
Commit: 3602796995e4c2814446ff0194690045facfd6e6
URL: https://git.icinga.org/?p=icinga-web.git;a=commit;h=3602796995e4c2814446ff0194690045facfd6e6
Author: jmosshammer <jannis.mosshammer at netways.com>
Date: Tue Oct 19 12:55:07 2010 +0200
* Fixed wrong time format in date commands
---
.../models/System/CommandSenderModel.class.php | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/app/modules/Cronks/models/System/CommandSenderModel.class.php b/app/modules/Cronks/models/System/CommandSenderModel.class.php
index 8d529b9..f7c1f48 100755
--- a/app/modules/Cronks/models/System/CommandSenderModel.class.php
+++ b/app/modules/Cronks/models/System/CommandSenderModel.class.php
@@ -10,6 +10,8 @@ class Cronks_System_CommandSenderModel extends CronksBaseModel {
private $data = array ();
private $command = null;
+ private $timeFields = array("checktime","endtime","checktime");
+
public function initialize(AgaviContext $context, array $parameters = array()) {
parent::initialize($context, $parameters);
}
@@ -45,6 +47,10 @@ class Cronks_System_CommandSenderModel extends CronksBaseModel {
$cmd->setCommand($command_name);
foreach ($data as $name=>$value) {
+ // parse date
+ if(in_array($name, $this->timeFields)) {
+ $value = strtotime($value);
+ }
$cmd->setTarget($name, $value);
}
More information about the icinga-checkins
mailing list