User "Brion VIBBER" posted a comment on MediaWiki.r89220.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89220#c17377
Commit summary:

Remove Cite singleton. Store it inside each associated parser at 
$parser->extCite
This fixes bug 20748 and bug 15819 without breaking the other tests. Reverts 
r88971.
The conflict with CategoryTree was the old problem of a message being called 
inside
of a parser callback, this time with clearState for which the hook is global.

Comment:

The way this sets global $wgHooks entries to call instance methods on a 
particular non-singleton instance, then tries to call through to *another* 
object if it's not the same parser, feels just *super* icky to me.

I think the code'll be a lot cleaner if the global hooks (ParserClearState, 
ParserBeforeTidy, InlineEditorPartialAfterParse) get set once globally to point 
at static functions which should dive in to find the right instance.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to