Page MenuHomePhabricator

Add wgRevisionId for revision of displayed page or diff
Closed, ResolvedPublic

Description

There is a wgCurRevisionId field currently, which as noted on the doc page is, "The top revision ID of the currently viewed page at the time the page was served"

This is implemented with OutputPage->getWikiPage()->getLatest() (page_latest).

However, in some cases, it is necessary to have the effective revision id. For a simple historical version (oldid=123), this would be the displayed version. For a diff (oldid=123&diff=next, oldid=123&diff=987, etc.), if would be the revision denoted by the diff. This should be available as wgRevisionId.

This will allow JavaScript to look things up by the actual revision ID, or log it when necessary.


Version: 1.22.0
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=60548

Details

Reference
bz51594

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:44 AM
bzimport set Reference to bz51594.

Change 81032 had a related patch set uploaded by Parent5446:
Add wgRevisionId variable to ResourceLoader

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

I actually had this patch in my repo a while ago. Turns out I forgot to upload it to Gerrit.

Change 81032 merged by jenkins-bot:
Add wgRevisionId variable to ResourceLoader

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