Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
10 | 10 | |
11 | | -define('SF_VERSION','1.8.5'); |
| 11 | +define('SF_VERSION','1.8.6'); |
12 | 12 | |
13 | 13 | $wgExtensionCredits['specialpage'][]= array( |
14 | 14 | 'path' => __FILE__, |
— | — | @@ -77,9 +77,14 @@ |
78 | 78 | $wgSpecialPages['RunQuery'] = 'SFRunQuery'; |
79 | 79 | $wgAutoloadClasses['SFRunQuery'] = $sfgIP . '/specials/SF_RunQuery.php'; |
80 | 80 | $wgSpecialPageGroups['RunQuery'] = 'sf_group'; |
81 | | -$wgSpecialPages['UploadWindow'] = 'SFUploadWindow'; |
82 | | -$wgAutoloadClasses['SFUploadWindow'] = $sfgIP . '/specials/SF_UploadWindow.php'; |
83 | | - |
| 81 | +// different upload-window class for MW 1.16+ |
| 82 | +if (class_exists('HTMLForm')) { // added in MW 1.16 |
| 83 | + $wgSpecialPages['UploadWindow'] = 'SFUploadWindow2'; |
| 84 | + $wgAutoloadClasses['SFUploadWindow2'] = $sfgIP . '/specials/SF_UploadWindow2.php'; |
| 85 | +} else { |
| 86 | + $wgSpecialPages['UploadWindow'] = 'SFUploadWindow'; |
| 87 | + $wgAutoloadClasses['SFUploadWindow'] = $sfgIP . '/specials/SF_UploadWindow.php'; |
| 88 | +} |
84 | 89 | $wgAutoloadClasses['SFTemplateField'] = $sfgIP . '/includes/SF_TemplateField.inc'; |
85 | 90 | $wgAutoloadClasses['SFForm'] = $sfgIP . '/includes/SF_FormClasses.inc'; |
86 | 91 | $wgAutoloadClasses['SFTemplateInForm'] = $sfgIP . '/includes/SF_FormClasses.inc'; |
— | — | @@ -134,18 +139,8 @@ |
135 | 140 | * greater or equal to 100. |
136 | 141 | */ |
137 | 142 | function sffInitNamespaces() { |
138 | | - global $sfgNamespaceIndex, $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespacesWithSubpages, $wgLanguageCode, $sfgContLang; |
| 143 | + global $wgExtraNamespaces, $wgNamespaceAliases, $wgNamespacesWithSubpages, $wgLanguageCode, $sfgContLang; |
139 | 144 | |
140 | | - if (!isset($sfgNamespaceIndex)) { |
141 | | - $sfgNamespaceIndex = 106; |
142 | | - } |
143 | | - |
144 | | - // these namespaces are defined in versions 1.4 and later of SMW |
145 | | - if (! defined('SF_NS_FORM')) |
146 | | - define('SF_NS_FORM', $sfgNamespaceIndex); |
147 | | - if (! defined('SF_NS_FORM_TALK')) |
148 | | - define('SF_NS_FORM_TALK', $sfgNamespaceIndex+1); |
149 | | - |
150 | 145 | sffInitContentLanguage($wgLanguageCode); |
151 | 146 | |
152 | 147 | // Register namespace identifiers |