r104262 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104261‎ | r104262 | r104263 >
Date:00:32, 26 November 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Followup r102624

Change $wgRealNameInInterface default to false

<mumble>change</mumble>
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -873,7 +873,7 @@
874874 'href' => $title->getLocalURL( $this->editUrlOptions() ),
875875 'primary' => true, // don't collapse this in vector
876876 );
877 -
 877+
878878 // section link
879879 if ( $showNewSection ) {
880880 // Adds new section link
@@ -982,7 +982,7 @@
983983 // Checks that language conversion is enabled and variants exist
984984 // And if it is not in the special namespace
985985 if( count( $variants ) > 1 ) {
986 - // Gets preferred variant (note that user preference is
 986+ // Gets preferred variant (note that user preference is
987987 // only possible for wiki content language variant)
988988 $preferred = $pageLang->getPreferredVariant();
989989 // Loops over each variant
@@ -1452,6 +1452,7 @@
14531453 * This is in reality the same list as already stored in personal_urls
14541454 * however it is reformatted so that you can just pass the individual items
14551455 * to makeListItem instead of hardcoding the element creation boilerplate.
 1456+ * @return array
14561457 */
14571458 function getPersonalTools() {
14581459 $personal_tools = array();
@@ -1485,7 +1486,7 @@
14861487 if ( !isset( $sidebar['LANGUAGES'] ) ) {
14871488 $sidebar['LANGUAGES'] = true;
14881489 }
1489 -
 1490+
14901491 if ( !isset( $options['search'] ) || $options['search'] !== true ) {
14911492 unset( $sidebar['SEARCH'] );
14921493 }
@@ -1495,7 +1496,7 @@
14961497 if ( isset( $options['languages'] ) && $options['languages'] === false ) {
14971498 unset( $sidebar['LANGUAGES'] );
14981499 }
1499 -
 1500+
15001501 $boxes = array();
15011502 foreach ( $sidebar as $boxName => $content ) {
15021503 if ( $content === false ) {
@@ -1529,7 +1530,7 @@
15301531 'generated' => false,
15311532 'content' => $this->data['language_urls'],
15321533 );
1533 - }
 1534+ }
15341535 break;
15351536 default:
15361537 $msgObj = $this->getMsg( $boxName );
@@ -1542,7 +1543,7 @@
15431544 break;
15441545 }
15451546 }
1546 -
 1547+
15471548 // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
15481549 $hookContents = null;
15491550 if ( isset( $boxes['TOOLBOX'] ) ) {
@@ -1557,7 +1558,7 @@
15581559 }
15591560 }
15601561 // END hack
1561 -
 1562+
15621563 if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
15631564 foreach ( $boxes as $boxName => $box ) {
15641565 if ( is_array( $box['content'] ) ) {
@@ -1567,7 +1568,7 @@
15681569 }
15691570 // HACK, shove the toolbox end onto the toolbox if we're rendering itself
15701571 if ( $hookContents ) {
1571 - $content .= "\n $hookContents";
 1572+ $content .= "\n $hookContents";
15721573 }
15731574 // END hack
15741575 $content .= "\n</ul>\n";
@@ -1597,7 +1598,7 @@
15981599 // END hack
15991600 }
16001601 }
1601 -
 1602+
16021603 return $boxes;
16031604 }
16041605
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2250,7 +2250,7 @@
22512251 * Use a user's real name inside the user interface for display instead of the username
22522252 * (experimental)
22532253 */
2254 -$wgRealNameInInterface = true;
 2254+$wgRealNameInInterface = false;
22552255
22562256 /**
22572257 * Site notice shown at the top of each page

Follow-up revisions

RevisionCommit summaryAuthorDate
r108581Revert r102624, r104262 (user display name stuff). Per CR there isn't consens...demon00:53, 11 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102624Add a new User::getDisplayName() to return the name that should be displayed ...dantman06:55, 10 November 2011

Comments

#Comment by Olivier Beaton (talk | contribs)   02:34, 26 November 2011

I still say to remove the $wgRealNameInInterface variable/realname code completely. It doesn't do the most expected setup (append) while still not providing even a good replacement feature on it's own. I'm all for this new function+hook just keep the realname feature in an extension. This new hook will allow it to do better replacement so that things like a userlist can appear sorted by realname and giving people good options about customizability.

#Comment by Reedy (talk | contribs)   11:55, 26 November 2011

Sure, but Im only changing the default back to what people are used to, because the change was weird

That's another discussion that you've already started

Status & tagging log