+if ((isInstalled()) && (getTotalFatalErrors() == 0)) {
+ // Is the extension installed?
+ if (!EXT_IS_ACTIVE('debug')) {
+ // Then abort here
+ shutdown();
+ } // END - if
+
+ // Is the request parameter set?
+ if (REQUEST_ISSET_POST(('request'))) {
+ // Handle the request
+ if (DEBUG_HANDLE_REQUEST(REQUEST_POST('request'))) {
+ // Construct FQFN for the module
+ $INC = sprintf("inc/debug/%s/request_%s",
+ getConfig('debug_mode'),
+ SQL_ESCAPE(REQUEST_POST('request'))
+ );
+
+ // Is the module there? Else we log it!
+ if (INCLUDE_READABLE($INC)) {
+ // Load the request module
+ LOAD_INC($INC);
+ } else {
+ // Missing request file, may happen while development
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', REQUEST_POST('request'));
+ }
+ } else {
+ // Unhandled request detected
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', REQUEST_POST('request'));
+ }
+ } else {
+ // Empty request
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_empty', '');
+ }
+} else {
+ // Not installed or fatal errors
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_fatal', getTotalFatalErrors());