r43111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43110‎ | r43111 | r43112 >
Date:07:56, 3 November 2008
Author:vyznev
Status:old
Tags:
Comment:
Hide skin tab in preferences entirely is $wgAllowUserSkin is false, remove the skin-override message.
Also ensure that PreferencesForm::mSkin is always normalized and is only saved if $wgAllowUserSkin is true.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEo.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEs.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesFa.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesFr.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesGl.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesHe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesHr.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesHu.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesIa.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesKsh.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesLb.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesNl.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesPl.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQu.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesSzl.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesVi.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -835,38 +835,32 @@
836836 # Skin
837837 #
838838 global $wgAllowUserSkin;
839 -
840 - if( !$wgAllowUserSkin ) {
841 - $wgOut->addHTML( "<p><em>" . wfMsg('skin-override') . "</em></p>" );
842 - }
843 -
844 - $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
845 - $mptitle = Title::newMainPage();
846 - $previewtext = wfMsg('skin-preview');
847 - # Only show members of Skin::getSkinNames() rather than
848 - # $skinNames (skins is all skin names from Language.php)
849 - $validSkinNames = Skin::getUsableSkins();
850 - # Sort by UI skin name. First though need to update validSkinNames as sometimes
851 - # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI).
852 - foreach ($validSkinNames as $skinkey => & $skinname ) {
853 - if ( isset( $skinNames[$skinkey] ) ) {
854 - $skinname = $skinNames[$skinkey];
 839+ if( $wgAllowUserSkin ) {
 840+ $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
 841+ $mptitle = Title::newMainPage();
 842+ $previewtext = wfMsg('skin-preview');
 843+ # Only show members of Skin::getSkinNames() rather than
 844+ # $skinNames (skins is all skin names from Language.php)
 845+ $validSkinNames = Skin::getUsableSkins();
 846+ # Sort by UI skin name. First though need to update validSkinNames as sometimes
 847+ # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI).
 848+ foreach ($validSkinNames as $skinkey => & $skinname ) {
 849+ if ( isset( $skinNames[$skinkey] ) ) {
 850+ $skinname = $skinNames[$skinkey];
 851+ }
855852 }
 853+ asort($validSkinNames);
 854+ foreach ($validSkinNames as $skinkey => $sn ) {
 855+ $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
 856+ $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
 857+ $previewlink = $wgAllowUserSkin ? "(<a target='_blank' href=\"$mplink\">$previewtext</a>)" : '';
 858+ if( $skinkey == $wgDefaultSkin )
 859+ $sn .= ' (' . wfMsg( 'default' ) . ')';
 860+ $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label> $previewlink<br />\n" );
 861+ }
 862+ $wgOut->addHTML( "</fieldset>\n\n" );
856863 }
857 - asort($validSkinNames);
858 - foreach ($validSkinNames as $skinkey => $sn ) {
859 - $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
860 -
861 - $checked = $wgAllowUserSkin ? $checked . '' : $checked . ' disabled=\'disabled\'';
862864
863 - $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
864 - $previewlink = $wgAllowUserSkin ? "(<a target='_blank' href=\"$mplink\">$previewtext</a>)" : '';
865 - if( $skinkey == $wgDefaultSkin )
866 - $sn .= ' (' . wfMsg( 'default' ) . ')';
867 - $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label> $previewlink<br />\n" );
868 - }
869 - $wgOut->addHTML( "</fieldset>\n\n" );
870 -
871865 # Math
872866 #
873867 global $wgUseTeX;
Index: trunk/phase3/languages/messages/MessagesQu.php
@@ -952,7 +952,6 @@
953953 'qbsettings-floatingright' => 'Pañaman tuytuy',
954954 'changepassword' => 'Yaykuna rimata hukchay',
955955 'skin' => 'Qara',
956 -'skin-override' => "Kay hunt'ana p'anqaqa manam saqillasqachu kachkan, kay wiki ruraqpa qara allinchasqankunata kamachiqpa churasqan kikinmanta qarawan huknachaptinmi.",
957956 'skin-preview' => 'Ñawpaqta qhaway',
958957 'math' => 'Minuywa',
959958 'dateformat' => "P'unchaw pacha chanta",
Index: trunk/phase3/languages/messages/MessagesHe.php
@@ -1209,7 +1209,6 @@
12101210 'qbsettings-floatingright' => 'צף מימין',
12111211 'changepassword' => 'שינוי סיסמה',
12121212 'skin' => 'עיצוב',
1213 -'skin-override' => 'טופס זה אינו פעיל, כיוון שבאתר ויקי זה נקבע העיצוב על ידי מנהל האתר, והמשתמשים אינם יכולים לשנותו.',
12141213 'skin-preview' => 'תצוגה מקדימה',
12151214 'math' => 'נוסחאות מתמטיות',
12161215 'dateformat' => 'מבנה תאריך',
Index: trunk/phase3/languages/messages/MessagesHu.php
@@ -1177,7 +1177,6 @@
11781178 'qbsettings-floatingright' => 'Lebegő jobboldali',
11791179 'changepassword' => 'Jelszócsere',
11801180 'skin' => 'Felület',
1181 -'skin-override' => 'A felület nem módosítható, mert a wiki adminisztrátora álltja be az alapértelmezett kinézetet.',
11821181 'skin-preview' => 'előnézet',
11831182 'math' => 'Képletek',
11841183 'dateformat' => 'Dátum formátuma',
Index: trunk/phase3/languages/messages/MessagesKsh.php
@@ -1202,7 +1202,6 @@
12031203 'qbsettings-floatingright' => 'Am rächte Rand am Schwevve',
12041204 'changepassword' => 'Passwood ändere',
12051205 'skin' => 'Et Ussinn',
1206 -'skin-override' => 'Di Ußwahl eß affjeschlldt, weil mer alß Metmaacher hee en dämm Wiki sing Ovverfläsh nit ußsöhke kann. Dat määt dä Wiki-Köbes.',
12071206 'skin-preview' => 'Vör-Ansich',
12081207 'math' => 'Mathematisch Formele',
12091208 'dateformat' => 'Em Datum sing Fomat',
Index: trunk/phase3/languages/messages/MessagesSzl.php
@@ -873,7 +873,6 @@
874874 'qbsettings-floatingright' => 'Unošůncy śe, s prawyj',
875875 'changepassword' => 'Zmjana hasua',
876876 'skin' => 'Skůrka',
877 -'skin-override' => 'Formulař je wyuůnčůny skiž tygo, co admińistrator tyj Wiki naštalowou yno jydna skůrka.',
878877 'skin-preview' => 'podglůnd',
879878 'math' => 'Wzory',
880879 'dateformat' => 'Format daty',
Index: trunk/phase3/languages/messages/MessagesHr.php
@@ -1181,7 +1181,6 @@
11821182 'qbsettings-floatingright' => 'Desno leteće',
11831183 'changepassword' => 'Promjena lozinke',
11841184 'skin' => 'Izgled',
1185 -'skin-override' => 'Ovaj obrazac je isključen, jer ova wiki premošćuje osobne suradničke postavke izgleda s glavnim izgledom postavljenim od strane administratora.',
11861185 'skin-preview' => 'Pregled',
11871186 'math' => 'Prikaz matematičkih formula',
11881187 'dateformat' => 'Format datuma',
Index: trunk/phase3/languages/messages/MessagesPl.php
@@ -1143,7 +1143,6 @@
11441144 'qbsettings-floatingright' => 'Unoszący się, z prawej',
11451145 'changepassword' => 'Zmiana hasła',
11461146 'skin' => 'Skórka',
1147 -'skin-override' => 'Formularz został wyłączony, ponieważ na tej wiki administrator ustawił jedną domyślną skórkę.',
11481147 'skin-preview' => 'podgląd',
11491148 'math' => 'Wzory',
11501149 'dateformat' => 'Format daty',
Index: trunk/phase3/languages/messages/MessagesIa.php
@@ -1062,7 +1062,6 @@
10631063 'qbsettings-floatingright' => 'Flottante a derecta',
10641064 'changepassword' => 'Cambiar contrasigno',
10651065 'skin' => 'Stilo',
1066 -'skin-override' => 'Iste formulario ha essite disactivate, post que iste wiki ultrapassa le configurationes de stilo del usator con le stilo predefinite per le administrator.',
10671066 'skin-preview' => 'Previsualisation',
10681067 'math' => 'Mathematica',
10691068 'dateformat' => 'Formato de datas',
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1494,7 +1494,6 @@
14951495 'qbsettings-floatingright' => 'Floating right',
14961496 'changepassword' => 'Change password',
14971497 'skin' => 'Skin',
1498 -'skin-override' => 'This form has been disabled, because this wiki overrides user skin settings with the default skin set by the administrator.',
14991498 'skin-preview' => 'Preview',
15001499 'math' => 'Math',
15011500 'dateformat' => 'Date format',
Index: trunk/phase3/languages/messages/MessagesFa.php
@@ -1268,7 +1268,6 @@
12691269 'qbsettings-floatingright' => 'شناور راست',
12701270 'changepassword' => 'تغییر گذرواژه',
12711271 'skin' => 'پوسته',
1272 -'skin-override' => 'این فرم غیر فعال شده‌است، زیرا این ویکی تنظیم پوسته توسط کاربر را با پوستهٔ پیش‌فرض که توسط مدیر تعیین شده باطل می‌سازد.',
12731272 'skin-preview' => 'پیش‌نمایش',
12741273 'math' => 'نمایش ریاضیات',
12751274 'dateformat' => 'قالب تاریخ',
Index: trunk/phase3/languages/messages/MessagesVi.php
@@ -1065,7 +1065,6 @@
10661066 'qbsettings-floatingright' => 'Nổi bên phải',
10671067 'changepassword' => 'Đổi mật khẩu',
10681068 'skin' => 'Hình dạng',
1069 -'skin-override' => 'Biểu mẫu này bị tắt vì hình dạng mặc định do quản lý viên đặt đè lên các thiết lập hình dạng cá nhân tại wiki này.',
10701069 'skin-preview' => 'Xem thử',
10711070 'math' => 'Công thức toán',
10721071 'dateformat' => 'Kiểu ngày tháng',
Index: trunk/phase3/languages/messages/MessagesGl.php
@@ -1033,7 +1033,6 @@
10341034 'qbsettings-floatingright' => 'Flotante á dereita',
10351035 'changepassword' => 'Cambiar o meu contrasinal',
10361036 'skin' => 'Aparencia',
1037 -'skin-override' => 'Este formulario foi deshabilitado porque este wiki sobreescribe a apariencia de usuario coa apariencia por defecto fixada polo administrador.',
10381037 'skin-preview' => 'Probar',
10391038 'math' => 'Fórmulas matemáticas',
10401039 'dateformat' => 'Formato da data',
Index: trunk/phase3/languages/messages/MessagesLb.php
@@ -997,7 +997,6 @@
998998 'qbsettings-floatingright' => 'Schwiewt riets',
999999 'changepassword' => 'Passwuert änneren',
10001000 'skin' => 'Skin',
1001 -'skin-override' => 'Dëse Formulaire ass ausgeschalt, well op dëser Wiki Skin Astellungen vun de Benotzer duerch déi Astellungen ersat sinn déi den Admistrateur par défaut agestallt huet.',
10021001 'skin-preview' => 'Kucken',
10031002 'dateformat' => 'Datumsformat',
10041003 'datedefault' => 'Egal (Standard)',
Index: trunk/phase3/languages/messages/MessagesEo.php
@@ -1074,7 +1074,6 @@
10751075 'qbsettings-floatingright' => 'Ŝvebas dekstre',
10761076 'changepassword' => 'Ŝanĝi pasvorton',
10771077 'skin' => 'Etoso',
1078 -'skin-override' => 'Ĉi tiu paĝo estis malŝaltita, ĉar ĉi tiu vikio anstataŭigas la etosajn preferojn kun la defaŭlta etosaro de la administranto.',
10791078 'skin-preview' => 'Antaŭrigardo',
10801079 'math' => 'Matematikaĵoj',
10811080 'dateformat' => 'Datformato',
Index: trunk/phase3/languages/messages/MessagesEs.php
@@ -1060,7 +1060,6 @@
10611061 'qbsettings-floatingright' => 'Flotante a la derecha',
10621062 'changepassword' => 'Cambiar la contraseña',
10631063 'skin' => 'Apariencia',
1064 -'skin-override' => 'Este formulario ha sido deshabilitado, ya que esta wiki sustituye la selección de apariencia del usuario por la indicada por el administrador.',
10651064 'skin-preview' => 'Ver cómo queda',
10661065 'math' => 'Fórmulas',
10671066 'dateformat' => 'Formato de fecha',
Index: trunk/phase3/languages/messages/MessagesFr.php
@@ -1101,7 +1101,6 @@
11021102 'qbsettings-floatingright' => 'Flottante à droite',
11031103 'changepassword' => 'Modification du mot de passe',
11041104 'skin' => 'Habillage',
1105 -'skin-override' => 'Ce formulaire a été désactivé, parce ce wiki écrase les paramètres d’interface utilisateur avec celle par défaut établie par l’administrateur.',
11061105 'skin-preview' => 'Prévisualiser',
11071106 'math' => 'Rendu des maths',
11081107 'dateformat' => 'Format de date',
Index: trunk/phase3/languages/messages/MessagesNl.php
@@ -1233,7 +1233,6 @@
12341234 'qbsettings-floatingright' => 'Rechts zwevend',
12351235 'changepassword' => 'Wachtwoord wijzigen',
12361236 'skin' => 'Vormgeving',
1237 -'skin-override' => 'Dit formulier is uitgeschakeld omdat in deze wiki alleen het door de beheerder gekozen uiterlijk weergegeven kan worden.',
12381237 'skin-preview' => 'Voorbeeld',
12391238 'math' => 'Formules',
12401239 'dateformat' => 'Datumopmaak',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -1080,7 +1080,6 @@
10811081 'qbsettings-floatingright' => 'Rechts, schwebend',
10821082 'changepassword' => 'Passwort ändern',
10831083 'skin' => 'Skin',
1084 -'skin-override' => 'Dieses Formular wurde deaktiviert, da dieses Wiki die Skineinstellungen ignoriert und den Standardskin verwendet, der vom Administrator festgelegt wurde.',
10851084 'skin-preview' => 'Vorschau',
10861085 'math' => 'TeX',
10871086 'dateformat' => 'Datumsformat',

Follow-up revisions

RevisionCommit summaryAuthorDate
r43112oops, r43111 was incomplete, here's the rest of it :-/vyznev08:08, 3 November 2008

Status & tagging log