Adding possibility to show a user-defined page for the SystemException
authorTim Düsterhus <timwolla@arcor.de>
Fri, 11 Nov 2011 16:18:27 +0000 (17:18 +0100)
committerTim Düsterhus <timwolla@arcor.de>
Fri, 11 Nov 2011 16:20:13 +0000 (17:20 +0100)
You can show a self-designed page now. Just add SYSTEMEXCEPTION_FILE to your config.inc.php in WCF or application

wcfsetup/install/files/lib/system/exception/SystemException.class.php

index 312c2469966448f232dbc94593a33fa0d345191f..9bfa2e41af9545df2381e53c87bd5f1fffb223f5 100644 (file)
@@ -72,6 +72,12 @@ class SystemException extends LoggedException implements IPrintableException {
                // send status code
                @header('HTTP/1.1 503 Service Unavailable');
                
+               // show user-defined system-exception
+               if (defined('SYSTEMEXCEPTION_FILE') && file_exists(SYSTEMEXCEPTION_FILE)) {
+                       require(SYSTEMEXCEPTION_FILE);
+                       return;
+               }
+               
                // print report
                echo '<?xml version="1.0" encoding="UTF-8"?>';