|
@@ -15,7 +15,7 @@ discard block |
|
|
block discarded – undo |
|
15
|
15
|
*/ |
|
16
|
16
|
public static function initExtension() { |
|
17
|
17
|
|
|
18
|
|
- define( 'SFS_VERSION', '2.0.0' ); |
|
|
18
|
+ define('SFS_VERSION', '2.0.0'); |
|
19
|
19
|
|
|
20
|
20
|
// Api modules |
|
21
|
21
|
$GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect'; |
|
@@ -25,7 +25,7 @@ discard block |
|
|
block discarded – undo |
|
25
|
25
|
|
|
26
|
26
|
// Register resource files |
|
27
|
27
|
$GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array( |
|
28
|
|
- 'localBasePath' => __DIR__ , |
|
|
28
|
+ 'localBasePath' => __DIR__, |
|
29
|
29
|
'remoteExtPath' => 'SemanticFormsSelect', |
|
30
|
30
|
'position' => 'bottom', |
|
31
|
31
|
'scripts' => array( |
|
@@ -42,12 +42,12 @@ discard block |
|
|
block discarded – undo |
|
42
|
42
|
*/ |
|
43
|
43
|
public static function onExtensionFunction() { |
|
44
|
44
|
|
|
45
|
|
- if ( !defined( 'PF_VERSION' ) ) { |
|
46
|
|
- die( '<b>Error:</b><a href="https://github.com/SemanticMediaWiki/SemanticFormsSelect/">Semantic Forms Select</a> requires the <a href="https://www.mediawiki.org/wiki/Extension:PageForms">Page Forms</a> extension. Please install and activate this extension first.' ); |
|
|
45
|
+ if (!defined('PF_VERSION')) { |
|
|
46
|
+ die('<b>Error:</b><a href="https://github.com/SemanticMediaWiki/SemanticFormsSelect/">Semantic Forms Select</a> requires the <a href="https://www.mediawiki.org/wiki/Extension:PageForms">Page Forms</a> extension. Please install and activate this extension first.'); |
|
47
|
47
|
} |
|
48
|
48
|
|
|
49
|
|
- if ( isset( $GLOBALS['wgPageFormsFormPrinter'] )) { |
|
50
|
|
- $GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook( 'SF_Select', '\SFS\SemanticFormsSelect::init', array() ); |
|
|
49
|
+ if (isset($GLOBALS['wgPageFormsFormPrinter'])) { |
|
|
50
|
+ $GLOBALS['wgPageFormsFormPrinter']->setInputTypeHook('SF_Select', '\SFS\SemanticFormsSelect::init', array()); |
|
51
|
51
|
} |
|
52
|
52
|
} |
|
53
|
53
|
|
|
@@ -57,7 +57,7 @@ discard block |
|
|
block discarded – undo |
|
57
|
57
|
* @return string|null |
|
58
|
58
|
*/ |
|
59
|
59
|
public static function getVersion() { |
|
60
|
|
- return is_string( SFS_VERSION ) ? SFS_VERSION : null; |
|
|
60
|
+ return is_string(SFS_VERSION) ? SFS_VERSION : null; |
|
61
|
61
|
} |
|
62
|
62
|
|
|
63
|
63
|
} |