From a563262b17764f11a177562b5106f9ef75a0d58b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 7 Apr 2005 22:23:40 +0000 Subject: [PATCH] * Print $namespace:$page if $invert is true and $namespace != NS_MAIN --- includes/SpecialAllpages.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index 35ad709588..78a87e727e 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -1,6 +1,5 @@ '; + + $namespaces = $wgContLang->getNamespaces(); + foreach($namespaces as $key => $ns) { + $namespaces[$key] = str_replace('_', ' ', $namespaces[$key]); + } + while( ($n < $indexMaxperpage) && ($s = $dbr->fetchObject( $res )) ) { $t = Title::makeTitle( $s->page_namespace, $s->page_title ); if( $t ) { - $link = $sk->makeKnownLinkObj( $t, $t->getText() ); + $link = $sk->makeKnownLinkObj( $t, $t->getText(), false, false, $namespaces[$s->page_namespace] . + (($invert && $namespaces[$s->page_namespace] != NS_MAIN) ? ':' :'') ); } else { $link = '[[' . htmlspecialchars( $s->page_title ) . ']]'; } -- 2.20.1