Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -2074,10 +2074,6 @@ |
2075 | 2075 | hashing method |
2076 | 2076 | &$hash: If the hook returns false, this String will be used as the hash |
2077 | 2077 | |
2078 | | -'UserDisplayName': Called in User::getDisplayName() |
2079 | | -$user: The user object to fetch the display name for |
2080 | | -&$displayName: The display name. Will be null. Set to a name to override default name. |
2081 | | - |
2082 | 2078 | 'UserEffectiveGroups': Called in User::getEffectiveGroups() |
2083 | 2079 | $user: User to get groups for |
2084 | 2080 | &$groups: Current effective groups |
Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -82,8 +82,6 @@ |
83 | 83 | * The default user signature now contains a talk link in addition to the user link. |
84 | 84 | * (bug 25306) Add link of old page title to MediaWiki:Delete_and_move_reason. |
85 | 85 | * Added hook BitmapHandlerCheckImageArea. |
86 | | -* (experimental) $wgRealNameInInterface can be enabled to display a user's |
87 | | - real name in some parts of the interface instead of a username. |
88 | 86 | * (bug 30062) Add $wgDBprefix option to cli installer. |
89 | 87 | * getUserPermissionsErrors and getUserPermissionsErrorsExpensive hooks are now |
90 | 88 | also called when checking for 'read' permission. |
Index: trunk/phase3/includes/User.php |
— | — | @@ -197,7 +197,7 @@ |
198 | 198 | */ |
199 | 199 | var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mRights, |
200 | 200 | $mBlockreason, $mEffectiveGroups, $mImplicitGroups, $mFormerGroups, $mBlockedGlobally, |
201 | | - $mLocked, $mHideName, $mOptions, $mDisplayName; |
| 201 | + $mLocked, $mHideName, $mOptions; |
202 | 202 | |
203 | 203 | /** |
204 | 204 | * @var WebRequest |
— | — | @@ -1191,7 +1191,6 @@ |
1192 | 1192 | $this->mEffectiveGroups = null; |
1193 | 1193 | $this->mImplicitGroups = null; |
1194 | 1194 | $this->mOptions = null; |
1195 | | - $this->mDisplayName = null; |
1196 | 1195 | |
1197 | 1196 | if ( $reloadFrom ) { |
1198 | 1197 | $this->mLoadedItems = array(); |
— | — | @@ -2141,32 +2140,6 @@ |
2142 | 2141 | } |
2143 | 2142 | |
2144 | 2143 | /** |
2145 | | - * Return the name of this user we should used to display in the user interface |
2146 | | - * @return String The user's display name |
2147 | | - */ |
2148 | | - public function getDisplayName() { |
2149 | | - global $wgRealNameInInterface; |
2150 | | - if ( is_null( $this->mDisplayName ) ) { |
2151 | | - $displayName = null; |
2152 | | - |
2153 | | - // Allow hooks to set a display name |
2154 | | - wfRunHooks( 'UserDisplayName', array( $this, &$displayName ) ); |
2155 | | - |
2156 | | - if ( is_null( $displayName ) && $wgRealNameInInterface && $this->getRealName() ) { |
2157 | | - // If $wgRealNameInInterface is true use the real name as the display name if it's set |
2158 | | - $displayName = $this->getRealName(); |
2159 | | - } |
2160 | | - |
2161 | | - if ( is_null( $displayName ) ) { |
2162 | | - $displayName = $this->getName(); |
2163 | | - } |
2164 | | - |
2165 | | - $this->mDisplayName = $displayName; |
2166 | | - } |
2167 | | - return $this->mDisplayName; |
2168 | | - } |
2169 | | - |
2170 | | - /** |
2171 | 2144 | * Get the user's current setting for a given option. |
2172 | 2145 | * |
2173 | 2146 | * @param $oname String The option to check |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -177,7 +177,6 @@ |
178 | 178 | $this->thisquery = wfArrayToCGI( $query ); |
179 | 179 | $this->loggedin = $user->isLoggedIn(); |
180 | 180 | $this->username = $user->getName(); |
181 | | - $this->userdisplayname = $user->getDisplayName(); |
182 | 181 | |
183 | 182 | if ( $this->loggedin || $this->showIPinHeader() ) { |
184 | 183 | $this->userpageUrlDetails = self::makeUrlDetails( $this->userpage ); |
— | — | @@ -288,7 +287,6 @@ |
289 | 288 | $tpl->set( 'capitalizeallnouns', $lang->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' ); |
290 | 289 | $tpl->set( 'showjumplinks', $user->getOption( 'showjumplinks' ) ); |
291 | 290 | $tpl->set( 'username', $this->loggedin ? $this->username : null ); |
292 | | - $tpl->set( 'userdisplayname', $this->loggedin ? $this->userdisplayname : null ); |
293 | 291 | $tpl->setRef( 'userpage', $this->userpage ); |
294 | 292 | $tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] ); |
295 | 293 | $tpl->set( 'userlang', $userlang ); |
— | — | @@ -551,7 +549,7 @@ |
552 | 550 | $returnto = wfArrayToCGI( $a ); |
553 | 551 | if( $this->loggedin ) { |
554 | 552 | $personal_urls['userpage'] = array( |
555 | | - 'text' => $this->userdisplayname, |
| 553 | + 'text' => $this->username, |
556 | 554 | 'href' => &$this->userpageUrlDetails['href'], |
557 | 555 | 'class' => $this->userpageUrlDetails['exists'] ? false : 'new', |
558 | 556 | 'active' => ( $this->userpageUrlDetails['href'] == $pageurl ) |
— | — | @@ -646,7 +644,7 @@ |
647 | 645 | if( $this->showIPinHeader() ) { |
648 | 646 | $href = &$this->userpageUrlDetails['href']; |
649 | 647 | $personal_urls['anonuserpage'] = array( |
650 | | - 'text' => $this->userdisplayname, |
| 648 | + 'text' => $this->username, |
651 | 649 | 'href' => $href, |
652 | 650 | 'class' => $this->userpageUrlDetails['exists'] ? false : 'new', |
653 | 651 | 'active' => ( $pageurl == $href ) |
— | — | @@ -871,7 +869,7 @@ |
872 | 870 | 'href' => $title->getLocalURL( $this->editUrlOptions() ), |
873 | 871 | 'primary' => true, // don't collapse this in vector |
874 | 872 | ); |
875 | | - |
| 873 | + |
876 | 874 | // section link |
877 | 875 | if ( $showNewSection ) { |
878 | 876 | // Adds new section link |
— | — | @@ -980,7 +978,7 @@ |
981 | 979 | // Checks that language conversion is enabled and variants exist |
982 | 980 | // And if it is not in the special namespace |
983 | 981 | if( count( $variants ) > 1 ) { |
984 | | - // Gets preferred variant (note that user preference is |
| 982 | + // Gets preferred variant (note that user preference is |
985 | 983 | // only possible for wiki content language variant) |
986 | 984 | $preferred = $pageLang->getPreferredVariant(); |
987 | 985 | // Loops over each variant |
— | — | @@ -1431,7 +1429,6 @@ |
1432 | 1430 | * This is in reality the same list as already stored in personal_urls |
1433 | 1431 | * however it is reformatted so that you can just pass the individual items |
1434 | 1432 | * to makeListItem instead of hardcoding the element creation boilerplate. |
1435 | | - * @return array |
1436 | 1433 | */ |
1437 | 1434 | function getPersonalTools() { |
1438 | 1435 | $personal_tools = array(); |
— | — | @@ -1465,7 +1462,7 @@ |
1466 | 1463 | if ( !isset( $sidebar['LANGUAGES'] ) ) { |
1467 | 1464 | $sidebar['LANGUAGES'] = true; |
1468 | 1465 | } |
1469 | | - |
| 1466 | + |
1470 | 1467 | if ( !isset( $options['search'] ) || $options['search'] !== true ) { |
1471 | 1468 | unset( $sidebar['SEARCH'] ); |
1472 | 1469 | } |
— | — | @@ -1475,7 +1472,7 @@ |
1476 | 1473 | if ( isset( $options['languages'] ) && $options['languages'] === false ) { |
1477 | 1474 | unset( $sidebar['LANGUAGES'] ); |
1478 | 1475 | } |
1479 | | - |
| 1476 | + |
1480 | 1477 | $boxes = array(); |
1481 | 1478 | foreach ( $sidebar as $boxName => $content ) { |
1482 | 1479 | if ( $content === false ) { |
— | — | @@ -1509,7 +1506,7 @@ |
1510 | 1507 | 'generated' => false, |
1511 | 1508 | 'content' => $this->data['language_urls'], |
1512 | 1509 | ); |
1513 | | - } |
| 1510 | + } |
1514 | 1511 | break; |
1515 | 1512 | default: |
1516 | 1513 | $msgObj = $this->getMsg( $boxName ); |
— | — | @@ -1522,7 +1519,7 @@ |
1523 | 1520 | break; |
1524 | 1521 | } |
1525 | 1522 | } |
1526 | | - |
| 1523 | + |
1527 | 1524 | // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd |
1528 | 1525 | $hookContents = null; |
1529 | 1526 | if ( isset( $boxes['TOOLBOX'] ) ) { |
— | — | @@ -1537,7 +1534,7 @@ |
1538 | 1535 | } |
1539 | 1536 | } |
1540 | 1537 | // END hack |
1541 | | - |
| 1538 | + |
1542 | 1539 | if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) { |
1543 | 1540 | foreach ( $boxes as $boxName => $box ) { |
1544 | 1541 | if ( is_array( $box['content'] ) ) { |
— | — | @@ -1547,7 +1544,7 @@ |
1548 | 1545 | } |
1549 | 1546 | // HACK, shove the toolbox end onto the toolbox if we're rendering itself |
1550 | 1547 | if ( $hookContents ) { |
1551 | | - $content .= "\n $hookContents"; |
| 1548 | + $content .= "\n $hookContents"; |
1552 | 1549 | } |
1553 | 1550 | // END hack |
1554 | 1551 | $content .= "\n</ul>\n"; |
— | — | @@ -1577,7 +1574,7 @@ |
1578 | 1575 | // END hack |
1579 | 1576 | } |
1580 | 1577 | } |
1581 | | - |
| 1578 | + |
1582 | 1579 | return $boxes; |
1583 | 1580 | } |
1584 | 1581 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -2281,12 +2281,6 @@ |
2282 | 2282 | $wgShowIPinHeader = true; |
2283 | 2283 | |
2284 | 2284 | /** |
2285 | | - * Use a user's real name inside the user interface for display instead of the username |
2286 | | - * (experimental) |
2287 | | - */ |
2288 | | -$wgRealNameInInterface = false; |
2289 | | - |
2290 | | -/** |
2291 | 2285 | * Site notice shown at the top of each page |
2292 | 2286 | * |
2293 | 2287 | * MediaWiki:Sitenotice page, which will override this. You can also |