Commit graph

142 commits

Author SHA1 Message Date
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +00:00
Ævar Arnfjörð Bjarmason
b63c3457a4 UserMailer.php: Send diff links from old->new on $wgEnotifImpersonal, not from unrelated_old->old
Since UserMailer's $wgEnotifImpersonal setting was introduced in
r21897 it has ostensibly been sending out mails like these:

    The OpenStreetMap Wiki page Servers has been changed on 10:20, 5 August 2010
    by TomH, see http://wiki.openstreetmap.org/wiki/Servers for the current
    revision.

    See http://wiki.openstreetmap.org/w/index.php?title=Servers&oldid=507861&diff=prev

That link takes you to a page with the diff between:

    Revision as of 2010-07-26T15:22:38 -> Revision as of 2010-07-29T13:03:51

Instead it should take you to:

    Revision as of 2010-07-29T13:03:51 -> Revision as of 2010-08-05T10:20:50

So that you get a diff *to* the 10:20 revision mentioned in the
original E-Mail. Switch diff=prev to diff=next to fix this. Now it'll
emit a link like:

    http://wiki.openstreetmap.org/w/index.php?title=Servers&oldid=507861&diff=next

Reported-by: Grant Slater <openstreetmap@firefishy.com>
2010-08-05 12:50:34 +00:00
Sam Reed
88f7649258 More unused variables, whitespace 2010-07-25 21:44:29 +00:00
Sam Reed
04f68827d0 Removal of unused globals
Removal of one setting of a variable to '', then not using further
2010-07-24 19:11:52 +00:00
Alexandre Emsenhuber
69d5d3222c Fixed some doxygen warnings 2010-07-18 13:18:01 +00:00
Platonides
a4698cf20b Follow up r65027. Use wfMsgForContent, the message is fully in Content language as we may not have a $wgUser here. 2010-05-27 16:35:59 +00:00
Chad Horohoe
0122b83933 (bug 23648) PHP yells about using objects in implode(). Would be nice if __toString() was called like it should. (Supposedly was fixed in PHP6, meh) 2010-05-25 13:25:37 +00:00
Mark A. Hershberger
edc744dcd9 * remove function_exists calls for things that functions that always
exist under supported versions of PHP
** assert() is always defined for DifferenceEngine()
** mail() is always defined for UserMailer()
** is_executable() is defined for Windows from PHP 5.0.0 on
2010-05-19 05:33:27 +00:00
Platonides
6d0221fa3b No MaxSem, you can't revert r65715 on r65716. Use a class variable instead of a global variable for passing the error from the error handler to user code. 2010-04-30 21:57:26 +00:00
Chad Horohoe
afba6fa029 Fix regression in unwatch links sent out by enotif. {{FULLPAGENAMEE}} happens to be "RunJobs.php," so hack around it by adding another $NAMEDVAR to enotif_body 2010-04-14 14:00:53 +00:00
Chad Horohoe
88bf1584a6 Revert r55459, 55467, 55469, 55518 (Page creation notification email is sent when a watched page is deleted). Breaks current setups where enotif_body is customized. Sidenote: anyone looking to do this right should redo EmailNotification::notifyOnPageChange() to just use the params array from RC, rather than tacking more crap onto this function 2009-09-11 01:04:00 +00:00
Purodha B Blissenbach
6de385eb78 Split date, and time, in Mediawiki:enotif_body, and show localized special page name in generated e-mail. 2009-08-23 17:48:25 +00:00
Raimond Spekking
45d0e16f78 Follow-up r55459: Fix for PHP Notice: Undefined variable: deleted in /var/www/w/includes/UserMailer.php on line 379 2009-08-22 07:03:52 +00:00
Alex Z
fb2f9aa34d Parse error: syntax error, unexpected T_VARIABLE in w/includes/UserMailer.php on line 480 2009-08-22 00:46:13 +00:00
Chad Horohoe
3617ab6b5c (bug 15646) Page creation notification email is sent when a watched page is deleted 2009-08-21 23:33:38 +00:00
Chad Horohoe
966ecbaace (bug 17804) Make EmailNotification members protected 2009-06-25 00:41:29 +00:00
Brion Vibber
74016b7565 Move wfDebug() call about use of PHP mail() function to _before_ we mess around with warning/error reporting.
Previously, a failure to open the debug log file for writing would end up getting reported as a failure of mail delivery, even though we were successful.
It'll now fail silently (as it should) and won't interfere with the actual mail() call's error reporting.
2009-05-18 19:08:53 +00:00
Ilmari Karonen
72addd0bc8 fix regression from r47927 2009-04-20 23:14:58 +00:00
Niklas Laxström
8233b77030 * Don't use wgLang for dates in emails 2009-03-20 06:11:04 +00:00
Roan Kattouw
3241ebcbcc (bug 10172) Move setting the "changed since last visit" flags out of the job queue:
* Move up the UPDATE query on wl_notificationtimestamp up to before scheduling the EnotifyNotifyJob
* Move up the SELECT query fetching the users to be notified to before the UPDATE, and use its result for a more efficient UPDATE
* Pass actuallyNotifyOnPageChange() and the EnotifyNotifyJob an array of user IDs
* Add UserArray::newFromIDs()
2009-03-02 12:15:28 +00:00
Tim Starling
b45af1125c Added basic support for Wietse Venema's taint feature. Fixed a few instances of shoddy code that it turned up, no actual vulnerabilities yet. 2009-02-04 09:10:32 +00:00
Aaron Schulz
5dee7c5b43 Avoid slave lag on $title->getLatestRevID() 2009-01-24 18:37:52 +00:00
Aaron Schulz
fff4fe4c52 Hurry up and commit db op before doing mailing op to the users to notify 2009-01-24 18:35:13 +00:00
Jack Phoenix
9d67504d76 tweak UserMailer.php documentation. $replyto must be a MailAddress object and not a string or otherwise you'll get fatal errors like this: Fatal error: Call to a member function toString() on a non-object in ../includes/UserMailer.php on line 142 2009-01-19 18:55:14 +00:00
Aryeh Gregor
6cce173ce5 Fix typo in r43155
Pointed out by zocky on IRC.
2009-01-18 18:48:16 +00:00
Aaron Schulz
d473f63e50 Remove old comment 2009-01-03 21:34:44 +00:00
Aaron Schulz
b18384211d (bug 16429) "nominornewtalk" should not trigger e-mail notifications 2009-01-02 21:32:00 +00:00
Brion Vibber
97f77b9b1a Revert r44702, r44703, r44704 (wfInvoke and UserMailer refactor based on it) and r44715, r44721 (cleanup thereof)
As Tim notes, the weird callback setup in $wgHooks isn't really something we want to replicate or ever rely on ever again, as PHP's native callback syntax already handles things fine and is more consistent (and used extensively in the rest of MediaWiki).
May be other remaining issues with the refactor on top of bugs already discovered, but if it's going to be refactored to use callbacks it should be done using regular callbacks.
2008-12-23 18:08:43 +00:00
Alexandre Emsenhuber
a3cbeaeefd * Short circuit EmailNotification::notify() to not call EmailNotification::commonMessageKeys() if there're no users to notify. This is a hack to work arround the following exception:
A database query syntax error has occurred.
The last attempted database query was:
"SELECT gu_id, lu_wiki, gu_salt, gu_password,gu_auth_token, gu_locked,gu_hidden,gu_registration,gu_email,gu_email_authenticated FROM `parsertest_globaluser` LEFT OUTER JOIN `parsertest_localuser` ON gu_name=lu_name AND lu_wiki='test2wiki-parsertest_' WHERE gu_name='127.0.0.1'"
from within function "Database::safeQuery".
MySQL returned error "1146: Table 'centralauth.parsertest_globaluser' doesn't exist (127.0.0.1)"
* Whitespaces fixes
2008-12-17 17:27:43 +00:00
Niklas Laxström
a9beb0adab * Shut this up 2008-12-17 14:07:07 +00:00
David McCabe
43c9235283 UserMailer bigtime refactor. Please test. 2008-12-17 07:08:16 +00:00
David McCabe
64d53b6569 Revert r44386; depends on wfInvoke, also reverted. 2008-12-10 06:40:05 +00:00
David McCabe
cbafadf8d6 Refactored UserMailer.php. Please let me know if this breaks anything. 2008-12-10 06:02:14 +00:00
Siebrand Mazeland
eed9351741 As discussed with Aaron on irc. Remove "@param bool $wgEnotifUseRealName true will use real name instead of username" altogether. It is not a parameter, so it should not be there. The setting is documented in DefaultSettings.php. 2008-11-03 22:33:18 +00:00
Siebrand Mazeland
2651d131ad Update documentation as pointed out by Aaron. Fix on r43155. 2008-11-03 22:26:58 +00:00
Siebrand Mazeland
a8553af5d0 Add missing global $wgEnotifUseRealName. Fix for undefined variable notice in r43155. 2008-11-03 22:22:46 +00:00
Siebrand Mazeland
7ccff4543c (bug 15068) Added $wgEnotifUseRealName, which allows UserMailer to send out e-mails based on the user's real name if one is set. Defaults to false (use the username). Patch by ^demon (Chad Horohoe). Per suggestion of brion. 2008-11-03 21:31:47 +00:00
Aaron Schulz
e03787afd9 Make getTimestampFromId() need a title. Avoids some secondary lookups and orphans revs will be overlooked. 2008-10-30 10:04:30 +00:00
Aaron Schulz
05e2726ec8 Stop watchlist links from hoping around from bold to non-bold 2008-10-09 03:41:29 +00:00
David McCabe
fd2031a752 Use PHP-5 private members. 2008-09-26 06:01:57 +00:00
Greg Sabino Mullane
5f2042e3fa Duplicate code 2008-09-18 15:19:44 +00:00
Roan Kattouw
83922fa645 Revert part of r40107 (Revert r40042 because of regressions). The changes to UserMailer.php had nothing to do with that bug. 2008-08-27 21:15:42 +00:00
Brion Vibber
2b5f7032ec Revert r40042 "* In Article::replaceSection(), actually return null when $section is bogus. Used this in my half-complete and now kind of abandoned attempt at rewriting EditPage.php"
This causes regression bug 15340 -- null-edits to a section destroy the rest of the page.
2008-08-27 21:12:44 +00:00
Roan Kattouw
323c3a6e71 * In Article::replaceSection(), actually return null when $section is bogus. Used this in my half-complete and now kind of abandoned attempt at rewriting EditPage.php
* In UserMailer::send(), allow the caller to override the Content-type header so people can send multipart messages if they really want to. Using this in an extension I'm developing
2008-08-26 20:07:53 +00:00
Brion Vibber
f8625ed29d * (bug 15055) Talk page notifications no longer attempt to send mail when
user's e-mail address is invalid or unconfirmed
2008-08-06 23:43:17 +00:00
Brion Vibber
10a39c7e78 * (bug 13376) Use $wgPasswordSender, not $wgEmergencyContact, as return
address for page update notification mails.

Note that $wgEmergencyContact is now not currently in active use, but could
in theory be used for some kinds of failure notifications or to provide to
users to contact in case of failure, which I think was its original intention.
Certainly it's silly to throw an "emergency" contact on auto-sent mails!

There's also a $wgNoReplyAddress, which is currently used to add a Reply-To
header on notification mails. WTF? :)

We should probably refactor all this address crap...
2008-08-01 16:38:15 +00:00
Brion Vibber
bb3faf9d9b Revert r37490, 37493 for now -- 'NotifyOnPageChangeComplete hook added'
The hook seems a bit odd; it triggers on some of the composes, but not all. There's another loop right after this one.
Also, there's no need to pass objects as references here.
2008-07-10 17:02:39 +00:00
Krzysztof Krzyzaniak
a8e647332b NotifyOnPageChangeComplete hook added 2008-07-10 11:10:48 +00:00
Brion Vibber
bbe8578150 Revert the rest of r37393 -- appears to be debugging stuff accidentally committed 2008-07-09 17:49:51 +00:00
Daniel Kinzler
438f6d2925 improved integration into category bar. Note: options is not functional until SkinJoinCategoryLinks hook is implemented (merge pending) 2008-07-09 15:05:25 +00:00