Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php |
— | — | @@ -117,26 +117,28 @@ |
118 | 118 | $wgExtensionAliasesFiles['SemanticForms'] = $sfgIP . '/languages/SF_Aliases.php'; |
119 | 119 | |
120 | 120 | // register client-side modules |
121 | | -$sfgResourceTemplate = array( |
122 | | - 'localBasePath' => $sfgIP, |
123 | | - 'remoteExtPath' => 'SemanticForms' |
124 | | -); |
125 | | -$wgResourceModules += array( |
126 | | - 'ext.semanticforms.main' => $sfgResourceTemplate + array( |
127 | | - 'scripts' => 'libs/SemanticForms.js', |
128 | | - 'styles' => array( |
129 | | - 'skins/SemanticForms.css', |
130 | | - 'skins/SF_jquery_ui_overrides.css', |
| 121 | +if ( isset( $wgResourceModules ) ) { |
| 122 | + $sfgResourceTemplate = array( |
| 123 | + 'localBasePath' => $sfgIP, |
| 124 | + 'remoteExtPath' => 'SemanticForms' |
| 125 | + ); |
| 126 | + $wgResourceModules += array( |
| 127 | + 'ext.semanticforms.main' => $sfgResourceTemplate + array( |
| 128 | + 'scripts' => 'libs/SemanticForms.js', |
| 129 | + 'styles' => array( |
| 130 | + 'skins/SemanticForms.css', |
| 131 | + 'skins/SF_jquery_ui_overrides.css', |
| 132 | + ), |
131 | 133 | ), |
132 | | - ), |
133 | | - 'ext.semanticforms.fancybox' => $sfgResourceTemplate + array( |
134 | | - 'scripts' => 'libs/jquery.fancybox-1.3.1.js', |
135 | | - 'styles' => 'skins/jquery.fancybox-1.3.1.css', |
136 | | - ), |
137 | | - 'ext.semanticforms.autogrow' => $sfgResourceTemplate + array( |
138 | | - 'scripts' => 'libs/SF_autogrow.js', |
139 | | - ), |
140 | | -); |
| 134 | + 'ext.semanticforms.fancybox' => $sfgResourceTemplate + array( |
| 135 | + 'scripts' => 'libs/jquery.fancybox-1.3.1.js', |
| 136 | + 'styles' => 'skins/jquery.fancybox-1.3.1.css', |
| 137 | + ), |
| 138 | + 'ext.semanticforms.autogrow' => $sfgResourceTemplate + array( |
| 139 | + 'scripts' => 'libs/SF_autogrow.js', |
| 140 | + ), |
| 141 | + ); |
| 142 | +} |
141 | 143 | |
142 | 144 | /** |
143 | 145 | * Do the actual intialization of the extension. This is just a delayed init that makes sure |