Fix a couple regressions due to diff style changes, where diffs were shown unstyled:
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 16 May 2007 21:57:55 +0000 (21:57 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 16 May 2007 21:57:55 +0000 (21:57 +0000)
* move the addition of common/diffs.css from showDiffPage() to showDiff() which catches most 'legit' cases
* hack it in to a couple of uses where getDiff() is used and manually spit out
* hack around the hacked-up custom diff table in Oversight... that should be refactored in the base class

includes/DifferenceEngine.php
includes/EditPage.php

index 511995d..5634a4c 100644 (file)
@@ -104,7 +104,6 @@ CONTROL;
                        return;
                }
 
-               $wgOut->addStyle( 'common/diff.css' );
                $wgOut->setArticleFlag( false );
                if ( ! $this->loadRevisionData() ) {
                        $t = $this->mTitle->getPrefixedText() . " (Diff: {$this->mOldid}, {$this->mNewid})";
@@ -297,6 +296,7 @@ CONTROL;
                        $wgOut->addWikitext( wfMsg( 'missingarticle', "<nowiki>(fixme, bug)</nowiki>" ) );
                        return false;
                } else {
+                       $wgOut->addStyle( 'common/diff.css' );
                        $wgOut->addHTML( $diff );
                        return true;
                }
index 6493698..bf89f3f 100644 (file)
@@ -1089,6 +1089,7 @@ class EditPage {
                        }
 
                        if ( 'diff' == $this->formtype ) {
+                               $wgOut->addStyle( 'common/diff.css' );
                                $wgOut->addHTML( $this->getDiff() );
                        }
                }
@@ -1271,6 +1272,7 @@ END
                        }
 
                        if ( $this->formtype == 'diff') {
+                               $wgOut->addStyle( 'common/diff.css' );
                                $wgOut->addHTML( $this->getDiff() );
                        }