r78988 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78987‎ | r78988 | r78989 >
Date:02:12, 25 December 2010
Author:dantman
Status:deferred
Tags:
Comment:
These newlines are causing rendering bugs in existing SMW installations upgrading to 1.5.4 by adding a newline into the wikimarkup when #ask is used inline and $footer is empty. If you happen to use #ask inline in a certain way and have a space following it the newline causes MW to render the contents of the line after the #ask as a <pre> due to MediaWiki's handling of lines starting with a space.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
@@ -111,8 +111,8 @@
112112 $rows_in_cur_column = 0;
113113 }
114114
115 - $result .= "\t\t\t\t$header\n";
116 -
 115+ if ( strlen($header) > 0 )
 116+ $result .= "\t\t\t\t$header\n";
117117
118118 if ( $this->mIntroTemplate != '' ) {
119119 $result .= "{{" . $this->mIntroTemplate . "}}";
@@ -137,7 +137,8 @@
138138 }
139139
140140 // Print footer
141 - $result .= "\t\t\t\t$footer\n";
 141+ if ( strlen($footer) > 0 )
 142+ $result .= "\t\t\t\t$footer\n";
142143
143144 if ( $this->mColumns > 1 ) {
144145 $result .= "\t\t\t\t</div>\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r79898Follow up to r78988jeroendedauw15:27, 9 January 2011

Status & tagging log