Page MenuHomePhabricator

add « oldid » to the autocomment (edit summaries in history, recentchanges, watchlist)
Closed, DuplicatePublic

Description

Author: gangleri

Description:
Dear friends,

At the url from above
http://de.wikipedia.org/w/index.php?title=user_talk:Weissbier&offset=200710121322&limit=1&action=history
the autocomment generates a link as

http://de.wikipedia.org/wiki/Benutzer_Diskussion:Weissbier#Europa_.E2.80.93_Demokratie_.E2.80.93_Esperanto

This link is of no real use, because the section was deleted long time ago.

The autocomment in the history should look like this:
http://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:Weissbier&oldid=37747972#Europa_.E2.80.93_Demokratie_.E2.80.93_Esperanto

I mean that oldid=37747972 should be added.

I assume that the cahnage relates to:
http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/includes/Linker.php

search for:
/**

  • This function is called by all recent changes variants, by the page history,
  • and by the user contributions list. It is responsible for formatting edit
  • comments. It escapes any HTML in the comment, but adds some CSS to format
  • auto-generated comments (from section editing) and formats [[wikilinks]]. *
  • @author Erik Moeller <moeller@scireview.de> *
  • Note: there's not always a title to pass to this function.
  • Since you can't set a default parameter for a reference, I've turned it
  • temporarily to a value pass. Should be adjusted further. --brion *
  • @param string $comment
  • @param mixed $title Title object (to generate link to the section in autocomment) or null
  • @param bool $local Whether section links should refer to local page
	 */

function formatComment($comment, $title = NULL, $local = false) {

		wfProfileIn( __METHOD__ );

		# Sanitize text a bit:
		$comment = str_replace( "\n", " ", $comment );
		$comment = htmlspecialchars( $comment );

		# Render autocomments and make links:
		$comment = $this->formatAutoComments( $comment, $title, $local );
		$comment = $this->formatLinksInComment( $comment );

		wfProfileOut( __METHOD__ );
		return $comment;

}

Best regards Reinhardt [[user:Gangleri]]


Version: unspecified
Severity: enhancement
URL: http://de.wikipedia.org/w/index.php?title=user_talk:Weissbier&offset=200710121322&limit=1&action=history

Details

Reference
bz12078

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:59 PM
bzimport set Reference to bz12078.
bzimport added a subscriber: Unknown Object (MLST).

To implement this, would need to add an $oldid option to Linker::formatComment() and buddies. Somewhat undecided on whether we'd want this everywhere...

Note that parser tests can now accomodate the edit comment parser, using the 'comment' option. (Plus 'title' and 'local' options; 'local' for the view you'll get on eg diffs, where hash links will be inline.) Test cases should be added for this feature if written.