[icinga-checkins] icinga.org: icinga-web/master: * Fixed error handling reporting module ( fixes #2248, ref #2277)

git at icinga.org git at icinga.org
Tue Jan 31 10:40:46 CET 2012


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Jan 31 10:39:56 2012 +0100

* Fixed error handling reporting module (fixes #2248, ref #2277)

---

 Makefile.in                                        |    6 ++++--
 app/modules/Reporting/config/cronks.xml            |    2 +-
 .../Reporting/models/ReportUserFileModel.class.php |    5 +++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 166ab4d..2ce2fc5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -179,11 +179,13 @@ test-cs: test-precede
 devel-inplace-config:
 	mkdir -p \
 	$(SRC_DIR)/app/cache/config \
-	$(SRC_DIR)/log
+	$(LOGDIR) \
+	$(SRC_DIR)/app/modules/Reporting/data/tmp
 	chown $(WEB_USER).$(WEB_GROUP) \
 		$(SRC_DIR)/app/cache \
 		$(SRC_DIR)/app/cache/config \
-		$(LOGDIR)
+		$(LOGDIR) \
+		$(SRC_DIR)/app/modules/Reporting/data/tmp
 	@printf "Done.\n"
 
 devel-reconfigure:
diff --git a/app/modules/Reporting/config/cronks.xml b/app/modules/Reporting/config/cronks.xml
index f3a4bb4..e54fb19 100644
--- a/app/modules/Reporting/config/cronks.xml
+++ b/app/modules/Reporting/config/cronks.xml
@@ -18,7 +18,7 @@
 				<ae:parameter name="description">Seamless Jasper Integration</ae:parameter>
 				<ae:parameter name="name">Reporting</ae:parameter>
 				<ae:parameter name="categories">icinga-reporting</ae:parameter>
-				<ae:parameter name="image">cronks.Weather Could Sun</ae:parameter>
+				<ae:parameter name="image">cronks.Weather_Could_Sun</ae:parameter>
 				<ae:parameter name="groupsonly">appkit_admin</ae:parameter>
 				<ae:parameter name="ae:parameter">
 					<ae:parameter name="jasperconfig">modules.reporting.jasperconfig.default</ae:parameter>
diff --git a/app/modules/Reporting/models/ReportUserFileModel.class.php b/app/modules/Reporting/models/ReportUserFileModel.class.php
index 4c410ee..58ece8b 100644
--- a/app/modules/Reporting/models/ReportUserFileModel.class.php
+++ b/app/modules/Reporting/models/ReportUserFileModel.class.php
@@ -58,11 +58,12 @@ class Reporting_ReportUserFileModel extends ReportingBaseModel implements AgaviI
         $this->__dir = AgaviConfig::get('modules.reporting.dir.download');
 
         if (!is_dir($this->__dir)) {
-            mkdir($this->__dir);
+            @mkdir($this->__dir);
         }
 
         if (!is_dir($this->__dir)) {
-            throw new AppKitModelException('Could not create dir: '. $this->__dir);
+            $this->log('Reporting: Permission denied to create temp dir: "%s"', $this->__dir, AgaviLogger::FATAL);
+            throw new AppKitModelException('Reporting: No permission, could not create dir: '. $this->__dir);
         } else {
             $this->fileGarbageCollector();
         }





More information about the icinga-checkins mailing list