jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/formatters/PageLinkFormatter.php b/formatters/PageLinkFormatter.php
index 2019bd0..a2163d1 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: merged
Gerrit-Change-Id: I6ee1232a9b55fb424897c8bc5c94806ff203e4ca
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson (WMF) <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits