Commit graph

228 commits

Author SHA1 Message Date
umherirrender
1044b0b8df fix some spacing
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
2013-02-04 20:18:33 +00:00
bsitu
f2282bfec9 (bug 42941) Add $CHANGEDORCREATED back for custom template
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
2013-01-11 13:14:13 +01:00
lwelling
fc8611d286 Add support for mulitpart mime email to email sending code
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
2012-12-28 16:43:55 -05:00
lwelling
c8cbff08d8 Remove fallback for PHP installs < v5.3.2 as that is now an install requirement
The native stream_resolve_include_path can now be used exclusively

Change-Id: I891fe9e08f5257614dbc966e725c9810423108a5
2012-12-10 13:47:57 -05:00
IAlex
3b0f9bfe28 Merge "Tidy up some unbalanced returns in methods" 2012-12-09 09:48:40 +00:00
Reedy
d537d96868 Add numerous missing @throws to method documentation
Change-Id: Iba868e82a75fef7c7d011bc5be192bf059d037c0
2012-12-09 03:09:48 +00:00
Reedy
d0a242abb4 Tidy up some unbalanced returns in methods
Leave a TODO

Change-Id: Ic49ac8630650b341aafb3c17abd22f3a07805d27
2012-12-09 02:59:04 +00:00
Platonides
a1e7329d8f Use JobQueueGroup::singleton()
Replaces usages of the deprecated pop() and insert()/insertBatch()
methods of Job class.

Change-Id: I5572c9e31a14bd660d7e3b9aa7792d0be9a26103
2012-12-07 20:30:45 +01:00
bsitu
494529503b (bug 14901) Email notification mistakes log action for new page creation
Original patch by Dan Nessett, modified by Benny Situ and Roan Kattouw

Change-Id: Ibb7953741e4189127d1cd6718ac58492f254671e
2012-11-26 19:37:01 +00:00
umherirrender
82375631c2 Fix tabs inside/between statements/text
This tabs are strange and a space there is better

Change-Id: I0885dff575ee2fcd0668d08fef3226e132c5b319
2012-10-26 18:18:59 +02:00
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
Aaron Schulz
5975deb7f4 Changed notifyOnPageChange() to use onTransactionIdle().
Change-Id: I938c771e195cae3731a29bfe55c76c997323cd2e
2012-09-24 20:33:53 -07:00
Siebrand Mazeland
01788cddd3 Replace deprecated wfMsg* calls with Message class calls.
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
2012-08-27 20:44:47 +02:00
Reedy
3f4e41a24e Noticed while looking at $wgShowUpdatedMarker related database queries, 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
2012-04-28 00:59:59 +01:00
Alexandre Emsenhuber
d8ef87afbf * (bug 35019) Fix for rr99942: edit summaries are no longer transformed in notification e-mails 2012-03-08 21:39:13 +00:00
Sam Reed
c47f83a4d4 More __METHOD__ in our madness 2012-02-24 18:45:24 +00:00
Antoine Musso
0ffeec1ddd (bug 34421) duplicate Subject / wrong To: headers in mail
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
2012-02-18 15:34:12 +00:00
Antoine Musso
d8ab214e02 (bug 34421) avoid duplicate Subject headers in mail
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.
2012-02-18 10:57:34 +00:00
Antoine Musso
9c2222010f revert r111765 bug 34421 avoid duplicate Subject headers
Was removing subjects when sending mails through PEAR.
2012-02-18 10:37:11 +00:00
Sam Reed
560ebfb721 Fix possibly undefined variables
Move $db further up

Return something on all paths
2012-02-18 01:07:42 +00:00
Antoine Musso
dd00e0dee2 (bug 34421) avoid duplicate Subject headers
r93397 duplicated the Subject header which was passed to the mail() function
as well as to the $headers array.
2012-02-17 17:02:24 +00:00
mrbluesky
c9f492e698 (bug 32210) UserMailer.php: New edit emails should offer a single-diff link. 2012-02-10 21:47:37 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
85bbb0b080 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:10 +00:00
Antoine Musso
fc6bc233be Fix doxygen docs before REL1_19 branching 2012-02-01 20:53:38 +00:00
Sam Reed
5d635eb62d Bug 33880 - $wgUsersNotifiedOnAllChanges should not send e-mail to user who made the edit. 2012-01-23 15:04:22 +00:00
Mark A. Hershberger
f7ae53ce33 w/s, remove unused vars per note in bug #33537 2012-01-06 20:54:24 +00:00
Sam Reed
5bd492d51c "else if" to "elseif" 2011-11-25 00:15:27 +00:00
Sam Reed
96641da58e Add, update, tweak documentation
Fix document comment blocks

Tweak some returns
2011-10-26 03:44:47 +00:00
Sam Reed
e27527f3f1 Remove duplicate setting of From 2011-10-16 19:52:46 +00:00
Alexandre Emsenhuber
d199c452f5 * Send "undisclosed-recipients" in "To" header when sending the mail to more 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
2011-10-16 12:39:05 +00:00
Alexandre Emsenhuber
2be3042a35 * Do magic word parsing after parameter replacement in MediaWiki:Enotif_body 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()
2011-10-16 09:53:41 +00:00
Alexandre Emsenhuber
ae8b7b7ad5 Fix E_WARNING from r99863 2011-10-15 19:22:05 +00:00
Chad Horohoe
215376e771 Self revert r99899....I HATE YOU PHPUNIT YOU @#Q**#(#@(#@@#(!!! 2011-10-15 19:06:31 +00:00
Chad Horohoe
9a860bef79 Temporarily reverting r99863 to see if I can pin down test failures 2011-10-15 19:02:07 +00:00
Alexandre Emsenhuber
a2c2cb5687 * Added Language::userDate(), Language::userTime() and Language::userTimeAndDate() as new versions of respectively Language::date(), Language::time() and Language::timeanddate(), which take a User object in the second parameter to get time correction and format instead of having to do this when calling the methods and not wanting to user $wgUser's parameters.
* Moved Language::userAdjust() near other related function
* Updated ENotif stuff to use that functions so that the date format is not taken from the sending user but the receiver
* Removed $PAGEEDITDATEANDTIME parameter, unsed and not present in impersonal notification
* Also fixed the debug line in UserMailer::send()
2011-10-15 09:32:03 +00:00
Max Semenik
ac81e1c697 Unbreak sending emails using mailTargets() in safe_mode 2011-10-10 17:41:22 +00:00
Sam Reed
8a082cbf5c * (bug 31081) $wgEnotifUseJobQ causes many unnecessary jobs to be queued
Do some of the cheap checks before spawning attempting to send emails via any method
2011-09-22 12:14:21 +00:00
Daniel Friesen
289b2174f3 Followup r95547; Where'd that $ come from? 2011-08-29 18:53:59 +00:00
Daniel Friesen
9668ff4705 Followup r93417; Don't use $wgServer in a way that makes invalid Message-IDs. Instead use IDHost if set, otherwise extract the host from $wgServer. Also instead of a static UserMailer prefix use the wiki's id. 2011-08-26 00:01:55 +00:00
Roan Kattouw
8fc36a535a Use canonical URLs (introduced in r94995) for all URLs in e-mails 2011-08-19 14:46:03 +00:00
Roan Kattouw
b88212a0bf Expand all URLs in e-mail notifications to be full HTTP URLs. This prevents protocol-relative URLs from appearing in e-mail notifications if $wgServer is protocol-relative 2011-08-04 15:13:17 +00:00
Mark A. Hershberger
8e9deef3c4 re: r93415
* Document what happens as the result of each value returned
* Require boolean true to continue, not just a true value or strings
  would succeed
* Trim the arguments since the header array already contains them.
2011-08-02 19:35:01 +00:00
Mark A. Hershberger
a03831aa25 followup r93415 — there is no “$this” in a static method. 2011-07-29 01:15:52 +00:00
Mark A. Hershberger
58aa1cdff8 wtf, who made this typo? 2011-07-28 19:44:53 +00:00
Mark A. Hershberger
60808e86c1 follow up r93397 — missed msgid 2011-07-28 19:38:28 +00:00
Mark A. Hershberger
e5a99a4262 Add hook that could be the solution for Bug #28026 (“Enable e-mail
notifications for watchlist (EnotifWatchlist) on all small wikis”) to
make logging sent emails easier.
2011-07-28 19:19:42 +00:00
Mark A. Hershberger
2da8afe11e further sanity checks for sending email … bomb out if we aren't given
any user with an email address.
2011-07-28 19:15:58 +00:00
Mark A. Hershberger
36a106d255 * followup r93397 — missing $dest
* Otherwise clean up $dest usage
* Clean up Debug messages
2011-07-28 19:03:54 +00:00
Mark A. Hershberger
9ed750e026 array of objects tostring conversion works correctly in php 5.2.3+ 2011-07-28 17:25:19 +00:00