r80635 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80634‎ | r80635 | r80636 >
Date:19:15, 20 January 2011
Author:yaron
Status:deferred
Tags:
Comment:
Restored calls to SMWOutputs::requireHeadItem(), this time with a fix
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -234,14 +234,12 @@
235235 $scripts = array();
236236 if ( !$sfgUseFormEditPage )
237237 $scripts[] = "$sfgScriptPath/libs/SF_ajax_form_preview.js";
238 - // The calls to requireHeadItem(), in some circumstances,
239 - // don't work - the two libraries don't get loaded. For now,
240 - // just always load these manually.
241 - // TODO - figure this out.
242 - //if ( method_exists( 'SMWOutputs', 'requireHeadItem' ) ) {
243 - if ( false ) {
 238+ if ( method_exists( 'SMWOutputs', 'requireHeadItem' ) ) {
244239 SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
245240 SMWOutputs::requireHeadItem( SMW_HEADER_SORTTABLE );
 241+ // TODO - should this be called directly here, or is
 242+ // there a "smarter" (in some way) place to put it?
 243+ SMWOutputs::commitToOutputPage( $wgOut );
246244 } else {
247245 $scripts[] = "$smwgScriptPath/skins/SMW_tooltip.js";
248246 $scripts[] = "$smwgScriptPath/skins/SMW_sorttable.js";