From b17e44b36744ec1fbc195d7df211dc9ed405c819 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 16 May 2007 21:57:55 +0000 Subject: [PATCH] Fix a couple regressions due to diff style changes, where diffs were shown unstyled: * 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 | 2 +- includes/EditPage.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 511995d9d2..5634a4c04c 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -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', "(fixme, bug)" ) ); return false; } else { + $wgOut->addStyle( 'common/diff.css' ); $wgOut->addHTML( $diff ); return true; } diff --git a/includes/EditPage.php b/includes/EditPage.php index 6493698a62..bf89f3f937 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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() ); } -- 2.20.1