r111298 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111297‎ | r111298 | r111299 >
Date:14:45, 12 February 2012
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
Follow up to r108871; -m
Modified paths:
  • /trunk/extensions/Nuke/Nuke.i18n.php (modified) (history)
  • /trunk/extensions/Nuke/Nuke.php (modified) (history)
  • /trunk/extensions/Nuke/Nuke_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Nuke/Nuke_body.php
@@ -161,15 +161,15 @@
162162 /**
163163 * @var $title Title
164164 */
165 - list( $title, $edits, $userName ) = $info;
 165+ list( $title, $userName ) = $info;
166166
167167 $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false;
168168 $thumb = $image && $image->exists() ? $image->transform( array( 'width' => 120, 'height' => 120 ), 0 ) : false;
169169
170 - $changes = wfMsgExt( 'nchanges', 'parsemag', $this->getLanguage()->formatNum( $edits ) );
171 -
172170 $out->addHTML( '<li>' .
173 - Xml::check( 'pages[]', true,
 171+ Xml::check(
 172+ 'pages[]',
 173+ true,
174174 array( 'value' => $title->getPrefixedDbKey() )
175175 ) .
176176 '&#160;' .
@@ -177,7 +177,12 @@
178178 Linker::linkKnown( $title ) .
179179 '&#160;(' .
180180 ( $userName ? wfMsgExt( 'nuke-editby', 'parseinline', $userName ) . ',&#160;' : '' ) .
181 - Linker::linkKnown( $title, $changes, array(), array('action' => 'history' ) ) .
 181+ Linker::linkKnown(
 182+ $title,
 183+ wfMsg( 'nuke-viewchanges' ),
 184+ array(),
 185+ array( 'action' => 'history' )
 186+ ) .
182187 ")</li>\n" );
183188 }
184189
@@ -203,7 +208,6 @@
204209 'rc_namespace',
205210 'rc_title',
206211 'rc_timestamp',
207 - 'COUNT(*) AS edits'
208212 );
209213
210214 $where = array( "(rc_new = 1) OR (rc_log_type = 'upload' AND rc_log_action = 'upload')" );
@@ -235,8 +239,7 @@
236240 foreach ( $result as $row ) {
237241 $pages[] = array(
238242 Title::makeTitle( $row->rc_namespace, $row->rc_title ),
239 - $row->edits,
240 - $username == '' ? $row->rc_user_text : false
 243+ $username === '' ? $row->rc_user_text : false
241244 );
242245 }
243246
@@ -255,6 +258,7 @@
256259 foreach( $pages as $page ) {
257260 $title = Title::newFromURL( $page );
258261 $file = $title->getNamespace() == NS_FILE ? wfLocalFile( $title ) : false;
 262+
259263 if ( $file ) {
260264 $oldimage = null; // Must be passed by reference
261265 $ok = FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, false )->isOK();
@@ -262,6 +266,7 @@
263267 $article = new Article( $title, 0 );
264268 $ok = $article->doDeleteArticle( $reason );
265269 }
 270+
266271 if ( $ok ) {
267272 $res[] = wfMsgExt( 'nuke-deleted', array( 'parseinline' ), $title->getPrefixedText() );
268273 } else {
Index: trunk/extensions/Nuke/Nuke.i18n.php
@@ -37,6 +37,7 @@
3838 'nuke-delete-more' => '[[Special:Nuke|Delete more pages]]',
3939 'nuke-pattern' => 'Pattern for the page name:',
4040 'nuke-nopages-global'=> 'There are no new pages in [[Special:RecentChanges|recent changes]].',
 41+ 'nuke-viewchanges' => 'view changes',
4142 );
4243
4344 /** Message documentation (Message documentation)
Index: trunk/extensions/Nuke/Nuke.php
@@ -4,7 +4,7 @@
55 die( 'Not an entry point.' );
66 }
77
8 -define( 'Nuke_VERSION', '1.1.3' );
 8+define( 'Nuke_VERSION', '1.1.4' );
99
1010 $dir = dirname(__FILE__) . '/';
1111

Follow-up revisions

RevisionCommit summaryAuthorDate
r113604bug 16985: Show number of recent edits in Special:Nuke...saper00:18, 12 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108871Revert most of r108602...reedy22:59, 13 January 2012

Comments

#Comment by Jeroen De Dauw (talk | contribs)   15:00, 12 February 2012

Commit comment fail. Should be: Changed "n changes" links by "view changes" links, since the edit count was broken and cannot be made to work nicely.

Status & tagging log