[go: up one dir, main page]

Page MenuHomePhabricator

checkuserlog API documentation references non-existent "culstart" and "culend"
Closed, ResolvedPublic

Description

https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bcheckuserlog

culdir: In which direction to enumerate:

  • newer: List oldest first. Note: culstart has to be before culend.
  • older: List newest first (default). Note: culstart has to be later than culend.

and yet the only time-related properties defined are:

culfrom: The timestamp to start enumerating from.

culto: The timestamp to end enumerating.

I'd love it if this supported start and stop, as that'd give us consistency with logevents. But the as-documented parameters don't exist.

Event Timeline

lfaraone raised the priority of this task from to Needs Triage.
lfaraone updated the task description. (Show Details)
lfaraone added subscribers: lfaraone, Legoktm.

The code:

			'dir' => array( "In which direction to enumerate}",
				" newer          - List oldest first. Note: {$p}from has to be before {$p}to.",
				" older          - List newest first (default). Note: {$p}from has to be later than {$p}to." ),

Probably just copied from somewhere else...

So logevents has these:

	"apihelp-query+logevents-param-start": "The timestamp to start enumerating from.",
	"apihelp-query+logevents-param-end": "The timestamp to end enumerating.",

And checkuserlog these:

			'from'   => 'The timestamp to start enumerating from',
			'to'     => 'The timestamp to end enumerating',

Basically, culfrom is like lestart and culto is like leend? Should we just alias start/end -> from/to for consistency in checkuserlog?

The code:

			'dir' => array( "In which direction to enumerate}",
				" newer          - List oldest first. Note: {$p}from has to be before {$p}to.",
				" older          - List newest first (default). Note: {$p}from has to be later than {$p}to." ),

Probably just copied from somewhere else...

Note that getParamDescription() that you quoted that code from is deprecated since 1.25.

Working on a patch to alias it.

Unable to work out how to alias it without having two different ways to put the start / end in on Special:ApiSandbox.

Change 806412 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Use to and from in culdir api help message instead of start and end

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

Change 806412 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Use to and from in culdir api help message instead of start and end

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

Resolving this task as it addresses the issue of incorrect API documentation. Standardisation to culstart and culend is definitely a good idea, but without changes to core it seems that aliasing parameters (i.e. allowing both culstart and culfrom) is not possible. Removal of the culfrom parameter is major enough that standardisation is not important enough to warrant the breaking changes.

Dreamy_Jazz moved this task from General / Unsorted to Done on the CheckUser board.