From 70ea9d60983625e9149d02671580f7487106743e Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Sat, 10 Sep 2011 23:51:08 +0000 Subject: [PATCH] * Per Aaron on r96261, use string 'flip' instead of boolean * Apparently @noflip should only be set once, otherwise it behaves differently --- includes/OutputPage.php | 4 ++-- skins/CologneBlue.php | 2 +- skins/Simple.php | 2 +- skins/Standard.php | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 42f81d0af1..5124ba1aa6 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2955,10 +2955,10 @@ $distantTemplates /** * Adds inline CSS styles * @param $style_css Mixed: inline CSS - * @param $flip Boolean: Whether to flip the CSS if needed + * @param $flip False or String: Set to 'flip' to flip the CSS if needed */ public function addInlineStyle( $style_css, $flip = false ) { - if( $flip && $this->getLang()->isRTL() ) { + if( $flip === 'flip' && $this->getLang()->isRTL() ) { # If wanted, and the interface is right-to-left, flip the CSS $style_css = CSSJanus::transform( $style_css, true, false ); } diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 925ffd4f09..ad0dc6f6ee 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -47,7 +47,7 @@ class SkinCologneBlue extends SkinLegacy { $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE } $style = implode( "\n", $rules ); - $out->addInlineStyle( $style, /* flip css if RTL */true ); + $out->addInlineStyle( $style, 'flip' ); } } diff --git a/skins/Simple.php b/skins/Simple.php index 7a3e2cd5f9..54be9f7d7d 100644 --- a/skins/Simple.php +++ b/skins/Simple.php @@ -44,7 +44,7 @@ class SkinSimple extends SkinTemplate { $rules[] = "a.stub:after { $underline; }"; } $style = implode( "\n", $rules ); - $out->addInlineStyle( $style, /* flip css if RTL */true ); + $out->addInlineStyle( $style, 'flip' ); } } diff --git a/skins/Standard.php b/skins/Standard.php index b29748ee2c..fd063ed052 100644 --- a/skins/Standard.php +++ b/skins/Standard.php @@ -30,20 +30,20 @@ class SkinStandard extends SkinLegacy { if ( 2 == $qb ) { # Right $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; right: 4px; border-left: 2px solid #000000; }"; - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }"; } elseif ( 1 == $qb || 3 == $qb ) { $rules[] = "/* @noflip */#quickbar { position: absolute; top: 4px; left: 4px; border-right: 1px solid gray; }"; - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }"; if( 3 == $qb ) { $rules[] = "/* @noflip */#quickbar { position: fixed; padding: 4px; }"; } } elseif ( 4 == $qb ) { $rules[] = "/* @noflip */#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}"; $rules[] = "/* @noflip */#quickbar { border-right: 1px solid gray; }"; - $rules[] = "/* @noflip */#article, /* @noflip */#mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; + $rules[] = "/* @noflip */#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }"; } $style = implode( "\n", $rules ); - $out->addInlineStyle( $style, /* flip css if RTL */true ); + $out->addInlineStyle( $style, 'flip' ); } } -- 2.20.1