Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75781
Change subject: link-from-page should be linked in html email outputformat
......................................................................
link-from-page should be linked in html email outputformat
Change-Id: I6ee1232a9b55fb424897c8bc5c94806ff203e4ca
---
M formatters/PageLinkFormatter.php
1 file changed, 18 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/81/75781/1
diff --git a/formatters/PageLinkFormatter.php b/formatters/PageLinkFormatter.php
index 2019bd0..3576d0c 100644
--- a/formatters/PageLinkFormatter.php
+++ b/formatters/PageLinkFormatter.php
@@ -103,17 +103,29 @@
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
--
To view, visit https://gerrit.wikimedia.org/r/75781
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ee1232a9b55fb424897c8bc5c94806ff203e4ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits