Merge "Change delimiter for multiple namespaces and tags"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 19f368a..ecee0e2 100644 (file)
@@ -589,6 +589,14 @@ class Parser {
                                        $this->mTitle->getPrefixedDBkey() );
                        }
                }
+
+               # Wrap non-interface parser output in a <div> so it can be targeted
+               # with CSS (T37247)
+               $class = $this->mOptions->getWrapOutputClass();
+               if ( $class !== false && !$this->mOptions->getInterfaceMessage() ) {
+                       $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+               }
+
                $this->mOutput->setText( $text );
 
                $this->mRevisionId = $oldRevisionId;
@@ -3476,7 +3484,7 @@ class Parser {
 
                if ( !$title->equals( $cacheTitle ) ) {
                        $this->mTplRedirCache[$cacheTitle->getPrefixedDBkey()] =
-                               [ $title->getNamespace(), $cdb = $title->getDBkey() ];
+                               [ $title->getNamespace(), $title->getDBkey() ];
                }
 
                return [ $dom, $title ];