Follow up r90334.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 19 Jun 2011 18:53:55 +0000 (18:53 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 19 Jun 2011 18:53:55 +0000 (18:53 +0000)
Removes the space after the class name in $wgBetterDirectionality = false,
I think it is clearer to have the variable to hold the classes, instead of the *additional* classes.
Renamed to be clearer and be camelCase.
Added redundant htmlspecialchars() and spaces.

includes/diff/DifferenceEngine.php

index 69d8994..5428477 100644 (file)
@@ -937,14 +937,14 @@ CONTROL;
         */
        static function addHeader( $diff, $otitle, $ntitle, $multi = '', $notice = '' ) {
                global $wgBetterDirectionality, $wgTitle;
-               $dirclass = '';
+               $tableClass = 'diff';
                if( $wgBetterDirectionality ) {
                        // shared.css sets diff in interface language/dir,
                        // but the actual content should be in the page language/dir
                        $pageLang = $wgTitle->getPageLanguage();
-                       $dirclass = ' diff-contentalign-'.$pageLang->alignStart();
+                       $tableClass .= ' diff-contentalign-' . htmlspecialchars( $pageLang->alignStart() );
                }
-               $header = "<table class='diff $dirclass'>";
+               $header = "<table class='$tableClass'>";
                if ( $diff ) { // Safari/Chrome show broken output if cols not used
                        $header .= "
                        <col class='diff-marker' />