@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public static function initExtension() { |
17 | 17 | |
18 | - define( 'SFS_VERSION', true ); |
|
18 | + define('SFS_VERSION', true); |
|
19 | 19 | |
20 | 20 | $GLOBALS['wgExtensionCredits']['semantic'][] = array( |
21 | 21 | 'path' => __FILE__, |
22 | 22 | 'name' => 'Semantic Forms Select', |
23 | - 'author' =>array( 'Jason Zhang', 'Toni Hermoso Pulido', '...' ), |
|
23 | + 'author' =>array('Jason Zhang', 'Toni Hermoso Pulido', '...'), |
|
24 | 24 | 'url' => 'https://www.mediawiki.org/wiki/Extension:SemanticFormsSelect', |
25 | 25 | 'description' => 'Allows to generate a select field in a semantic form whose values are retrieved from a query', |
26 | 26 | 'version' => SFS_VERSION, |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | |
36 | 36 | // Register resource files |
37 | 37 | $GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array( |
38 | - 'localBasePath' => __DIR__ , |
|
38 | + 'localBasePath' => __DIR__, |
|
39 | 39 | 'remoteExtPath' => 'SemanticFormsSelect', |
40 | 40 | 'position' => 'bottom', |
41 | - 'scripts' => array( 'res/scriptSelect.js' ), |
|
41 | + 'scripts' => array('res/scriptSelect.js'), |
|
42 | 42 | 'dependencies' => array( |
43 | 43 | 'ext.semanticforms.main' |
44 | 44 | ) |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public static function onExtensionFunction() { |
52 | 52 | |
53 | - if ( !defined( 'SF_VERSION' ) ) { |
|
54 | - 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:SemanticForms">Semantic Forms</a> extension. Please install and activate this extension first.' ); |
|
53 | + if (!defined('SF_VERSION')) { |
|
54 | + 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:SemanticForms">Semantic Forms</a> extension. Please install and activate this extension first.'); |
|
55 | 55 | } |
56 | 56 | |
57 | - if ( isset( $GLOBALS['sfgFormPrinter'] )) { |
|
58 | - $GLOBALS['sfgFormPrinter']->setInputTypeHook( 'SF_Select', '\SFS\SemanticFormsSelect::init', array() ); |
|
57 | + if (isset($GLOBALS['sfgFormPrinter'])) { |
|
58 | + $GLOBALS['sfgFormPrinter']->setInputTypeHook('SF_Select', '\SFS\SemanticFormsSelect::init', array()); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public static function getVersion() { |
68 | 68 | $extensionData = ExtensionRegistry::getInstance()->getAllThings(); |
69 | 69 | |
70 | - if ( isset( $extensionData['Semantic Forms Select'] ) ) { |
|
70 | + if (isset($extensionData['Semantic Forms Select'])) { |
|
71 | 71 | return $extensionData['Semantic Forms Select']['version']; |
72 | 72 | } |
73 | 73 |