Index: trunk/phase3/includes/Title.php |
— | — | @@ -571,8 +571,8 @@ |
572 | 572 | return $this->getNsTextInternal( $this->mNamespace ); |
573 | 573 | } |
574 | 574 | |
575 | | - function getNsTextInternal( $namespace) { |
576 | | - global $wgContLang, $wgSlowGenderAliases, $wgTitle, $title; |
| 575 | + function getNsTextInternal( $namespace ) { |
| 576 | + global $wgContLang, $wgRequest, $wgTitle, $wgSlowGenderAliases; |
577 | 577 | if( $namespace === NS_USER || $namespace === NS_USER_TALK ) { |
578 | 578 | static $gender = null; |
579 | 579 | |
— | — | @@ -581,13 +581,13 @@ |
582 | 582 | $gender[$name] = User::getDefaultOption( 'gender' ); |
583 | 583 | |
584 | 584 | // wgTitle may not be defined |
585 | | - $mytitle = isset($wgTitle) ? $wgTitle: Title::newFromText($title); |
| 585 | + $mytitle = isset( $wgTitle ) ? $wgTitle : Title::newFromText( $wgRequest->getVal( 'title' ) ); |
586 | 586 | |
587 | 587 | // Check stuff |
588 | 588 | if ( $wgSlowGenderAliases || |
589 | 589 | // Needs to be checked always to produce desired |
590 | 590 | // effect when viewing user pages |
591 | | - ($mytitle && $name === $mytitle->getBaseText()) ) { |
| 591 | + ( $mytitle && $name === $mytitle->getBaseText() ) ) { |
592 | 592 | |
593 | 593 | $user = User::newFromName( $name ); |
594 | 594 | if ( $user ) $gender[$name] = $user->getOption( 'gender' ); |