$out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
$out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
- $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
+ $out .= Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() );
$out .= Xml::openElement( 'fieldset' );
$out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
$out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
$t = Title::makeTitle( $s->page_namespace, $s->page_title );
if ( $t ) {
$displayed = $t->getText();
- if ( $this->stripPrefix ) {
+ // Try not to generate unclickable links
+ if ( $this->stripPrefix && $prefixLength !== strlen( $displayed ) ) {
$displayed = substr( $displayed, $prefixLength );
}
$link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
$out2 = '';
} else {
$nsForm = $this->namespacePrefixForm( $namespace, $prefix );
- $self = $this->getTitle();
+ $self = $this->getPageTitle();
$out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) .
'<tr>
<td>' .