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

git at icinga.org git at icinga.org
Tue Jan 31 13:51:40 CET 2012


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

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)

Conflicts:

	Makefile.in
	app/modules/Reporting/config/cronks.xml

---

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

diff --git a/app/modules/Reporting/config/cronks.xml b/app/modules/Reporting/config/cronks.xml
index 7b19d3e..202537d 100644
--- a/app/modules/Reporting/config/cronks.xml
+++ b/app/modules/Reporting/config/cronks.xml
@@ -29,4 +29,4 @@
 		</cronks>
 		
 	</ae:configuration>
-</ae:configurations>
\ No newline at end of file
+</ae:configurations>
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