r102092 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102091‎ | r102092 | r102093 >
Date:13:34, 5 November 2011
Author:ashley
Status:deferred
Tags:
Comment:
CreateAPage: follow-up to r98699 as per Roan's review:
*moved the if ( $wgCreatePageCoverRedLinks ) check to the hooked function
*moved the new preference under "Advanced editing" subsection in the editing tab
*changed HTML to wikitext in the preference message because HTML no longer works there
*bumped version number to 3.91
Modified paths:
  • /trunk/extensions/CreateAPage/CreateAPage.i18n.php (modified) (history)
  • /trunk/extensions/CreateAPage/CreatePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CreateAPage/CreateAPage.i18n.php
@@ -60,7 +60,7 @@
6161 'createpage-must-specify-title' => 'Please specify a title first!',
6262 'createpage-unsaved-changes' => 'Unsaved changes',
6363 'createpage-unsaved-changes-details' => 'You have unsaved changes. Clicking OK will result in abandoning them.',
64 - 'tog-createpage-redlinks' => 'Use <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">CreatePage</a> when following broken links',
 64+ 'tog-createpage-redlinks' => 'Use [http://www.shoutwiki.com/wiki/Help:CreatePage CreatePage] when following broken links',
6565 'createpage-template-infobox-format' => '/\{\{[^\{\}]*Infobox.*\}\}/is', # regex used to find out whether our template is an infobox or not
6666 );
6767
@@ -254,7 +254,7 @@
255255 'createpage-about-info' => 'Este es un editor simplificado. Para saber más ve a la [[s:Help:CreatePage|Hub de ShoutWiki]].',
256256 'createpage-advanced-text' => 'Puedes usar también el $1.',
257257 'createpage-advanced-edit' => 'editor avanzado',
258 - 'tog-createpage-redlinks' => 'Usa <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">CreatePage</a> cuando sigas enlaces rotos',
 258+ 'tog-createpage-redlinks' => 'Usa [http://www.shoutwiki.com/wiki/Help:CreatePage CreatePage] cuando sigas enlaces rotos',
259259 );
260260
261261 /** Persian (فارسی) */
@@ -314,7 +314,7 @@
315315 'createpage-must-specify-title' => 'Anna otsikko ensiksi!',
316316 'createpage-unsaved-changes' => 'Tallentamattomat muutokset',
317317 'createpage-unsaved-changes-details' => 'Sinulla on tallentamattomia muutoksia. Painamalla OK-painiketta hylkäät ne.',
318 - 'tog-createpage-redlinks' => 'Käytä <a href="http://fi.shoutwiki.com/wiki/Ohje:CreatePage">CreatePagea</a> rikkinäisiä linkkejä seuratessa',
 318+ 'tog-createpage-redlinks' => 'Käytä [http://fi.shoutwiki.com/wiki/Ohje:CreatePage CreatePagea] rikkinäisiä linkkejä seuratessa',
319319 'createpage-template-infobox-format' => '/\{\{[^\{\}]*tietolaatikko.*\}\}/is',
320320 );
321321
@@ -366,7 +366,7 @@
367367 'createpage-advanced-edit' => 'éditeur avancé',
368368 'createpage-optionals-text' => 'Ajouter des sections optionnelles :',
369369 'createpage-save' => 'Sauvegarde',
370 - 'tog-createpage-redlinks' => 'Utiliser <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">CreatePage</a> après avoir suivi des liens cassés',
 370+ 'tog-createpage-redlinks' => 'Utiliser [http://www.shoutwiki.com/wiki/Help:CreatePage CreatePage] après avoir suivi des liens cassés',
371371 );
372372
373373 /** Galician (Galego)
@@ -501,7 +501,7 @@
502502 'createpage-advanced-text' => 'Можете да користите и $1.',
503503 'createpage-advanced-edit' => 'напреден уредник',
504504 'createpage-optionals-text' => 'Додај дополнителни делови:',
505 - 'tog-createpage-redlinks' => 'Користи <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">СоздајСтраница</a> кога следам прекинати врски',
 505+ 'tog-createpage-redlinks' => 'Користи [http://www.shoutwiki.com/wiki/Help:CreatePage СоздајСтраница] кога следам прекинати врски',
506506 'createpage-template-infobox-format' => '/\{\{[^\{\}]*Инфокутија.*\}\}/is',
507507 );
508508
@@ -552,7 +552,7 @@
553553 'createpage-advanced-edit' => 'uitgebreide tekstverwerker',
554554 'createpage-optionals-text' => 'Optionele secties toevoegen:',
555555 'createpage-save' => 'Opslaan',
556 - 'tog-createpage-redlinks' => 'Gebruik <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">pagina aanmaken</a> als u verbroken verwijzigen volgt',
 556+ 'tog-createpage-redlinks' => 'Gebruik [http://www.shoutwiki.com/wiki/Help:CreatePage pagina aanmaken] als u verbroken verwijzigen volgt',
557557 'createpage-template-infobox-format' => '/\{\{[^\{\}]*Informatievenster.*\}\}/is',
558558 );
559559
@@ -601,7 +601,7 @@
602602 'createpage-advanced-text' => 'Możesz też użyć $1',
603603 'createpage-advanced-edit' => 'zaawansowanego edytora',
604604 'createpage-optionals-text' => 'Dodaj opcjonalne sekcje:',
605 - 'tog-createpage-redlinks' => 'Otwórz <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">CreatePage\'a</a> po przejściu do nieistniejącej strony'
 605+ 'tog-createpage-redlinks' => 'Otwórz [http://www.shoutwiki.com/wiki/Help:CreatePage CreatePage\'a] po przejściu do nieistniejącej strony'
606606 );
607607
608608 /** Piedmontese (Piemontèis)
@@ -648,7 +648,7 @@
649649 'createpage-advanced-text' => 'It peule ëdcò dovré ël $1.',
650650 'createpage-advanced-edit' => 'editor avansà',
651651 'createpage-optionals-text' => 'Gionta session opsinaj:',
652 - 'tog-createpage-redlinks' => 'Dòvra <a href="http://www.shoutwiki.com/wiki/Help:CreatePage">CreatePage</a> quand dré a colegament pa bon',
 652+ 'tog-createpage-redlinks' => 'Dòvra [http://www.shoutwiki.com/wiki/Help:CreatePage CreatePage] quand dré a colegament pa bon',
653653 );
654654
655655 /** Portuguese (Português)
Index: trunk/extensions/CreateAPage/CreatePage.php
@@ -5,7 +5,7 @@
66 *
77 * @file
88 * @ingroup Extensions
9 - * @version 3.90 (r15554)
 9+ * @version 3.91 (r15554)
1010 * @author Bartek Łapiński <bartek@wikia-inc.com>
1111 * @author Jack Phoenix <jack@countervandalism.net>
1212 * @copyright Copyright © 2007-2008 Wikia Inc.
@@ -25,7 +25,7 @@
2626 'Bartek Łapiński', 'Łukasz Garczewski', 'Przemek Piotrowski',
2727 'Jack Phoenix'
2828 ),
29 - 'version' => '3.90',
 29+ 'version' => '3.91',
3030 'description' => '[[Special:CreatePage|Easy to use interface]] for creating new articles',
3131 'url' => 'http://www.mediawiki.org/wiki/Extension:CreateAPage',
3232 );
@@ -81,9 +81,7 @@
8282 $wgHooks['CustomEditor'][] = 'wfCreatePageRedLinks';
8383 $wgHooks['ConfirmEdit::onConfirmEdit'][] = 'wfCreatePageConfirmEdit'; // ConfirmEdit CAPTCHA
8484
85 -if ( $wgCreatePageCoverRedLinks ) {
86 - $wgHooks['GetPreferences'][] = 'wfCreatePageToggle';
87 -}
 85+$wgHooks['GetPreferences'][] = 'wfCreatePageToggle';
8886
8987 // handle ConfirmEdit CAPTCHA, only for CreatePage, which will be treated a bit differently (edits in special page)
9088 function wfCreatePageConfirmEdit( &$captcha, &$editPage, $newtext, $section, $merged, &$result ) {
@@ -182,11 +180,14 @@
183181 * @return Boolean: true
184182 */
185183 function wfCreatePageToggle( $user, &$preferences ) {
186 - $preferences['create-page-redlinks'] = array(
187 - 'type' => 'toggle',
188 - 'section' => 'editing',
189 - 'label-message' => 'tog-createpage-redlinks',
190 - );
 184+ global $wgCreatePageCoverRedLinks;
 185+ if ( $wgCreatePageCoverRedLinks ) {
 186+ $preferences['create-page-redlinks'] = array(
 187+ 'type' => 'toggle',
 188+ 'section' => 'editing/advancedediting',
 189+ 'label-message' => 'tog-createpage-redlinks',
 190+ );
 191+ }
191192 return true;
192193 }
193194

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98699add CreateAPage to SVN. Mostly compatible with 1.16, except that the upload f...ashley18:27, 2 October 2011

Status & tagging log