r100138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100137‎ | r100138 | r100139 >
Date:17:57, 18 October 2011
Author:raymond
Status:ok (Comments)
Tags:
Comment:
* (bug 18823) "move succeeded" text displays bluelinks even when redirect was suppressed
Ping r100017 for the subpage part.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -110,6 +110,8 @@
111111 * Timezones are now recognised in user preferences when offset is different
112112 due to DST
113113 * (bug 31692) "summary" parameter now also work when undoing revisions
 114+* (bug 18823) "move succeeded" text displays bluelinks even when redirect was
 115+ suppressed
114116
115117 === API changes in 1.19 ===
116118 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -424,15 +424,18 @@
425425 $out = $this->getOutput();
426426 $out->setPagetitle( wfMsg( 'pagemovedsub' ) );
427427
428 - $oldUrl = $ot->getFullUrl( 'redirect=no' );
429 - $newUrl = $nt->getFullUrl();
 428+ $oldLink = Linker::link(
 429+ $ot,
 430+ null,
 431+ array(),
 432+ array( 'redirect' => 'no' )
 433+ );
 434+ $newLink = Linker::linkKnown( $nt );
430435 $oldText = $ot->getPrefixedText();
431436 $newText = $nt->getPrefixedText();
432 - $oldLink = "<span class='plainlinks'>[$oldUrl $oldText]</span>";
433 - $newLink = "<span class='plainlinks'>[$newUrl $newText]</span>";
434437
435438 $msgName = $createRedirect ? 'movepage-moved-redirect' : 'movepage-moved-noredirect';
436 - $out->addWikiMsg( 'movepage-moved', $oldLink, $newLink, $oldText, $newText );
 439+ $out->addHTML( wfMessage( 'movepage-moved' )->rawParams( $oldLink, $newLink, $oldText, $newText ) );
437440 $out->addWikiMsg( $msgName );
438441
439442 # Now we move extra pages we've been asked to move: subpages and talk

Follow-up revisions

RevisionCommit summaryAuthorDate
r100214Fix r100138 per Nikas CR: "always use explicit conversion to string with wfMe...raymond09:35, 19 October 2011
r113727* (bug 34887) Fix for r100138: make $3 and $4 parameters being substituted co...ialex15:54, 13 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100017Old link is not always known, it depends on $createRedirectraymond09:11, 17 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   05:48, 19 October 2011

Please always use explicit conversion to string with wfMessage, like ->parseAsBlock in this case. Having old and newText as rawparams may prevent some customisations.

#Comment by Raymond (talk | contribs)   09:37, 19 October 2011

"always use explicit conversion to string with wfMessage"

Done with r100214

"Having old and newText as rawparams may prevent some customisations. "

I do not see how this prevent customisations. old and newText are plain text. I have tested it with the customisations of enwiki and dewiki w/o problems.
#Comment by Nikerabbit (talk | contribs)   09:39, 19 October 2011

That's why I said some. Display is fine, but you can't have any conditionals that need to read the value.

#Comment by Raymond (talk | contribs)   09:42, 19 October 2011

Sorry, I do not understand. The behaviour of $3 and $4 is unchanged.

Status & tagging log