r50779 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50778‎ | r50779 | r50780 >
Date:16:55, 19 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added sorting of result, better formatting of strings in user messages (both from Capmo)
Modified paths:
  • /trunk/extensions/ReplaceText/SpecialReplaceText.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReplaceText/SpecialReplaceText.php
@@ -108,7 +108,7 @@
109109 Job::batchInsert( $jobs );
110110
111111 $count = $wgLang->formatNum( count( $jobs ) );
112 - $wgOut->addWikiMsg( 'replacetext_success', $this->target, $this->replacement, $count );
 112+ $wgOut->addWikiMsg( 'replacetext_success', "<tt><nowiki>{$this->target}</nowiki></tt>", "<tt><nowiki>{$this->replacement}</nowiki></tt>", $count );
113113
114114 // Link back
115115 $sk = $this->user->getSkin();
@@ -144,7 +144,7 @@
145145 $res = $this->doSearchQuery( $this->replacement, $selected_namespaces );
146146 $count = $res->numRows();
147147 if ( $count > 0 ) {
148 - $message = array( 'replacetext_warning', $wgLang->formatNum( $count ), $this->replacement );
 148+ $message = array( 'replacetext_warning', $wgLang->formatNum( $count ), "<tt><nowiki>{$this->replacement}</nowiki></tt>" );
149149 }
150150 } elseif ( $this->move_pages ) {
151151 $selected_namespaces = self::getSelectedNamespaces();
@@ -449,8 +449,9 @@
450450 'rev_id = page_latest',
451451 'rev_text_id = old_id'
452452 );
 453+ $sort = array( 'ORDER BY' => 'page_namespace, page_title' );
453454
454 - return $dbr->select( $tables, $vars, $conds, __METHOD__ );
 455+ return $dbr->select( $tables, $vars, $conds, __METHOD__ , $sort );
455456 }
456457
457458 }

Status & tagging log