Index: trunk/extensions/Gadgets/Gadgets_body.php |
— | — | @@ -2,7 +2,6 @@ |
3 | 3 | /** |
4 | 4 | * Gadgets extension - lets users select custom javascript gadgets |
5 | 5 | * |
6 | | - * |
7 | 6 | * For more info see http://mediawiki.org/wiki/Extension:Gadgets |
8 | 7 | * |
9 | 8 | * @file |
— | — | @@ -13,7 +12,6 @@ |
14 | 13 | */ |
15 | 14 | |
16 | 15 | class GadgetHooks { |
17 | | - |
18 | 16 | /** |
19 | 17 | * ArticleSaveComplete hook handler. |
20 | 18 | * |
— | — | @@ -22,9 +20,9 @@ |
23 | 21 | * @param $text String: New page text |
24 | 22 | */ |
25 | 23 | public static function articleSaveComplete( $article, $user, $text ) { |
26 | | - //update cache if MediaWiki:Gadgets-definition was edited |
| 24 | + // update cache if MediaWiki:Gadgets-definition was edited |
27 | 25 | $title = $article->mTitle; |
28 | | - if( $title->getNamespace() == NS_MEDIAWIKI && $title->getText() == 'Gadgets-definition' ) { |
| 26 | + if ( $title->getNamespace() == NS_MEDIAWIKI && $title->getText() == 'Gadgets-definition' ) { |
29 | 27 | Gadget::loadStructuredList( $text ); |
30 | 28 | } |
31 | 29 | return true; |
— | — | @@ -36,15 +34,16 @@ |
37 | 35 | */ |
38 | 36 | public static function userGetDefaultOptions( &$defaultOptions ) { |
39 | 37 | $gadgets = Gadget::loadStructuredList(); |
40 | | - if (!$gadgets) return true; |
| 38 | + if ( !$gadgets ) return true; |
41 | 39 | |
42 | | - foreach( $gadgets as $section => $thisSection ) { |
43 | | - foreach( $thisSection as $gadgetId => $gadget ) { |
| 40 | + foreach ( $gadgets as $section => $thisSection ) { |
| 41 | + foreach ( $thisSection as $gadgetId => $gadget ) { |
44 | 42 | if ( $gadget->isOnByDefault() ) { |
45 | 43 | $defaultOptions['gadget-' . $gadgetId] = 1; |
46 | 44 | } |
47 | 45 | } |
48 | 46 | } |
| 47 | + |
49 | 48 | return true; |
50 | 49 | } |
51 | 50 | |
— | — | @@ -55,13 +54,17 @@ |
56 | 55 | */ |
57 | 56 | public static function getPreferences( $user, &$preferences ) { |
58 | 57 | $gadgets = Gadget::loadStructuredList(); |
59 | | - if (!$gadgets) return true; |
60 | 58 | |
| 59 | + if ( !$gadgets ) { |
| 60 | + return true; |
| 61 | + } |
| 62 | + |
61 | 63 | $options = array(); |
62 | 64 | $default = array(); |
63 | | - foreach( $gadgets as $section => $thisSection ) { |
| 65 | + foreach ( $gadgets as $section => $thisSection ) { |
64 | 66 | $available = array(); |
65 | | - foreach( $thisSection as $gadget ) { |
| 67 | + |
| 68 | + foreach ( $thisSection as $gadget ) { |
66 | 69 | if ( $gadget->isAllowed( $user ) ) { |
67 | 70 | $gname = $gadget->getName(); |
68 | 71 | $available[$gadget->getDescription()] = $gname; |
— | — | @@ -70,8 +73,10 @@ |
71 | 74 | } |
72 | 75 | } |
73 | 76 | } |
| 77 | + |
74 | 78 | if ( $section !== '' ) { |
75 | 79 | $section = wfMsgExt( "gadget-section-$section", 'parseinline' ); |
| 80 | + |
76 | 81 | if ( count ( $available ) ) { |
77 | 82 | $options[$section] = $available; |
78 | 83 | } |
— | — | @@ -111,9 +116,11 @@ |
112 | 117 | */ |
113 | 118 | public static function registerModules( &$resourceLoader ) { |
114 | 119 | $gadgets = Gadget::loadList(); |
| 120 | + |
115 | 121 | if ( !$gadgets ) { |
116 | 122 | return true; |
117 | 123 | } |
| 124 | + |
118 | 125 | foreach ( $gadgets as $g ) { |
119 | 126 | $module = $g->getModule(); |
120 | 127 | if ( $module ) { |
— | — | @@ -121,6 +128,7 @@ |
122 | 129 | } |
123 | 130 | } |
124 | 131 | return true; |
| 132 | + |
125 | 133 | } |
126 | 134 | |
127 | 135 | /** |
— | — | @@ -147,6 +155,7 @@ |
148 | 156 | if ( $gadget->hasModule() ) { |
149 | 157 | $out->addModules( $gadget->getModuleName() ); |
150 | 158 | } |
| 159 | + |
151 | 160 | foreach ( $gadget->getLegacyScripts() as $page ) { |
152 | 161 | $lb->add( NS_MEDIAWIKI, $page ); |
153 | 162 | $pages[] = $page; |
— | — | @@ -157,8 +166,12 @@ |
158 | 167 | $lb->execute( __METHOD__ ); |
159 | 168 | |
160 | 169 | $done = array(); |
| 170 | + |
161 | 171 | foreach ( $pages as $page ) { |
162 | | - if ( isset( $done[$page] ) ) continue; |
| 172 | + if ( isset( $done[$page] ) ) { |
| 173 | + continue; |
| 174 | + } |
| 175 | + |
163 | 176 | $done[$page] = true; |
164 | 177 | self::applyScript( $page, $out ); |
165 | 178 | } |
— | — | @@ -180,12 +193,14 @@ |
181 | 194 | # ResourceLoader handle this in OutputPage::getModules() |
182 | 195 | # TODO: make this extension load everything via RL, then we don't need to worry |
183 | 196 | # about any of this. |
184 | | - if( $out->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) < ResourceLoaderModule::ORIGIN_USER_SITEWIDE ){ |
| 197 | + if ( $out->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) < ResourceLoaderModule::ORIGIN_USER_SITEWIDE ) { |
185 | 198 | return; |
186 | 199 | } |
187 | 200 | |
188 | 201 | $t = Title::makeTitleSafe( NS_MEDIAWIKI, $page ); |
189 | | - if ( !$t ) return; |
| 202 | + if ( !$t ) { |
| 203 | + return; |
| 204 | + } |
190 | 205 | |
191 | 206 | $u = $t->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType ); |
192 | 207 | $out->addScriptFile( $u, $t->getLatestRevID() ); |
— | — | @@ -197,6 +212,7 @@ |
198 | 213 | */ |
199 | 214 | public static function unitTestsList( $files ) { |
200 | 215 | $files[] = dirname( __FILE__ ) . '/Gadgets_tests.php'; |
| 216 | + |
201 | 217 | return true; |
202 | 218 | } |
203 | 219 | } |
— | — | @@ -211,10 +227,10 @@ |
212 | 228 | const GADGET_CLASS_VERSION = 5; |
213 | 229 | |
214 | 230 | private $version = self::GADGET_CLASS_VERSION, |
215 | | - $scripts = array(), |
216 | | - $styles = array(), |
| 231 | + $scripts = array(), |
| 232 | + $styles = array(), |
217 | 233 | $dependencies = array(), |
218 | | - $name, |
| 234 | + $name, |
219 | 235 | $definition, |
220 | 236 | $resourceLoaded = false, |
221 | 237 | $requiredRights = array(), |
— | — | @@ -231,13 +247,14 @@ |
232 | 248 | if ( !preg_match( '/^\*+ *([a-zA-Z](?:[-_:.\w\d ]*[a-zA-Z0-9])?)(\s*\[.*?\])?\s*((\|[^|]*)+)\s*$/', $definition, $m ) ) { |
233 | 249 | return false; |
234 | 250 | } |
235 | | - //NOTE: the gadget name is used as part of the name of a form field, |
| 251 | + // NOTE: the gadget name is used as part of the name of a form field, |
236 | 252 | // and must follow the rules defined in http://www.w3.org/TR/html4/types.html#type-cdata |
237 | 253 | // Also, title-normalization applies. |
238 | 254 | $gadget = new Gadget(); |
239 | | - $gadget->name = trim( str_replace(' ', '_', $m[1] ) ); |
| 255 | + $gadget->name = trim( str_replace( ' ', '_', $m[1] ) ); |
240 | 256 | $gadget->definition = $definition; |
241 | 257 | $options = trim( $m[2], ' []' ); |
| 258 | + |
242 | 259 | foreach ( preg_split( '/\s*\|\s*/', $options, -1, PREG_SPLIT_NO_EMPTY ) as $option ) { |
243 | 260 | $arr = preg_split( '/\s*=\s*/', $option, 2 ); |
244 | 261 | $option = $arr[0]; |
— | — | @@ -247,6 +264,7 @@ |
248 | 265 | } else { |
249 | 266 | $params = array(); |
250 | 267 | } |
| 268 | + |
251 | 269 | switch ( $option ) { |
252 | 270 | case 'ResourceLoader': |
253 | 271 | $gadget->resourceLoaded = true; |
— | — | @@ -262,14 +280,17 @@ |
263 | 281 | break; |
264 | 282 | } |
265 | 283 | } |
| 284 | + |
266 | 285 | foreach ( preg_split( '/\s*\|\s*/', $m[3], -1, PREG_SPLIT_NO_EMPTY ) as $page ) { |
267 | 286 | $page = "Gadget-$page"; |
| 287 | + |
268 | 288 | if ( preg_match( '/\.js/', $page ) ) { |
269 | 289 | $gadget->scripts[] = $page; |
270 | 290 | } elseif ( preg_match( '/\.css/', $page ) ) { |
271 | 291 | $gadget->styles[] = $page; |
272 | 292 | } |
273 | 293 | } |
| 294 | + |
274 | 295 | return $gadget; |
275 | 296 | } |
276 | 297 | |
— | — | @@ -394,17 +415,21 @@ |
395 | 416 | */ |
396 | 417 | public function getModule() { |
397 | 418 | $pages = array(); |
398 | | - foreach( $this->styles as $style ) { |
| 419 | + |
| 420 | + foreach ( $this->styles as $style ) { |
399 | 421 | $pages['MediaWiki:' . $style] = array( 'type' => 'style' ); |
400 | 422 | } |
| 423 | + |
401 | 424 | if ( $this->supportsResourceLoader() ) { |
402 | 425 | foreach ( $this->scripts as $script ) { |
403 | 426 | $pages['MediaWiki:' . $script] = array( 'type' => 'script' ); |
404 | 427 | } |
405 | 428 | } |
| 429 | + |
406 | 430 | if ( !count( $pages ) ) { |
407 | 431 | return null; |
408 | 432 | } |
| 433 | + |
409 | 434 | return new GadgetResourceLoaderModule( $pages, $this->dependencies ); |
410 | 435 | } |
411 | 436 | |
— | — | @@ -442,10 +467,13 @@ |
443 | 468 | public static function loadList() { |
444 | 469 | static $gadgets = null; |
445 | 470 | |
446 | | - if ( $gadgets !== null ) return $gadgets; |
| 471 | + if ( $gadgets !== null ) { |
| 472 | + return $gadgets; |
| 473 | + } |
447 | 474 | |
448 | 475 | wfProfileIn( __METHOD__ ); |
449 | 476 | $struct = self::loadStructuredList(); |
| 477 | + |
450 | 478 | if ( !$struct ) { |
451 | 479 | $gadgets = $struct; |
452 | 480 | wfProfileOut( __METHOD__ ); |
— | — | @@ -478,6 +506,7 @@ |
479 | 507 | } |
480 | 508 | } |
481 | 509 | } |
| 510 | + |
482 | 511 | return true; // empty array |
483 | 512 | } |
484 | 513 | |
— | — | @@ -493,13 +522,15 @@ |
494 | 523 | global $wgMemc; |
495 | 524 | |
496 | 525 | static $gadgets = null; |
497 | | - if ( $gadgets !== null && $forceNewText === null ) return $gadgets; |
| 526 | + if ( $gadgets !== null && $forceNewText === null ) { |
| 527 | + return $gadgets; |
| 528 | + } |
498 | 529 | |
499 | 530 | wfProfileIn( __METHOD__ ); |
500 | 531 | $key = wfMemcKey( 'gadgets-definition', self::GADGET_CLASS_VERSION ); |
501 | 532 | |
502 | 533 | if ( $forceNewText === null ) { |
503 | | - //cached? |
| 534 | + // cached? |
504 | 535 | $gadgets = $wgMemc->get( $key ); |
505 | 536 | if ( self::isValidList( $gadgets ) ) { |
506 | 537 | wfProfileOut( __METHOD__ ); |
— | — | @@ -537,10 +568,10 @@ |
538 | 569 | } |
539 | 570 | } |
540 | 571 | |
541 | | - //cache for a while. gets purged automatically when MediaWiki:Gadgets-definition is edited |
542 | | - $wgMemc->set( $key, $gadgets, 60*60*24 ); |
| 572 | + // cache for a while. gets purged automatically when MediaWiki:Gadgets-definition is edited |
| 573 | + $wgMemc->set( $key, $gadgets, 60 * 60 * 24 ); |
543 | 574 | $source = $forceNewText !== null ? 'input text' : 'MediaWiki:Gadgets-definition'; |
544 | | - wfDebug( __METHOD__ . ": $source parsed, cache entry $key updated\n"); |
| 575 | + wfDebug( __METHOD__ . ": $source parsed, cache entry $key updated\n" ); |
545 | 576 | wfProfileOut( __METHOD__ ); |
546 | 577 | |
547 | 578 | return $gadgets; |
Index: trunk/extensions/Gadgets/Gadgets.i18n.php |
— | — | @@ -15,10 +15,10 @@ |
16 | 16 | * @author Daniel Kinzler, brightbyte.de |
17 | 17 | */ |
18 | 18 | $messages['en'] = array( |
19 | | - #for Special:Version |
| 19 | + # for Special:Version |
20 | 20 | 'gadgets-desc' => 'Lets users select custom [[Special:Gadgets|CSS and JavaScript gadgets]] in their [[Special:Preferences|preferences]]', |
21 | 21 | |
22 | | - #for Special:Preferences |
| 22 | + # for Special:Preferences |
23 | 23 | 'prefs-gadgets' => 'Gadgets', |
24 | 24 | 'gadgets-prefstext' => 'Below is a list of special gadgets you can enable for your account. |
25 | 25 | These gadgets are mostly based on JavaScript, so JavaScript has to be enabled in your browser for them to work. |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | Also note that these special gadgets are not part of the MediaWiki software, and are usually developed and maintained by users on your local wiki. |
29 | 29 | Local administrators can edit the [[MediaWiki:Gadgets-definition|definitions]] and [[Special:Gadgets|descriptions]] of available gadgets.', |
30 | 30 | |
31 | | - #for Special:Gadgets |
| 31 | + # for Special:Gadgets |
32 | 32 | 'gadgets' => 'Gadgets', |
33 | 33 | 'gadgets-title' => 'Gadgets', |
34 | 34 | 'gadgets-pagetext' => "Below is a list of special gadgets users can enable on their [[Special:Preferences|preferences page]], as defined by the [[MediaWiki:Gadgets-definition|definitions]]. |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | 'gadgets-prefstext' => "Contino ye una lista de trastes especials que puede fer servir en a suya cuenta. |
130 | 130 | Como quasi totz istos trastes son feitos en JavaScript, caldrá que tienga activato JavaScript en o suyo navegador ta que vaigan bien. Pare cuenta que istos trastes no tendrán garra efeuto en ista pachina de preferencias. |
131 | 131 | |
132 | | -Pare cuenta tamién que istos trastes especials no fan parte d'o software MediaWiki, y que gosan estar desenvolicatos y mantenitos por usuarios d'a suya wiki local. |
| 132 | +Pare cuenta tamién que istos trastes especials no fan parte d'o software MediaWiki, y que gosan estar desenvolicatos y mantenitos por usuarios d'a suya wiki local. |
133 | 133 | Os almenistradors locals pueden editar os trastes disponibles en as pachinas de [[MediaWiki:Gadgets-definition|definicions]] y de [[Special:Gadgets|descripcions]].", |
134 | 134 | 'gadgets' => 'Trastes', |
135 | 135 | 'gadgets-title' => 'Trastes', |
— | — | @@ -689,14 +689,14 @@ |
690 | 690 | 'gadgets-desc' => 'Permesas al uzantoj elekti proprajn [[Special:Gadgets|CSS kaj JavaScript aldonaĵojn]] en ties [[Special:Preferences|preferoj]].', |
691 | 691 | 'prefs-gadgets' => 'Aldonaĵoj', |
692 | 692 | 'gadgets-prefstext' => 'Jen listo de specialaj aldonaĵoj kiujn vi povas aktivigi por via uzulkonto. |
693 | | -Plej multaj el ili baziĝas sur Ĵavaskriptoj, sekve Ĵavaskripto nepre estu aktivigita por ke ili funkciu. |
694 | | -Notu ke tiuj aldonaĵoj ne efikos sur viaj preferoj. |
| 693 | +Plej multaj el ili baziĝas sur Ĵavaskriptoj, sekve Ĵavaskripto nepre estu aktivigita por ke ili funkciu. |
| 694 | +Notu ke tiuj aldonaĵoj ne efikos sur viaj preferoj. |
695 | 695 | |
696 | 696 | Notu ankaŭ ke ili ne estas parto de la programaro MediaWiki, kaj estas kutime evoluigitaj kaj prizorgataj de uzuloj sur via loka vikio. |
697 | 697 | Lokaj administrantoj povas redakti liston de haveblaj aldonaĵoj per [[MediaWiki:Gadgets-definition|difinoj]] kaj [[Special:Gadgets|priskriboj]].', |
698 | 698 | 'gadgets' => 'Aldonaĵoj', |
699 | 699 | 'gadgets-title' => 'Aldonaĵoj', |
700 | | - 'gadgets-pagetext' => 'Jen listo da specialaj aldonaĵoj kiujn uzuloj povas aktivigi en [[Special:Preferences|siaj preferoj]], kiel difinite en [[MediaWiki:Gadgets-definition|difinoj]]. |
| 700 | + 'gadgets-pagetext' => 'Jen listo da specialaj aldonaĵoj kiujn uzuloj povas aktivigi en [[Special:Preferences|siaj preferoj]], kiel difinite en [[MediaWiki:Gadgets-definition|difinoj]]. |
701 | 701 | Ĉi tiu superrigardo provizas facilan aliron al la sistemaj mesaĝoj kiuj difinas la priskribon kaj la kodon de ĉiuj aldonaĵoj.', |
702 | 702 | 'gadgets-uses' => 'uzas', |
703 | 703 | 'gadgets-required-rights' => 'Bezonas la {{PLURAL:$2|$1 rajton|jenajn rajtojn: $1}}.', |
— | — | @@ -1088,8 +1088,8 @@ |
1089 | 1089 | 'gadgets-export' => 'Izvezi', |
1090 | 1090 | 'gadgets-export-title' => "Izvoz JS skripti (''gadgets'')", |
1091 | 1091 | 'gadgets-not-found' => "''Gadget'' \"\$1\" nije pronađen.", |
1092 | | - 'gadgets-export-text' => 'Za izvoz $1 JavaScript pomoćne skripte (\'\'gadgeta\'\'), kliknite na "{{int:gadgets-export-download}}" gumb, snimiti preuzetu datoteku, |
1093 | | -zatim idete na Special:Import na odredišnoj wiki i postavite skriptu tamo. Zatim dodajte sljedeće na "MediaWiki:Gadgets-definition stranici: |
| 1092 | + 'gadgets-export-text' => 'Za izvoz $1 JavaScript pomoćne skripte (\'\'gadgeta\'\'), kliknite na "{{int:gadgets-export-download}}" gumb, snimiti preuzetu datoteku, |
| 1093 | +zatim idete na Special:Import na odredišnoj wiki i postavite skriptu tamo. Zatim dodajte sljedeće na "MediaWiki:Gadgets-definition stranici: |
1094 | 1094 | <pre>$2</pre> |
1095 | 1095 | Morate imati odgovarajuća prava na odredišnoj wiki (uključujući i pravo na uređivanje sistemskih poruka) i uvoz iz snimljenih datoteka mora biti omogućen.', |
1096 | 1096 | 'gadgets-export-download' => 'Preuzmi', |
— | — | @@ -1302,7 +1302,7 @@ |
1303 | 1303 | $messages['jv'] = array( |
1304 | 1304 | 'gadgets-desc' => 'Marengaké para panganggo milih [[Special:Gadgets|gadget CSS lan JavaScript]] ngliwati [[Special:Preferences|préferènsi]] dhéwé-dhéwé.', |
1305 | 1305 | 'prefs-gadgets' => 'Gadget', |
1306 | | - 'gadgets-prefstext' => 'Ing ngisor iki daftar gadget astaméwa sing bisa panjenangan aktifaké kanggo rékening panjenengan. Gadget-gadget iki sabagéyan gedhé adhedhasar JavaScript dadi panjenengan kudu ngaktifaké JavaScript ing panjlajah wèb panjenengan supaya bisa nglakokaké. |
| 1306 | + 'gadgets-prefstext' => 'Ing ngisor iki daftar gadget astaméwa sing bisa panjenangan aktifaké kanggo rékening panjenengan. Gadget-gadget iki sabagéyan gedhé adhedhasar JavaScript dadi panjenengan kudu ngaktifaké JavaScript ing panjlajah wèb panjenengan supaya bisa nglakokaké. |
1307 | 1307 | Mangga diwigatèkaké yèn gadget-gadget iki ora ndarbèni pangaruh marang kaca préferènsi iki. |
1308 | 1308 | |
1309 | 1309 | Uga mangga diwigatèkaké yèn gadget astaméwa iki dudu bagéyan saka piranti empuk MediaWiki lan biasané dikembangaké lan diopèni déning panganggo-panganggo ing wiki lokal panjenengan. Pangurus lokal bisa nyunting gadget sing kasedyakaké nganggo [[MediaWiki:Gadgets-definition|dhéfinisi]] lan [[Special:Gadgets|uraian]].', |
— | — | @@ -1490,7 +1490,7 @@ |
1491 | 1491 | D'Gadgete baséiere meeschtens op engem JavaScript, dofir muss JavaScript an Ärem Browser aktivéiert sinn, fir datt se fonctionéieren. |
1492 | 1492 | D'Gadgete fonctionéieren awer net op dëser Säit mat de perséinlechen Astellungen. |
1493 | 1493 | |
1494 | | -Ausserdeem sollt Dir wëssen, datt dës Gadgete generell net Deel vu MediaWiki sinn, a meeschtens vu Benotzer vu lokale Wikien entwéckelt an ënnerhale ginn. |
| 1494 | +Ausserdeem sollt Dir wëssen, datt dës Gadgete generell net Deel vu MediaWiki sinn, a meeschtens vu Benotzer vu lokale Wikien entwéckelt an ënnerhale ginn. |
1495 | 1495 | Lokal Wiki-Administrateure kënnen d'Lëscht von den disponibele Gadgeten op de Säiten [[MediaWiki:Gadgets-definition|Definitioune vun Gadgeten]] a [[Special:Gadgets|Beschreiwunge vu Gadgeten]] änneren.", |
1496 | 1496 | 'gadgets' => 'Gadgeten', |
1497 | 1497 | 'gadgets-title' => 'Gadgeten', |
— | — | @@ -1519,7 +1519,7 @@ |
1520 | 1520 | De oetbreijinge zeen veurnamelik gebaseerd op JavaScript, dus JavaScript mót veur diene browser ingesjakeld zeen óm die te laote wirke. |
1521 | 1521 | De oetbreijinge höbbe geine invlood op dees pazjena mit veurkäöre. |
1522 | 1522 | |
1523 | | -Dees sjpeciaal oetbreijinge zeen ouch gein óngerdeil van de MediaWiki-software en die mótte meistal óntwikkeld en óngerhauwe waere door gebroekers van diene wiki. |
| 1523 | +Dees sjpeciaal oetbreijinge zeen ouch gein óngerdeil van de MediaWiki-software en die mótte meistal óntwikkeld en óngerhauwe waere door gebroekers van diene wiki. |
1524 | 1524 | Lokaal beheerders kónne de besjikbaar oetbreijinge aangaeve in [[MediaWiki:Gadgets-definition]] en [[Special:Gadgets]].', |
1525 | 1525 | 'gadgets' => 'Oetbreijinger', |
1526 | 1526 | 'gadgets-title' => 'Oetbreijinger', |
— | — | @@ -1740,7 +1740,7 @@ |
1741 | 1741 | 'prefs-gadgets' => 'उपकरणहरु', |
1742 | 1742 | 'gadgets-prefstext' => 'विशेष उपकरणहरुको सूची तल दिइएकोछ तपाईंले आफ्नो खातामा सक्रिय पार्न सक्नुहुन्छ। |
1743 | 1743 | प्राय सबै उपकरणहरु जाभास्क्रीप्टमा आधारित छन्, यस कारण ब्राउजरमा काम गराउनको लागि जाभास्क्रीप्टलाई सक्रिय गर्नु पर्छ। |
1744 | | -याद राख्नुहोस् ती उपकरणहरुले अभिरुचि पृष्ठमा असर गर्दैनन्। |
| 1744 | +याद राख्नुहोस् ती उपकरणहरुले अभिरुचि पृष्ठमा असर गर्दैनन्। |
1745 | 1745 | यो पनि याद राखुहोस् यी विशेष उपकरणहरु मीडिया विकि सफ्टवेयरभित्र पर्दैनन् र प्राय स्थानीय विकि प्रयोगकर्ताहरुले विकास यसको विकास र सञ्चालन गर्दछन्। स्थानीय प्रबन्धकहरुले उपलब्ध उपकरणहरुका [[MediaWiki:Gadgets-definition|परिभाषाहरु]] र [[Special:Gadgets|विवरणहरु]] सम्पादन गर्दछन्।', |
1746 | 1746 | 'gadgets' => 'उपकरणहरु', |
1747 | 1747 | 'gadgets-title' => 'उपकरणहरु', |
— | — | @@ -1952,15 +1952,15 @@ |
1953 | 1953 | $messages['pms'] = array( |
1954 | 1954 | 'gadgets-desc' => "A lassa che j'utent a selession-o [[Special:Gadgets|CSS e gadget JavaScript]] ant ij [[Special:Preferences|sò gust]]", |
1955 | 1955 | 'prefs-gadgets' => 'Component', |
1956 | | - 'gadgets-prefstext' => "Ambelessì sota a-i é na lista ëd component ch'a peul vischesse ant sò cont personal. |
1957 | | -Sti component-sì a son dzortut basà ansima a JavaScript, donca a venta anans tut che JavaScript a sia avisch ant sò navigator, s'a veul che ij component a travajo. |
| 1956 | + 'gadgets-prefstext' => "Ambelessì sota a-i é na lista ëd component ch'a peul vischesse ant sò cont personal. |
| 1957 | +Sti component-sì a son dzortut basà ansima a JavaScript, donca a venta anans tut che JavaScript a sia avisch ant sò navigator, s'a veul che ij component a travajo. |
1958 | 1958 | Ch'a ten-a present che sti component a l'han gnun efet ansima a la pàgina dij \"sò gust\". |
1959 | 1959 | |
1960 | | -Ch'a nòta ëdcò che a son nen part dël programa MediaWiki e che për sòlit a resto dësvlupà e mantnù da dj'utent dla wiki andova chiel/chila as treuva adess. |
| 1960 | +Ch'a nòta ëdcò che a son nen part dël programa MediaWiki e che për sòlit a resto dësvlupà e mantnù da dj'utent dla wiki andova chiel/chila as treuva adess. |
1961 | 1961 | J'aministrator locaj a peulo regolé ij component disponibij ën dovrand le pàgine [[MediaWiki:Gadgets-definition|definission dij component]] e [[Special:Gadgets|component]].", |
1962 | 1962 | 'gadgets' => 'Component', |
1963 | 1963 | 'gadgets-title' => 'Component', |
1964 | | - 'gadgets-pagetext' => "Ambelessì sota a-i é na lista ëd component spessiaj che j'utent a peulo butesse avisch ant ij [[Special:Preferences|sò gust]], conforma a la [[MediaWiki:Gadgets-definition|definission dij component]]. |
| 1964 | + 'gadgets-pagetext' => "Ambelessì sota a-i é na lista ëd component spessiaj che j'utent a peulo butesse avisch ant ij [[Special:Preferences|sò gust]], conforma a la [[MediaWiki:Gadgets-definition|definission dij component]]. |
1965 | 1965 | Sta lista complessiva a smon na stra còmoda për rivé a le pàgine ëd messagi ëd sistema ch'a definisso descrission e còdes ëd vira component.", |
1966 | 1966 | 'gadgets-uses' => 'a dòvra', |
1967 | 1967 | 'gadgets-required-rights' => 'A ciama {{PLURAL:$2|ël drit $1|ij drit sì-dapress: $1}}.', |
— | — | @@ -2142,8 +2142,8 @@ |
2143 | 2143 | 'gadgets-export' => 'Экспортировать', |
2144 | 2144 | 'gadgets-export-title' => 'Экспорт гаджета', |
2145 | 2145 | 'gadgets-not-found' => 'Гаджет «$1» не найден.', |
2146 | | - 'gadgets-export-text' => 'Для экспорта гаджета $1, нажмите кнопку «{{int:gadgets-export-download}}», сохраните загруженный файл, |
2147 | | -перейдите на страницу Special:Import целевой вики и загрузите файл. Затем добавьте следующие строки на страницу MediaWiki:Gadgets-definition: |
| 2146 | + 'gadgets-export-text' => 'Для экспорта гаджета $1, нажмите кнопку «{{int:gadgets-export-download}}», сохраните загруженный файл, |
| 2147 | +перейдите на страницу Special:Import целевой вики и загрузите файл. Затем добавьте следующие строки на страницу MediaWiki:Gadgets-definition: |
2148 | 2148 | <pre>$2</pre> |
2149 | 2149 | Вы должны иметь соответствующие разрешения в целевой вики (в том числе право на редактирование системных сообщений), также на сервере должна быть включена настройка импорта из файлов.', |
2150 | 2150 | 'gadgets-export-download' => 'Загрузить', |
— | — | @@ -2198,8 +2198,8 @@ |
2199 | 2199 | 'gadgets-export' => 'Экспортаа', |
2200 | 2200 | 'gadgets-export-title' => 'Ҕааддьыты таһаарыы (экспорт)', |
2201 | 2201 | 'gadgets-not-found' => '"$1" ҕааддьыт көстүбэтэ.', |
2202 | | - 'gadgets-export-text' => '$1 ҕааддьыты таһаарарга (экспорт), «{{int:gadgets-export-download}}» тимэҕи баттаа, хачайдаммыт билэни бигэргэт, |
2203 | | -онтон угуохтаах биикиҥ Special:Import сирэйигэр киирэн уган кэбис. Ол кэннэ MediaWiki:Gadgets-definition сирэйгэ бу устуруокалары эп: |
| 2202 | + 'gadgets-export-text' => '$1 ҕааддьыты таһаарарга (экспорт), «{{int:gadgets-export-download}}» тимэҕи баттаа, хачайдаммыт билэни бигэргэт, |
| 2203 | +онтон угуохтаах биикиҥ Special:Import сирэйигэр киирэн уган кэбис. Ол кэннэ MediaWiki:Gadgets-definition сирэйгэ бу устуруокалары эп: |
2204 | 2204 | <pre>$2</pre> |
2205 | 2205 | Угуохтаах биикигэр аналлаах көҥүллээх буолуохтааххын (ол иһигэр тиһилик биллэриилэрин эрэдээксийэлиир кыах), эбиитин сиэрбэргэ билэни киллэрии көҥүллэммит буолуохтаах.', |
2206 | 2206 | 'gadgets-export-download' => 'Хачайдааһын', |
— | — | @@ -2263,8 +2263,8 @@ |
2264 | 2264 | 'gadgets-export' => 'Exportovať', |
2265 | 2265 | 'gadgets-export-title' => 'Export nástroja', |
2266 | 2266 | 'gadgets-not-found' => 'Nástroj „$1” nebol nájdený.', |
2267 | | - 'gadgets-export-text' => 'Ak chcete exportovať nástroj $1, kliknite na tlačidlo „{{int:gadgets-export-download}}“, uložte stiahnutý súbor, |
2268 | | - choďte na stránku Special:Import na cieľovej wiki a nahrajte ho. Potom pridajte nasledujúce na stránku MediaWiki:Gadgets-definition: |
| 2267 | + 'gadgets-export-text' => 'Ak chcete exportovať nástroj $1, kliknite na tlačidlo „{{int:gadgets-export-download}}“, uložte stiahnutý súbor, |
| 2268 | + choďte na stránku Special:Import na cieľovej wiki a nahrajte ho. Potom pridajte nasledujúce na stránku MediaWiki:Gadgets-definition: |
2269 | 2269 | <pre>$2</pre> |
2270 | 2270 | Musíte mať príslušné oprávnenia na cieľovej wiki (vrátane práva na úpravu systémových správ) a import z nahraného súboru musí byť povolený.', |
2271 | 2271 | 'gadgets-export-download' => 'Stiahnuť', |
— | — | @@ -2278,8 +2278,8 @@ |
2279 | 2279 | 'gadgets-desc' => 'Omogoča uporabnikom, da vključijo [[Special:Gadgets|vtičnike CSS in JavaScript]] v [[Special:Preferences|nastavitvah]]', |
2280 | 2280 | 'prefs-gadgets' => 'Vtičniki', |
2281 | 2281 | 'gadgets-prefstext' => 'Prikazan je seznam posebnih vtičnikov, ki si jih lahko omogočite za vaš račun. |
2282 | | -Večinoma temeljijo na JavaScript, zato mora biti za njihovo delovanje omogočen v vašem brskalniku. |
2283 | | -Ti vtičniki nimajo nobenega vpliva na to nastavitveno stran. |
| 2282 | +Večinoma temeljijo na JavaScript, zato mora biti za njihovo delovanje omogočen v vašem brskalniku. |
| 2283 | +Ti vtičniki nimajo nobenega vpliva na to nastavitveno stran. |
2284 | 2284 | |
2285 | 2285 | Prav tako pomnite, da ti vtičniki niso del programja MediaWiki, in jih običajno razvijajo ter vzdržujejo uporabniki na vašem lokalnem wikiju. |
2286 | 2286 | Administratorji lahko uredite seznam vtičnikov z uporabo [[Special:Gadgets|posebne strani]] in [[MediaWiki:Gadgets-definition|opisov]].', |
— | — | @@ -2550,8 +2550,8 @@ |
2551 | 2551 | 'gadgets-export' => 'Iluwas', |
2552 | 2552 | 'gadgets-export-title' => 'Pagluluwas ng gadyet', |
2553 | 2553 | 'gadgets-not-found' => 'Hindi natagpuan ang gadyet na "$1".', |
2554 | | - 'gadgets-export-text' => 'Upang iluwas ang gadyet na $1, pindutin ang pindutang "{{int:gadgets-export-download}}", sagipin ang talaksang ikinargang paibaba, |
2555 | | -pumunta sa Special:Import na nasa kapupuntahang wiki at ikarga itong paitaas. Pagkaraan ay idagdag ang sumusunod sa pahina ng MediaWiki:Gadgets-definition: |
| 2554 | + 'gadgets-export-text' => 'Upang iluwas ang gadyet na $1, pindutin ang pindutang "{{int:gadgets-export-download}}", sagipin ang talaksang ikinargang paibaba, |
| 2555 | +pumunta sa Special:Import na nasa kapupuntahang wiki at ikarga itong paitaas. Pagkaraan ay idagdag ang sumusunod sa pahina ng MediaWiki:Gadgets-definition: |
2556 | 2556 | <pre>$2</pre> |
2557 | 2557 | Dapat kang mayroong nararapat na mga pahintulot sa kapupuntahang wiki (kasama ang karapatang mamatnugot ng mga mensahe ng sistema) at dapat na gumagana ang mga inangkat mula sa mga talaksang ikinargang paitaas', |
2558 | 2558 | 'gadgets-export-download' => 'Ikargang pababa', |
Index: trunk/extensions/Gadgets/ApiQueryGadgets.php |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | if ( $this->categories && !isset( $this->categories[$category] ) ) { |
61 | 61 | continue; |
62 | 62 | } |
| 63 | + |
63 | 64 | foreach ( $list as $g ) { |
64 | 65 | if ( $this->isNeeded( $g ) ) { |
65 | 66 | $result[] = $g; |
— | — | @@ -80,15 +81,19 @@ |
81 | 82 | if ( isset( $this->props['id'] ) ) { |
82 | 83 | $row['id'] = $g->getName(); |
83 | 84 | } |
| 85 | + |
84 | 86 | if ( isset( $this->props['metadata'] ) ) { |
85 | 87 | $row['metadata'] = $this->fakeMetadata( $g ); |
86 | 88 | $this->setIndexedTagNameForMetadata( $row['metadata'] ); |
87 | 89 | } |
| 90 | + |
88 | 91 | if ( isset( $this->props['desc'] ) ) { |
89 | 92 | $row['desc'] = $g->getDescription(); |
90 | 93 | } |
| 94 | + |
91 | 95 | $data[] = $row; |
92 | 96 | } |
| 97 | + |
93 | 98 | $result->setIndexedTagName( $data, 'gadget' ); |
94 | 99 | $result->addValue( 'query', $this->getModuleName(), $data ); |
95 | 100 | } |
— | — | @@ -212,5 +217,4 @@ |
213 | 218 | public function getVersion() { |
214 | 219 | return __CLASS__ . ': $Id$'; |
215 | 220 | } |
216 | | - |
217 | 221 | } |
Index: trunk/extensions/Gadgets/Gadgets.php |
— | — | @@ -2,7 +2,6 @@ |
3 | 3 | /** |
4 | 4 | * Gadgets extension - lets users select custom javascript gadgets |
5 | 5 | * |
6 | | - * |
7 | 6 | * For more info see http://mediawiki.org/wiki/Extension:Gadgets |
8 | 7 | * |
9 | 8 | * @file |
— | — | @@ -12,7 +11,7 @@ |
13 | 12 | * @license GNU General Public Licence 2.0 or later |
14 | 13 | */ |
15 | 14 | |
16 | | -if( !defined( 'MEDIAWIKI' ) ) { |
| 15 | +if ( !defined( 'MEDIAWIKI' ) ) { |
17 | 16 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
18 | 17 | die( 1 ); |
19 | 18 | } |
— | — | @@ -36,7 +35,7 @@ |
37 | 36 | $wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetHooks::registerModules'; |
38 | 37 | $wgHooks['UnitTestsList'][] = 'GadgetHooks::unitTestsList'; |
39 | 38 | |
40 | | -$dir = dirname(__FILE__) . '/'; |
| 39 | +$dir = dirname( __FILE__ ) . '/'; |
41 | 40 | $wgExtensionMessagesFiles['Gadgets'] = $dir . 'Gadgets.i18n.php'; |
42 | 41 | $wgExtensionAliasesFiles['Gadgets'] = $dir . 'Gadgets.alias.php'; |
43 | 42 | |
Index: trunk/extensions/Gadgets/SpecialGadgets.php |
— | — | @@ -9,14 +9,6 @@ |
10 | 10 | * @license GNU General Public License 2.0 or later |
11 | 11 | */ |
12 | 12 | |
13 | | -if( !defined( 'MEDIAWIKI' ) ) { |
14 | | - echo( "not a valid entry point.\n" ); |
15 | | - die( 1 ); |
16 | | -} |
17 | | - |
18 | | -/** |
19 | | - * |
20 | | - */ |
21 | 13 | class SpecialGadgets extends SpecialPage { |
22 | 14 | |
23 | 15 | /** |
— | — | @@ -32,13 +24,14 @@ |
33 | 25 | */ |
34 | 26 | function execute( $par ) { |
35 | 27 | $parts = explode( '/', $par ); |
| 28 | + |
36 | 29 | if ( count( $parts ) == 2 && $parts[0] == 'export' ) { |
37 | 30 | $this->showExportForm( $parts[1] ); |
38 | 31 | } else { |
39 | 32 | $this->showMainForm(); |
40 | 33 | } |
41 | 34 | } |
42 | | - |
| 35 | + |
43 | 36 | /** |
44 | 37 | * Displays form showing the list of installed gadgets |
45 | 38 | */ |
— | — | @@ -63,43 +56,50 @@ |
64 | 57 | |
65 | 58 | $msgOpt = array( 'parseinline', 'parsemag' ); |
66 | 59 | $editInterfaceAllowed = $wgUser->isAllowed( 'editinterface' ); |
67 | | - |
| 60 | + |
68 | 61 | foreach ( $gadgets as $section => $entries ) { |
69 | 62 | if ( $section !== false && $section !== '' ) { |
70 | 63 | $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-section-$section$lang" ); |
71 | 64 | if ( $editInterfaceAllowed ) { |
72 | 65 | $lnkTarget = $t |
73 | | - ? $skin->link( $t, wfMsgHTML( 'edit' ), array(), array( 'action' => 'edit' ) ) |
| 66 | + ? $skin->link( $t, wfMsgHTML( 'edit' ), array(), array( 'action' => 'edit' ) ) |
74 | 67 | : htmlspecialchars( $section ); |
75 | 68 | $lnk = "    [$lnkTarget]"; |
76 | 69 | } else { |
77 | 70 | $lnk = ''; |
78 | 71 | } |
| 72 | + |
79 | 73 | $ttext = wfMsgExt( "gadget-section-$section", $msgOpt ); |
80 | 74 | |
81 | | - if( $listOpen ) { |
| 75 | + if ( $listOpen ) { |
82 | 76 | $wgOut->addHTML( Xml::closeElement( 'ul' ) . "\n" ); |
83 | 77 | $listOpen = false; |
84 | 78 | } |
| 79 | + |
85 | 80 | $wgOut->addHTML( Html::rawElement( 'h2', array(), $ttext . $lnk ) . "\n" ); |
86 | 81 | } |
87 | 82 | |
88 | 83 | foreach ( $entries as $gadget ) { |
89 | 84 | $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-{$gadget->getName()}$lang" ); |
90 | | - if ( !$t ) continue; |
91 | 85 | |
| 86 | + if ( !$t ) { |
| 87 | + continue; |
| 88 | + } |
| 89 | + |
92 | 90 | $links = array(); |
93 | 91 | if ( $editInterfaceAllowed ) { |
94 | 92 | $links[] = $skin->link( $t, wfMsgHTML( 'edit' ), array(), array( 'action' => 'edit' ) ); |
95 | 93 | } |
| 94 | + |
96 | 95 | $links[] = $skin->link( $this->getTitle( "export/{$gadget->getName()}" ), wfMsgHtml( 'gadgets-export' ) ); |
97 | | - |
| 96 | + |
98 | 97 | $ttext = wfMsgExt( "gadget-{$gadget->getName()}", $msgOpt ); |
99 | 98 | |
100 | | - if( !$listOpen ) { |
| 99 | + if ( !$listOpen ) { |
101 | 100 | $listOpen = true; |
102 | 101 | $wgOut->addHTML( Xml::openElement( 'ul' ) ); |
103 | 102 | } |
| 103 | + |
104 | 104 | $lnk = '  ' . wfMsg( 'parentheses', $wgLang->pipeList( $links ) ); |
105 | 105 | $wgOut->addHTML( Xml::openElement( 'li' ) . |
106 | 106 | $ttext . $lnk . "<br />" . |
— | — | @@ -109,26 +109,31 @@ |
110 | 110 | $lnk = array(); |
111 | 111 | foreach ( $gadget->getScriptsAndStyles() as $codePage ) { |
112 | 112 | $t = Title::makeTitleSafe( NS_MEDIAWIKI, $codePage ); |
113 | | - if ( !$t ) continue; |
114 | 113 | |
| 114 | + if ( !$t ) { |
| 115 | + continue; |
| 116 | + } |
| 117 | + |
115 | 118 | $lnk[] = $skin->link( $t, htmlspecialchars( $t->getText() ) ); |
116 | 119 | } |
117 | 120 | $wgOut->addHTML( $wgLang->commaList( $lnk ) ); |
118 | 121 | $rights = $gadget->getRequiredRights(); |
| 122 | + |
119 | 123 | if ( count( $rights ) ) { |
120 | | - $wgOut->addHTML( '<br />' . |
| 124 | + $wgOut->addHTML( '<br />' . |
121 | 125 | wfMessage( 'gadgets-required-rights', $wgLang->commaList( $rights ), count( $rights ) )->parse() |
122 | 126 | ); |
123 | 127 | } |
| 128 | + |
124 | 129 | if ( $gadget->isOnByDefault() ) { |
125 | 130 | $wgOut->addHTML( '<br />' . wfMessage( 'gadgets-default' )->parse() ); |
126 | 131 | } |
127 | | - |
| 132 | + |
128 | 133 | $wgOut->addHTML( Xml::closeElement( 'li' ) . "\n" ); |
129 | 134 | } |
130 | 135 | } |
131 | 136 | |
132 | | - if( $listOpen ) { |
| 137 | + if ( $listOpen ) { |
133 | 138 | $wgOut->addHTML( Xml::closeElement( 'ul' ) . "\n" ); |
134 | 139 | } |
135 | 140 | } |
— | — | @@ -145,7 +150,7 @@ |
146 | 151 | $wgOut->showErrorPage( 'error', 'gadgets-not-found', array( $gadget ) ); |
147 | 152 | return; |
148 | 153 | } |
149 | | - |
| 154 | + |
150 | 155 | $g = $gadgets[$gadget]; |
151 | 156 | $this->setHeaders(); |
152 | 157 | $wgOut->setPagetitle( wfMsg( "gadgets-export-title" ) ); |
Index: trunk/extensions/Gadgets/Gadgets_tests.php |
— | — | @@ -1,14 +1,14 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * @group Gadgets |
6 | 5 | */ |
7 | | -class GadgetsTest extends PHPUnit_Framework_TestCase { |
8 | 6 | |
| 7 | +class GadgetsTest extends PHPUnit_Framework_TestCase { |
9 | 8 | private function create( $line ) { |
10 | 9 | $g = Gadget::newFromDefinition( $line ); |
11 | 10 | // assertInstanceOf() is available since PHPUnit 3.5 |
12 | 11 | $this->assertEquals( 'Gadget', get_class( $g ) ); |
| 12 | + |
13 | 13 | return $g; |
14 | 14 | } |
15 | 15 | |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $g = $this->create( '*foo [ResourceLoader]|foo.js|foo.css' ); |
36 | 36 | $this->assertEquals( 'foo', $g->getName() ); |
37 | 37 | $this->assertTrue( $g->supportsResourceLoader() ); |
38 | | - $this->assertEquals(0, count( $g->getLegacyScripts() ) ); |
| 38 | + $this->assertEquals( 0, count( $g->getLegacyScripts() ) ); |
39 | 39 | } |
40 | 40 | |
41 | 41 | function testDependencies() { |
— | — | @@ -45,12 +45,11 @@ |
46 | 46 | } |
47 | 47 | |
48 | 48 | function testPreferences() { |
49 | | - global $wgUser; |
| 49 | + global $wgUser, $wgOut, $wgTitle; |
50 | 50 | |
51 | 51 | // This test makes call to the parser which requires valids Outputpage |
52 | 52 | // and Title objects. Set them up there, they will be released at the |
53 | 53 | // end of the test. |
54 | | - global $wgOut, $wgTitle; |
55 | 54 | $old_wgOut = $wgOut; |
56 | 55 | $old_wgTitle = $wgTitle; |
57 | 56 | $wgTitle = Title::newFromText( 'Parser test for Gadgets extension' ); |
Index: trunk/extensions/Gadgets/ApiQueryGadgetCategories.php |
— | — | @@ -50,14 +50,17 @@ |
51 | 51 | if ( isset( $this->props['name'] ) ) { |
52 | 52 | $row['name'] = $category; |
53 | 53 | } |
| 54 | + |
54 | 55 | if ( $category !== "" ) { |
55 | 56 | if ( isset( $this->props['title'] ) ) { |
56 | 57 | $row['desc'] = wfMessage( "gadget-section-$category" )->parse(); |
57 | 58 | } |
58 | 59 | } |
| 60 | + |
59 | 61 | if ( isset( $this->props['members'] ) ) { |
60 | 62 | $row['members'] = count( $list ); |
61 | 63 | } |
| 64 | + |
62 | 65 | $data[] = $row; |
63 | 66 | } |
64 | 67 | } |
— | — | @@ -102,6 +105,7 @@ |
103 | 106 | public function getExamples() { |
104 | 107 | $params = $this->getAllowedParams(); |
105 | 108 | $allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] ); |
| 109 | + |
106 | 110 | return array( |
107 | 111 | 'Get a list of existing gadget categories:', |
108 | 112 | ' api.php?action=query&list=gadgetcategories', |
— | — | @@ -113,5 +117,4 @@ |
114 | 118 | public function getVersion() { |
115 | 119 | return __CLASS__ . ': $Id$'; |
116 | 120 | } |
117 | | - |
118 | 121 | } |
Index: trunk/extensions/Gadgets/README |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | |
34 | 34 | == Caveats == |
35 | 35 | |
36 | | -* Gadgets do not apply to Special:Preferences, Special:UserLogin and |
| 36 | +* Gadgets do not apply to Special:Preferences, Special:UserLogin and |
37 | 37 | Special:ResetPass so users can always disable any broken gadgets they |
38 | 38 | may have enabled, and malicious gadgets will be unable to steal passwords. |
39 | 39 | * Uses BeforePageDisplay hook, thus only works with MonoBook based skins; |