Last modified: 2014-05-31 12:44:45 UTC
See https://gerrit.wikimedia.org/r/#/c/76454/4/BookManagerv2.hooks.php
I m happy to submit this bug as a Google Code-in task. However, in its current status it is quite cryptic for a newcomer. There is only a link to a patch merged with some comments around. Can you add a proper description of the bug, please?
That function uses $wgLang and $wgUser, which are evil globals. Each parent caller (through various functions) provides context, which is some object that implements IContextSource. The code should simply pass the context down and use $context->getLanguage() and $context->getUser() instead of relying on globals.
Thank you! Google Code-in task created.
so is what I need to do just add $context as a parameter for the method and use the context's methods to get the variables?
(In reply to comment #4) > so is what I need to do just add $context as a parameter for the method and > use > the context's methods to get the variables? Basically yup!
Change 99584 had a related patch set uploaded by Tholam: Use an IContextSource instead of globals in addDate method https://gerrit.wikimedia.org/r/99584
Change 99584 merged by jenkins-bot: Use an IContextSource instead of globals in addDate method https://gerrit.wikimedia.org/r/99584
Thanks!