SpecialPrefixindex: Try not to generate unclickable links
authorMatmaRex <matma.rex@gmail.com>
Fri, 30 Aug 2013 19:39:57 +0000 (21:39 +0200)
committerMatmaRex <matma.rex@gmail.com>
Fri, 30 Aug 2013 19:39:57 +0000 (21:39 +0200)
Bug: 52543
Change-Id: I1f202d9c07bba730200d226a664e5804aa961b68

includes/specials/SpecialPrefixindex.php

index c4c5c99..28d07ff 100644 (file)
@@ -210,7 +210,8 @@ class SpecialPrefixindex extends SpecialAllpages {
                                        $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">' : '' ) .