if (substr($cmd, -2, 2) == 'js') $outputMode = 1;
// Handle an URL here
- $replacer = "\" . encodeUrl('" . $matches[3][$key] . "', " . $outputMode . ") . \"";
+ $replacer = "\" . encodeUrl(\"" . $matches[3][$key] . "\", " . $outputMode . ") . \"";
// Replace it
$code = str_replace($matches[0][$key], $replacer, $code);
// Was that eval okay?
if (empty($newContent)) {
// Something went wrong!
- debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>');
+ debug_report_bug('Evaluation error:<pre>' . linenumberCode($eval) . '</pre>', false);
} // END - if
$GLOBALS['output'] = $newContent;
eval("\$toEmail = \"".compileRawCode(escapeQuotes($toEmail))."\";");
// Compile "MSG"
- eval("\$message = \"".compileRawCode(escapeQuotes($message))."\";");
+ eval("\$message = \"".str_replace('$', '$', compileRawCode(escapeQuotes($message)))."\";");
// Fix HTML parameter (default is no!)
if (empty($isHtml)) $isHtml = 'N';
}
// Output a debug backtrace to the user
-function debug_report_bug ($message = '') {
+function debug_report_bug ($message = '', $sendEmail = true) {
// Is this already called?
if (isset($GLOBALS[__FUNCTION__])) {
// Other 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 an email? (e.g. not wanted for evaluation errors)
+ if ($sendEmail === true) {
+ // 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);
+ // Send email to webmaster
+ sendAdminNotification(getMessage('DEBUG_REPORT_BUG_SUBJECT'), 'admin_report_bug', $content);
+ } // END - if
// And abort here
// @TODO This cannot be rewritten to app_die(), try to find a solution for this.
}
// Add it to URL
- $url .= $seperator . session_name() . '=' . session_id();
+ if (session_id() != '') {
+ $url .= $seperator . session_name() . '=' . session_id();
+ } // END - if
} // END - if
// Add {?URL?}
<table border="0" cellspacing="0" cellpadding="0" class="member_mailidtop">
<tr>
<td width="220" align="center">
- <form accept-charset="utf-8" action="{?URL?}/mailid_top.php?userid=$content[userid]&$content[type]=$content[data]?m?mode=add&code=$content[code]" method="post">
+ <form accept-charset="utf-8" action="{%url=mailid_top.php?userid=$content[userid]&$content[type]=$content[data]?m?mode=add&code=$content[code]%}" method="post">
{--MAILID_CLICK_BUTTON--}:<br />
<input type="hidden" name="gfx_check" value="$content[gfx]" />
<input type="submit" class="member_submit" name="ok" value="{--SUBMIT_CODE--}" />