Last modified: 2012-02-06 14:11:31 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 T26783, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24783 - Section links on history and diff pages should be permalinks (with &oldid=)
Section links on history and diff pages should be permalinks (with &oldid=)
Status: NEW
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.17.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-13 14:42 UTC by Liangent
Modified: 2012-02-06 14:11 UTC (History)
3 users (show)

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


Attachments

Description Liangent 2010-08-13 14:42:19 UTC
Links generated by /* section */ in summary should include &oldid= parameter.
Comment 1 Daniel Friesen 2011-10-10 18:17:37 UTC
Here's an interesting thought. Instead of &oldid= how about we add in a new &= parameter that takes a timestamp and gives the best revision it can find for said page at that timestamp. Then we make all [[links]] inside of edit summaries include a timestamp that matches the edit. Then all links will generally point to a fairly good representation of what the page was like at that point in time.
Comment 2 Helder 2012-02-06 14:11:31 UTC
A snippet of JavaScript such as the following should provide the requested functionality:

----
$(function(){
	mw.loader.using('mediawiki.util',function(){
		var	$list = $('#pagehistory').find('li'),
			$sectionLink = $list.find('.autocomment a'),
			oldUrl = $list.find('> a').attr('href');		
		$sectionLink.attr('href', function(i, val) {
			var parts = val.split( '#', 2 );
			return parts.join( '?oldid=' + mw.util.getParamValue('oldid', oldUrl ) + '#' );
		});
	});
});
----

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


Navigation
Links