templates/de/emails/admin/admin_rallye_notify.tpl -text
templates/de/emails/admin/admin_rallye_purged.tpl -text
templates/de/emails/admin/admin_refback.tpl -text
+templates/de/emails/admin/admin_report_bug.tpl -text
templates/de/emails/admin/admin_reset_password.tpl -text
templates/de/emails/admin/admin_sponsor_change_data.tpl -text
templates/de/emails/admin/admin_sponsor_change_email.tpl -text
return $backtrace;
}
+// A mail-able backtrace
+function debug_get_mailable_backtrace () {
+ // Init variable
+ $backtrace = '';
+
+ // Get and prepare backtrace for output
+ $backtraceArray = debug_backtrace();
+ foreach ($backtraceArray as $key => $trace) {
+ if (!isset($trace['file'])) $trace['file'] = __FUNCTION__;
+ if (!isset($trace['line'])) $trace['line'] = __LINE__;
+ if (!isset($trace['args'])) $trace['args'] = array();
+ $backtrace .= ($key+1) . '.:' . basename($trace['file']) . ':' . $trace['line'] . ', ' . $trace['function'] . '(' . count($trace['args']) . ")\n";
+ } // END - foreach
+
+ // Return the backtrace
+ return $backtrace;
+}
+
// Output a debug backtrace to the user
function debug_report_bug ($message = '') {
// Is this already called?
} // END - if
// Add output
- $debug .= "Please report this bug at <a title=\"Direct link to the bug-tracker\" href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a> and include the logfile from <strong>" . str_replace(getConfig('PATH'), '', getConfig('CACHE_PATH')) . "debug.log</strong> in your report (you can now attach files):<pre>";
+ $debug .= "Please report this bug at <a title=\"Direct link to the bug-tracker\" href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">http://bugs.mxchange.org</a> and include the logfile from <strong>" . str_replace(getConfig('PATH'), '', getConfig('CACHE_PATH')) . "debug.log</strong> in your report (you can now attach files):<pre>";
$debug .= debug_get_printable_backtrace();
$debug .= "</pre>\nRequest-URI: " . getRequestUri()."<br />\n";
$debug .= "Thank you for finding bugs.";
+ // Prepare content
+ $content = array(
+ 'message' => trim($message),
+ 'backtrace' => trim(debug_get_mailable_backtrace()),
+ 'request_uri' => trim(getRequestUri())
+ );
+
+ // Send email to webmaster
+ sendAdminNotification(getMessage('DEBUG_REPORT_BUG_SUBJECT'), 'admin_report_bug', $content);
+
// And abort here
// @TODO This cannot be rewritten to app_die(), try to find a solution for this.
die($debug);
'ADMIN_WARNING_SQL_PATCHES_MISSING' => "Eine essentielle Erweiterung <span=\"data\">sql_patches</span> ist noch nicht installiert. Bitte erledigen Sie dies bald, da Ihr {?mt_word?} sonst nicht funktioniert.",
'ADMIN_EXTENSION_IS_NON_PRODUCTIVE' => "Die von Ihnen ausgewählte Erweiterung <span=\"data\">%s</span> ist noch nicht für den produktiven Betrieb freigegeben und befindet sich somit noch in der Entwicklung. Bitte nur verwenden, wenn Sie wissen, was Sie tun.",
'ADMIN_ENTRIES_404' => "Es wurden keine Einträge gefunden.",
+ 'DEBUG_REPORT_BUG_SUBJECT' => "[BUG!] Es wurde ein Fehler im Script erkannt:",
'MEMBER_MAIL_BONUS_CONFIRMED_ON' => "Sie haben diese Bonusmail <span class=\"data\">%s</span> bestätigt.",
'MEMBER_MAIL_NORMAL_CONFIRMED_ON' => "Sie haben diese Klickmail <span class=\"data\">%s</span> bestätigt.",
--- /dev/null
+Hallo Administrator,
+
+Es wurde soeben ein Fehler im Mailsystem erkannt. Hier ist der Fehlertext:
+
+------------------------------
+Fehlermeldung: $content[message]
+------------------------------
+Backtrace:
+$content[backtrace]
+------------------------------
+Abfrage-String: $content[request_uri]
+------------------------------
+
+Mit freundlichen Grüßen,
+ Ihr {?MAIN_TITLE?} Script
+
+{?URL?}/admin.php