Merge "Added result properties to action=paraminfo"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index ba7ff60..f881455 100644 (file)
@@ -2859,7 +2859,8 @@ class Parser {
                                $value = $pageLang->formatNum( SiteStats::edits() );
                                break;
                        case 'numberofviews':
-                               $value = $pageLang->formatNum( SiteStats::views() );
+                               global $wgDisableCounters;
+                               $value = !$wgDisableCounters ? $pageLang->formatNum( SiteStats::views() ) : '';
                                break;
                        case 'currenttimestamp':
                                $value = wfTimestamp( TS_MW, $ts );
@@ -3309,7 +3310,7 @@ class Parser {
                                                $isHTML = true;
                                                $this->disableCache();
                                        }
-                               } elseif ( MWNamespace::isNonincludableNamespace( $title->getNamespace() ) ) {
+                               } elseif ( MWNamespace::isNonincludable( $title->getNamespace() ) ) {
                                        $found = false; # access denied
                                        wfDebug( __METHOD__.": template inclusion denied for " . $title->getPrefixedDBkey() );
                                } else {
@@ -3390,10 +3391,8 @@ class Parser {
                }
 
                # Replace raw HTML by a placeholder
-               # Add a blank line preceding, to prevent it from mucking up
-               # immediately preceding headings
                if ( $isHTML ) {
-                       $text = "\n\n" . $this->insertStripItem( $text );
+                       $text = $this->insertStripItem( $text );
                } elseif ( $nowiki && ( $this->ot['html'] || $this->ot['pre'] ) ) {
                        # Escape nowiki-style return values
                        $text = wfEscapeWikiText( $text );