From ed97e482a6478693d9a951442a46ad2f4c274652 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 23 Jul 2008 07:59:38 +0000 Subject: [PATCH] Revert r37924 "(bug 14883) Create hook AlternateSkinPreferences to alternate skin section in user preferences" 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 | 1 - docs/hooks.txt | 4 --- includes/specials/SpecialPreferences.php | 46 ++++++++++++------------ 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 779585056a..32356ea4bc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/docs/hooks.txt b/docs/hooks.txt index f724947bb2..286ed7e2a4 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 tag diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 0dd2654d73..b3468a3c6b 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -815,32 +815,30 @@ class PreferencesForm { # Skin # $wgOut->addHTML( "
\n\n" . wfMsg('skin') . "\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 = "$previewtext"; - if( $skinkey == $wgDefaultSkin ) - $sn .= ' (' . wfMsg( 'default' ) . ')'; - $wgOut->addHTML( " $previewlink
\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 = "$previewtext"; + if( $skinkey == $wgDefaultSkin ) + $sn .= ' (' . wfMsg( 'default' ) . ')'; + $wgOut->addHTML( " $previewlink
\n" ); } $wgOut->addHTML( "
\n\n" ); -- 2.20.1