Another attempt at fixing the complexity and the broken RTL display
that change I822a7390 introduced.
This commit is the same as Change I36ec3bec, except that it completely
removes the parentheses that were added to the "talk" link and
the associated mytalk-parenthetical message.
The following is copied from the commit message of Change I36ec3bec:
Change I822a7390 introduced a somewhat complex way to display
the "talk" link in parentheses after the username. It would only
work in Vector, and it broke the display in RTL wikis, because
it hacked into the personal links array.
This change attempts to make it more robust, by keeping the
array intact. This fixes the display in RTL wikis.
This commit also eliminates the global $wgVectorCombineUserTalk,
which is not needed any more.
Change-Id: Ib6076396d7f5bbdd4ba771b21020bdbb8e0c5b2d
*/
$wgUseCombinedLoginLink = false;
*/
$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
/**
* Search form look for Vector skin only.
* - true = use an icon search button
'moredotdotdot' => 'More...',
'mypage' => 'Page',
'mytalk' => 'Talk',
'moredotdotdot' => 'More...',
'mypage' => 'Page',
'mytalk' => 'Talk',
-'mytalk-parenthetical' => 'talk',
'anontalk' => 'Talk for this IP address',
'navigation' => 'Navigation',
'and' => ' and',
'anontalk' => 'Talk for this IP address',
'navigation' => 'Navigation',
'and' => ' and',
* $1 is an unknown warning.',
'api-error-uploaddisabled' => 'API error message that can be used for client side localisation of API errors.',
'api-error-verification-error' => 'The word "extension" refers to the part behind the last dot in a file name, that by convention gives a hint about the kind of data format which a files contents are in.',
* $1 is an unknown warning.',
'api-error-uploaddisabled' => 'API error message that can be used for client side localisation of API errors.',
'api-error-verification-error' => 'The word "extension" refers to the part behind the last dot in a file name, that by convention gives a hint about the kind of data format which a files contents are in.',
-
-# Unknown messages
-'mytalk-parenthetical' => 'When user page and talk combined into single label, link title for talk label',
-);
* @param $elements array
*/
protected function renderNavigation( $elements ) {
* @param $elements array
*/
protected function renderNavigation( $elements ) {
- global $wgVectorUseSimpleSearch, $wgVectorCombineUserTalk;
+ global $wgVectorUseSimpleSearch;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php
$personalTools = $this->getPersonalTools();
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php
$personalTools = $this->getPersonalTools();
- if ( $wgVectorCombineUserTalk && isset( $personalTools['userpage'] ) ) {
-?>
- <li>
-<?php
- echo $this->makeListItem( 'userpage', $personalTools['userpage'], array( 'tag' => 'span' ) );
-?> <?php
- $personalTools['mytalk']['links'][0]['text'] = $this->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'] );
-?>
- </li>
-<?php
- }
foreach ( $personalTools as $key => $item ) {
echo $this->makeListItem( $key, $item );
}
foreach ( $personalTools as $key => $item ) {
echo $this->makeListItem( $key, $item );
}