Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.alias.php |
— | — | @@ -4,9 +4,12 @@ |
5 | 5 | /** English */ |
6 | 6 | $aliases['en'] = array( |
7 | 7 | 'PureWikiDeletion' => array( 'PureWikiDeletion' ), |
| 8 | + 'RandomExcludeBlank' => array( 'RandomExcludeBlank' ), |
| 9 | + 'PopulateBlankedPagesTable' => array( 'PopulateBlankedPagesTable' ), |
8 | 10 | ); |
9 | 11 | |
10 | 12 | /** Arabic */ |
11 | 13 | $aliases['ar'] = array( |
12 | 14 | 'PureWikiDeletion' => array( 'حذف_الويكي_النقي' ), |
13 | | -); |
\ No newline at end of file |
| 15 | +); |
| 16 | + |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.i18n.php |
— | — | @@ -1,50 +1,51 @@ |
2 | | -<source lang="php"> |
3 | 2 | <?php |
4 | 3 | $messages = array(); |
5 | 4 | |
6 | 5 | $messages['en'] = array( |
7 | 6 | 'purewikideletion' => 'Pure wiki deletion', |
8 | | - 'randomexcludeblank' => 'Random page (exclude blank)', |
9 | | - 'populateblankedpagestable' => 'Populate blanked pages table', |
10 | | - 'purewikideletion-desc' => 'Among other things, causes blanked pages to be redlinked', |
11 | | - 'purewikideletion-pref-watchblank' => 'Add pages I blank to my watchlist', |
12 | | - 'purewikideletion-pref-watchunblank' => 'Add pages I unblank to my watchlist', |
13 | | - 'purewikideletion-blanked' => "A former version of this page was blanked by [[User:$1|$1]] ([[User talk:$1|talk]]) " |
14 | | - . "([[Special:Contributions/$1|contribs]]) on $2 <br /> The reason given for blanking was: " |
15 | | - . "''<nowiki>$3</nowiki>''.<br /> You may [{{fullurl:{{FULLPAGENAMEE}}|action=history}} view the article's " |
16 | | - . "history], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} edit the last version], or type new " |
17 | | - . "page into the white space below.", |
18 | | - 'blank-log' => 'blank', |
19 | | - 'blank-log-name' => 'Blank log', |
20 | | - 'blank-log-header' => 'Below is a list of page blankings and unblankings.', |
21 | | - 'blank-log-entry-blank' => 'blanked $1', |
22 | | - 'blank-log-entry-unblank' => 'unblanked $1', |
23 | | - 'blank-log-link' => '[[Special:Log/blank|blank log]]', |
24 | | - 'blanknologin' => 'Not logged in', |
25 | | - 'blanknologintext' => 'You must be a registered user and ' |
26 | | - . '[[Special:UserLogin|logged in]] to blank a page.', |
27 | | - 'unblanknologintext' => 'You must be a registered user and ' |
28 | | - . '[[Special:UserLogin|logged in]] to unblank a page.', |
29 | | - 'blankedtext' => '[[$1]] has been blanked. See $2 for a record of recent blankings.' |
| 7 | + 'randomexcludeblank' => 'Random page (exclude blank)', |
| 8 | + 'populateblankedpagestable' => 'Populate blanked pages table', |
| 9 | + 'purewikideletion-desc' => 'Among other things, causes blanked pages to be redlinked', |
| 10 | + 'purewikideletion-pref-watchblank' => 'Add pages I blank to my watchlist', |
| 11 | + 'purewikideletion-pref-watchunblank' => 'Add pages I unblank to my watchlist', |
| 12 | + 'purewikideletion-blanked' => "A former version of this page was blanked by [[User:$1|$1]] ([[User talk:$1|talk]]) ([[Special:Contributions/$1|contribs]]) on $2 |
| 13 | + |
| 14 | +The reason given for blanking was: ''<nowiki>$3</nowiki>''. |
| 15 | + |
| 16 | +You may [{{fullurl:{{FULLPAGENAMEE}}|action=history}} view the article's history], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} edit the last version], or type new page into the white space below.", |
| 17 | + 'blank-log' => 'blank', |
| 18 | + 'blank-log-name' => 'Blank log', |
| 19 | + 'blank-log-header' => 'Below is a list of page blankings and unblankings.', |
| 20 | + 'blank-log-entry-blank' => 'blanked $1', |
| 21 | + 'blank-log-entry-unblank' => 'unblanked $1', |
| 22 | + 'blank-log-link' => '[[Special:Log/blank|blank log]]', |
| 23 | + 'purewikideletion-blanknologin' => 'Not logged in', |
| 24 | + 'purewikideletion-blanknologintext' => 'You must be a registered user and [[Special:UserLogin|logged in]] to blank a page.', |
| 25 | + 'purewikideletion-unblanknologintext' => 'You must be a registered user and [[Special:UserLogin|logged in]] to unblank a page.', |
| 26 | + 'purewikideletion-blankedtext' => '[[$1]] has been blanked. |
| 27 | +See $2 for a record of recent blankings.', |
| 28 | + 'purewikideletion-population-done' => 'Done populating blanked_page table.', |
| 29 | + 'right-purewikideletion' => '[[Special:PopulateBlankedPagesTable|Populate]] the blanked pages table', |
30 | 30 | ); |
31 | 31 | |
32 | 32 | $messages['ar'] = array( |
33 | 33 | 'purewikideletion' => 'حذف الويكي النقي', |
34 | | - 'randomexcludeblank' => 'صفحة عشوائية (لا يشمل ذلك الفارغة)', |
35 | | - 'populateblankedpagestable' => 'املأ جدول الصفحات الفارغة', |
36 | | - 'purewikideletion-desc' => 'من ضمن أشياء أخرى، يؤدي إلى أن تكون الصفحات الفارغة ذات وصلات حمراء', |
37 | | - 'purewikideletion-pref-watchblank' => 'أضف الفصفحات التي أفرغها إلى قائمة مراقبتي', |
38 | | - 'purewikideletion-pref-watchunblank' => 'أضف الصفحات التي أملؤها إلى قائمة مراقبتي', |
39 | | - 'purewikideletion-blanked' => "نسخة سابقة من هذه الصفحة تم إفراغها بواسطة [[User:$1|$1]] ([[User talk:$1|نقاش]]) " |
40 | | - . "([[Special:Contributions/$1|مساهمات]]) في $2 <br /> السبب المعطى للإفراغ كان: " |
41 | | - . "''<nowiki>$3</nowiki>''.<br /> يمكنك [{{fullurl:{{FULLPAGENAMEE}}|action=history}} رؤية تاريخ المقالة " |
42 | | - . "], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} تعديل آخر نسخة]، أو كتابة صفحة جديدة في الفراغ الأبيض بالأسفل.", |
43 | | - 'blank-log' => 'فارغة', |
44 | | - 'blank-log-name' => 'سجل الإفراغ', |
45 | | - 'blank-log-header' => 'بالأسفل قائمة بعمليات إفراغ وملأ الصفحات.', |
46 | | - 'blank-log-entry-blank' => 'أفرغ $1', |
47 | | - 'blank-log-entry-unblank' => 'ملأ $1', |
48 | | - 'blanknologin' => 'غير مسجل الدخول', |
49 | | - 'blanknologintext' => 'يجب أن تكون مستخدما مسجلا و ' |
50 | | - . '[[Special:UserLogin|تسجل الدخول]] لإفراغ أو ملأ صفحة.' |
51 | | -); |
\ No newline at end of file |
| 34 | + 'randomexcludeblank' => 'صفحة عشوائية (لا يشمل ذلك الفارغة)', |
| 35 | + 'populateblankedpagestable' => 'املأ جدول الصفحات الفارغة', |
| 36 | + 'purewikideletion-desc' => 'من ضمن أشياء أخرى، يؤدي إلى أن تكون الصفحات الفارغة ذات وصلات حمراء', |
| 37 | + 'purewikideletion-pref-watchblank' => 'أضف الفصفحات التي أفرغها إلى قائمة مراقبتي', |
| 38 | + 'purewikideletion-pref-watchunblank' => 'أضف الصفحات التي أملؤها إلى قائمة مراقبتي', |
| 39 | + 'purewikideletion-blanked' => "نسخة سابقة من هذه الصفحة تم إفراغها بواسطة [[User:$1|$1]] ([[User talk:$1|نقاش]]) ([[Special:Contributions/$1|مساهمات]]) في $2 |
| 40 | + |
| 41 | +السبب المعطى للإفراغ كان: ''<nowiki>$3</nowiki>''. |
| 42 | + |
| 43 | +يمكنك [{{fullurl:{{FULLPAGENAMEE}}|action=history}} رؤية تاريخ المقالة], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} تعديل آخر نسخة]، |
| 44 | +أو كتابة صفحة جديدة في الفراغ الأبيض بالأسفل.", |
| 45 | + 'blank-log' => 'فارغة', |
| 46 | + 'blank-log-name' => 'سجل الإفراغ', |
| 47 | + 'blank-log-header' => 'بالأسفل قائمة بعمليات إفراغ وملأ الصفحات.', |
| 48 | + 'blank-log-entry-blank' => 'أفرغ $1', |
| 49 | + 'blank-log-entry-unblank' => 'ملأ $1', |
| 50 | + 'purewikideletion-blanknologin' => 'غير مسجل الدخول', |
| 51 | + 'purewikideletion-blanknologintext' => 'يجب أن تكون مستخدما مسجلا و [[Special:UserLogin|تسجل الدخول]] لإفراغ أو ملأ صفحة.', |
| 52 | +); |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.php |
— | — | @@ -26,11 +26,12 @@ |
27 | 27 | } |
28 | 28 | |
29 | 29 | $wgExtensionCredits['specialpage'][] = array( |
| 30 | + 'path' => __FILE__, |
30 | 31 | 'name' => 'Pure wiki deletion', |
31 | 32 | 'author' => 'Tisane', |
32 | 33 | 'url' => 'http://www.mediawiki.org/wiki/Extension:PureWikiDeletion', |
33 | 34 | 'description' => 'Implements pure wiki deletion', |
34 | | - 'descriptionmsg' => 'PureWikiDeletion-desc', |
| 35 | + 'descriptionmsg' => 'purewikideletion-desc', |
35 | 36 | 'version' => '1.0.3', |
36 | 37 | ); |
37 | 38 | |
— | — | @@ -71,7 +72,12 @@ |
72 | 73 | $wgSpecialPages['RandomExcludeBlank'] = 'RandomExcludeBlank'; |
73 | 74 | $wgSpecialPages['AllPagesExcludeBlank'] = 'AllPagesExcludeBlank'; |
74 | 75 | $wgSpecialPages['PopulateBlankedPagesTable'] = 'PopulateBlankedPagesTable'; |
| 76 | +$wgSpecialPageGroups['RandomExcludeBlank'] = 'redirects'; |
| 77 | +$wgSpecialPageGroups['AllPagesExcludeBlank'] = 'pages'; |
| 78 | +$wgSpecialPageGroups['PopulateBlankedPagesTable'] = 'wiki'; |
75 | 79 | |
| 80 | +# User right to execute Special:PopulateBlankedPagesTable |
| 81 | +$wgAvailableRights[] = 'purewikideletion'; |
76 | 82 | $wgGroupPermissions['bureaucrat']['purewikideletion'] = true; |
77 | 83 | |
78 | 84 | function wfPureWikiDeletion() { |
— | — | @@ -93,7 +99,7 @@ |
94 | 100 | global $wgOut, $wgPureWikiDeletionLoginRequiredToBlank, $wgPureWikiDeletionLoginRequiredToUnblank; |
95 | 101 | if ( $text == "" ) { |
96 | 102 | if ( $wgPureWikiDeletionLoginRequiredToBlank && !( $user->isLoggedIn() ) ) { |
97 | | - $wgOut->showErrorPage( 'blanknologin', 'blanknologintext' ); |
| 103 | + $wgOut->showErrorPage( 'purewikideletion-blanknologin', 'purewikideletion-blanknologintext' ); |
98 | 104 | return false; |
99 | 105 | } |
100 | 106 | if ( $summary == wfMsgForContent( 'autosumm-blank' ) ) { |
— | — | @@ -107,7 +113,7 @@ |
108 | 114 | , array( "blank_page_id" => $blank_page_id ) ); |
109 | 115 | if ( $result ) { |
110 | 116 | if ( $wgPureWikiDeletionLoginRequiredToUnblank && !( $user->isLoggedIn() ) ) { |
111 | | - $wgOut->showErrorPage( 'blanknologin', 'unblanknologintext' ); |
| 117 | + $wgOut->showErrorPage( 'purewikideletion-blanknologin', 'purewikideletion-blanknologintext' ); |
112 | 118 | return false; |
113 | 119 | } |
114 | 120 | if ( $summary == '' ) { |
— | — | @@ -148,6 +154,6 @@ |
149 | 155 | if ( !$result ) { |
150 | 156 | return true; |
151 | 157 | } |
152 | | - $wgOut->showErrorPage( 'blanknologin', 'unblanknologintext' ); |
| 158 | + $wgOut->showErrorPage( 'purewikideletion-blanknologin', 'purewikideletion-unblanknologintext' ); |
153 | 159 | return false; |
154 | 160 | } |
\ No newline at end of file |
Index: trunk/extensions/PureWikiDeletion/purewikideletiontable.sql |
— | — | @@ -1,6 +1,4 @@ |
2 | | -BEGIN; |
3 | | - |
4 | | -CREATE TABLE blanked_page( |
| 2 | +CREATE TABLE /*_*/blanked_page ( |
5 | 3 | blank_id int NOT NULL AUTO_INCREMENT, |
6 | 4 | blank_page_id int UNSIGNED NOT NULL, |
7 | 5 | blank_user_id int UNSIGNED NOT NULL, |
— | — | @@ -9,13 +7,10 @@ |
10 | 8 | blank_summary varchar(256), |
11 | 9 | blank_parent_id int UNSIGNED, |
12 | 10 | PRIMARY KEY (blank_id) |
13 | | -); |
| 11 | +) /*$wgDBTableOptions*/; |
14 | 12 | |
15 | | -CREATE INDEX blank_id ON blanked_page (blank_id); |
16 | | -CREATE INDEX blank_page_id ON blanked_page (blank_page_id); |
17 | | -CREATE INDEX blank_user_id ON blanked_page (blank_user_id); |
18 | | -CREATE INDEX blank_user_name ON blanked_page (blank_user_name); |
19 | | -CREATE INDEX blank_timestamp ON blanked_page (blank_timestamp); |
20 | | - |
21 | | -COMMIT; |
22 | | -</source> |
\ No newline at end of file |
| 13 | +CREATE INDEX blank_id ON /*_*/blanked_page (blank_id); |
| 14 | +CREATE INDEX blank_page_id ON /*_*/blanked_page (blank_page_id); |
| 15 | +CREATE INDEX blank_user_id ON /*_*/blanked_page (blank_user_id); |
| 16 | +CREATE INDEX blank_user_name ON /*_*/blanked_page (blank_user_name); |
| 17 | +CREATE INDEX blank_timestamp ON /*_*/blanked_page (blank_timestamp); |
\ No newline at end of file |
Index: trunk/extensions/PureWikiDeletion/SpecialPureWikiDeletion.php |
— | — | @@ -565,7 +565,7 @@ |
566 | 566 | class PopulateBlankedPagesTable extends SpecialPage { |
567 | 567 | function __construct() { |
568 | 568 | parent::__construct( 'PopulateBlankedPagesTable','purewikideletion' ); |
569 | | - wfLoadExtensionMessages('PopulateBlankedPagesTable'); |
| 569 | + wfLoadExtensionMessages( 'PureWikiDeletion' ); |
570 | 570 | } |
571 | 571 | |
572 | 572 | function execute( $par ) { |
— | — | @@ -622,7 +622,7 @@ |
623 | 623 | } |
624 | 624 | |
625 | 625 | } |
626 | | - $output="Done populating blanked_page table."; |
| 626 | + $output = wfMsg( 'purewikideletion-population-done' ); |
627 | 627 | $wgOut->addWikiText($output); |
628 | 628 | } |
629 | 629 | } |
\ No newline at end of file |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.hooks.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); |
78 | 78 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
79 | 79 | $loglink = wfMsg( 'blank-log-link' ); |
80 | | - $wgOut->addWikiMsg( 'blankedtext', $mTitle->getPrefixedText(), $loglink ); |
| 80 | + $wgOut->addWikiMsg( 'purewikideletion-blankedtext', $mTitle->getPrefixedText(), $loglink ); |
81 | 81 | $wgOut->returnToMain( false ); |
82 | 82 | } else { |
83 | 83 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -834,6 +834,9 @@ |
835 | 835 | PSI NoTocNum |
836 | 836 | magicfile = PSINoTocNum/PSINoTocNum.i18n.magic.php |
837 | 837 | |
| 838 | +Pure Wiki Deletion |
| 839 | +aliasfile = PureWikiDeletion/PureWikiDeletion.alias.php |
| 840 | + |
838 | 841 | Purge |
839 | 842 | |
840 | 843 | Purge Cache |