Add IContextSource as parameter to ChangeTags::formatSummaryRow
authorAashaka Shah <aashaka96@gmail.com>
Fri, 29 Jan 2016 13:03:41 +0000 (18:33 +0530)
committerAashaka Shah <aashaka96@gmail.com>
Thu, 4 Feb 2016 18:02:24 +0000 (23:32 +0530)
commit124026a712c77886d7df04df406593b1f3f7ea70
treea6976153cae8ff5b607d2a81b79cb50eb23587f4
parent4750a72e87cf72fcc7616c5662b410af7f7cdce9
Add IContextSource as parameter to ChangeTags::formatSummaryRow

Using IContextSource avoids the use of $wgLang and wfMessage which make
use of global $wgTtle.

Add IContextSource as parameter to ChangeTags::formatSummaryRow to avoid
globals. Define an IContextSource instance in all functions which
reference ChangeTags::formatSummaryRow and pass it in ChangeTags::formatSummaryRow
function call.

Also make the default value of IContextSource $context as null in
parameter, to avoid breaking changes for old callers in extensions.

Document default null value of IContextSource and add a @note to prefer
IContextSource over null value.

Remove trailing whitespace, and make code order according to parameter
order.

Bug: T105648
Change-Id: Ib54a6a96b73f6cd8fcdf8e520db2448a1e811cfa
includes/actions/HistoryAction.php
includes/changes/ChangesList.php
includes/changetags/ChangeTags.php
includes/changetags/ChangeTagsLogItem.php
includes/changetags/ChangeTagsRevisionItem.php
includes/diff/DifferenceEngine.php
includes/logging/LogEventsList.php
includes/revisiondelete/RevDelRevisionItem.php
includes/specials/SpecialContributions.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialUndelete.php