Last modified: 2011-09-21 20:52:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33062, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31062 - Don't set up language converter hooks in Language object constructor
Don't set up language converter hooks in Language object constructor
Status: NEW
Product: MediaWiki
Classification: Unclassified
Language converter (Other open bugs)
1.20.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-21 08:19 UTC by Niklas Laxström
Modified: 2011-09-21 20:52 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2011-09-21 08:19:31 UTC
Don't set up language converter hooks in Language object constructor. Looks very ugly and error prone.

Raised in r96712.
Comment 1 Brion Vibber 2011-09-21 20:51:00 UTC
The most puzzling thing is that it seems to be there to trigger a generic-looking onArticleSaveComplete method on LanguageConverter, to recache some objects if you're saving to MediaWiki:Conversiontable/<variant-name>

But since it triggers for any Language object that's created where the language supports a converter, this may trigger inappropriately -- eg based on somebody's UI language where the converter isn't even available to use. Seems funky in the extreme to me. :)
Comment 2 Brion Vibber 2011-09-21 20:52:19 UTC
Note this dates back at least to r8347; and before that it looks like it was done as a standalone hook function that'd get set up as soon as LanguageZh.php got loaded -- without even necessarily instantiating the class. :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links