r6794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6793‎ | r6794 | r6795 >
Date:11:43, 23 December 2004
Author:vibber
Status:old
Tags:
Comment:
* (bug 1164) Let wikitext be used in Loginprompt and Loginend messages
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -962,8 +962,21 @@
963963 }
964964
965965 /**
 966+ * An ugly, ugly hack.
966967 * @access private
967968 */
 969+ function msgWiki( $str ) {
 970+ global $wgParser, $wgTitle, $wgOut, $wgUseTidy;
 971+
 972+ $text = $this->translator->translate( $str );
 973+ $parserOutput = $wgParser->parse( $text, $wgTitle,
 974+ $wgOut->mParserOptions, true );
 975+ echo $parserOutput->getText();
 976+ }
 977+
 978+ /**
 979+ * @access private
 980+ */
968981 function haveData( $str ) {
969982 return $this->data[$str];
970983 }
Index: trunk/phase3/includes/templates/Userlogin.php
@@ -17,7 +17,7 @@
1818 <p class='error'><?php $this->html('error') ?></p>
1919 <?php } else { ?>
2020 <h2><?php $this->msg('login' ) ?>:</h2>
21 - <p><?php $this->msg('loginprompt') ?></p>
 21+ <p><?php $this->msgWiki('loginprompt') ?></p>
2222 <?php } ?>
2323 <form name="userlogin" id="userlogin" method="post" action="<?php $this->text('action') ?>">
2424 <table border='0'>
@@ -106,7 +106,7 @@
107107 </table>
108108 </form>
109109 <?php
110 - $this->msgHtml( 'loginend' );
 110+ $this->msgWiki( 'loginend' );
111111 }
112112 }
113113

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r6793* (bug 1164) Let wikitext be used in Loginprompt and Loginend messagesvibber11:42, 23 December 2004

Status & tagging log