Page MenuHomePhabricator

ApiWatch result should emit namespace
Closed, ResolvedPublic

Description

Unlike almost every other module in the API, ApiWatch emits only title without the traditional ns that usually accompanies it.

Event Timeline

Restricted Application added a project: Platform Engineering. · View Herald TranscriptOct 15 2019, 8:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
RobinHood70 renamed this task from ApiWatch emits title but not namespace to ApiWatch result should emit namespace.Oct 15 2019, 8:48 AM
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Oct 15 2019, 1:04 PM
eprodromou triaged this task as Low priority.Oct 18 2019, 2:24 PM
eprodromou added a subscriber: eprodromou.

This seems like a tractable issue, without compatibility problems. My guess is that it would be an easy one for new developers to work on, and should fit pretty easily into the Clinic Duty timeframe.

Restricted Application added a project: User-DannyS712. · View Herald TranscriptOct 23 2019, 5:27 AM

Change 545431 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Emit namespace for titles in ApiWatch

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

Good start, but there's a standard function to add title and namespace (the main concern being that 'ns' is the standard key for namespace). I'm not really a PHP programmer, but I believe the first couple of lines should look like this:

$res = [];
ApiQueryBase::addTitleInfo( $res, $title );

Change 545431 merged by jenkins-bot:
[mediawiki/core@master] Emit namespace for titles in ApiWatch

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

Anomie closed this task as Resolved.Oct 24 2019, 4:52 PM