$this->thisquery = wfArrayToCGI( $query );
$this->loggedin = $user->isLoggedIn();
$this->username = $user->getName();
- $this->userdisplayname = $user->getDisplayName();
if ( $this->loggedin || $this->showIPinHeader() ) {
$this->userpageUrlDetails = self::makeUrlDetails( $this->userpage );
$tpl->set( 'capitalizeallnouns', $lang->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' );
$tpl->set( 'showjumplinks', $user->getOption( 'showjumplinks' ) );
$tpl->set( 'username', $this->loggedin ? $this->username : null );
- $tpl->set( 'userdisplayname', $this->loggedin ? $this->userdisplayname : null );
$tpl->setRef( 'userpage', $this->userpage );
$tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] );
$tpl->set( 'userlang', $userlang );
$returnto = wfArrayToCGI( $a );
if( $this->loggedin ) {
$personal_urls['userpage'] = array(
- 'text' => $this->userdisplayname,
+ 'text' => $this->username,
'href' => &$this->userpageUrlDetails['href'],
'class' => $this->userpageUrlDetails['exists'] ? false : 'new',
'active' => ( $this->userpageUrlDetails['href'] == $pageurl )
if( $this->showIPinHeader() ) {
$href = &$this->userpageUrlDetails['href'];
$personal_urls['anonuserpage'] = array(
- 'text' => $this->userdisplayname,
+ 'text' => $this->username,
'href' => $href,
'class' => $this->userpageUrlDetails['exists'] ? false : 'new',
'active' => ( $pageurl == $href )
'href' => $title->getLocalURL( $this->editUrlOptions() ),
'primary' => true, // don't collapse this in vector
);
-
+
// section link
if ( $showNewSection ) {
// Adds new section link
// Checks that language conversion is enabled and variants exist
// And if it is not in the special namespace
if( count( $variants ) > 1 ) {
- // Gets preferred variant (note that user preference is
+ // Gets preferred variant (note that user preference is
// only possible for wiki content language variant)
$preferred = $pageLang->getPreferredVariant();
// Loops over each variant
* This is in reality the same list as already stored in personal_urls
* however it is reformatted so that you can just pass the individual items
* to makeListItem instead of hardcoding the element creation boilerplate.
- * @return array
*/
function getPersonalTools() {
$personal_tools = array();
if ( !isset( $sidebar['LANGUAGES'] ) ) {
$sidebar['LANGUAGES'] = true;
}
-
+
if ( !isset( $options['search'] ) || $options['search'] !== true ) {
unset( $sidebar['SEARCH'] );
}
if ( isset( $options['languages'] ) && $options['languages'] === false ) {
unset( $sidebar['LANGUAGES'] );
}
-
+
$boxes = array();
foreach ( $sidebar as $boxName => $content ) {
if ( $content === false ) {
'generated' => false,
'content' => $this->data['language_urls'],
);
- }
+ }
break;
default:
$msgObj = $this->getMsg( $boxName );
break;
}
}
-
+
// HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
$hookContents = null;
if ( isset( $boxes['TOOLBOX'] ) ) {
}
}
// END hack
-
+
if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
foreach ( $boxes as $boxName => $box ) {
if ( is_array( $box['content'] ) ) {
}
// HACK, shove the toolbox end onto the toolbox if we're rendering itself
if ( $hookContents ) {
- $content .= "\n $hookContents";
+ $content .= "\n $hookContents";
}
// END hack
$content .= "\n</ul>\n";
// END hack
}
}
-
+
return $boxes;
}
*/
var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mRights,
$mBlockreason, $mEffectiveGroups, $mImplicitGroups, $mFormerGroups, $mBlockedGlobally,
- $mLocked, $mHideName, $mOptions, $mDisplayName;
+ $mLocked, $mHideName, $mOptions;
/**
* @var WebRequest
$this->mEffectiveGroups = null;
$this->mImplicitGroups = null;
$this->mOptions = null;
- $this->mDisplayName = null;
if ( $reloadFrom ) {
$this->mLoadedItems = array();
$this->mRealName = $str;
}
- /**
- * Return the name of this user we should used to display in the user interface
- * @return String The user's display name
- */
- public function getDisplayName() {
- global $wgRealNameInInterface;
- if ( is_null( $this->mDisplayName ) ) {
- $displayName = null;
-
- // Allow hooks to set a display name
- wfRunHooks( 'UserDisplayName', array( $this, &$displayName ) );
-
- if ( is_null( $displayName ) && $wgRealNameInInterface && $this->getRealName() ) {
- // If $wgRealNameInInterface is true use the real name as the display name if it's set
- $displayName = $this->getRealName();
- }
-
- if ( is_null( $displayName ) ) {
- $displayName = $this->getName();
- }
-
- $this->mDisplayName = $displayName;
- }
- return $this->mDisplayName;
- }
-
/**
* Get the user's current setting for a given option.
*