aboutsummaryrefslogtreecommitdiffstats
path: root/includes/UserMailer.php
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate $wgPasswordSenderNametheopolisme2014-01-011-3/+18
| | | | | | | | | | | | | | The sender name for system mailings can now be configured locally by modifying the system message "emailsender". The new default sender name is simply "{{SITENAME}}". Added to release notes. Also modify UserMailer to strip CR/LF linebreaks from header values to prevent mail header injection now that the sender name can be modified. Bug: 32770 Change-Id: Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3
* Move closing parenthesis from multi line if and function to own lineumherirrender2013-12-011-10/+10
| | | | | | | | | | | The Line continuation Coding conventions prefers the closing parenthesis on the same line than the beginning curly braces. This is done for ifs and functions. Also move some boolean operator from the end of a line to the beginning and changed some indentation to make the condition hopefully better readable. Change-Id: Id0437b06bde86eb5a75bc59eefa19e7edb624426
* Make sure we always restore the error handler.daniel2013-11-151-7/+12
| | | | Change-Id: I27f5d11ea27f783eda71c2bfdba7e70695f5d53c
* doc: Remove repetitive "Give grep a chance" phrase from commentsTimo Tijhof2013-08-291-5/+8
| | | | | | | | * Follows-up b2e2b2e016. * Minor clean up of surrounding documentation comments. * Fixed missing keys for messages in WebInstallerPage Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362
* Give grep a chance to find the usagesshirayuki2013-08-161-0/+4
| | | | Change-Id: I18846326539b814fa7fa93ca54117dac3572e4b0
* Merge "Mime emails should be sent with UTF-8 charset"Tychay2013-07-151-1/+1
|\
| * Mime emails should be sent with UTF-8 charsetbsitu2013-07-021-1/+1
| | | | | | | | Change-Id: Ifa3d14340b163ce09363c6b9956aee5c7522e6a3
* | Avoid date()/gmdate() for date formattingumherirrender2013-07-081-1/+1
|/ | | | | | | | | | | | | | | Added a MWTimestamp::format method to format a timestamp object in the given pattern. This avoids date(), which needs the local time zone corretly set on the server, which is assumed at the moment in Setup.php Added MWTimestamp::getInstance for gmdate() and MWTimestamp::getLocalInstance for date() to create a MWTimestamp object and use it as inline statement. Also MWTimestamp::setTimezone and MWTimestamp::getTimzone was added for timezone handling. Change-Id: I812aa013be2f4380e0cf10dc465202756fe8347b
* Fix the error in html email when pear mail_mime is missingbsitu2013-06-231-0/+2
| | | | | | | | When pear package mail_mime is missing, attempt to send html email throws error: mail() expects parameter 3 to be string, array given. This is because the code doesn't unset the html part of the body when falling back to text email Change-Id: Ie8c73a481cb9003a0b43893cf4751475bdf5c690
* Add new hook AbortTalkPageEmailNotificationbsitu2013-06-101-3/+5
| | | | | | | | | This hook will allow extension to disable the regular talk page email notification, Echo is doing this with a hackish solution of setting global variable wgEnotifUserTalk to false on the fly, this approach is problematic and will be replaced with this hook Change-Id: Ie043d9a1a771d64e4b05b7ddeca75c7542a6c575
* phpcs: Fix WhiteSpace.LanguageConstructSpacing warningsTimo Tijhof2013-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Squiz.WhiteSpace.LanguageConstructSpacing: Language constructs must be followed by a single space; expected "require_once expression" but found "require_once(expression)" It is a keyword (e.g. like `new`, `return` and `print`). As such the parentheses don't make sense. Per our code conventions, we use a space after keywords like these. We appeared to have an unwritten exception for `require` that doesn't make sense. About 60% of require/include usage was missing the space and/or had superfluous parentheses. It is as silly as print("foo") or return("foo"), it works because keywords have no significance for whitespace between it and the expression that follows, and since experessions can be wrapped in parentheses for clarity (e.g. when doing string concatenation or mathematical operations) the parenthesis before and after basiclaly just ignored. Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
* Pass array to Title::getLocalURL instead of an urlencoded stringumherirrender2013-04-271-2/+2
| | | | | | | This makes code easier to read and the urlencode is done inside getLocalURL or friends Change-Id: I21b988890356d11835eedba12a90a347bf0905b2
* Fixed spacing in files direct in includes folderumherirrender2013-04-211-5/+6
| | | | | | | Added spaces before if, foreach Added some braces for one line statements Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
* Add missing wfProfileOut before throwing an exceptionumherirrender2013-04-081-0/+1
| | | | Change-Id: I1d830da0597f19efd0b2ae48642389975e736e23
* Fix case of some Title methodsAlexandre Emsenhuber2013-03-271-7/+7
| | | | Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
* Spellchecked /includes directoryYuri Astrakhan2013-03-131-2/+2
| | | | | | | | | * Ran spell-checker over code comments in /includes/ * A few spellchecking fixes for wfDebug() calls Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?" Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
* Fixed @param tags to conform with Doxygen format.Tyler Anthony Romeo2013-03-111-13/+13
| | | | | | | | | | | Doxygen expects parameter types to come before the parameter name in @param tags. Used a quick regex to switch everything around where possible. This only fixes cases where a primitve variable (or a primitive followed by other types) is the variable type. Other cases will need to be fixed manually. Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
* fix some spacingumherirrender2013-03-071-3/+1
| | | | | | | | Added/removed spaces around logical/arithmetic operator Reduced multiple empty lines to one empty line Removed wrong tabs before comments at end of line Removed too many spaces in assigments Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
* fix some spacingumherirrender2013-02-041-11/+11
| | | | Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
* (bug 42941) Add $CHANGEDORCREATED back for custom templatebsitu2013-01-111-2/+6
| | | | | | | | | 1. Add $CHANGEDORCREATED back so custom template with this variable won't break. Scheduled for removal in MediaWiki 1.23. 2. change escaped() to text() since this is just plain text email and client will interpret it as plain text Change-Id: I7d9fd90519a68dd66f99479a7c92f6c664485a9c
* Add support for mulitpart mime email to email sending codelwelling2012-12-281-19/+84
| | | | | | | | | | | | | | The change is backwards compatible so various places that send email can be upgraded in their own time, or ignore it. The first user will be the Echo extension but it is likely to be used elsewhere This requires adding 'pear install Mime_Mail' to the server install To see a change you need to add $wgAllowHTMLEmail to your LocalSettings.php By default it is false in DefaultSettings.php as there is no core code that uses it yet (patch 11 notes fixed) Change-Id: I2096f50b789ffa0b8f4fa8c32fdaf43e9b0e4661
* Remove fallback for PHP installs < v5.3.2 as that is now an install requirementlwelling2012-12-101-6/+1
| | | | | | The native stream_resolve_include_path can now be used exclusively Change-Id: I891fe9e08f5257614dbc966e725c9810423108a5
* Merge "Tidy up some unbalanced returns in methods"IAlex2012-12-091-3/+5
|\
| * Tidy up some unbalanced returns in methodsReedy2012-12-091-3/+5
| | | | | | | | | | | | Leave a TODO Change-Id: Ic49ac8630650b341aafb3c17abd22f3a07805d27
* | Add numerous missing @throws to method documentationReedy2012-12-091-0/+2
|/ | | | Change-Id: Iba868e82a75fef7c7d011bc5be192bf059d037c0
* Use JobQueueGroup::singleton()Platonides2012-12-071-1/+1
| | | | | | | Replaces usages of the deprecated pop() and insert()/insertBatch() methods of Job class. Change-Id: I5572c9e31a14bd660d7e3b9aa7792d0be9a26103
* (bug 14901) Email notification mistakes log action for new page creationbsitu2012-11-261-14/+28
| | | | | | Original patch by Dan Nessett, modified by Benny Situ and Roan Kattouw Change-Id: Ibb7953741e4189127d1cd6718ac58492f254671e
* Fix tabs inside/between statements/textumherirrender2012-10-261-1/+1
| | | | | | This tabs are strange and a space there is better Change-Id: I0885dff575ee2fcd0668d08fef3226e132c5b319
* Update docs for return and exception infoSiebrand Mazeland2012-10-091-0/+1
| | | | | | | * Removed some inline tabs in the process. * IDE fixed some incorrect leading spaces, too. Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
* Changed notifyOnPageChange() to use onTransactionIdle().Aaron Schulz2012-09-241-16/+20
| | | | Change-Id: I938c771e195cae3731a29bfe55c76c997323cd2e
* Replace deprecated wfMsg* calls with Message class calls.Siebrand Mazeland2012-08-271-13/+17
| | | | | | | | | | Last round of easy replacements. About 30 uses in core remain (outside of HISTORY and GlobalFunctions::wfMsg*). I'll work with IAlex and Nikerabbit to work towards getting rid of those, too. Updated method documentation in a few places. Change-Id: I2491c006b62a9cc183230e31a0bd96c91e5b6142
* Noticed while looking at $wgShowUpdatedMarker related database queries, ↵Reedy2012-04-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | queries not using index order at all. Fixed up Title.php at line 4313: array( 'wl_namespace' => $this->getNamespace(), 'wl_title' => $this->getDBkey(), 'wl_user' => $user->getId() ), In UserMailer.php at line 438: array( 'wl_title' => $title->getDBkey(), 'wl_namespace' => $title->getNamespace(), 'wl_user != ' . intval( $editor->getID() ), 'wl_notificationtimestamp IS NULL', ) And line 455: array( /* WHERE */ 'wl_title' => $title->getDBkey(), 'wl_namespace' => $title->getNamespace(), 'wl_user' => $watchers ) CREATE TABLE /*_*/watchlist ( -- Key to user.user_id wl_user int unsigned NOT NULL, -- Key to page_namespace/page_title -- Note that users may watch pages which do not exist yet, -- or existed in the past but have been deleted. wl_namespace int NOT NULL default 0, wl_title varchar(255) binary NOT NULL default '', -- Timestamp when user was last sent a notification e-mail; -- cleared when the user visits the page. wl_notificationtimestamp varbinary(14) ) /*$wgDBTableOptions*/; CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); Change-Id: I633c009b4a1c614b966c69f042f94c2056e03784
* * (bug 35019) Fix for rr99942: edit summaries are no longer transformed in ↵Alexandre Emsenhuber2012-03-081-3/+7
| | | | | | | notification e-mails Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113407
* More __METHOD__ in our madnessSam Reed2012-02-241-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112339
* (bug 34421) duplicate Subject / wrong To: headers in mailAntoine Musso2012-02-181-13/+56
| | | | | | | | | | | | | | | | | | | | This fixup our mail sending system which duplicated the Subject and To: header. In some conditions it used only the email address for the From: field skipping the username ($dest in old code only contains the email address). Mails sent to a single recipients will look alike with mail() or PEAR Mail. For multiple recipients: - php mail() will show the recipient email and 'undisclosed-recipients:' - PEAR Mail will only show 'undisclosed-recipients:' Reverts r111820 Follow r111819 Fixup r93397 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111832
* (bug 34421) avoid duplicate Subject headers in mailAntoine Musso2012-02-181-0/+2
| | | | | | | | | | | | | | r93397 duplicated the Subject header since it was passed both as an argument of mail() and in the additional headers array. This is r111765 done right. Tested using both Pear and mail() methods. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111820
* revert r111765 bug 34421 avoid duplicate Subject headersAntoine Musso2012-02-181-3/+3
| | | | | | | | Was removing subjects when sending mails through PEAR. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111819
* Fix possibly undefined variablesSam Reed2012-02-181-2/+3
| | | | | | | | | Move $db further up Return something on all paths Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111811
* (bug 34421) avoid duplicate Subject headersAntoine Musso2012-02-171-3/+3
| | | | | | | | | r93397 duplicated the Subject header which was passed to the mail() function as well as to the $headers array. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111765
* (bug 32210) UserMailer.php: New edit emails should offer a single-diff link.mrbluesky2012-02-101-6/+7
|
* More return documentationSam Reed2012-02-091-0/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111103
* Fixing some of the "@return true" or "@return false", need to be "@return ↵Sam Reed2012-02-091-1/+1
| | | | | | | | | bool" and then the metadata can say true if foo, false if bar Other documentation improvements Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111052
* Fix doxygen docs before REL1_19 branchingAntoine Musso2012-02-011-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110518
* Bug 33880 - $wgUsersNotifiedOnAllChanges should not send e-mail to user who ↵Sam Reed2012-01-231-0/+4
| | | | | | | made the edit. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/109826
* w/s, remove unused vars per note in bug #33537Mark A. Hershberger2012-01-061-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108282
* "else if" to "elseif"Sam Reed2011-11-251-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/104208
* Add, update, tweak documentationSam Reed2011-10-261-1/+12
| | | | | | | | | Fix document comment blocks Tweak some returns Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100778
* Remove duplicate setting of FromSam Reed2011-10-161-1/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/99967
* * Send "undisclosed-recipients" in "To" header when sending the mail to more ↵Alexandre Emsenhuber2011-10-161-17/+14
| | | | | | | | | | than one user instead of checking $wgEnotifImpersonal. This was causing Special:EmailUser to send mails with that header when $wgEnotifImpersonal is true * Fix for r91662: Return-Path must an e-mail address and only a e-mail address, it cannot be "Name <address@...>" * Code simplification Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/99950
* * Do magic word parsing after parameter replacement in MediaWiki:Enotif_body ↵Alexandre Emsenhuber2011-10-161-48/+35
| | | | | | | | | | and MediaWiki:Enotif_subject * Fix link to Special:EmailUser in case $wgEnotifUseRealName was true and the user defined a real name, link was pointing to Special:EmailUser/Real_Name instead of Special:EmailUser/User_Name * Simplified the code of EmailNotification::composeCommonMailtext() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/99942