Index: trunk/extensions/Nuke/Nuke_body.php |
— | — | @@ -6,8 +6,8 @@ |
7 | 7 | parent::__construct( 'Nuke', 'nuke' ); |
8 | 8 | } |
9 | 9 | |
10 | | - public function execute( $par ){ |
11 | | - if( !$this->userCanExecute( $this->getUser() ) ){ |
| 10 | + public function execute( $par ) { |
| 11 | + if( !$this->userCanExecute( $this->getUser() ) ) { |
12 | 12 | $this->displayRestrictionError(); |
13 | 13 | return; |
14 | 14 | } |
— | — | @@ -25,12 +25,10 @@ |
26 | 26 | if ( $user ) $target = $user->getName(); |
27 | 27 | } |
28 | 28 | |
29 | | - $reason = $req->getText( |
30 | | - 'wpReason', |
31 | | - wfMsgForContent( |
32 | | - 'nuke-defaultreason', |
33 | | - $target === '' ? wfMsg( 'nuke-multiplepeople' ) : $target |
34 | | - ) |
| 29 | + $reason = $req->getText( 'wpReason', |
| 30 | + $target === '' ? |
| 31 | + wfMsgForContent( 'nuke-multiplepeople' ) : |
| 32 | + wfMsgForContent( 'nuke-defaultreason', "[[Special:Contributions/$target|$target]]" ) |
35 | 33 | ); |
36 | 34 | |
37 | 35 | if( $req->wasPosted() |
— | — | @@ -60,6 +58,8 @@ |
61 | 59 | |
62 | 60 | /** |
63 | 61 | * Prompt for a username or IP address. |
| 62 | + * |
| 63 | + * @param $userName string |
64 | 64 | */ |
65 | 65 | protected function promptForm( $userName = '' ) { |
66 | 66 | $out = $this->getOutput(); |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | Xml::tags( 'p', |
137 | 137 | null, |
138 | 138 | Xml::inputLabel( |
139 | | - wfMsg( 'deletecomment' ), 'wpReason', 'wpReason', 60, $reason |
| 139 | + wfMsg( 'deletecomment' ), 'wpReason', 'wpReason', 70, $reason |
140 | 140 | ) |
141 | 141 | ) |
142 | 142 | ); |
— | — | @@ -149,7 +149,7 @@ |
150 | 150 | $out->addHTML( |
151 | 151 | Xml::tags( 'p', |
152 | 152 | null, |
153 | | - wfMsg( 'nuke-select', $this->getLang()->commaList( $links ) ) |
| 153 | + wfMsg( 'nuke-select', $this->getLanguage()->commaList( $links ) ) |
154 | 154 | ) |
155 | 155 | ); |
156 | 156 | |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
168 | 168 | $thumb = $image && $image->exists() ? $image->transform( array( 'width' => 120, 'height' => 120 ), 0 ) : false; |
169 | 169 | |
170 | | - $changes = wfMsgExt( 'nchanges', 'parsemag', $this->getLang()->formatNum( $edits ) ); |
| 170 | + $changes = wfMsgExt( 'nchanges', 'parsemag', $this->getLanguage()->formatNum( $edits ) ); |
171 | 171 | |
172 | 172 | $out->addHTML( '<li>' . |
173 | 173 | Xml::check( 'pages[]', true, |
— | — | @@ -174,10 +174,10 @@ |
175 | 175 | ) . |
176 | 176 | ' ' . |
177 | 177 | ( $thumb ? $thumb->toHtml( array( 'desc-link' => true ) ) : '' ) . |
178 | | - $this->getSkin()->makeKnownLinkObj( $title ) . |
| 178 | + Linker::makeKnownLinkObj( $title ) . |
179 | 179 | ' (' . |
180 | 180 | ( $userName ? wfMsgExt( 'nuke-editby', 'parseinline', $userName ) . ', ' : '' ) . |
181 | | - $this->getSkin()->makeKnownLinkObj( $title, $changes, 'action=history' ) . |
| 181 | + Linker::makeKnownLinkObj( $title, $changes, 'action=history' ) . |
182 | 182 | ")</li>\n" ); |
183 | 183 | } |
184 | 184 | |
Index: trunk/extensions/Nuke/Nuke.i18n.php |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | 'nuke-list-multiple' => 'The following pages were recently created; |
24 | 24 | put in a comment and hit the button to delete them.', |
25 | 25 | 'nuke-defaultreason' => "Mass deletion of pages added by $1", |
| 26 | + 'nuke-multiplepeople'=> 'Mass deletion of recently added pages', |
26 | 27 | 'nuke-tools' => 'This tool allows for mass deletions of pages recently added by a given user or an IP address. |
27 | 28 | Input the username or IP address to get a list of pages to delete, or leave blank for all users.', |
28 | 29 | 'nuke-submit-user' => 'Go', |
— | — | @@ -30,7 +31,6 @@ |
31 | 32 | 'nuke-select' => 'Select: $1', |
32 | 33 | 'nuke-userorip' => 'Username, IP address or blank:', |
33 | 34 | 'nuke-maxpages' => 'Maximum number of pages:', |
34 | | - 'nuke-multiplepeople'=> 'multiple users', |
35 | 35 | 'nuke-editby' => 'Created by [[Special:Contributions/$1|$1]]', |
36 | 36 | 'nuke-deleted' => "Page '''$1''' has been deleted.", |
37 | 37 | 'nuke-not-deleted' => "Page [[:$1]] '''could not''' be deleted.", |
— | — | @@ -56,12 +56,11 @@ |
57 | 57 | 'nuke-desc' => 'The Nuke extension allows for sysops to delete a large number of pages ("Mass delete"). |
58 | 58 | For more information, see http://www.mediawiki.org/wiki/Extension:Nuke |
59 | 59 | {{desc}}', |
60 | | - 'nuke-defaultreason' => 'Reason for deletion in logs. Parameters: |
61 | | -* $1 is a username or {{msg-mw|nuke-multiplepeople}} in case pages by multiple users were deleted.', |
| 60 | + 'nuke-defaultreason' => 'Reason for deletion in logs. Parameters: $1 is a username or IP address, with a link to their contributions.', |
| 61 | + 'nuke-multiplepeople' => 'Reason for deletion in logs, when pages created by multiple users were deleted.', |
62 | 62 | 'nuke-submit-user' => '{{Identical|Go}}', |
63 | 63 | 'right-nuke' => '{{doc-right|nuke}}', |
64 | 64 | 'nuke-select' => '{{Identical|Select}}', |
65 | | - 'nuke-multiplepeople' => 'Substituted for $1 in {{msg-mw|nuke-defaultreason}} when pages created by multiple users were deleted.', |
66 | 65 | ); |
67 | 66 | |
68 | 67 | /** Niuean (ko e vagahau Niuē) |
Index: trunk/extensions/Nuke/Nuke.php |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | die( 'Not an entry point.' ); |
6 | 6 | } |
7 | 7 | |
8 | | -define( 'Nuke_VERSION', '1.1.2' ); |
| 8 | +define( 'Nuke_VERSION', '1.1.3' ); |
9 | 9 | |
10 | 10 | $dir = dirname(__FILE__) . '/'; |
11 | 11 | |