Last modified: 2014-01-30 03:54:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53594, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51594 - Add wgRevisionId for revision of displayed page or diff
Add wgRevisionId for revision of displayed page or diff
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.22.0
All All
: Normal enhancement (vote)
: ---
Assigned To: Tyler Romeo
:
Depends on:
Blocks: 51728
  Show dependency treegraph
 
Reported: 2013-07-18 02:57 UTC by Matthew Flaschen
Modified: 2014-01-30 03:54 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2013-07-18 02:57:55 UTC
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.
Comment 1 Gerrit Notification Bot 2013-08-26 18:59:24 UTC
Change 81032 had a related patch set uploaded by Parent5446:
Add wgRevisionId variable to ResourceLoader

https://gerrit.wikimedia.org/r/81032
Comment 2 Tyler Romeo 2013-08-26 19:01:46 UTC
I actually had this patch in my repo a while ago. Turns out I forgot to upload it to Gerrit.
Comment 3 Gerrit Notification Bot 2013-09-26 02:43:28 UTC
Change 81032 merged by jenkins-bot:
Add wgRevisionId variable to ResourceLoader

https://gerrit.wikimedia.org/r/81032
Comment 4 Matthew Flaschen 2013-09-26 03:14:39 UTC
Documented at https://www.mediawiki.org/wiki/Manual:Interface/JavaScript#Page-specific

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links