Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.i18n.php |
— | — | @@ -1,6 +1,12 @@ |
2 | 2 | <?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension AbsenteeLandlord. |
| 5 | + */ |
| 6 | + |
3 | 7 | $messages = array(); |
4 | | - |
| 8 | + |
| 9 | +/** English |
| 10 | + */ |
5 | 11 | $messages['en'] = array( |
6 | 12 | 'purewikideletion' => 'Pure wiki deletion', |
7 | 13 | 'randomexcludeblank' => 'Random page (exclude blank)', |
— | — | @@ -8,8 +14,8 @@ |
9 | 15 | 'purewikideletion-desc' => 'Among other things, causes blanked pages to be redlinked', |
10 | 16 | 'purewikideletion-pref-watchblank' => 'Add pages I blank to my watchlist', |
11 | 17 | '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 | | - |
| 18 | + 'purewikideletion-blanked' => "A former version of this page was blanked by [[User:$1|$1]] ([[User talk:$1|talk]]) ([[Special:Contributions/$1|contribs]]) on $5 at $6. |
| 19 | + |
14 | 20 | The reason given for blanking was: ''<nowiki>$3</nowiki>''. |
15 | 21 | |
16 | 22 | 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.", |
— | — | @@ -18,7 +24,7 @@ |
19 | 25 | 'blank-log-header' => 'Below is a list of page blankings and unblankings.', |
20 | 26 | 'blank-log-entry-blank' => 'blanked $1', |
21 | 27 | 'blank-log-entry-unblank' => 'unblanked $1', |
22 | | - 'blank-log-link' => '[[Special:Log/blank|blank log]]', |
| 28 | + 'blank-log-link' => '[[{{#Special:Log}}/blank|blank log]]', |
23 | 29 | 'purewikideletion-blanknologin' => 'Not logged in', |
24 | 30 | 'purewikideletion-blanknologintext' => 'You must be a registered user and [[Special:UserLogin|logged in]] to blank a page.', |
25 | 31 | 'purewikideletion-unblanknologintext' => 'You must be a registered user and [[Special:UserLogin|logged in]] to unblank a page.', |
— | — | @@ -37,7 +43,7 @@ |
38 | 44 | 'purewikideletion-pref-watchblank' => 'أضف الفصفحات التي أفرغها إلى قائمة مراقبتي', |
39 | 45 | 'purewikideletion-pref-watchunblank' => 'أضف الصفحات التي أملؤها إلى قائمة مراقبتي', |
40 | 46 | 'purewikideletion-blanked' => "نسخة سابقة من هذه الصفحة تم إفراغها بواسطة [[User:$1|$1]] ([[User talk:$1|نقاش]]) ([[Special:Contributions/$1|مساهمات]]) في $2 |
41 | | - |
| 47 | + |
42 | 48 | السبب المعطى للإفراغ كان: ''<nowiki>$3</nowiki>''. |
43 | 49 | |
44 | 50 | يمكنك [{{fullurl:{{FULLPAGENAMEE}}|action=history}} رؤية تاريخ المقالة], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} تعديل آخر نسخة]، |
— | — | @@ -63,7 +69,7 @@ |
64 | 70 | 'purewikideletion-pref-watchblank' => 'Дадаваць у мой сьпіс назіраньня старонкі, якія я буду ачышчаць', |
65 | 71 | 'purewikideletion-pref-watchunblank' => 'Дадаваць у мой сьпіс назіраньня старонкі, у якіх я буду адмяняць ачыстку', |
66 | 72 | 'purewikideletion-blanked' => "Папярэдняя вэрсія гэтай старонкі была ачышчаная [[User:$1|$1]] ([[User talk:$1|гутаркі]]) ([[Special:Contributions/$1|унёсак]]) $2 |
67 | | - |
| 73 | + |
68 | 74 | Пададзеная прычына ачысткі была: ''<nowiki>$3</nowiki>''. |
69 | 75 | |
70 | 76 | Вы можаце [{{fullurl:{{FULLPAGENAMEE}}|action=history}} праглядзець гісторыю старонкі], [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} рэдагаваць апошнюю вэрсію], альбо ўвесьці тэкст новай старонкі ў белае поле ніжэй.", |
— | — | @@ -211,7 +217,7 @@ |
212 | 218 | 'purewikideletion-pref-watchblank' => 'Додавај ги страниците што ги празнам во мојата листа на набљудувања', |
213 | 219 | 'purewikideletion-pref-watchunblank' => 'Додавај ги испразнетите страници што ги враќам во мојата листа на набљудувања', |
214 | 220 | 'purewikideletion-blanked' => "Претходна верзија на оваа страница беше испразнета од [[User:$1|$1]] ([[User talk:$1|разговор]]) ([[Special:Contributions/$1|придонеси]]) на $2 |
215 | | - |
| 221 | + |
216 | 222 | За испразнувањето беше наведена следнава причина: ''<nowiki>$3</nowiki>''. |
217 | 223 | |
218 | 224 | Можете да ја [{{fullurl:{{FULLPAGENAMEE}}|action=history}} погледате историјата на статијата], да ја [{{fullurl:{{FULLPAGENAMEE}}|oldid=$4&action=edit}} уредите најновата верзија], или пак да напишете нова содржина за страницата во просторот подолу.", |
Index: trunk/extensions/PureWikiDeletion/PureWikiDeletion.hooks.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | } |
10 | 10 | |
11 | 11 | class PureWikiDeletionHooks { |
12 | | - |
| 12 | + |
13 | 13 | public static function PureWikiDeletionOutputPageParserOutputHook( &$out, $parseroutput ) { |
14 | 14 | $dbr = wfGetDB( DB_SLAVE ); |
15 | 15 | $target = $out->getTitle(); |
— | — | @@ -28,11 +28,11 @@ |
29 | 29 | if ( $out->getPageTitle() == $target->getPrefixedText() ) { |
30 | 30 | $out->redirect( $target->getEditURL() ); |
31 | 31 | } |
32 | | - |
| 32 | + |
33 | 33 | $out->setPageTitle( $out->getPageTitle() ); |
34 | 34 | return true; |
35 | 35 | } |
36 | | - |
| 36 | + |
37 | 37 | public static function PureWikiDeletionSaveCompleteHook( &$article, &$user, $text, $summary, |
38 | 38 | $minoredit, &$watchthis, $sectionanchor, &$flags, $revision, &$status, $baseRevId, |
39 | 39 | &$redirect ) { |
— | — | @@ -106,8 +106,8 @@ |
107 | 107 | } |
108 | 108 | return true; |
109 | 109 | } |
110 | | - |
111 | | - |
| 110 | + |
| 111 | + |
112 | 112 | public static function PureWikiDeletionLink( $skin, $target, &$text, &$customAttribs, &$query, &$options |
113 | 113 | , &$ret ) { |
114 | 114 | global $wgPureWikiDeletionBlankLinkStyle; |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | } |
137 | 137 | return true; |
138 | 138 | } |
139 | | - |
| 139 | + |
140 | 140 | public static function PureWikiDeletionEditHook( &$editPage ) { |
141 | 141 | global $wgLang, $wgUser; |
142 | 142 | wfLoadExtensionMessages( 'PureWikiDeletion' ); |
— | — | @@ -148,13 +148,13 @@ |
149 | 149 | 'blank_summary', |
150 | 150 | 'blank_parent_id' |
151 | 151 | ); |
152 | | - |
| 152 | + |
153 | 153 | $result = $dbr->selectRow( 'blanked_page', $blank_row, array |
154 | 154 | ( 'blank_page_id' => $blank_page_id ) ); |
155 | 155 | if ( !$result ) { |
156 | 156 | return true; |
157 | 157 | } |
158 | | - |
| 158 | + |
159 | 159 | $blank_user_id = $result->blank_user_id; |
160 | 160 | if ( $blank_user_id == 0 ) { |
161 | 161 | $blank_user_name = $result->blank_user_name; |
— | — | @@ -162,21 +162,23 @@ |
163 | 163 | $blanking_user = User::newFromId( $blank_user_id ); |
164 | 164 | $blank_user_name = $blanking_user->getName(); |
165 | 165 | } |
166 | | - $html = wfMsgExt( 'purewikideletion-blanked', 'parse', array |
167 | | - ( $blank_user_name |
168 | | - , $wgLang->timeanddate( wfTimestamp( TS_MW |
169 | | - , $result->blank_timestamp ), true ) |
170 | | - , $result->blank_summary |
171 | | - , $result->blank_parent_id ) ); |
172 | | - $editPage->editFormPageTop .= $html; |
173 | | - |
| 166 | + $html = wfMsgExt( 'purewikideletion-blanked', 'parse', array( |
| 167 | + $blank_user_name, |
| 168 | + $wgLang->timeanddate( wfTimestamp( TS_MW, $result->blank_timestamp ), true ), |
| 169 | + $result->blank_summary, |
| 170 | + $result->blank_parent_id, |
| 171 | + $wgLang->date( wfTimestamp( TS_MW, $result->blank_timestamp ), true ), |
| 172 | + $wgLang->time( wfTimestamp( TS_MW, $result->blank_timestamp ), true ) |
| 173 | + ) ); |
| 174 | + $editPage->editFormPageTop .= $html; |
| 175 | + |
174 | 176 | if ($wgUser->getOption( 'watchunblank' )){ |
175 | 177 | $editPage->watchthis = true; |
176 | 178 | } |
177 | | - |
| 179 | + |
178 | 180 | return true; |
179 | 181 | } |
180 | | - |
| 182 | + |
181 | 183 | public static function PureWikiDeletionDeleteHook( &$article, &$user, $reason, $id ) |
182 | 184 | { |
183 | 185 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -190,7 +192,7 @@ |
191 | 193 | } |
192 | 194 | return true; |
193 | 195 | } |
194 | | - |
| 196 | + |
195 | 197 | public static function PureWikiDeletionUndeleteHook( $title, $create ) { |
196 | 198 | $dbr = wfGetDB( DB_SLAVE ); |
197 | 199 | $myRevision = Revision::loadFromTitle( $dbr, $title ); |
— | — | @@ -208,14 +210,14 @@ |
209 | 211 | } |
210 | 212 | return true; |
211 | 213 | } |
212 | | - |
| 214 | + |
213 | 215 | public static function efPureWikiDeletionParserFunction_Setup( $parser ) { |
214 | 216 | # Set a function hook associating the "example" magic word with our function |
215 | 217 | $parser->setFunctionHook( 'ifnotblank', 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_RenderNotBlank' ); |
216 | 218 | $parser->setFunctionHook( 'ifblank', 'PureWikiDeletionHooks::efPureWikiDeletionParserFunction_RenderBlank' ); |
217 | 219 | return true; |
218 | 220 | } |
219 | | - |
| 221 | + |
220 | 222 | public static function efPureWikiDeletionParserFunction_Magic( &$magicWords, $langCode ) { |
221 | 223 | # Add the magic word |
222 | 224 | # The first array element is whether to be case sensitive, in this case (0) it is not case |
— | — | @@ -226,15 +228,15 @@ |
227 | 229 | # unless we return true, other parser functions extensions won't get loaded. |
228 | 230 | return true; |
229 | 231 | } |
230 | | - |
| 232 | + |
231 | 233 | public static function efPureWikiDeletionParserFunction_RenderBlank( $parser, $param1 = '', $param2 = '', $param3 = '' ) { |
232 | 234 | return PureWikiDeletionHooks::evaluateBlankness ( $parser, $param1, $param2, $param3 ); |
233 | 235 | } |
234 | | - |
| 236 | + |
235 | 237 | public static function efPureWikiDeletionParserFunction_RenderNotBlank( $parser, $param1 = '', $param2 = '', $param3 = '' ) { |
236 | 238 | return PureWikiDeletionHooks::evaluateBlankness ( $parser, $param1, $param3, $param2 ); |
237 | 239 | } |
238 | | - |
| 240 | + |
239 | 241 | public static function evaluateBlankness ( $parser, $param1 = '', $param2 = '', $param3 = '' ) { |
240 | 242 | global $wgNamespaceAliases, $wgExpensiveParserFunctionLimit; |
241 | 243 | if ( $parser->incrementExpensiveFunctionCount() ) { |
— | — | @@ -262,7 +264,7 @@ |
263 | 265 | } |
264 | 266 | return false; // If too many expensive functions have been run |
265 | 267 | } |
266 | | - |
| 268 | + |
267 | 269 | public static function PureWikiDeletionCreateTable() { |
268 | 270 | global $wgExtNewTables; |
269 | 271 | $wgExtNewTables[] = array( |
— | — | @@ -270,4 +272,4 @@ |
271 | 273 | dirname( __FILE__ ) . '/purewikideletiontable.sql' ); |
272 | 274 | return true; |
273 | 275 | } |
274 | | -} |
\ No newline at end of file |
| 276 | +} |