Index: trunk/phase3/includes/specials/SpecialNuke.php |
— | — | @@ -48,12 +48,13 @@ |
49 | 49 | |
50 | 50 | function promptForm() { |
51 | 51 | global $wgUser, $wgOut; |
52 | | - $sk =& $wgUser->getSkin(); |
53 | 52 | |
54 | | - $nuke = Title::makeTitle( NS_SPECIAL, 'Nuke' ); |
| 53 | + $sk = $wgUser->getSkin(); |
| 54 | + |
| 55 | + $nuke = $this->getTitle(); |
55 | 56 | $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-user' ) ) ); |
56 | 57 | |
57 | | - $wgOut->addWikiText( wfMsg( 'nuke-tools' ) ); |
| 58 | + $wgOut->addWikiMsg( 'nuke-tools' ); |
58 | 59 | $wgOut->addHTML( Xml::element( 'form', array( |
59 | 60 | 'action' => $nuke->getLocalURL( 'action=submit' ), |
60 | 61 | 'method' => 'post' ), |
— | — | @@ -73,10 +74,10 @@ |
74 | 75 | $pages = $this->getNewPages( $username ); |
75 | 76 | $escapedName = wfEscapeWikiText( $username ); |
76 | 77 | if( count( $pages ) == 0 ) { |
77 | | - $wgOut->addWikiText( wfMsg( 'nuke-nopages', $escapedName ) ); |
| 78 | + $wgOut->addWikiMsg( 'nuke-nopages', $escapedName ); |
78 | 79 | return $this->promptForm(); |
79 | 80 | } |
80 | | - $wgOut->addWikiText( wfMsg( 'nuke-list', $escapedName ) ); |
| 81 | + $wgOut->addWikiMsg( 'nuke-list', $escapedName ); |
81 | 82 | |
82 | 83 | $nuke = $this->getTitle(); |
83 | 84 | $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-delete' ) ) ); |
— | — | @@ -99,7 +100,7 @@ |
100 | 101 | 'value' => $wgUser->editToken() ) ) . |
101 | 102 | "\n<ul>\n" ); |
102 | 103 | |
103 | | - $sk =& $wgUser->getSkin(); |
| 104 | + $sk = $wgUser->getSkin(); |
104 | 105 | foreach( $pages as $info ) { |
105 | 106 | list( $title, $edits ) = $info; |
106 | 107 | $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
— | — | @@ -136,10 +137,10 @@ |
137 | 138 | ) |
138 | 139 | ); |
139 | 140 | $pages = array(); |
140 | | - while( $row = $dbr->fetchObject( $result ) ) { |
| 141 | + while( $row = $result->fetchObject() ) { |
141 | 142 | $pages[] = array( Title::makeTitle( $row->rc_namespace, $row->rc_title ), $row->edits ); |
142 | 143 | } |
143 | | - $dbr->freeResult( $result ); |
| 144 | + $result->free(); |
144 | 145 | return $pages; |
145 | 146 | } |
146 | 147 | |