Merge "Apply the pseudo-css selector rules to diff and changelist pages"
[lhc/web/wiklou.git] / includes / diff / DifferenceEngine.php
index 43bc6e4..8e2b96d 100644 (file)
@@ -956,7 +956,10 @@ class DifferenceEngine extends ContextSource {
         */
        public function showDiffStyle() {
                if ( !$this->isSlotDiffRenderer ) {
-                       $this->getOutput()->addModuleStyles( 'mediawiki.diff.styles' );
+                       $this->getOutput()->addModuleStyles( [
+                               'mediawiki.interface.helpers.styles',
+                               'mediawiki.diff.styles'
+                       ] );
                        foreach ( $this->getSlotDiffRenderers() as $slotDiffRenderer ) {
                                $slotDiffRenderer->addModules( $this->getOutput() );
                        }
@@ -1033,7 +1036,7 @@ class DifferenceEngine extends ContextSource {
                        // Try cache
                        if ( !$this->mRefreshCache ) {
                                $difftext = $cache->get( $key );
-                               if ( $difftext ) {
+                               if ( is_string( $difftext ) ) {
                                        wfIncrStats( 'diff_cache.hit' );
                                        $difftext = $this->localiseDiff( $difftext );
                                        $difftext .= "\n<!-- diff cache key $key -->\n";