Page MenuHomePhabricator

Special:NewPages - add <span> for "originally created as..."
Closed, ResolvedPublic


This is more a feature request, than a bug.

When listing new pages with Special:NewPages and you moved a page, there will be written "originally created as <pagename>".
Unfortunately, this is plain text and no html-element. So there is no change to format this text with css. Or - in my case - hide it.

Is there a chance, to enclose this message with a <span>?

Using MW 1.27.1

Event Timeline

Steps to reproduce:

  • Create a page Test
  • Move page to Template:Test

Then you'll see

originally created as "Test"

after the last <span> when calling Special:NewPages

Reedy subscribed.

rc-old-title is the message used

		# Display the old title if the namespace/title has been changed
		$oldTitleText = '';
		$oldTitle = Title::makeTitle( $result->rc_namespace, $result->rc_title );

		if ( !$title->equals( $oldTitle ) ) {
			$oldTitleText = $oldTitle->getPrefixedText();
			$oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped();

		return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} "
			. "{$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";

So changing

$oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped();


$oldTitleText = Html::rawElement( 'span', [ 'class' => 'mw-newpages-oldtitle' ],
$this->msg( 'rc-old-title' )->rawParams( $oldTitleText )->escaped() );

would be a valid solution?

Sidhant-gupta-004 subscribed.

I am new to WikiMedia and have picked this problem in order to learn how to create and submit patches here. Any suggestions, and/or help you could offer me is welcome. :)

Change 313762 had a related patch set uploaded (by Sidhant-gupta-004):
Special:NewPages - add <span> for "originally created as..."

Change 313762 merged by jenkins-bot:
Special:NewPages - add <span> for "originally created as..."

Reedy assigned this task to Sidhant-gupta-004.