Index: trunk/extensions/Nuke/Nuke_body.php |
— | — | @@ -7,7 +7,6 @@ |
8 | 8 | } |
9 | 9 | |
10 | 10 | public function execute( $par ) { |
11 | | - |
12 | 11 | if( !$this->userCanExecute( $this->getUser() ) ) { |
13 | 12 | $this->displayRestrictionError(); |
14 | 13 | return; |
— | — | @@ -39,20 +38,17 @@ |
40 | 39 | $pages = $req->getArray( 'pages' ); |
41 | 40 | |
42 | 41 | if( $pages ) { |
43 | | - return $this->doDelete( $pages, $reason ); |
| 42 | + $this->doDelete( $pages, $reason ); |
| 43 | + return; |
44 | 44 | } |
45 | | - } |
46 | | - elseif ( $req->getVal( 'action' ) == 'submit' ) { |
| 45 | + } elseif ( $req->getVal( 'action' ) == 'submit' ) { |
47 | 46 | $this->listForm( $target, $reason, $req->getInt( 'limit', 500 ) ); |
48 | | - } |
49 | | - else { |
| 47 | + } else { |
50 | 48 | $this->promptForm(); |
51 | 49 | } |
52 | | - } |
53 | | - elseif ( $target === '' ) { |
| 50 | + } elseif ( $target === '' ) { |
54 | 51 | $this->promptForm(); |
55 | | - } |
56 | | - else { |
| 52 | + } else { |
57 | 53 | $this->listForm( $target, $reason, $req->getInt( 'limit', 500 ) ); |
58 | 54 | } |
59 | 55 | } |
— | — | @@ -108,12 +104,12 @@ |
109 | 105 | if( count( $pages ) == 0 ) { |
110 | 106 | if ( $username === '' ) { |
111 | 107 | $out->addWikiMsg( 'nuke-nopages-global' ); |
112 | | - } |
113 | | - else { |
| 108 | + } else { |
114 | 109 | $out->addWikiMsg( 'nuke-nopages', $username ); |
115 | 110 | } |
116 | 111 | |
117 | | - return $this->promptForm( $username ); |
| 112 | + $this->promptForm( $username ); |
| 113 | + return; |
118 | 114 | } |
119 | 115 | |
120 | 116 | if ( $username === '' ) { |
— | — | @@ -162,6 +158,9 @@ |
163 | 159 | $out->addHTML( '<ul>' ); |
164 | 160 | |
165 | 161 | foreach( $pages as $info ) { |
| 162 | + /** |
| 163 | + * @var $title title |
| 164 | + */ |
166 | 165 | list( $title, $edits, $userName ) = $info; |
167 | 166 | |
168 | 167 | $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
— | — | @@ -253,8 +252,6 @@ |
254 | 253 | $resultEdits->numRows(), |
255 | 254 | $username == '' ? $row->rc_user_text : false |
256 | 255 | ); |
257 | | - |
258 | | - $dbr->freeResult( $resultEdits ); |
259 | 256 | } |
260 | 257 | |
261 | 258 | return $pages; |