Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132464

Change subject: Use an actual URL for helppage in enotif_body
......................................................................

Use an actual URL for helppage in enotif_body

The helppage can be a full URL, which canonicalurl doesn't like.

This means that if a wiki
* has a custom enotif_body which uses canonicalurl + helppage, but
* doesn't have helppage defined locally (as local/interwiki title),
then it will still have to fix either of the two locally.

Bug: 63269
Change-Id: I82d26b648ef23b69ae4fbd0a74ffa23eb7a93dae
(cherry picked from commit dccbb7b402af49689fec931ac8ee163dcdb8bc89)
---
M RELEASE-NOTES-1.22
M includes/UserMailer.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
4 files changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/132464/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 5685fef..47e7dc6 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -3,6 +3,20 @@
 Security reminder: MediaWiki does not require PHP's register_globals. If you
 have it on, turn it '''off''' if you can.
 
+== MediaWiki 1.22.7 ==
+
+This is a maintenance release of the MediaWiki 1.22 branch.
+
+=== Changes since 1.22.6 ===
+
+* (bug 63269) Email notifications were not correctly handling the
+  [[MediaWiki:Helppage]] message being set to a full URL. This is a regression
+  from the 1.22.5 point release, which made the default value for it a URL.
+  If you customized [[MediaWiki:Enotif body]] (the text of email 
notifications),
+  you'll need to edit it locally to include the URL via the new variable
+  $HELPPAGE instead of the parser functions fullurl and canonicalurl; otherwise
+  you don't have to do anything.
+
 == MediaWiki 1.22.6 ==
 
 This is a security release of the MediaWiki 1.22 branch.
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index 8ab10b2..163f836 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -747,6 +747,7 @@
                }
 
                $keys['$PAGEEDITOR_WIKI'] = 
$this->editor->getUserPage()->getCanonicalURL();
+               $keys['$HELPPAGE'] = wfExpandUrl( 
Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' 
)->inContentLanguage()->text() ) );
 
                # Replace this after transforming the message, bug 35019
                $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - 
' : $this->summary;
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 4f82b86..7b500f2 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3031,7 +3031,7 @@
 $UNWATCHURL
 
 Feedback and further assistance:
-{{canonicalurl:{{MediaWiki:Helppage}}}}',
+$HELPPAGE',
 'created'                      => 'created', # only translate this message to 
other languages if you have to change it
 'changed'                      => 'changed', # only translate this message to 
other languages if you have to change it
 
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index f30453a..e201ad4 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -5525,6 +5525,7 @@
 ***{{msg-mw|Enotif lastvisited}}
 *$PAGEEDITOR_EMAIL and $PAGEEDITOR_WIKI are links respectively to the email 
user special page and user page for the user who performed the action.
 *$PAGEEDITOR is the username of the user who performed the action.
+*$HELPPAGE is the full URL to the help page, defined by {{msg-mw|helppage}}.
 
 The subject of the email is one of the following messages:
 *{{msg-mw|Enotif subject deleted}}

-- 
To view, visit https://gerrit.wikimedia.org/r/132464
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82d26b648ef23b69ae4fbd0a74ffa23eb7a93dae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_22
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to