Page MenuHomePhabricator

Echo: refactor duplicate icon handling code into getNotificationIconUrl()
Closed, ResolvedPublic

Description

formatters/BasicFormatter.php's format() and includes/EmailFormatter.php getNotifIcon() were already duplicating code to determine the URL of a notification icon. With the fix for bug 58705 it's 20 lines of identical code.

The only difference between them is getNotifIcon() calls wfExpandUrl(); this e.g. could be an optional parameter to a common function or method.


Version: master
Severity: normal

Details

Reference
bz58726
Related Gerrit Patches:
mediawiki/extensions/Echo : masterRefactor and unify icon URL logic

Related Objects

StatusAssignedTask
OpenNone
OpenNone
ResolvedCatrope
Resolved jmatazzoni
ResolvedCatrope
ResolvedCatrope
OpenNone
OpenNone
OpenNone
Resolvedmatthiasmullie
ResolvedMooeypoo
Resolvedmatthiasmullie
OpenNone
InvalidWikinaut
ResolvedCatrope
ResolvedCatrope
DeclinedSBisson
OpenNone
ResolvedLegoktm
ResolvedLegoktm

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:38 AM
bzimport added a project: Notifications.
bzimport set Reference to bz58726.
bzimport added a subscriber: Unknown Object (MLST).
EBernhardson triaged this task as Lowest priority.Dec 12 2014, 10:26 PM
EBernhardson added a project: good first bug.
EBernhardson set Security to None.
Legoktm moved this task from Backlog to Needs code on the Notifications board.Jul 6 2015, 8:41 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJul 6 2015, 8:41 AM
Legoktm renamed this task from refactor duplicate code into getNotificationIconUrl() to Echo: refactor duplicate icon handling code into getNotificationIconUrl().Aug 5 2015, 5:23 PM
Legoktm claimed this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 5 2015, 5:24 PM

Change 229475 had a related patch set uploaded (by Legoktm):
Refactor and unify icon URL logic

https://gerrit.wikimedia.org/r/229475

Catrope closed this task as Resolved.Aug 6 2015, 4:20 AM
Catrope moved this task from Needs Review to Done on the Collaboration-Team-Archive-2015-2016 board.

Change 229475 merged by jenkins-bot:
Refactor and unify icon URL logic

https://gerrit.wikimedia.org/r/229475

Restricted Application added a project: Growth-Team. · View Herald TranscriptNov 18 2018, 12:52 PM