| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public static function onSemanticFormsSelectSetup ( & $parser ) {
|
||
| 18 | |||
| 19 | if ( !defined( 'PF_VERSION' ) ) {
|
||
| 20 | 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.' ); |
||
| 21 | } |
||
| 22 | |||
| 23 | if ( isset( $GLOBALS['wgPageFormsFormPrinter'] )) {
|
||
| 24 | $GLOBALS['wgPageFormsFormPrinter']->registerInputType( '\SFS\SemanticFormsSelectInput' ); |
||
| 25 | } |
||
| 26 | |||
| 27 | return true; |
||
| 28 | } |
||
| 29 | } |
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.