From 6eeb3bd50913f3acb644dac0343a3eb4b077525a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 9 Feb 2012 16:28:08 +0100 Subject: [PATCH] Included stacktrace in PermissionDeniedException Closes #209 --- com.woltlab.wcf/template/permissionDenied.tpl | 8 ++++++++ wcfsetup/install/files/acp/templates/permissionDenied.tpl | 8 ++++++++ .../system/exception/PermissionDeniedException.class.php | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/com.woltlab.wcf/template/permissionDenied.tpl b/com.woltlab.wcf/template/permissionDenied.tpl index 8831f320f0..298fe316b7 100644 --- a/com.woltlab.wcf/template/permissionDenied.tpl +++ b/com.woltlab.wcf/template/permissionDenied.tpl @@ -12,6 +12,14 @@ +{if ENABLE_DEBUG_MODE} + +{/if} + {include file='footer' sandbox=false} \ No newline at end of file diff --git a/wcfsetup/install/files/acp/templates/permissionDenied.tpl b/wcfsetup/install/files/acp/templates/permissionDenied.tpl index 06fdb061da..58b8fc8c6e 100644 --- a/wcfsetup/install/files/acp/templates/permissionDenied.tpl +++ b/wcfsetup/install/files/acp/templates/permissionDenied.tpl @@ -2,4 +2,12 @@

{lang}wcf.global.error.permissionDenied{/lang}

+{if ENABLE_DEBUG_MODE} + +{/if} + {include file='footer'} diff --git a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php index 7e5115582d..1737660323 100644 --- a/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php +++ b/wcfsetup/install/files/lib/system/exception/PermissionDeniedException.class.php @@ -27,6 +27,10 @@ class PermissionDeniedException extends UserException { @header('HTTP/1.0 403 Forbidden'); WCF::getTPL()->assign(array( + 'name' => get_class($this), + 'file' => $this->getFile(), + 'line' => $this->getLine(), + 'stacktrace' => $this->getTraceAsString(), 'templateName' => 'permissionDenied' )); WCF::getTPL()->display('permissionDenied'); -- 2.20.1