r77046 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77045‎ | r77046 | r77047 >
Date:00:11, 20 November 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added 'if' statement around code added by tstarling in r77020 , for backwards compatibility with all but very latest MW trunk. The new code still doesn't seem to actually work, but that's a different story.
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php
@@ -117,26 +117,28 @@
118118 $wgExtensionAliasesFiles['SemanticForms'] = $sfgIP . '/languages/SF_Aliases.php';
119119
120120 // 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+ ),
131133 ),
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+}
141143
142144 /**
143145 * Do the actual intialization of the extension. This is just a delayed init that makes sure

Follow-up revisions

RevisionCommit summaryAuthorDate
r77053Per CR r77020, followup to r77046: add a constant so that extensions can more...tstarling07:05, 20 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77020Updated extensions for r77011:...tstarling13:59, 19 November 2010

Status & tagging log