r102647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102646‎ | r102647 | r102648 >
Date:12:46, 10 November 2011
Author:cryptocoryne
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Premoderation/SpecialPremoderation.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Premoderation/SpecialPremoderation.php
@@ -96,9 +96,8 @@
9797 }
9898
9999 if( isset( $offset ) ) {
100 - $articlePath = str_replace('$1', '', $wgArticlePath);
101 - $wgOut->addHTML( '<a href="' . $articlePath . 'Special:Premoderation/list/offset/'
102 - . $offset . '">' . wfMsg( 'premoderation-next' ) . '</a>' );
 100+ $wgOut->addHtml( Linker::link( $this->getTitle( "list/offset/$offset" ),
 101+ wfMsgHtml( 'premoderation-next' ) ) );
103102 }
104103
105104 if( isset( $result['new'] ) ) {
@@ -139,19 +138,17 @@
140139 }
141140
142141 protected function formatListTableRow( $row ) {
143 - global $wgLang, $wgArticlePath;
 142+ global $wgLang;
144143
145 - $articlePath = str_replace('$1', '', $wgArticlePath);
146144 return '<tr><td>' . $wgLang->timeanddate( $row['pmq_timestamp'] ) . '</td>' .
147145 '<td>' . Linker::userLink( $row['pmq_user'], $row['pmq_user_text'] ) . '</td>' .
148146 '<td>' . Linker::link( Title::newFromText( $row['pmq_page_title'], $row['pmq_page_ns'] ) ) .
149147 '</td><td>' . ( $row['pmq_minor'] == 0 ? '' : ' ' . wfMsg( 'minoreditletter' ) ) . '</td>' .
150 - '<td>' . $row['pmq_summary'] . '</td><td>' . '<a href="' . $articlePath .
151 - 'Special:Premoderation/status/id/' . $row['pmq_id'] . '">' .
152 - wfMessage( 'premoderation-status-' . $row['pmq_status'] .
153 - ( $row['pmq_updated_user_text'] ? '-changed' : '-added' ),
154 - array( $row['pmq_updated_user_text'] ) ) .
155 - '</a></td></tr>';
 148+ '<td>' . $row['pmq_summary'] . '</td><td>' .
 149+ Linker::link( $this->getTitle( "status/id/" . $row['pmq_id'] ),
 150+ wfMessage( 'premoderation-status-' . $row['pmq_status'] .
 151+ ( $row['pmq_updated_user_text'] ? '-changed' : '-added' ),
 152+ array( $row['pmq_updated_user_text'] ) ) ) . '</td></tr>';
156153 }
157154
158155 protected function statusInterface() {
@@ -188,7 +185,7 @@
189186 Xml::closeElement( 'table' ) );
190187
191188 if( $wgUser->isAllowed( 'premoderation-viewip' ) ) {
192 - $wgOut->addHTML( wfMessage( 'premoderation-private-ip', $row['pmq_ip'] ) );
 189+ $wgOut->addWikiMsg( 'premoderation-private-ip', $row['pmq_ip'] );
193190 }
194191
195192 $rev = Revision::newFromID( $row['pmq_page_last_id'] );

Status & tagging log