link-from-page should be linked in html email outputformat

Change-Id: I6ee1232a9b55fb424897c8bc5c94806ff203e4ca
This commit is contained in:
bsitu 2013-07-24 13:59:54 -07:00
parent 7b144838b8
commit 6ec1b94fbf

View file

@ -103,17 +103,29 @@ class EchoPageLinkFormatter extends EchoBasicFormatter {
switch ( $param ) {
// 'A' part in this message: link from page A and X others
case 'link-from-page':
$content = null;
$title = null;
if ( $this->isTitleSet( $extra ) ) {
$title = Title::newFromId( $extra['link-from-page-id'] );
if ( $title !== null ) {
$content = $this->formatTitle( $title );
if ( $title ) {
if ( $this->outputFormat === 'htmlemail' ) {
$message->rawParams(
Linker::link(
$title,
$this->formatTitle( $title ),
array( 'style' => $this->getHTMLLinkStyle() ),
array(),
array( 'https' )
)
);
} else {
$message->params( $this->formatTitle( $title ) );
}
}
}
if ( $content === null ) {
$content = wfMessage( 'echo-no-title' );
if ( !$title ) {
$message->params( wfMessage( 'echo-no-title' ) );
}
$message->params( $content );
break;
// example: {7} other page, {99+} other pages