MarkAHershberger has uploaded a new change for review.

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

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
---
M RELEASE-NOTES-1.23
M includes/UserMailer.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/131267/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 3f72f52..c112aa1 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -36,6 +36,9 @@
 * $wgPasswordSenderName has been removed and is no longer functional. To set a
   custom mailer name, the system message 'emailsender' should be modified
   (default: "{{SITENAME}}").
+* 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.
 * $wgDBAhandler was removed as the only class using it was also removed
 * The 'max threads' setting was removed from $wgDBservers.
 * Support for AdminSettings.php has been completely removed. All configuration
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index d8b9eb4..c5a4f08 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -767,6 +767,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/i18n/en.json b/languages/i18n/en.json
index 41c12b3..07dd209 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1858,7 +1858,7 @@
     "enotif_lastvisited": "See $1 for all changes since your last visit.",
     "enotif_lastdiff": "See $1 to view this change.",
     "enotif_anon_editor": "anonymous user $1",
-    "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEditor's 
summary: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the editor:\nmail: 
$PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThere will be no other 
notifications in case of further activity unless you visit this page while 
logged in. You could also reset the notification flags for all your watched 
pages on your watchlist.\n\nYour friendly {{SITENAME}} notification 
system\n\n--\nTo change your email notification settings, 
visit\n{{canonicalurl:{{#special:Preferences}}}}\n\nTo change your watchlist 
settings, visit\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nTo delete the 
page from your watchlist, visit\n$UNWATCHURL\n\nFeedback and further 
assistance:\n{{canonicalurl:{{MediaWiki:Helppage}}}}",
+    "enotif_body": "Dear $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEditor's 
summary: $PAGESUMMARY $PAGEMINOREDIT\n\nContact the editor:\nmail: 
$PAGEEDITOR_EMAIL\nwiki: $PAGEEDITOR_WIKI\n\nThere will be no other 
notifications in case of further activity unless you visit this page while 
logged in. You could also reset the notification flags for all your watched 
pages on your watchlist.\n\nYour friendly {{SITENAME}} notification 
system\n\n--\nTo change your email notification settings, 
visit\n{{canonicalurl:{{#special:Preferences}}}}\n\nTo change your watchlist 
settings, visit\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nTo delete the 
page from your watchlist, visit\n$UNWATCHURL\n\nFeedback and further 
assistance:\n$HELPPAGE",
     "created": "created",
     "changed": "changed",
     "deletepage": "Delete page",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 8d25d9e..939f862 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2020,7 +2020,7 @@
     "enotif_lastvisited": "Parameters:\n* $1 - a URL which points to diff\nSee 
also:\n* {{msg-mw|Enotif lastdiff}}",
     "enotif_lastdiff": "Email notification text to the latest page 
differences. Parameters:\n* $1 - a link which points to a diff, shown as a 
plain link\nSee also:\n* {{msg-mw|Enotif lastvisited}}",
     "enotif_anon_editor": "User name in an email notification when referring 
to an anonymous user. Parameters:\n* $1 - the anonymous user name (i.e. an IP 
address).",
-    "enotif_body": "Text of a notification email sent when a watched page has 
been edited or 
deleted.\n[[File:Screenshot_MediaWiki_e-mail_notifier.PNG|150px|right]]\n\nRefers
 to {{msg-mw|Helppage}}.\n\nParameters:\n*$WATCHINGUSERNAME is the username of 
the user receiving the notification.\n*$PAGEINTRO is the first line of the 
message, saying what happened. It currently can be either 
of:\n**{{msg-mw|Enotif body intro deleted}}\n**{{msg-mw|Enotif body intro 
created}}\n**{{msg-mw|Enotif body intro moved}}\n**{{msg-mw|Enotif body intro 
restored}}\n**{{msg-mw|Enotif body intro changed}} (for all the other 
cases).\n*$NEWPAGE consists of either\n**if the page is new (in older 
releases), {{msg-mw|Enotif newpagetext}}\n**if the page has a previous 
revision,\n***{{msg-mw|Enotif lastdiff}}\n***a newline\n***{{msg-mw|Enotif 
lastvisited}}\n*$PAGEEDITOR_EMAIL and $PAGEEDITOR_WIKI are links respectively 
to the email user special page and user page for the user who performed the 
action.\n*$PAGEEDITOR is the username of the user who performed the 
action.\n\nThe subject of the email is one of the following 
messages:\n*{{msg-mw|Enotif subject deleted}}\n*{{msg-mw|Enotif subject 
created}}\n*{{msg-mw|Enotif subject moved}}\n*{{msg-mw|Enotif subject 
restored}}\n*{{msg-mw|Enotif subject changed}}",
+    "enotif_body": "Text of a notification email sent when a watched page has 
been edited or 
deleted.\n[[File:Screenshot_MediaWiki_e-mail_notifier.PNG|150px|right]]\n\nRefers
 to {{msg-mw|Helppage}}.\n\nParameters:\n*$WATCHINGUSERNAME is the username of 
the user receiving the notification.\n*$PAGEINTRO is the first line of the 
message, saying what happened. It currently can be either 
of:\n**{{msg-mw|Enotif body intro deleted}}\n**{{msg-mw|Enotif body intro 
created}}\n**{{msg-mw|Enotif body intro moved}}\n**{{msg-mw|Enotif body intro 
restored}}\n**{{msg-mw|Enotif body intro changed}} (for all the other 
cases).\n*$NEWPAGE consists of either\n**if the page is new (in older 
releases), {{msg-mw|Enotif newpagetext}}\n**if the page has a previous 
revision,\n***{{msg-mw|Enotif lastdiff}}\n***a newline\n***{{msg-mw|Enotif 
lastvisited}}\n*$PAGEEDITOR_EMAIL and $PAGEEDITOR_WIKI are links respectively 
to the email user special page and user page for the user who performed the 
action.\n*$PAGEEDITOR is the username of the user who performed the 
action.\n*$HELPPAGE is the full URL to the help page, defined by 
{{msg-mw|helppage}}.\n\nThe subject of the email is one of the following 
messages:\n*{{msg-mw|Enotif subject deleted}}\n*{{msg-mw|Enotif subject 
created}}\n*{{msg-mw|Enotif subject moved}}\n*{{msg-mw|Enotif subject 
restored}}\n*{{msg-mw|Enotif subject changed}}",
     "created": "{{Optional}}\nPossible value for $CHANGEDORCREATED in the 
following messages:\n* {{msg-mw|enotif_subject}}\n* 
{{msg-mw|enotif_body}}\n{{Identical|Created}}",
     "changed": "{{Optional}}\nPossible value for $CHANGEDORCREATED in the 
following messages:\n* {{msg-mw|Enotif subject}}\n* {{msg-mw|Enotif body}}",
     "deletepage": "Used as Submit button text.\n{{Identical|Delete page}}",

-- 
To view, visit https://gerrit.wikimedia.org/r/131267
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_23
Gerrit-Owner: MarkAHershberger <[email protected]>

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

Reply via email to