Page MenuHomePhabricator

ApiWatch result should emit namespace
Closed, ResolvedPublic


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 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
eprodromou subscribed.

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.

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

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