* (bug 1164) Let wikitext be used in Loginprompt and Loginend messages
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Dec 2004 11:43:24 +0000 (11:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Dec 2004 11:43:24 +0000 (11:43 +0000)
includes/SkinTemplate.php
includes/templates/Userlogin.php

index 0d435ba..cc1676a 100644 (file)
@@ -961,6 +961,19 @@ class QuickTemplate {
                echo $this->translator->translate( $str );
        }
        
+       /**
+        * An ugly, ugly hack.
+        * @access private
+        */
+       function msgWiki( $str ) {
+               global $wgParser, $wgTitle, $wgOut, $wgUseTidy;
+
+               $text = $this->translator->translate( $str );
+               $parserOutput = $wgParser->parse( $text, $wgTitle,
+                       $wgOut->mParserOptions, true );
+               echo $parserOutput->getText();
+       }
+       
        /**
         * @access private
         */
index d416896..c0b0f51 100644 (file)
@@ -17,7 +17,7 @@ class UserloginTemplate extends QuickTemplate {
        <p class='error'><?php $this->html('error') ?></p>
 <?php } else { ?>
        <h2><?php $this->msg('login'      ) ?>:</h2>
-       <p><?php  $this->msg('loginprompt') ?></p>
+       <p><?php  $this->msgWiki('loginprompt') ?></p>
 <?php } ?>
 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
        <table border='0'>
@@ -106,7 +106,7 @@ class UserloginTemplate extends QuickTemplate {
        </table>
 </form>
 <?php
-               $this->msgHtml( 'loginend' );
+               $this->msgWiki( 'loginend' );
        }
 }