[icinga-checkins] icinga.org: icinga-web/mhein/reporting: * Bugfixes, reporting and session only for PHP5.3

git at icinga.org git at icinga.org
Tue Jul 5 09:52:30 CEST 2011


Module: icinga-web
Branch: mhein/reporting
Commit: 9a527a0ac831835774afc838d96e848b4a2de9c2
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=9a527a0ac831835774afc838d96e848b4a2de9c2

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Jul  1 13:39:05 2011 +0200

* Bugfixes, reporting and session only for PHP5.3

---

 .../storage/AppKitDoctrineSessionStorage.class.php |    6 ++++--
 app/modules/Cronks/config/cronks.xml               |    5 -----
 .../models/JasperParameterStructModel.class.php    |    3 ++-
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php b/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php
index b45bfef..c4120b0 100755
--- a/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php
+++ b/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php
@@ -42,8 +42,10 @@ class AppKitDoctrineSessionStorage extends AgaviSessionStorage {
 	}
 	
 	public function sessionGC($lifetime) {
-		$date = new DateTime();
-		$date->sub(new DateInterval(sprintf('PT%dS', $lifetime)));
+		$diff = time() - $lifetime;
+		
+		$date = new DateTime(strftime('%Y-%m-%d %h:%M:%S', $diff));
+		// $date->sub(new DateInterval(sprintf('PT%dS', $lifetime)));
 
 		$this->getContext()->getLoggerManager()->log('Deleting sessions older that '. $date->format('c'), AgaviLogger::DEBUG);
 
diff --git a/app/modules/Cronks/config/cronks.xml b/app/modules/Cronks/config/cronks.xml
index a327a4e..bc547a6 100755
--- a/app/modules/Cronks/config/cronks.xml
+++ b/app/modules/Cronks/config/cronks.xml
@@ -550,9 +550,4 @@
 	
 	</setting>
 
-	<!-- Include the site config file *NEVER REMOVE THIS LINE* -->
-	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cronks.site.xml" xpointer="xmlns(ae=http://agavi.org/agavi/config/global/envelope/1.0) xmlns(cronk=http://icinga.org/cronks/config/parts/cronks/1.0) xpointer(//ae:configurations/ae:configuration)">
-		<xi:fallback></xi:fallback>
-	</xi:include>
-	
 </settings>
diff --git a/app/modules/Reporting/models/JasperParameterStructModel.class.php b/app/modules/Reporting/models/JasperParameterStructModel.class.php
index 6416338..1301b67 100644
--- a/app/modules/Reporting/models/JasperParameterStructModel.class.php
+++ b/app/modules/Reporting/models/JasperParameterStructModel.class.php
@@ -62,6 +62,7 @@ class Reporting_JasperParameterStructModel extends ReportingBaseModel {
     
     public function getJsonStructure() {
         $objects = $this->getObjects();
+	$out = array ();
         foreach ($objects as $rd) {
             $tmp = array();
             
@@ -100,4 +101,4 @@ class Reporting_JasperParameterStructModel extends ReportingBaseModel {
     }
 }
 
-?>
\ No newline at end of file
+?>





More information about the icinga-checkins mailing list