Revert r38587, r38589 for now ("(bug 2314) Add links to users custom CSS and JS...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Aug 2008 04:50:24 +0000 (04:50 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Aug 2008 04:50:24 +0000 (04:50 +0000)
This clutters up the prefs UI with a lot of links which don't currently apply, most of which will never be used. It also isn't clear how it would apply to proposed non-skin-specific pages such as User:X/common.css/.js and User:X/print.css

RELEASE-NOTES
includes/specials/SpecialPreferences.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 0eedf64..268e045 100644 (file)
@@ -44,7 +44,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   ables into into the output of Skin::makeVariablesScript
 * Added $wgAddGroups and $wgRemoveGroups display on Special:ListGroupRights
 * (bug 14377) Add a date selector to history pages
-* (bug 2314) Add links to users custom CSS and JS into Special:Preferences
 
 === Bug fixes in 1.14 ===
 
index a04c3e8..c3eea3a 100644 (file)
@@ -814,20 +814,9 @@ class PreferencesForm {
 
                # Skin
                #
-               global $wgAllowUserCss, $wgAllowUserJs;
-               $wgOut->addHTML(
-                       Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', null, wfMsg( 'skin' ) ) . "\n"
-               );
-               $wgOut->addWikiMsg( 'skin-header' );
-               if ( $wgAllowUserCss )
-                       $wgOut->addWikiMsg( 'skin-header-css' );
-
-               if ( $wgAllowUserJs )
-                       $wgOut->addWikiMsg( 'skin-header-js' );
-
+               $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
                $mptitle = Title::newMainPage();
-               $previewtext = wfMsg('skin-preview');
+               $previewtext = wfMsg('skinpreview');
                # Only show members of Skin::getSkinNames() rather than
                # $skinNames (skins is all skin names from Language.php)
                $validSkinNames = Skin::getSkinNames();
@@ -843,27 +832,15 @@ class PreferencesForm {
                        if ( in_array( $skinkey, $wgSkipSkins ) ) {
                                continue;
                        }
-
-                       $linkToCSS = $linkToJS = '';
-                       if ( $wgAllowUserCss ) {
-                               $pageCSS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.css' );
-                               $linkToCSS = ' | ' . $sk->link( $pageCSS, wfMsg( 'skin-link-to-css' ) );
-                       }
-                       if ( $wgAllowUserJs ) {
-                               $pageJS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.js' );
-                               $linkToJS = ' | ' . $sk->link( $pageJS, wfMsg( 'skin-link-to-js' ) );
-                       }
-
                        $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
 
                        $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
-                       $linkLine = " (<a target='_blank' href=\"$mplink\">$previewtext</a>" . $linkToCSS . $linkToJS . ')';
-                       if( $skinkey == $wgDefaultSkin ) {
+                       $previewlink = "<a target='_blank' href=\"$mplink\">$previewtext</a>";
+                       if( $skinkey == $wgDefaultSkin )
                                $sn .= ' (' . wfMsg( 'default' ) . ')';
-                       }
-                       $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label>$linkLine<br />\n" );
+                       $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label> $previewlink<br />\n" );
                }
-               $wgOut->addHTML( Xml::closeElement( 'fieldset' ) );
+               $wgOut->addHTML( "</fieldset>\n\n" );
 
                # Math
                #
index 6698a30..6428142 100644 (file)
@@ -537,6 +537,8 @@ XHTML id names.
 'underline-never'   => 'Never',
 'underline-default' => 'Browser default',
 
+'skinpreview' => '(Preview)',
+
 # Dates
 'sunday'        => 'Sunday',
 'monday'        => 'Monday',
@@ -1401,12 +1403,6 @@ Note that their indexes of {{SITENAME}} content may be out of date.',
 'qbsettings-floatingright' => 'Floating right',
 'changepassword'           => 'Change password',
 'skin'                     => 'Skin',
-'skin-header'              => 'Available skins.',
-'skin-header-css'          => '* With the associated cascading style sheets (CSS) pages you can customize each skin.',
-'skin-header-js'           => '* With the associated JavaScript (JS) pages you can add own scripts to each skin.',
-'skin-preview'             => 'Preview',
-'skin-link-to-css'         => 'associated CSS',
-'skin-link-to-js'          => 'associated JS',
 'math'                     => 'Math',
 'dateformat'               => 'Date format',
 'datedefault'              => 'No preference',
index 23c2fbe..7618d84 100644 (file)
@@ -58,6 +58,9 @@ $wgMessageStructure = array(
                'underline-never',
                'underline-default',
        ),
+       'skinpreview' => array(
+               'skinpreview',
+       ),
        'dates' => array(
                'sunday',
                'monday',
@@ -749,12 +752,6 @@ $wgMessageStructure = array(
                'qbsettings-floatingright',
                'changepassword',
                'skin',
-               'skin-header',
-               'skin-header-css',
-               'skin-header-js',
-               'skin-preview',
-               'skin-link-to-css',
-               'skin-link-to-js',
                'math',
                'dateformat',
                'datedefault',
@@ -2627,6 +2624,7 @@ XHTML id it should only appear once and include characters that are legal
 XHTML id names.",
        'toggles'             => 'User preference toggles',
        'underline'           => '',
+       'skinpreview'         => '',
        'dates'               => 'Dates',
        'categorypages'       => 'Categories related messages',
        'mainpage'            => '',