Index: trunk/extensions/SemanticFormsInputs/SemanticFormsInputs.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | die( 'This is a Semantic Forms extension. You need to install Semantic Forms first.' ); |
17 | 17 | } |
18 | 18 | |
19 | | -define( 'SFI_VERSION', '0.4.1' ); |
| 19 | +define( 'SFI_VERSION', '0.4.2 alpha' ); |
20 | 20 | |
21 | 21 | // create and initialize settings |
22 | 22 | $sfigSettings = new SFISettings(); |
— | — | @@ -36,10 +36,10 @@ |
37 | 37 | require_once( $dir . '/SFI_Settings.php' ); |
38 | 38 | |
39 | 39 | $wgExtensionMessagesFiles['SemanticFormsInputs'] = $dir . '/SemanticFormsInputs.i18n.php'; |
40 | | -$wgExtensionFunctions[] = "wfSFISetup"; |
| 40 | +$wgExtensionFunctions[] = 'wfSFISetup'; |
41 | 41 | $wgAutoloadClasses['SFIInputs'] = $dir . '/SFI_Inputs.php'; |
42 | 42 | |
43 | | -/* |
| 43 | +/** |
44 | 44 | * Class to encapsulate all settings |
45 | 45 | */ |
46 | 46 | class SFISettings { |
— | — | @@ -63,11 +63,11 @@ |
64 | 64 | public $datePickerDayNames; |
65 | 65 | } |
66 | 66 | |
67 | | -/* |
| 67 | +/** |
68 | 68 | * Registers the input types with Semantic Forms. |
69 | 69 | */ |
70 | 70 | function wfSFISetup() { |
71 | | - global $sfgFormPrinter, $wgOut; |
| 71 | + global $sfgFormPrinter; |
72 | 72 | |
73 | 73 | $sfgFormPrinter->setInputTypeHook( 'regexp', array( 'SFIInputs', 'regexpHTML' ), array() ); |
74 | 74 | $sfgFormPrinter->setInputTypeHook( 'datepicker', array( 'SFIInputs', 'jqDatePickerHTML' ), array() ); |
— | — | @@ -77,6 +77,8 @@ |
78 | 78 | // $sfgFormPrinter->setInputTypeHook( 'wysiwyg', array( 'SFIInputs', 'wysiwygHTML' ), array() ); |
79 | 79 | $sfgFormPrinter->setInputTypeHook( 'menuselect', array( 'SFIInputs', 'menuselectHTML' ), array() ); |
80 | 80 | |
81 | | - // TODO: obsolete as of MW 1.16, remove around 1.18 or so |
82 | | - wfLoadExtensionMessages( 'SemanticFormsInputs' ); |
| 81 | + // This function has been deprecated in 1.16, but needed for earlier versions. |
| 82 | + if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
| 83 | + wfLoadExtensionMessages( 'SemanticFormsInputs' ); |
| 84 | + } |
83 | 85 | } |