openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 20c628e013a32b48792c5a080179ab68ff3adc2e
parent 093a35df3fcf3bd7a9afd748e72ab82954b6bc6a
Author: Jan Dankert <devnull@localhost>
Date:   Wed,  4 Jul 2018 01:12:09 +0200

Bessere Logausgaben im Fehlerfall.

Diffstat:
modules/cms-ui/UI.class.php | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/cms-ui/UI.class.php b/modules/cms-ui/UI.class.php @@ -45,6 +45,7 @@ class UI } header('Content-Type: text/html; charset=UTF-8'); + self::setContentSecurityPolicy(); UI::executeAction($action,$subaction); @@ -74,16 +75,16 @@ class UI // Action-Method does not exist. return ""; } catch (ObjectNotFoundException $e) { - Logger::warn("Object not found: " . $e->__toString()); // Nicht so schlimm, da dies bei gelöschten Objekten vorkommen kann. + Logger::warn("Embedded Action $action/$subaction: Object not found: " . $e->__toString()); // Nicht so schlimm, da dies bei gelöschten Objekten vorkommen kann. return DEVELOPMENT ? $e->getMessage() : ""; } catch (OpenRatException $e) { - Logger::warn( $e->__toString() ); + Logger::warn( "Embedded Action $action/$subaction: ".$e->__toString() ); return DEVELOPMENT ? $e->getMessage() : lang($e->key); } catch (SecurityException $e) { - Logger::info( $e->getMessage() ); + Logger::info( "Embedded Action $action/$subaction: ".$e->getMessage() ); return DEVELOPMENT ? $e->getMessage() : ""; } catch (Exception $e) { - Logger::info( $e->getMessage() ); + Logger::warn( "Embedded Action $action/$subaction: ".$e->__toString() ); return DEVELOPMENT ? $e->getMessage() : ""; } } @@ -126,6 +127,7 @@ class UI // Embedded Actions are ALWAYS Queries (means: GET). $dispatcher->isAction = false; + $dispatcher->isEmbedded = true; $data = $dispatcher->callActionMethod();