Commit graph

163 commits

Author SHA1 Message Date
Sam Reed
15df9a9d5c Kill off the long deprecated $wgInputEncoding and $wgOutputEncoding globals 2011-05-06 22:09:47 +00:00
Alexandre Emsenhuber
49c718d871 Removed more functions marked for removal in 1.19: wfParseCIDR(), wfRFC822Phrase() and userMailer(). 2011-05-06 18:22:37 +00:00
Sam Reed
8e80b8c3c1 Tidy up some unused variables and such 2011-04-23 21:40:52 +00:00
Tim Starling
7440e684a9 HipHop fixes:
* Fixed preg_replace /e usage in Sanitizer and UserMailer. This was already against policy.
* Removed the __get()-based lazy initialisation of $this->xpath in PPNode_DOM. This caused a notice in HipHop, and is also inefficient due to the need for dynamic properties.
* Fixed the assertion in PPNode_DOM::splitHeading(), flagged by Inez Korczynski. It was obviously completely broken, converting a non-existent property to boolean, and it only appeared to work in Zend by accident.
2011-04-05 04:43:54 +00:00
Sam Reed
dcda4332c9 Tweak some documentation
Add some braces

Explicitally define a variable
2011-02-27 00:40:06 +00:00
Platonides
ab3f4cf4b3 Move the include_path finding code to Fallback class.
Checking availability when calling, as only UserMailer uses it.
2011-02-26 22:37:58 +00:00
Chad Horohoe
a13e752b69 When using safe_mode, mail() cannot take the 5th parameter. Rather than (needlessly) disabling e-mail confirmation as a result, just disregard the parameter. Pointed out by Kunda on IRC. 2010-12-15 19:55:08 +00:00
Sam Reed
73777f30cd Followup r78101 fixme, remove wfQuotedPrintable per Roans CR 2010-12-10 15:48:17 +00:00
Siebrand Mazeland
d5511d979e Follow-up r78101:
* add @deprecated to each deprecated method.
* add @since to new method.
2010-12-09 11:27:59 +00:00
Platonides
a21b365848 Move wfQuotedPrintable() into UserMailer class 2010-12-08 23:09:29 +00:00
Chad Horohoe
23a57f8eb8 php4 access declarations are silly 2010-12-05 04:14:39 +00:00
Alexandre Emsenhuber
ca1d64e584 Stylise UserMailer.php ; added some "public" to public functions 2010-12-04 13:39:18 +00:00
Alexandre Emsenhuber
4d19be865b * Converted UserMailer stuff to return a Status object instead of true-or-WikiError
* Made WikiError::isError() compatible with Status objects
* Added Status::getMessage() for backward compatibility

Extensions using WikiError::isError() to detect a failure of UserMailer::send() and realted methods should still work like before
2010-12-04 13:27:05 +00:00
Alexandre Emsenhuber
78ddcac1e6 Kill E_STRICTs from Mail package 2010-11-07 09:40:34 +00:00
Alexandre Emsenhuber
95580b06ed * (bug 25728) Added $wgPasswordSenderName to allow customise the name associed with $wgPasswordSender 2010-11-07 09:30:42 +00:00
Alexandre Emsenhuber
06a3539699 added wfDeprecated() to wfRFC822Phrase() and userMailer(); tag for removal in 1.19 (last calls were removed in r76212) 2010-11-06 20:10:55 +00:00
Sam Reed
c40d38a5be Remove a few more unused variables
Add a couple of braces to unobvious if
2010-10-31 23:19:40 +00:00
Alexandre Emsenhuber
ac7e41492a * (bug 25642) A exception is now thrown instead of a fatal error when using $wgSMTP without PEAR mail package
Patch by Dmitriy (http://bug-attachment.wikimedia.org/attachment.cgi?id=7754) with correction
2010-10-31 11:47:03 +00:00
Max Semenik
13392647c8 Introduced $wgAdditionalMailParams to allow adjusting extra email options. Based on patch by Alejandro Mery. 2010-10-27 15:52:02 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Sam Reed
7f2d9336cb Using oimplode( ',', $to ) in wfDebug would only result in the same problem as the listed bug (object, object, object) that was being worked around
Bug linked tested on php 5.3.2 gives expected results. Can we optionally work around this now?
2010-09-11 21:08:48 +00:00
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