[icinga-checkins] icinga.org: icinga-web/master: * Patch applied from tgelf, THANKS!

git at icinga.org git at icinga.org
Thu Nov 10 11:43:19 CET 2011


Module: icinga-web
Branch: master
Commit: 7c19cb86546b920b66e345f8dede5d119fb7580c
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=7c19cb86546b920b66e345f8dede5d119fb7580c

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Nov  9 17:17:34 2011 +0100

* Patch applied from tgelf, THANKS!

---

 app/modules/Reporting/config/module.xml.in         |    2 +-
 .../models/FieldValueConverterModel.class.php      |    6 ++----
 .../models/JasperParameterStructModel.class.php    |    4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/app/modules/Reporting/config/module.xml.in b/app/modules/Reporting/config/module.xml.in
index 721cee1..3b1e9e9 100644
--- a/app/modules/Reporting/config/module.xml.in
+++ b/app/modules/Reporting/config/module.xml.in
@@ -98,7 +98,7 @@
 				</setting>
 				
 				<setting name="parameter.mapping.type">
-					<ae:parameter name="2">
+					<ae:parameter name="4">
 						<ae:parameter name="className">Ext.form.DateField</ae:parameter>
 						<ae:parameter name="format">Y-m-d H:i:s</ae:parameter>
 						<!-- H:i:s -->
diff --git a/app/modules/Reporting/models/FieldValueConverterModel.class.php b/app/modules/Reporting/models/FieldValueConverterModel.class.php
index 6eb5e5b..36f44d7 100644
--- a/app/modules/Reporting/models/FieldValueConverterModel.class.php
+++ b/app/modules/Reporting/models/FieldValueConverterModel.class.php
@@ -2,8 +2,6 @@
 
 class Reporting_FieldValueConverterModel extends ReportingBaseModel {
 
-    const TYPE_DATE = 2;
-
     /**
      * @var SoapClient
      */
@@ -51,11 +49,11 @@ class Reporting_FieldValueConverterModel extends ReportingBaseModel {
             $name = $rd->getResourceDescriptor()->getParameter(JasperResourceDescriptor::DESCRIPTOR_ATTR_NAME);
 
             if (array_key_exists($name, $this->__p)) {
-                $type = $rd->getProperties()->getParameter('PROP_INPUTCONTROL_TYPE');
+                $type = $rd->getProperties()->getParameter('PROP_DATATYPE_TYPE');
                 $value = $this->__p[$name];
 
                 switch ($type) {
-                    case self::TYPE_DATE:
+                    case JasperRequestXmlDoc::DT_TYPE_DATE_TIME:
                         $value = $this->convertDate($value);
                         break;
                 }
diff --git a/app/modules/Reporting/models/JasperParameterStructModel.class.php b/app/modules/Reporting/models/JasperParameterStructModel.class.php
index 9de15dd..621b309 100644
--- a/app/modules/Reporting/models/JasperParameterStructModel.class.php
+++ b/app/modules/Reporting/models/JasperParameterStructModel.class.php
@@ -86,7 +86,7 @@ class Reporting_JasperParameterStructModel extends ReportingBaseModel {
         $struct = array();
 
         $rd_name = $rd->getResourceDescriptor()->getParameter(JasperResourceDescriptor::DESCRIPTOR_ATTR_NAME);
-        $rd_type = $rd->getProperties()->getParameter('PROP_INPUTCONTROL_TYPE');
+        $rd_type = $rd->getProperties()->getParameter(JasperResourceDescriptor::PROP_DATATYPE_TYPE);
 
         if (array_key_exists($rd_name, $this->__nameMapping)) {
             $struct = $this->__nameMapping[$rd_name];
@@ -94,7 +94,7 @@ class Reporting_JasperParameterStructModel extends ReportingBaseModel {
 
         elseif(array_key_exists($rd_type, $this->__typeMapping)) {
             $struct = $this->__typeMapping[$rd_type];
-        }
+       }
 
         $target[$key] = $struct;
 





More information about the icinga-checkins mailing list