@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | public static function initExtension() { |
| 17 | 17 | |
| 18 | - define( 'SFS_VERSION', '2.2.0-alpha' ); |
|
| 18 | + define('SFS_VERSION', '2.2.0-alpha'); |
|
| 19 | 19 | |
| 20 | 20 | // Api modules |
| 21 | 21 | $GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect'; |
@@ -25,7 +25,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @return string|null |
| 60 | 60 | */ |
| 61 | - public static function getVersion( $dependency = null ) { |
|
| 61 | + public static function getVersion($dependency = null) { |
|
| 62 | 62 | |
| 63 | - if ( $dependency === null && defined( 'SFS_VERSION' ) ) { |
|
| 63 | + if ($dependency === null && defined('SFS_VERSION')) { |
|
| 64 | 64 | return SFS_VERSION; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - if ( $dependency === 'PageForms' && defined( 'PF_VERSION' ) ) { |
|
| 67 | + if ($dependency === 'PageForms' && defined('PF_VERSION')) { |
|
| 68 | 68 | return PF_VERSION; |
| 69 | 69 | } |
| 70 | 70 | |