Revert r37924 "(bug 14883) Create hook AlternateSkinPreferences to alternate skin...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 23 Jul 2008 07:59:38 +0000 (07:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 23 Jul 2008 07:59:38 +0000 (07:59 +0000)
This hook seems pretty unclear to me. What's it meant to accomplish? It passes no data to be customized, and has no code interface for building a sustainable, forward-compatible extension from it.

RELEASE-NOTES
docs/hooks.txt
includes/specials/SpecialPreferences.php

index 7795850..32356ea 100644 (file)
@@ -190,7 +190,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   the database is potentially queried
 * (bug 9736) Redirects on Special:Fewestrevisions are now marked as such.
 * New date/time formats in Cs localization according to ČSN and PČP.
-* (bug 14883) Create hook AlternateSkinPreferences to alternate skin section in user preferences
 * Special:Recentchangeslinked now includes changes to transcluded pages and
   displayed images; also, the "Show changes to pages linked" checkbox now works on
   category pages too, showing all links that are not categorizations
index f724947..286ed7e 100644 (file)
@@ -265,10 +265,6 @@ before showing the edit form ( EditPage::edit() ). This is triggered
 on &action=edit.
 $EditPage : the EditPage object
 
-'AlternateSkinPreferences': before creating the content of the 'skin'
-tab in preferences
-$prefsform : the PreferencesForm object
-
 'APIEditBeforeSave': before saving a page with api.php?action=edit,
 after processing request parameters. Return false to let the request
 fail, returning an error message or an <edit result="Failure"> tag
index 0dd2654..b3468a3 100644 (file)
@@ -815,32 +815,30 @@ class PreferencesForm {
                # Skin
                #
                $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
-               if( wfRunHooks('AlternateSkinPreferences'), array($this) ) {
-                       $mptitle = Title::newMainPage();
-                       $previewtext = wfMsg('skinpreview');
-                       # Only show members of Skin::getSkinNames() rather than
-                       # $skinNames (skins is all skin names from Language.php)
-                       $validSkinNames = Skin::getSkinNames();
-                       # Sort by UI skin name. First though need to update validSkinNames as sometimes
-                       # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI).
-                       foreach ($validSkinNames as $skinkey => & $skinname ) {
-                               if ( isset( $skinNames[$skinkey] ) )  {
-                                       $skinname = $skinNames[$skinkey];
-                               }
+               $mptitle = Title::newMainPage();
+               $previewtext = wfMsg('skinpreview');
+               # Only show members of Skin::getSkinNames() rather than
+               # $skinNames (skins is all skin names from Language.php)
+               $validSkinNames = Skin::getSkinNames();
+               # Sort by UI skin name. First though need to update validSkinNames as sometimes
+               # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI).
+               foreach ($validSkinNames as $skinkey => & $skinname ) {
+                       if ( isset( $skinNames[$skinkey] ) )  {
+                               $skinname = $skinNames[$skinkey];
                        }
-                       asort($validSkinNames);
-                       foreach ($validSkinNames as $skinkey => $sn ) {
-                               if ( in_array( $skinkey, $wgSkipSkins ) ) {
-                                       continue;
-                               }
-                               $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
-
-                               $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
-                               $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> $previewlink<br />\n" );
+               }
+               asort($validSkinNames);
+               foreach ($validSkinNames as $skinkey => $sn ) {
+                       if ( in_array( $skinkey, $wgSkipSkins ) ) {
+                               continue;
                        }
+                       $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
+
+                       $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
+                       $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> $previewlink<br />\n" );
                }
                $wgOut->addHTML( "</fieldset>\n\n" );