r63682 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63681‎ | r63682 | r63683 >
Date:16:07, 13 March 2010
Author:happy-melon
Status:ok (Comments)
Tags:
Comment:
Allow OutputPage::addReturnTo() to set the text of the link.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2018,11 +2018,11 @@
20192019 * @param $title Title to link
20202020 * @param $query String: query string
20212021 */
2022 - public function addReturnTo( $title, $query = array() ) {
 2022+ public function addReturnTo( $title, $query = array(), $text=null ) {
20232023 global $wgUser;
20242024 $this->addLink( array( 'rel' => 'next', 'href' => $title->getFullUrl() ) );
20252025 $link = wfMsgHtml( 'returnto', $wgUser->getSkin()->link(
2026 - $title, null, array(), $query ) );
 2026+ $title, $text, array(), $query ) );
20272027 $this->addHTML( "<p id=\"mw-returnto\">{$link}</p>\n" );
20282028 }
20292029

Follow-up revisions

RevisionCommit summaryAuthorDate
r63702Follow-ups from r63682 CR suggestions.happy-melon19:07, 13 March 2010

Comments

#Comment by Nikerabbit (talk | contribs)   16:52, 13 March 2010

Spaces around =. Documentation should be updated, and it should probably note that $text must be pre-sanitised from bad html.

#Comment by Happy-melon (talk | contribs)   19:07, 13 March 2010

Done in r63702.

Status & tagging log