From: Ævar Arnfjörð Bjarmason Date: Thu, 7 Apr 2005 22:23:40 +0000 (+0000) Subject: * Print $namespace:$page if $invert is true and $namespace != NS_MAIN X-Git-Tag: 1.5.0alpha1~349 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=a563262b17764f11a177562b5106f9ef75a0d58b;p=lhc%2Fweb%2Fwiklou.git * Print $namespace:$page if $invert is true and $namespace != NS_MAIN --- 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 ) . ']]'; }