Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -106,14 +106,15 @@ |
107 | 107 | $text .= $form_text; |
108 | 108 | } |
109 | 109 | } |
| 110 | + if ( $embedded ) |
| 111 | + $text = "<div class='runQueryEmbedded'>$text</div>"; |
| 112 | + $wgOut->addHTML( $text ); |
110 | 113 | SFUtils::addJavascriptAndCSS( $embedded ? $wgParser:null ); |
111 | 114 | $script = ' <script type="text/javascript">' . "\n" . $javascript_text . '</script>' . "\n"; |
112 | | - if ( $embedded ) |
| 115 | + if ( $embedded ) { |
113 | 116 | $wgParser->getOutput()->addHeadItem( $script ); |
114 | | - else |
| 117 | + } else { |
115 | 118 | $wgOut->addScript( $script ); |
116 | | - if ( $embedded ) |
117 | | - $text = "<div class='runQueryEmbedded'>$text</div>"; |
118 | | - $wgOut->addHTML( $text ); |
| 119 | + } |
119 | 120 | } |
120 | 121 | } |