| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public static function initExtension() { |
||
| 17 | |||
| 18 | define( 'SFS_VERSION', '2.0.0-alpha' ); |
||
| 19 | |||
| 20 | // Api modules |
||
| 21 | $GLOBALS['wgAPIModules']['sformsselect'] = 'SFS\ApiSemanticFormsSelect'; |
||
| 22 | |||
| 23 | $GLOBALS['wgScriptSelectCount'] = 0; |
||
| 24 | $GLOBALS['wgSF_Select_debug'] = 0; |
||
| 25 | |||
| 26 | // Register resource files |
||
| 27 | $GLOBALS['wgResourceModules']['ext.sf_select.scriptselect'] = array( |
||
| 28 | 'localBasePath' => __DIR__ , |
||
| 29 | 'remoteExtPath' => 'SemanticFormsSelect', |
||
| 30 | 'position' => 'bottom', |
||
| 31 | 'scripts' => array( 'res/scriptSelect.js' ), |
||
| 32 | 'dependencies' => array( |
||
| 33 | 'ext.pageforms.main' |
||
| 34 | ) |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 62 |
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.