When $wgEnotifUseRealName is true and no realname is given, the email
notification will contain a empty string, so checking the realname first
Change-Id: I1b76d9eae8ada8ca2eee8fa93d7119fbff44269d
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
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I0056b4a8df243cfc0c5f25378de48f7a35170aca
It's used in 67 of our own translations and likely by end-users in
customized messages, and keeping it doesn't really hurt anything.
Per discussion on I885dc670.
Change-Id: Ia95ff4185d8f1a1e335b8c3f3d855289a66b8d3e
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
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
* Follows-up b2e2b2e016.
* Minor clean up of surrounding documentation comments.
* Fixed missing keys for messages in WebInstallerPage
Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362
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
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
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
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
* 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
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
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
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
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
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
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
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
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.