Conditions | 2 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public static function initExtension( $credits = array() ) { |
||
17 | |||
18 | // See https://phabricator.wikimedia.org/T151136 (extension.json) |
||
19 | define( 'SFS_VERSION', isset( $credits['version'] ) ? $credits['version'] : '2.2.0-alpha' ); |
||
20 | |||
21 | // Api modules |
||
22 | $GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect'; |
||
23 | |||
24 | $GLOBALS['wgScriptSelectCount'] = 0; |
||
25 | $GLOBALS['wgSF_Select_debug'] = 0; |
||
26 | |||
27 | // Register resource files |
||
28 | $GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array( |
||
29 | 'localBasePath' => __DIR__ , |
||
30 | 'remoteExtPath' => 'SemanticFormsSelect', |
||
31 | 'position' => 'bottom', |
||
32 | 'scripts' => array( |
||
33 | 'res/scriptSelect.js' |
||
34 | ), |
||
35 | 'dependencies' => array( |
||
36 | 'ext.pageforms.main' |
||
37 | ) |
||
38 | ); |
||
39 | } |
||
40 | |||
76 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.