r99123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99122‎ | r99123 | r99124 >
Date:17:33, 6 October 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fixed "divider" (and <hr> tag) to only show up if it's needed
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -109,11 +109,15 @@
110110 // Get the full text of the form.
111111 $fullFormText = '';
112112 $additionalQueryHeader = '';
 113+ $dividerText = '';
113114 if ( !$raw ) {
114 - // The "additional query" header - displayed if the form has
115 - // already been submitted.
 115+ // Create the "additional query" header, and the
 116+ // divider text - one of these (depending on whether
 117+ // the query form is at the top or bottom) is displayed
 118+ // if the form has already been submitted.
116119 if ( $form_submitted ) {
117120 $additionalQueryHeader = "\n" . Xml::element( 'h2', null, wfMsg( 'sf_runquery_additionalquery' ) ) . "\n";
 121+ $dividerText = "\n<hr style=\"margin: 15px 0;\" />\n";
118122 }
119123 $action = htmlspecialchars( $this->getTitle( $form_name )->getLocalURL() );
120124 $fullFormText .= <<<END
@@ -129,7 +133,7 @@
130134 // settings - the display is slightly different in each case.
131135 if ( $sfgRunQueryFormAtTop ) {
132136 $text .= $fullFormText;
133 - $text .= "\n<hr style=\"margin: 15px 0;\" />\n";
 137+ $text .= $dividerText;
134138 $text .= $resultsText;
135139 } else {
136140 $text .= $resultsText;