Index: trunk/phase3/includes/specials/SpecialNuke.php |
— | — | @@ -1,160 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * @file |
5 | | - * @ingroup SpecialPage |
6 | | - * |
7 | | - * @author Brion Vibber |
8 | | - * @copyright Copyright © 2005-2008, Brion Vibber |
9 | | - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
10 | | - */ |
11 | | - |
12 | | -/** |
13 | | - * implements Special:Nuke |
14 | | - */ |
15 | | - |
16 | | -class SpecialNuke extends SpecialPage { |
17 | | - function __construct() { |
18 | | - parent::__construct( 'Nuke', 'nuke' ); |
19 | | - } |
20 | | - |
21 | | - function execute( $par ){ |
22 | | - global $wgUser, $wgRequest; |
23 | | - |
24 | | - if( !$this->userCanExecute( $wgUser ) ){ |
25 | | - $this->displayRestrictionError(); |
26 | | - return; |
27 | | - } |
28 | | - |
29 | | - $this->setHeaders(); |
30 | | - $this->outputHeader(); |
31 | | - |
32 | | - $target = $wgRequest->getText( 'target', $par ); |
33 | | - $reason = $wgRequest->getText( 'wpReason', |
34 | | - wfMsgForContent( 'nuke-defaultreason', $target ) ); |
35 | | - $posted = $wgRequest->wasPosted() && |
36 | | - $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ); |
37 | | - if( $posted ) { |
38 | | - $pages = $wgRequest->getArray( 'pages' ); |
39 | | - if( $pages ) { |
40 | | - return $this->doDelete( $pages, $reason ); |
41 | | - } |
42 | | - } |
43 | | - if( $target != '' ) { |
44 | | - $this->listForm( $target, $reason ); |
45 | | - } else { |
46 | | - $this->promptForm(); |
47 | | - } |
48 | | - } |
49 | | - |
50 | | - function promptForm() { |
51 | | - global $wgUser, $wgOut; |
52 | | - |
53 | | - $sk = $wgUser->getSkin(); |
54 | | - |
55 | | - $nuke = $this->getTitle(); |
56 | | - $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-user' ) ) ); |
57 | | - |
58 | | - $wgOut->addWikiMsg( 'nuke-tools' ); |
59 | | - $wgOut->addHTML( Xml::element( 'form', array( |
60 | | - 'action' => $nuke->getLocalURL( 'action=submit' ), |
61 | | - 'method' => 'post' ), |
62 | | - null ) . |
63 | | - Xml::element( 'input', array( |
64 | | - 'type' => 'text', |
65 | | - 'size' => 40, |
66 | | - 'name' => 'target' ) ) . |
67 | | - "\n$submit\n" ); |
68 | | - |
69 | | - $wgOut->addHTML( "</form>" ); |
70 | | - } |
71 | | - |
72 | | - function listForm( $username, $reason ) { |
73 | | - global $wgUser, $wgOut, $wgLang; |
74 | | - |
75 | | - $pages = $this->getNewPages( $username ); |
76 | | - $escapedName = wfEscapeWikiText( $username ); |
77 | | - if( count( $pages ) == 0 ) { |
78 | | - $wgOut->addWikiMsg( 'nuke-nopages', $escapedName ); |
79 | | - return $this->promptForm(); |
80 | | - } |
81 | | - $wgOut->addWikiMsg( 'nuke-list', $escapedName ); |
82 | | - |
83 | | - $nuke = $this->getTitle(); |
84 | | - $submit = Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsgHtml( 'nuke-submit-delete' ) ) ); |
85 | | - |
86 | | - $wgOut->addHTML( Xml::element( 'form', array( |
87 | | - 'action' => $nuke->getLocalURL( 'action=delete' ), |
88 | | - 'method' => 'post' ), |
89 | | - null ) . |
90 | | - "\n<div>" . |
91 | | - wfMsgHtml( 'deletecomment' ) . ' ' . |
92 | | - Xml::element( 'input', array( |
93 | | - 'name' => 'wpReason', |
94 | | - 'value' => $reason, |
95 | | - 'size' => 60 ) ) . |
96 | | - "</div><br />" . |
97 | | - $submit . |
98 | | - Xml::element( 'input', array( |
99 | | - 'type' => 'hidden', |
100 | | - 'name' => 'wpEditToken', |
101 | | - 'value' => $wgUser->editToken() ) ) . |
102 | | - "\n<ul>\n" ); |
103 | | - |
104 | | - $sk = $wgUser->getSkin(); |
105 | | - foreach( $pages as $info ) { |
106 | | - list( $title, $edits ) = $info; |
107 | | - $image = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
108 | | - $thumb = $image && $image->exists() ? $image->getThumbnail( 120, 120 ) : false; |
109 | | - |
110 | | - $wgOut->addHTML( '<li>' . |
111 | | - Xml::element( 'input', array( |
112 | | - 'type' => 'checkbox', |
113 | | - 'name' => "pages[]", |
114 | | - 'value' => $title->getPrefixedDbKey(), |
115 | | - 'checked' => 'checked' ) ) . |
116 | | - ' ' . |
117 | | - ( $thumb ? $thumb->toHtml( array( 'desc-link' => true ) ) : '' ) . |
118 | | - $sk->makeKnownLinkObj( $title ) . |
119 | | - ' (' . |
120 | | - $sk->makeKnownLinkObj( $title, wfMsgExt( 'nchanges', array( 'parsemag' ), $wgLang->formatNum( $edits ) ), 'action=history' ) . |
121 | | - ")</li>\n" ); |
122 | | - } |
123 | | - $wgOut->addHTML( "</ul>\n$submit</form>" ); |
124 | | - } |
125 | | - |
126 | | - function getNewPages( $username ) { |
127 | | - $dbr = wfGetDB( DB_SLAVE ); |
128 | | - $result = $dbr->select( 'recentchanges', |
129 | | - array( 'rc_namespace', 'rc_title', 'rc_timestamp', 'COUNT(*) AS edits' ), |
130 | | - array( |
131 | | - 'rc_user_text' => $username, |
132 | | - '(rc_new = 1) OR (rc_log_type = "upload" AND rc_log_action = "upload")' |
133 | | - ), |
134 | | - __METHOD__, |
135 | | - array( |
136 | | - 'ORDER BY' => 'rc_timestamp DESC', |
137 | | - 'GROUP BY' => 'rc_namespace, rc_title' |
138 | | - ) |
139 | | - ); |
140 | | - $pages = array(); |
141 | | - while( $row = $result->fetchObject() ) { |
142 | | - $pages[] = array( Title::makeTitle( $row->rc_namespace, $row->rc_title ), $row->edits ); |
143 | | - } |
144 | | - $result->free(); |
145 | | - return $pages; |
146 | | - } |
147 | | - |
148 | | - function doDelete( $pages, $reason ) { |
149 | | - foreach( $pages as $page ) { |
150 | | - $title = Title::newFromUrl( $page ); |
151 | | - $file = $title->getNamespace() == NS_IMAGE ? wfLocalFile( $title ) : false; |
152 | | - if ( $file ) { |
153 | | - $oldimage = null; // Must be passed by reference |
154 | | - FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, false ); |
155 | | - } else { |
156 | | - $article = new Article( $title ); |
157 | | - $article->doDelete( $reason ); |
158 | | - } |
159 | | - } |
160 | | - } |
161 | | -} |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1186,8 +1186,6 @@ |
1187 | 1187 | $wgGroupPermissions['sysop']['apihighlimits'] = true; |
1188 | 1188 | $wgGroupPermissions['sysop']['browsearchive'] = true; |
1189 | 1189 | $wgGroupPermissions['sysop']['noratelimit'] = true; |
1190 | | -$wgGroupPermissions['sysop']['nuke'] = true; |
1191 | | - |
1192 | 1190 | #$wgGroupPermissions['sysop']['mergehistory'] = true; |
1193 | 1191 | |
1194 | 1192 | // Permission to change users' group assignments |
— | — | @@ -2862,7 +2860,6 @@ |
2863 | 2861 | 'Export' => 'pagetools', |
2864 | 2862 | 'Import' => 'pagetools', |
2865 | 2863 | 'Whatlinkshere' => 'pagetools', |
2866 | | - 'Nuke' => 'pagetools', |
2867 | 2864 | |
2868 | 2865 | 'Statistics' => 'wiki', |
2869 | 2866 | 'Version' => 'wiki', |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -164,7 +164,6 @@ |
165 | 165 | 'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ), |
166 | 166 | 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ), |
167 | 167 | 'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ), |
168 | | - 'Nuke' => 'SpecialNuke', |
169 | 168 | ); |
170 | 169 | |
171 | 170 | static public $mAliases; |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -478,7 +478,6 @@ |
479 | 479 | 'SpecialBookSources' => 'includes/specials/SpecialBooksources.php', |
480 | 480 | 'SpecialListGroupRights' => 'includes/specials/SpecialListgrouprights.php', |
481 | 481 | 'SpecialMostlinkedtemplates' => 'includes/specials/SpecialMostlinkedtemplates.php', |
482 | | - 'SpecialNuke' => 'includes/specials/SpecialNuke.php', |
483 | 482 | 'SpecialPrefixindex' => 'includes/specials/SpecialPrefixindex.php', |
484 | 483 | 'SpecialRandomredirect' => 'includes/specials/SpecialRandomredirect.php', |
485 | 484 | 'SpecialRecentchanges' => 'includes/specials/SpecialRecentchanges.php', |
Index: trunk/phase3/languages/messages/MessagesHe.php |
— | — | @@ -286,7 +286,6 @@ |
287 | 287 | 'Blankpage' => array( 'דף_ריק' ), |
288 | 288 | 'LinkSearch' => array( 'חיפוש_קישורים_חיצוניים' ), |
289 | 289 | 'DeletedContributions' => array( 'תרומות_מחוקות' ), |
290 | | - 'Nuke' => array( 'מחיקה_מרובה' ), |
291 | 290 | ); |
292 | 291 | |
293 | 292 | $namespaceNames = array( |
Index: trunk/phase3/languages/messages/MessagesAr.php |
— | — | @@ -370,7 +370,6 @@ |
371 | 371 | 'Blankpage' => array( 'صفحة_فارغة' ), |
372 | 372 | 'LinkSearch' => array( 'بحث_الوصلات' ), |
373 | 373 | 'DeletedContributions' => array( 'مساهمات_محذوفة' ), |
374 | | - 'Nuke' => array( 'حذف_كمي' ), |
375 | 374 | ); |
376 | 375 | |
377 | 376 | $imageFiles = array( |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -442,7 +442,6 @@ |
443 | 443 | 'Blankpage' => array( 'BlankPage' ), |
444 | 444 | 'LinkSearch' => array( 'LinkSearch' ), |
445 | 445 | 'DeletedContributions' => array( 'DeletedContributions' ), |
446 | | - 'Nuke' => array( 'Nuke' ), |
447 | 446 | ); |
448 | 447 | |
449 | 448 | /** |
— | — | @@ -3723,16 +3722,4 @@ |
3724 | 3723 | |
3725 | 3724 | #Put all regex fragments above this line. Leave this line exactly as it is</pre>', |
3726 | 3725 | |
3727 | | -# Special:Nuke |
3728 | | -'nuke' => 'Mass delete', |
3729 | | -'nuke-nopages' => 'No new pages by [[Special:Contributions/$1|$1]] in recent changes.', |
3730 | | -'nuke-list' => 'The following pages were recently created by [[Special:Contributions/$1|$1]]; |
3731 | | -put in a comment and hit the button to delete them.', |
3732 | | -'nuke-defaultreason' => 'Mass removal of pages added by $1', |
3733 | | -'nuke-tools' => 'This tool allows for mass deletions of pages recently added by a given user or IP. |
3734 | | -Input the username or IP to get a list of pages to delete.', |
3735 | | -'nuke-submit-user' => 'Go', |
3736 | | -'nuke-submit-delete' => 'Delete selected', |
3737 | | -'right-nuke' => 'Mass delete pages', |
3738 | | - |
3739 | 3726 | ); |
Index: trunk/phase3/languages/messages/MessagesArz.php |
— | — | @@ -267,7 +267,6 @@ |
268 | 268 | 'Blankpage' => array( 'صفحة_فارغة' ), |
269 | 269 | 'LinkSearch' => array( 'بحث_الوصلات' ), |
270 | 270 | 'DeletedContributions' => array( 'مساهمات_محذوفة' ), |
271 | | - 'Nuke' => array( 'حذف_كمى' ), |
272 | 271 | ); |
273 | 272 | |
274 | 273 | $messages = array( |
Index: trunk/phase3/languages/messages/MessagesNo.php |
— | — | @@ -163,7 +163,6 @@ |
164 | 164 | 'Blankpage' => array( 'Blank side' ), |
165 | 165 | 'LinkSearch' => array( 'Lenkesøk' ), |
166 | 166 | 'DeletedContributions' => array( 'Slettede bidrag' ), |
167 | | - 'Nuke' => array( 'Massesletting' ), |
168 | 167 | ); |
169 | 168 | |
170 | 169 | $messages = array( |
Index: trunk/phase3/languages/messages/MessagesNl.php |
— | — | @@ -282,7 +282,6 @@ |
283 | 283 | 'ListUserRestrictions' => array( 'Gebruikersbeperkingen' ), |
284 | 284 | 'RemoveRestrictions' => array( 'BeperkingenVerwijderen' ), |
285 | 285 | 'RestrictUser' => array( 'GebruikerBeperken' ), |
286 | | - 'Nuke' => array( 'MassaalVerwijderen' ), |
287 | 286 | ); |
288 | 287 | |
289 | 288 | $linkTrail = '/^([a-zäöüïëéèà]+)(.*)$/sDu'; |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -158,7 +158,6 @@ |
159 | 159 | 'Blankpage' => array( 'Leerseite' ), |
160 | 160 | 'LinkSearch' => array( 'Weblink-Suche' ), |
161 | 161 | 'DeletedContributions' => array( 'Gelöschte Beiträge' ), |
162 | | - 'Nuke' => array( 'Massenlöschung' ), |
163 | 162 | ); |
164 | 163 | |
165 | 164 | $datePreferences = array( |
Index: trunk/phase3/languages/messages/MessagesNds_nl.php |
— | — | @@ -251,7 +251,6 @@ |
252 | 252 | 'Withoutinterwiki' => array( 'Gien_interwiki' ), |
253 | 253 | 'LinkSearch' => array( 'Verwiezingen_zeuken' ), |
254 | 254 | 'DeletedContributions' => array( 'Vort-ehaolen gebrukersbiedragen' ), |
255 | | - 'Nuke' => array( 'Massaal_vortdoon' ), |
256 | 255 | ); |
257 | 256 | |
258 | 257 | $linkTrail = '/^([a-zäöüïëéèà]+)(.*)$/sDu'; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -59,7 +59,6 @@ |
60 | 60 | * Special:LinkSearch to search for external links (was extension LinkSearch) |
61 | 61 | * RenderHash |
62 | 62 | * NoMoveUserPages |
63 | | -* Special:Nuke to mass delete all pages created by a user |
64 | 63 | * Poem (patch by Nathaniel Herman) |
65 | 64 | * UniversalEditButton |
66 | 65 | |
Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2810,16 +2810,6 @@ |
2811 | 2811 | 'external_images' => array( |
2812 | 2812 | 'external_image_whitelist', |
2813 | 2813 | ), |
2814 | | - 'special-nuke' => array( |
2815 | | - 'nuke', |
2816 | | - 'nuke-nopages', |
2817 | | - 'nuke-list', |
2818 | | - 'nuke-defaultreason', |
2819 | | - 'nuke-tools', |
2820 | | - 'nuke-submit-user', |
2821 | | - 'nuke-submit-delete', |
2822 | | - 'right-nuke', |
2823 | | - ), |
2824 | 2814 | ); |
2825 | 2815 | |
2826 | 2816 | /** Comments for each block */ |
— | — | @@ -3015,7 +3005,6 @@ |
3016 | 3006 | 'special-specialpages' => 'Special:SpecialPages', |
3017 | 3007 | 'special-blank' => 'Special:BlankPage', |
3018 | 3008 | 'external_images' => 'External image whitelist', |
3019 | | - 'special-nuke' => 'Special:Nuke', |
3020 | 3009 | ); |
3021 | 3010 | |
3022 | 3011 | /** Short comments for standalone messages */ |