Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php |
— | — | @@ -257,11 +257,8 @@ |
258 | 258 | |
259 | 259 | public function __construct( $name, $options, $lang ) { |
260 | 260 | global $wgContLang; |
261 | | - if ( !self::$parserOptions ) { |
262 | | - self::$parserOptions = new ParserOptions(); |
263 | | - self::$parserOptions->setEditSection( false ); |
264 | | - self::$parser = new Parser(); |
265 | | - } |
| 261 | + |
| 262 | + self::staticInit(); |
266 | 263 | $this->name = $name; |
267 | 264 | $this->options = $options; |
268 | 265 | if ( $options['inUserLanguage'] ) { |
— | — | @@ -271,6 +268,18 @@ |
272 | 269 | } |
273 | 270 | } |
274 | 271 | |
| 272 | + private static function staticInit() { |
| 273 | + if ( !self::$parserOptions ) { |
| 274 | + self::$parserOptions = new ParserOptions(); |
| 275 | + self::$parserOptions->setEditSection( false ); |
| 276 | + self::$parser = new Parser(); |
| 277 | + } |
| 278 | + } |
| 279 | + |
| 280 | + public function __wakeup() { |
| 281 | + self::staticInit(); |
| 282 | + } |
| 283 | + |
275 | 284 | /** |
276 | 285 | * @param $key string |
277 | 286 | * @return Message |