if( $wgAllowUserSkin ) {
# get the user skin
$userSkin = $this->getOption( 'skin' );
+ $userSkin = $wgRequest->getVal('useskin', $userSkin);
} else {
# if we're not allowing users to override, then use the default
$userSkin = $wgDefaultSkin;
}
- # we'll allow skin "testing" regardless of the AllowUserSkin option
- $userSkin = $wgRequest->getVal('useskin', $userSkin);
-
$this->mSkin =& Skin::newFromKey( $userSkin );
wfProfileOut( __METHOD__ );
}
# Skin
#
+ global $wgAllowUserSkin;
+
+ if( !$wgAllowUserSkin ) {
+ $wgOut->addHTML( "<p><em>" . wfMsg('skin-override') . "</em></p>" );
+ }
+
$wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
$mptitle = Title::newMainPage();
$previewtext = wfMsg('skin-preview');
asort($validSkinNames);
foreach ($validSkinNames as $skinkey => $sn ) {
$checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
+
+ $checked = $wgAllowUserSkin ? $checked . '' : $checked . ' disabled=\'disabled\'';
$mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
$previewlink = "(<a target='_blank' href=\"$mplink\">$previewtext</a>)";
'qbsettings-floatingright' => 'Floating right',
'changepassword' => 'Change password',
'skin' => 'Skin',
+'skin-override' => 'This form has been disabled, because this wiki overrides user skin settings with the default skin set by the administrator.',
'skin-preview' => 'Preview',
'math' => 'Math',
'dateformat' => 'Date format',