From a8fbbcf98de84bb9b6c3dc1d12feaf595905f81f Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Sat, 6 Apr 2013 17:13:45 +0200 Subject: [PATCH] Remove the "Quickbar" feature and all things related to it "Quickbar" was a feature of the Standard and CologneBlue skins that allowed the sidebar to be displayed on left or right side of the page, floated or fixed, and hidden on diff pages. Standard was removed (Ia6d73c2d), and CologneBlue doesn't support this anymore (bug 41246), so all things quickbar can now be safely removed. * Removed user prefs option + interface * Removed related messages * Removed code for this in SkinLegacy * Removed dead code in DifferenceEngine and Language Change-Id: I5e6f7d48d6904a052a3a11547d3ebe6161463018 --- RELEASE-NOTES-1.21 | 8 +++--- includes/DefaultSettings.php | 1 - includes/Preferences.php | 12 --------- includes/SkinLegacy.php | 40 ------------------------------ includes/diff/DifferenceEngine.php | 5 ---- languages/Language.php | 14 ----------- languages/messages/MessagesEn.php | 9 ------- languages/messages/MessagesQqq.php | 9 ------- maintenance/language/messages.inc | 10 -------- 9 files changed, 5 insertions(+), 103 deletions(-) diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 18249102f8..25401dc11e 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -328,7 +328,7 @@ changes to languages because of Bugzilla reports. were using it, you have to either copy it to your extension, or install the Vector extension (and possibly disable its features using config settings if you don't want them). -* Experimental IBM DB2 support was removed due to lack of interest and maintainership +* Experimental IBM DB2 support was removed due to lack of interest and maintainership. * BREAKING CHANGE: Filenames of maintenance scripts were standardized into lowerCamelCase format, and made more explicit: - clear_stats.php -> clearCacheStats.php @@ -344,7 +344,7 @@ changes to languages because of Bugzilla reports. - ShowStats -> ShowSiteStats. * BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module and moved it to the TitleBlacklist extension. -* The Special:ActiveUsers special page was removed +* The Special:ActiveUsers special page was removed. * BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding has changed: ** MediaWiki no longer supports PHP installations in which the native JSON @@ -354,11 +354,13 @@ changes to languages because of Bugzilla reports. ** The sets of characters escaped by default, along with the precise escape sequences used, have changed (except for the Xml::escapeJsString() function, which is now deprecated). -* BREAKING CHANGE: The Services_JSON class has been removed; if necessary, +* BREAKING CHANGE: The Services_JSON class has been removed. If necessary, be sure to upgrade affected extensions at the same time (e.g. Collection). * Calling Linker methods using a skin will now output deprecation warnings. * Pages with a returnto (such as the page when you login or logout), no longer have a rel="next" link tag. +* The Quickbar feature of the legacy skin model and the last remnants of it + throughout the code base have been removed. == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5f7eb65fbc..d660f50391 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3672,7 +3672,6 @@ $wgDefaultUserOptions = array( 'numberheadings' => 0, 'previewonfirst' => 0, 'previewontop' => 1, - 'quickbar' => 5, 'rcdays' => 7, 'rclimit' => 50, 'rememberpassword' => 0, diff --git a/includes/Preferences.php b/includes/Preferences.php index 56dba05ee8..8edf60a84c 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -546,18 +546,6 @@ class Preferences { 'section' => 'rendering/skin', ); } - - $selectedSkin = $user->getOption( 'skin' ); - if ( in_array( $selectedSkin, array( 'cologneblue', 'standard' ) ) ) { - $settings = array_flip( $context->getLanguage()->getQuickbarSettings() ); - - $defaultPreferences['quickbar'] = array( - 'type' => 'radio', - 'options' => $settings, - 'section' => 'rendering/skin', - 'label-message' => 'qbsettings', - ); - } } /** diff --git a/includes/SkinLegacy.php b/includes/SkinLegacy.php index b17abc275e..9d657f7b71 100644 --- a/includes/SkinLegacy.php +++ b/includes/SkinLegacy.php @@ -36,46 +36,6 @@ class SkinLegacy extends SkinTemplate { public function commonPrintStylesheet() { return true; } - - /** - * This was for the old skins and for users with 640x480 screen. - * Please note old skins are still used and might prove useful for - * users having old computers or visually impaired. - */ - var $mSuppressQuickbar = false; - - /** - * Suppress the quickbar from the output, only for skin supporting - * the quickbar - */ - public function suppressQuickbar() { - $this->mSuppressQuickbar = true; - } - - /** - * Return whether the quickbar should be suppressed from the output - * - * @return Boolean - */ - public function isQuickbarSuppressed() { - return $this->mSuppressQuickbar; - } - - function qbSetting() { - global $wgUser; - if ( $this->isQuickbarSuppressed() ) { - return 0; - } - $q = $wgUser->getOption( 'quickbar', 0 ); - if( $q == 5 ) { - # 5 is the default, which chooses the setting - # depending on the directionality of your interface language - global $wgLang; - return $wgLang->isRTL() ? 2 : 1; - } - return $q; - } - } class LegacyTemplate extends BaseTemplate { diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index d44c05032b..d03a5bee73 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -279,11 +279,6 @@ class DifferenceEngine extends ContextSource { } else { wfRunHooks( 'DiffViewHeader', array( $this, $this->mOldRev, $this->mNewRev ) ); - $sk = $this->getSkin(); - if ( method_exists( $sk, 'suppressQuickbar' ) ) { - $sk->suppressQuickbar(); - } - if ( $this->mNewPage->equals( $this->mOldPage ) ) { $out->setPageTitle( $this->msg( 'difference-title', $this->mNewPage->getPrefixedText() ) ); $samePage = true; diff --git a/languages/Language.php b/languages/Language.php index 57d456a6d7..dd8a314068 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -742,20 +742,6 @@ class Language { return $this->getNsText( NS_SPECIAL ) . ':' . $name; } - /** - * @return array - */ - function getQuickbarSettings() { - return array( - $this->getMessage( 'qbsettings-none' ), - $this->getMessage( 'qbsettings-fixedleft' ), - $this->getMessage( 'qbsettings-fixedright' ), - $this->getMessage( 'qbsettings-floatingleft' ), - $this->getMessage( 'qbsettings-floatingright' ), - $this->getMessage( 'qbsettings-directionality' ) - ); - } - /** * @return array */ diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 8365dcb131..c5dba69dc0 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1805,15 +1805,6 @@ Note that their indexes of {{SITENAME}} content may be out of date.', # OpenSearch description 'opensearch-desc' => '{{SITENAME}} ({{CONTENTLANGUAGE}})', # do not translate or duplicate this message to other languages -# Quickbar -'qbsettings' => 'Quickbar', -'qbsettings-none' => 'None', -'qbsettings-fixedleft' => 'Fixed left', -'qbsettings-fixedright' => 'Fixed right', -'qbsettings-floatingleft' => 'Floating left', -'qbsettings-floatingright' => 'Floating right', -'qbsettings-directionality' => 'Fixed, depending on the script directionality of your language', - # Preferences page 'preferences' => 'Preferences', 'preferences-summary' => '', # do not translate or duplicate this message to other languages diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index eea11fb271..725d911791 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2332,15 +2332,6 @@ In this sentence, "their indexes" refers to "Google\'s indexes". Shown on [[Special:Search]] when the internal search is disabled.', -# Quickbar -'qbsettings' => 'The title of the section in [[Special:Preferences]], only shown when using the skins "Standard/Classic" or "Cologne Blue". The quicbar is the same as the sidebar.', -'qbsettings-none' => '{{Identical|None}}', -'qbsettings-fixedleft' => 'Position of the quickbar (sidebar). Used in the preferences.', -'qbsettings-fixedright' => 'Position of the quickbar (sidebar). Used in the preferences.', -'qbsettings-floatingleft' => 'Position of the quickbar (sidebar). Used in the preferences.', -'qbsettings-floatingright' => 'Position of the quickbar (sidebar). Used in the preferences.', -'qbsettings-directionality' => '"Fixed", as in the position "fixed left or right". For left-to-right languages, the quickbar will be positioned at the left, for right-to-left languages at the right.', - # Preferences page 'preferences' => 'Title of the [[Special:Preferences]] page. {{Identical|Preferences}}', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 8361b1b343..33628b6884 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -947,15 +947,6 @@ $wgMessageStructure = array( 'opensearch' => array( 'opensearch-desc', ), - 'quickbar' => array( - 'qbsettings', - 'qbsettings-none', - 'qbsettings-fixedleft', - 'qbsettings-fixedright', - 'qbsettings-floatingleft', - 'qbsettings-floatingright', - 'qbsettings-directionality', - ), 'preferences' => array( 'preferences', 'preferences-summary', @@ -3878,7 +3869,6 @@ XHTML id names.", 'diffs' => 'Diffs', 'search' => 'Search results', 'opensearch' => 'OpenSearch description', - 'quickbar' => 'Quickbar', 'preferences' => 'Preferences page', 'preferences-email' => 'User preference: email validation using jQuery', 'userrights' => 'User rights', -- 2.20.1