r41639 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41638‎ | r41639 | r41640 >
Date:10:14, 4 October 2008
Author:ialex
Status:old
Tags:
Comment:
Some cleanup
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNuke.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNuke.php
@@ -48,12 +48,13 @@
4949
5050 function promptForm() {
5151 global $wgUser, $wgOut;
52 - $sk =& $wgUser->getSkin();
5352
54 - $nuke = Title::makeTitle( NS_SPECIAL, 'Nuke' );
 53+ $sk = $wgUser->getSkin();
 54+
 55+ $nuke = $this->getTitle();
5556 $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-user' ) ) );
5657
57 - $wgOut->addWikiText( wfMsg( 'nuke-tools' ) );
 58+ $wgOut->addWikiMsg( 'nuke-tools' );
5859 $wgOut->addHTML( Xml::element( 'form', array(
5960 'action' => $nuke->getLocalURL( 'action=submit' ),
6061 'method' => 'post' ),
@@ -73,10 +74,10 @@
7475 $pages = $this->getNewPages( $username );
7576 $escapedName = wfEscapeWikiText( $username );
7677 if( count( $pages ) == 0 ) {
77 - $wgOut->addWikiText( wfMsg( 'nuke-nopages', $escapedName ) );
 78+ $wgOut->addWikiMsg( 'nuke-nopages', $escapedName );
7879 return $this->promptForm();
7980 }
80 - $wgOut->addWikiText( wfMsg( 'nuke-list', $escapedName ) );
 81+ $wgOut->addWikiMsg( 'nuke-list', $escapedName );
8182
8283 $nuke = $this->getTitle();
8384 $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-delete' ) ) );
@@ -99,7 +100,7 @@
100101 'value' => $wgUser->editToken() ) ) .
101102 "\n<ul>\n" );
102103
103 - $sk =& $wgUser->getSkin();
 104+ $sk = $wgUser->getSkin();
104105 foreach( $pages as $info ) {
105106 list( $title, $edits ) = $info;
106107 $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false;
@@ -136,10 +137,10 @@
137138 )
138139 );
139140 $pages = array();
140 - while( $row = $dbr->fetchObject( $result ) ) {
 141+ while( $row = $result->fetchObject() ) {
141142 $pages[] = array( Title::makeTitle( $row->rc_namespace, $row->rc_title ), $row->edits );
142143 }
143 - $dbr->freeResult( $result );
 144+ $result->free();
144145 return $pages;
145146 }
146147

Status & tagging log