From 5b96b26a17170203dd1fbb1f7b05f55b70a70290 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Sat, 24 Nov 2012 23:15:12 +0000 Subject: [PATCH] Revert "(bug 42337) Simplify "my talk" link logic in personal tools" For 2 reasons: * The parentheses look (according to CologneBlue) weird in skins others than Monobook and Vector (where they are bulleted lists) * The parentheses look (according to Krinkle) weird in Vector and Monobook as well. * The casing changed from (talk) to (Talk), which is odd. Please try again. This reverts commit f31209dfb307ec2bac20107e788578b762f70e89 --- includes/DefaultSettings.php | 7 +++++++ includes/SkinTemplate.php | 7 ------- skins/Vector.php | 16 +++++++++++++++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 77a9de1e82..60c3ab8754 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2776,6 +2776,13 @@ $wgFooterIcons = array( */ $wgUseCombinedLoginLink = false; +/** + * Appearance of user page and talk page labels in personal tools. + * - true = combine links into a single label + * - false = keep links in separate labels + */ +$wgVectorCombineUserTalk = false; + /** * Search form look for Vector skin only. * - true = use an icon search button diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index a24ece5c8a..173d37af6f 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1777,13 +1777,6 @@ abstract class BaseTemplate extends QuickTemplate { $attrs['class'] .= ' active'; $attrs['class'] = trim( $attrs['class'] ); } - - // A special case for the talk link in personal tools. - // See bug 41672 and 42337. - if ( $key === 'mytalk' ) { - $html = $this->getMsg( 'parentheses' )->rawParams( $html )->escaped(); - } - return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html ); } diff --git a/skins/Vector.php b/skins/Vector.php index 8d685bdf6c..92eb3ad02f 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -367,7 +367,7 @@ class VectorTemplate extends BaseTemplate { * @param $elements array */ protected function renderNavigation( $elements ) { - global $wgVectorUseSimpleSearch; + global $wgVectorUseSimpleSearch, $wgVectorCombineUserTalk; // If only one element was given, wrap it in an array, allowing more // flexible arguments @@ -452,6 +452,20 @@ class VectorTemplate extends BaseTemplate { html( 'userlangattributes' ) ?>> getPersonalTools(); + if ( $wgVectorCombineUserTalk && isset( $personalTools['userpage'] ) ) { +?> +
  • +makeListItem( 'userpage', $personalTools['userpage'], array( 'tag' => 'span' ) ); +?> getMsg( 'mytalk-parenthetical' )->text(); + $talkItem = $this->makeListItem( 'mytalk', $personalTools['mytalk'], array( 'tag' => 'span' ) ); + echo $this->getMsg( 'parentheses' )->rawParams( $talkItem )->escaped(); + unset( $personalTools['userpage'], $personalTools['mytalk'] ); +?> +
  • + $item ) { echo $this->makeListItem( $key, $item ); } -- 2.20.1