r75736 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75735‎ | r75736 | r75737 >
Date:18:52, 31 October 2010
Author:yaron
Status:deferred
Tags:
Comment:
Moved adding of JS and CSS to after the addition of main text, for the benefit of MW <= 1.16
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_FormEdit.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php
@@ -124,7 +124,6 @@
125125 } elseif ( $target_name == '' && $page_name_formula == '' ) {
126126 $text = '<p class="error">' . wfMsg( 'sf_formedit_badurl' ) . "</p>\n";
127127 } else {
128 - SFUtils::addJavascriptAndCSS();
129128 $form_article = new Article( $form_title );
130129 $form_definition = $form_article->getContent();
131130
@@ -249,6 +248,7 @@
250249 // if (! empty($javascript_text))
251250 // $wgOut->addScript(' <script type="text/javascript">' . "\n" . $javascript_text . '</script>' . "\n");
252251 $wgOut->addHTML( $text );
 252+ SFUtils::addJavascriptAndCSS();
253253 if ( ! empty( $javascript_text ) ) {
254254 $wgOut->addHTML( ' <script type="text/javascript">' . "\n$javascript_text\n" . '</script>' . "\n" );
255255 }

Status & tagging log