From: Brion Vibber Date: Wed, 16 May 2007 21:57:55 +0000 (+0000) Subject: Fix a couple regressions due to diff style changes, where diffs were shown unstyled: X-Git-Tag: 1.31.0-rc.0~52891 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=b17e44b36744ec1fbc195d7df211dc9ed405c819;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ); }