From aa75a3061b7c63f57ffe69378c0e65d2dd964e6d Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sat, 14 Aug 2010 08:46:36 +0000 Subject: [PATCH] Remove User::getToggles() code, dormant since preferences rewrite over a year ago --- docs/hooks.txt | 4 --- includes/User.php | 66 ----------------------------------------------- 2 files changed, 70 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 9dafb95a9f..9a297de631 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1840,10 +1840,6 @@ $user: User object &$timestamp: new timestamp, change this to override local email authentification timestamp -'UserToggles': called when initialising User::$mToggles, use this to add -new toggles -$toggles: array of toggles to add - 'WantedPages::getSQL': called in WantedPagesPage::getSQL(), can be used to alter the SQL query which gets the list of wanted pages &$wantedPages: WantedPagesPage object diff --git a/includes/User.php b/includes/User.php index 522b49b2b8..675ccfd36a 100644 --- a/includes/User.php +++ b/includes/User.php @@ -42,56 +42,6 @@ class PasswordError extends MWException { */ class User { - /** - * \type{\arrayof{\string}} A list of default user toggles, i.e., boolean user - * preferences that are displayed by Special:Preferences as checkboxes. - * This list can be extended via the UserToggles hook or by - * $wgContLang::getExtraUserToggles(). - * @showinitializer - */ - public static $mToggles = array( - 'highlightbroken', - 'justify', - 'hideminor', - 'extendwatchlist', - 'usenewrc', - 'numberheadings', - 'showtoolbar', - 'editondblclick', - 'editsection', - 'editsectiononrightclick', - 'showtoc', - 'rememberpassword', - 'watchcreations', - 'watchdefault', - 'watchmoves', - 'watchdeletion', - 'previewontop', - 'previewonfirst', - 'nocache', - 'enotifwatchlistpages', - 'enotifusertalkpages', - 'enotifminoredits', - 'enotifrevealaddr', - 'shownumberswatching', - 'fancysig', - 'externaleditor', - 'externaldiff', - 'showjumplinks', - 'uselivepreview', - 'forceeditsummary', - 'watchlisthideminor', - 'watchlisthidebots', - 'watchlisthideown', - 'watchlisthideanons', - 'watchlisthideliu', - 'ccmeonemails', - 'diffonly', - 'showhiddencats', - 'noconvertlink', - 'norollbackdiff', - ); - /** * \type{\arrayof{\string}} List of member variables which are saved to the * shared cache (memcached). Any operation which changes the @@ -1090,22 +1040,6 @@ class User { } } - /** - * Get a list of user toggle names - * @return \type{\arrayof{\string}} Array of user toggle names - */ - static function getToggles() { - global $wgContLang, $wgUseRCPatrol; - $extraToggles = array(); - wfRunHooks( 'UserToggles', array( &$extraToggles ) ); - if( $wgUseRCPatrol ) { - $extraToggles[] = 'hidepatrolled'; - $extraToggles[] = 'newpageshidepatrolled'; - $extraToggles[] = 'watchlisthidepatrolled'; - } - return array_merge( self::$mToggles, $extraToggles, $wgContLang->getExtraUserToggles() ); - } - /** * Get blocking information -- 2.20.1