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

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone
ResolvedCatrope
Resolved jmatazzoni
ResolvedCatrope
ResolvedCatrope
OpenNone
ResolvedNone
ResolvedNone
Resolvedmatthiasmullie
ResolvedMooeypoo
Resolvedmatthiasmullie
OpenFeatureNone
InvalidWikinaut
ResolvedCatrope
ResolvedCatrope
DeclinedSBisson
ResolvedNone
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 added a project: good first task.
EBernhardson set Security to None.
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.

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

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

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

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