@@ -7,11 +7,11 @@ discard block |
||
| 7 | 7 | * |
| 8 | 8 | * @defgroup SemanticFormsSelect Semantic Forms Select |
| 9 | 9 | */ |
| 10 | -if ( !defined( 'MEDIAWIKI' ) ) { |
|
| 11 | - die( 'Not an entry point.' ); |
|
| 10 | +if (!defined('MEDIAWIKI')) { |
|
| 11 | + die('Not an entry point.'); |
|
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -if ( defined( 'SFS_VERSION' ) ) { |
|
| 14 | +if (defined('SFS_VERSION')) { |
|
| 15 | 15 | // Do not initialize more than once. |
| 16 | 16 | return 1; |
| 17 | 17 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $GLOBALS['wgExtensionCredits']['semantic'][] = array( |
| 22 | 22 | 'path' => __FILE__, |
| 23 | 23 | 'name' => 'Semantic Forms Select', |
| 24 | - 'author' =>array( 'Jason Zhang', 'Toni Hermoso Pulido', '...' ), |
|
| 24 | + 'author' =>array('Jason Zhang', 'Toni Hermoso Pulido', '...'), |
|
| 25 | 25 | 'url' => 'https://www.mediawiki.org/wiki/Extension:SemanticFormsSelect', |
| 26 | 26 | 'description' => 'Allows to generate a select field in a semantic form whose values are retrieved from a query', |
| 27 | 27 | 'version' => SFS_VERSION, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public static function initExtension() { |
| 44 | 44 | |
| 45 | - define( 'SFS_VERSION', '1.4.0-alpha' ); |
|
| 45 | + define('SFS_VERSION', '1.4.0-alpha'); |
|
| 46 | 46 | |
| 47 | 47 | // Api modules |
| 48 | 48 | $GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect'; |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | // Register resource files |
| 54 | 54 | $GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array( |
| 55 | - 'localBasePath' => __DIR__ , |
|
| 55 | + 'localBasePath' => __DIR__, |
|
| 56 | 56 | 'remoteExtPath' => 'SemanticFormsSelect', |
| 57 | 57 | 'position' => 'bottom', |
| 58 | - 'scripts' => array( 'res/scriptSelect.js' ), |
|
| 58 | + 'scripts' => array('res/scriptSelect.js'), |
|
| 59 | 59 | 'dependencies' => array( |
| 60 | 60 | 'ext.semanticforms.main' |
| 61 | 61 | ) |
@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public static function onExtensionFunction() { |
| 69 | 69 | |
| 70 | - if ( !defined( 'SF_VERSION' ) ) { |
|
| 71 | - 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.' ); |
|
| 70 | + if (!defined('SF_VERSION')) { |
|
| 71 | + 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.'); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( isset( $GLOBALS['sfgFormPrinter'] )) { |
|
| 75 | - $GLOBALS['sfgFormPrinter']->setInputTypeHook( 'SF_Select', '\SFS\SemanticFormsSelect::init', array() ); |
|
| 74 | + if (isset($GLOBALS['sfgFormPrinter'])) { |
|
| 75 | + $GLOBALS['sfgFormPrinter']->setInputTypeHook('SF_Select', '\SFS\SemanticFormsSelect::init', array()); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |