Return nothing on empty math tags instead of char encoding
[lhc/web/wiklou.git] / includes / SpecialPrefixindex.php
index ebaff98..ce296b4 100644 (file)
@@ -27,7 +27,7 @@ function wfSpecialPrefixIndex( $par=NULL, $specialPage ) {
                $namespace = 0;
 
        $wgOut->setPagetitle( $namespace > 0 ?
-               wfMsg( 'allinnamespace', $namespaces[$namespace] ) :
+               wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
                wfMsg( 'allarticles' )
                );
 
@@ -97,7 +97,6 @@ function showChunk( $namespace = NS_MAIN, $prefix, $including = false, $from = n
                $n = 0;
                $out = '<table style="background: inherit;" border="0" width="100%">';
 
-               $namespaces = $wgContLang->getFormattedNamespaces();
                while( ($n < $this->maxPerPage) && ($s = $dbr->fetchObject( $res )) ) {
                        $t = Title::makeTitle( $s->page_namespace, $s->page_title );
                        if( $t ) {
@@ -131,7 +130,7 @@ function showChunk( $namespace = NS_MAIN, $prefix, $including = false, $from = n
                $out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' .
                                $sk->makeKnownLink( $wgContLang->specialPage( $this->name ),
                                        wfMsg ( 'allpages' ) );
-               if ( $dbr && ($n == $this->maxPerPage) && ($s = $dbr->fetchObject( $res )) ) {
+               if ( isset($dbr) && $dbr && ($n == $this->maxPerPage) && ($s = $dbr->fetchObject( $res )) ) {
                        $namespaceparam = $namespace ? "&namespace=$namespace" : "";
                        $out2 .= " | " . $sk->makeKnownLink(
                                $wgContLang->specialPage( $this->name ),