* Per Aaron on r96261, use string 'flip' instead of boolean
authorRobin Pepermans <robin@users.mediawiki.org>
Sat, 10 Sep 2011 23:51:08 +0000 (23:51 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Sat, 10 Sep 2011 23:51:08 +0000 (23:51 +0000)
* Apparently @noflip should only be set once, otherwise it behaves differently

includes/OutputPage.php
skins/CologneBlue.php
skins/Simple.php
skins/Standard.php

index 42f81d0..5124ba1 100644 (file)
@@ -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 );
                }
index 925ffd4..ad0dc6f 100644 (file)
@@ -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' );
        }
 
 }
index 7a3e2cd..54be9f7 100644 (file)
@@ -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' );
 
        }
 }
index b29748e..fd063ed 100644 (file)
@@ -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' );
        }
 
 }