Page MenuHomePhabricator

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


Author: gangleri

Dear friends,

At the url from above
the autocomment generates a link as

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

The autocomment in the history should look like this:

I mean that oldid=37747972 should be added.

I assume that the cahnage relates to:

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 <> *
  • 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



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).
brion added a comment.Jul 20 2009, 4:21 AM

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.