GSoC/GCI Archive
Google Code-in 2013 Wikimedia

BookManager v2: Use an IContextSource instead of globals

completed by: Thomas Lam

mentors: Quim Gil, Raylton P. Sousa, Kunal Mehta

Bug 52347 - Use an IContextSource instead of globals

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.

Find the details in the bug report above. You can also ask any questions there, where not only GCI mentors but also the maintainers of the application can help you.


Students are required to read Wikimedia's general instructions first. Patches should be submitted to Gerrit and reference the bug report in the commit message.