Page MenuHomePhabricator

Move ApiQueryRecentChanges::parseRCType to static method on RecentChange
Closed, ResolvedPublic

Description

We should provide a public interface for mapping RC_* constants to human-readable descriptions (e.g. RC_EDIT => "edit"). ApiQueryRecentChanges::parseRCType() does this, but it is a private method, and it is on the wrong class -- there is nothing API-specific about this functionality.


Version: unspecified
Severity: enhancement

Details

Reference
bz65071

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:11 AM
bzimport set Reference to bz65071.

There's also a duplicate of this function in ApiWatchlist.

Actually, ApiQueryRecentChanges::parseRCType() does the opposite, parsing text to RC_* constants. But both ApiQueryRecentchanges and ApiWatchlist implement both both, the latter is just embedded in the middle of their extractRowInfo() functions.

Change 133441 had a related patch set uploaded by Kishanio:
Move ApiQueryRecentChanges::parseRCType to static method on RecentChange

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

Change 133441 merged by jenkins-bot:
Move ApiQueryRecentChanges::parseRCType to static method on RecentChange

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