Page MenuHomePhabricator

Section links on history and diff pages should be permalinks (with &oldid=)
Open, LowPublic

Description

Links generated by /* section */ in summary should include &oldid= parameter.

Details

Reference
bz24783

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedNone
OpenNone
OpenNone
DeclinedNone
DeclinedNone
OpenNone
OpenNone
DeclinedNone
OpenNone
DeclinedNone
Openmatmarex
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Declinedbrion
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
ResolvedNone
OpenNone
OpenNone
Resolvedmatmarex
Resolvedmatmarex
OpenNone
InvalidAklapper
DuplicateCatrope
Resolvedbrion
DeclinedNone
OpenNone
ResolvedNone
OpenNone
OpenNone
OpenNone
DeclinedNone
DeclinedNone
ResolvedMaxSem
ResolvedFomafix
DeclinedNone
Resolvedmatmarex
OpenNone
OpenNone
StalledNone
ResolvedUmherirrender
ResolvedNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
OpenNone
DuplicateNone
ResolvedJdlrobson
OpenNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:09 PM
bzimport set Reference to bz24783.
bzimport added a subscriber: Unknown Object (MLST).
liangent created this task.Aug 13 2010, 2:42 PM

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.

He7d3r added a comment.EditedFeb 6 2012, 2:11 PM

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 ) + '#' );
		});
	});
});
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2015, 1:30 PM