Index: trunk/extensions/Nuke/SpecialNuke_body.php |
— | — | @@ -94,6 +94,9 @@ |
95 | 95 | $sk =& $wgUser->getSkin(); |
96 | 96 | foreach( $pages as $info ) { |
97 | 97 | list( $title, $edits ) = $info; |
| 98 | + $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
| 99 | + $thumb = $image ? $image->getThumbnail( 120, 120 ) : false; |
| 100 | + |
98 | 101 | $wgOut->addHTML( '<li>' . |
99 | 102 | Xml::element( 'input', array( |
100 | 103 | 'type' => 'checkbox', |
— | — | @@ -101,6 +104,7 @@ |
102 | 105 | 'value' => $title->getPrefixedDbKey(), |
103 | 106 | 'checked' => 'checked' ) ) . |
104 | 107 | ' ' . |
| 108 | + ( $thumb ? $thumb->toHtml( array( 'desc-link' => true ) ) : '' ) . |
105 | 109 | $sk->makeKnownLinkObj( $title ) . |
106 | 110 | ' (' . |
107 | 111 | $sk->makeKnownLinkObj( $title, wfMsgExt( 'nchanges', array( 'parsemag' ), $wgLang->formatNum( $edits ) ), 'action=history' ) . |
— | — | @@ -133,8 +137,14 @@ |
134 | 138 | function doDelete( $pages, $reason ) { |
135 | 139 | foreach( $pages as $page ) { |
136 | 140 | $title = Title::newFromUrl( $page ); |
137 | | - $article = new Article( $title ); |
138 | | - $article->doDelete( $reason ); |
| 141 | + $file = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
| 142 | + if ( $file ) { |
| 143 | + $oldimage = null; // Must be passed by reference |
| 144 | + FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, false ); |
| 145 | + } else { |
| 146 | + $article = new Article( $title ); |
| 147 | + $article->doDelete( $reason ); |
| 148 | + } |
139 | 149 | } |
140 | 150 | } |
141 | 151 | } |