r70654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70653‎ | r70654 | r70655 >
Date:23:36, 7 August 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Some cleanup and FIXMEs for raw html messages
Modified paths:
  • /trunk/extensions/ReplaceText/SpecialReplaceText.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReplaceText/SpecialReplaceText.php
@@ -9,7 +9,6 @@
1010 */
1111 public function __construct() {
1212 parent::__construct( 'ReplaceText', 'replacetext' );
13 - wfLoadExtensionMessages( 'ReplaceText' );
1413 }
1514
1615 function execute( $query ) {
@@ -146,6 +145,7 @@
147146 if ( ! $category_title->exists() ) $bad_cat_name = true;
148147 }
149148 if ( $bad_cat_name ) {
 149+ //FIXME: raw html message
150150 $wgOut->addHTML( wfMsg( 'replacetext_nosuchcategory', $sk->link( $category_title, ucfirst( $this->category ) ) ) );
151151 } else {
152152 if ( $this->edit_pages )
@@ -154,6 +154,7 @@
155155 $wgOut->addWikiMsg( 'replacetext_nomove', "<tt><nowiki>{$this->target}</nowiki></tt>" );
156156 }
157157 // link back to starting form
 158+ //FIXME: raw html message
158159 $wgOut->addHTML( '<p>' . $sk->makeKnownLinkObj( $this->getTitle(), wfMsg( 'replacetext_return' ) ) . '</p>' );
159160 } else {
160161 // show a warning message if the replacement string
@@ -207,8 +208,7 @@
208209 if ( is_null( $warning_msg ) ) {
209210 $wgOut->addWikiMsg( 'replacetext_docu' );
210211 } else {
211 - $actual_warning_msg = wfMsg( $warning_msg );
212 - $wgOut->addWikiText("<div class=\"errorbox\">$actual_warning_msg</div><br clear=\"both\" />");
 212+ $wgOut->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br clear=\"both\" />", $warning_msg );
213213 }
214214 $wgOut->addHTML( '<table><tr><td style="vertical-align: top;">' );
215215 $wgOut->addWikiMsg( 'replacetext_originaltext' );
@@ -236,7 +236,8 @@
237237 // search interface was added in MW 1.16 - check for the
238238 // presence of the 'powersearch-togglelabel' message to see
239239 // if we can use this functionality here
240 - if ( ! wfEmptyMsg( 'powersearch-togglelabel', wfMsg( 'powersearch-togglelabel' ) ) ) {
 240+ // FIXME: this extension requires 1.16 now?
 241+ if ( !wfEmptyMsg( 'powersearch-togglelabel', wfMsg( 'powersearch-togglelabel' ) ) ) {
241242 $wgOut->addHTML(
242243 Xml::tags(
243244 'div',
@@ -268,6 +269,7 @@
269270 Xml::element( 'div', array( 'class' => 'divider' ), '', false ) .
270271 "$tables\n</fieldset>"
271272 );
 273+ //FIXME: raw html messages
272274 $optional_filters_label = wfMsg( 'replacetext_optionalfilters' );
273275 $category_search_label = wfMsg( 'replacetext_categorysearch' );
274276 $prefix_search_label = wfMsg( 'replacetext_prefixsearch' );

Status & tagging log