| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public static function commitToParserOutput() { |
||
| 37 | global $wgOut; |
||
|
|
|||
| 38 | |||
| 39 | // to be used in JS like: |
||
| 40 | // var SFSelect_fobjs = $.parseJSON( mw.config.get( 'sf_select' ) ); |
||
| 41 | $wgOut->addJsConfigVars('sf_select', json_encode( self::$headItems )); |
||
| 42 | |||
| 43 | //self::$resourceModules = array(); |
||
| 44 | //self::$headItems = array(); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
Instead of relying on
globalstate, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state