* (bug 2683) Really fix apostrophe escaping for toolbox tips
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index d310e27..bc5e2a9 100644 (file)
@@ -431,7 +431,8 @@ function wfDebugDieBacktrace( $msg = '' ) {
                        $msg .= "\n<p>Backtrace:</p>\n$backtrace";
                }
         }
-        die( $msg );
+        echo $msg;
+        die( -1 );
 }
 
 function wfBacktrace() {
@@ -642,7 +643,7 @@ function wfEscapeJsString( $string ) {
        $pairs = array(
                "\\" => "\\\\",
                "\"" => "\\\"",
-               "\'" => "\\\'",
+               '\'' => '\\\'',
                "\n" => "\\n",
                "\r" => "\\r",
                
@@ -1116,19 +1117,18 @@ function wfGetSiteNotice() {
        wfProfileIn( $fname );
 
        $notice = wfMsg( 'sitenotice' );
-       if($notice == '&lt;sitenotice&gt;') $notice = '';
-       # Allow individual wikis to turn it off
-       if ( $notice == '-' ) {
+       if( $notice == '&lt;sitenotice&gt;' || $notice == '-' ) {
                $notice = '';
-       } else {
-               if ($notice == '') {
-                       $notice = $wgSiteNotice;
-               }
-               if($notice != '-' && $notice != '') {
-                       $specialparser = new Parser();
-                       $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
-                       $notice = $parserOutput->getText();
-               }
+       }
+       if( $notice == '' ) {
+               # We may also need to override a message with eg downtime info
+               # FIXME: make this work!
+               $notice = $wgSiteNotice;
+       }
+       if($notice != '-' && $notice != '') {
+               $specialparser = new Parser();
+               $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
+               $notice = $parserOutput->getText();
        }
        wfProfileOut( $fname );
        return $notice;