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 362898e..e2ddb66 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 73928d9..ef7e638 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 725fe68..e8a2819 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 927ea3b..8d73e46 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 70ff2a0..31b6ef3 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 8bc5855..4037af9 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">