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.
*/
static function addHeader( $diff, $otitle, $ntitle, $multi = '', $notice = '' ) {
global $wgBetterDirectionality, $wgTitle;
*/
static function addHeader( $diff, $otitle, $ntitle, $multi = '', $notice = '' ) {
global $wgBetterDirectionality, $wgTitle;
if( $wgBetterDirectionality ) {
// shared.css sets diff in interface language/dir,
// but the actual content should be in the page language/dir
$pageLang = $wgTitle->getPageLanguage();
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' />
if ( $diff ) { // Safari/Chrome show broken output if cols not used
$header .= "
<col class='diff-marker' />