Final fixes for admin logout
authorRoland Häder <roland@mxchange.org>
Wed, 18 Nov 2009 04:02:18 +0000 (04:02 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 18 Nov 2009 04:02:18 +0000 (04:02 +0000)
inc/filters.php
inc/functions.php
templates/de/html/mailid/mailid_confirm_buttom.tpl
templates/de/html/mailid/mailid_enter_code.tpl
templates/de/html/mailid/mailid_points_done2.tpl
templates/de/html/mailid/mailid_points_locked2.tpl

index 362898e490a2fed3cdd501be98da9be6cfd72f80..e2ddb66c1d66fc33044cffb3639fcd32267cbeae 100644 (file)
@@ -471,7 +471,7 @@ function FILTER_COMPILE_EXTENSION ($code) {
                                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);
index 73928d96981e3554f082e5b24f1428cacbf8afe1..ef7e6388360f6dbb690db2549cdeea547a3b988e 100644 (file)
@@ -169,7 +169,7 @@ function compileFinalOutput () {
                // 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;
 
@@ -587,7 +587,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        eval("\$toEmail = \"".compileRawCode(escapeQuotes($toEmail))."\";");
 
        // Compile "MSG"
-       eval("\$message = \"".compileRawCode(escapeQuotes($message))."\";");
+       eval("\$message = \"".str_replace('$', '&#36;', compileRawCode(escapeQuotes($message)))."\";");
 
        // Fix HTML parameter (default is no!)
        if (empty($isHtml)) $isHtml = 'N';
@@ -2559,7 +2559,7 @@ function debug_get_mailable_backtrace () {
 }
 
 // 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
@@ -2591,15 +2591,18 @@ function debug_report_bug ($message = '') {
        $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.
@@ -3847,7 +3850,9 @@ function encodeUrl ($url, $outputMode = '0') {
                }
 
                // 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?}
index 725fe681b8fc498ccfbe6f0ae96ed8bafbe9270c..e8a28191cd6b5de9fdaf546b9abd75cf53fe0252 100644 (file)
@@ -1,7 +1,7 @@
 <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]&amp;$content[type]=$content[data]?m?mode=add&amp;code=$content[code]" method="post">
+                       <form accept-charset="utf-8" action="{%url=mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]?m?mode=add&amp;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--}" />
index 927ea3b8d7f64831feb5a631709f8a7fbbfd8717..8d73e468017619380a4ac55cc6b42c2a794f559b 100644 (file)
@@ -3,7 +3,7 @@
                <td width="220" align="center">
                        <form
                                accept-charset="utf-8"
-                               action="{?URL?}/mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]?m?mode=add&amp;code=$content[code]"
+                               action="{%url=mailid_top.php?userid=$content[userid]&amp;$content[type]=$content[data]?m?mode=add&amp;code=$content[code]%}"
                                method="post">
                                        {--ENTER_CODE--}:
                                        $content[image]<br />
index 70ff2a04bbc229a66635dfcb2f448ecb7c835c6e..31b6ef38b65f8ae14dfd3d675e7446bc99be0d70 100644 (file)
@@ -6,7 +6,7 @@
                        {--MAILID_TOTAL_POINTS1--} <span class="member_done">$content[total]
                        {?POINTS?}</span> {--MAILID_TOTAL_POINTS2--}<br />
                        <br />
-                       <a href="{?URL?}/show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[data]" target="_blank">{--BONUS_SHOW_TURBO_BONUS--}
+                       <a href="{%url=show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[data]%}" target="_blank">{--BONUS_SHOW_TURBO_BONUS--}
                        </div>
                </td>
                <td align="center">
index 8bc5855cf2af68ac55ab03ab487ac73af6b65922..4037af9d3b817e7c7e19b7ae1370fa597ea4b67f 100644 (file)
@@ -4,7 +4,7 @@
                        <div class="tiny">
                                {--THANX_POINTS_LOCKED_1--}<span class="member_done">$content[points]</span>&nbsp;{--THANX_POINTS_LOCKED_2--}<br />
                                <br />
-                               <a href="{?URL?}/show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[data]" target="_blank">{--BONUS_SHOW_TURBO_BONUS--}
+                               <a href="{%url=show_bonus.php?userid=$content[userid]&amp;t=$content[type]&amp;d=$content[data]%}" target="_blank">{--BONUS_SHOW_TURBO_BONUS--}
                        </div>
                </td>
                <td align="center">