(bug 12400) Add class to content transcluded from IW source.
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 6a85f29..2f4d702 100644 (file)
@@ -134,6 +134,10 @@ class Parser
                $this->mVarCache = array();
                if ( isset( $conf['preprocessorClass'] ) ) {
                        $this->mPreprocessorClass = $conf['preprocessorClass'];
+               } elseif ( extension_loaded( 'domxml' ) ) {
+                       // PECL extension that conflicts with the core DOM extension (bug 13770)
+                       wfDebug( "Warning: you have the obsolete domxml extension for PHP. Please remove it!\n" );
+                       $this->mPreprocessorClass = 'Preprocessor_Hash';
                } elseif ( extension_loaded( 'dom' ) ) {
                        $this->mPreprocessorClass = 'Preprocessor_DOM';
                } else {
@@ -3157,7 +3161,7 @@ class Parser
 
                if (strlen($url) > 255)
                        return wfMsg('scarytranscludetoolong');
-               return $this->fetchScaryTemplateMaybeFromCache($url);
+               return "<div class=\"mw-iw-transclusion\">\n" . $this->fetchScaryTemplateMaybeFromCache($url) . "</div>\n";
        }
 
        function fetchScaryTemplateMaybeFromCache($url) {