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: Iced714bca004756b461b66067a49a925a7e3b877
Split the variable assignment and the return statement in two lines for
better readability.
When there was two return statements in one method the logic was swapped
to have only one return statement.
Change-Id: Id7a01b4a2df96036435f9e1a9be5678dd124b0af
Also:
* Take function call out of for loop test part.
* Suppress CodeSniffer warnings for unavoidable long lines.
Change-Id: I14044f14b30d494d910541a1dac50921254a7398
Except LegacyLogFormatter.
includes/logging/LogFormatter.php is getting bigger and bigger with
the addition of new formatters when logs are changed to use them
instead of the old method, so better doing this now before we get
new formatters for remaining log types.
Change-Id: I6aab19c8d68bf47beddad42632b0360a7b12f251
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
This allows to display the "password sent by e-mail." string in the user's language
since it's now in the action text rather than always in content language due to the
fact it was hardcoded in the log's comment.
Insertion of log entries for the new users log is now acomplished using the
ManualLogEntry class rather than the old LogPage one.
Removed 'newuserlog-byemail' message since it's no longer used (also checked
extensions in Wikimedia's Git repo).
IRC notifications will use the same message for 'create2' and 'byemail' for backward
compatibility. The only difference is that 'byemail' entries will no longer have
"password sent by email." in the comment.
Change-Id: Icdf1d714259d054cf8c256faf894c533be0dc73c
Don't know if there is a bug for this or not, but I noticed that we don't get "content hidden/unhidden" type notes for revdel logs when they're for file revisions (instead of page revisions)
Change-Id: I0de389e601aaad7fd8abb989b4a0004082206894
This change adds types to LogFormatter like "msg" so log values
(parameters for the log message) can be formated as e.g. a message in
user or content language.
This change adds tests for LogFormatter, too. Tested are the normal log
params, the log params with type and the output of the comment.
This change repairs the changes I6a56c204 and I7218a173
Change-Id: Ief3665056b3bb613ff709821306017ee7967c444
This breaks extensions because of changing protected methods to public (LogFormatter::getMessageParameters() in particular). We need a solid solution. The next 1.21-wmf is being branched tomorrow. Revert is the sanest solution at the moment.
This reverts commit 1c296faf58
This change adds types to LogFormatter like "msg" so log values
(paramaters for the log message) can be formated as e.g. a message in
user or content language.
If you want to add another type feel free to suggest it in your review.
Change-Id: I6a56c2041bcbce292cff485e706db02305aab01c
* Has to keep actual messages for IRC notification
* Catch really old log entries with no parameters and use an
appropriate message in that case to not always display erroneous
"X changed group membership for Y from (none) to (none)".
Change-Id: Ie188bc6fcdf672fe31f0f389a158aab6256031fa
* This allow extensions to set both action text and links directly
from a subclass LogFormatter instead of having to use the LogLine
hooks for this purpose.
* Moved stuff for logs that already use a subclass of LogFormatter
there and the remaining in LegacyLogFormatter. I had to an hack
there so that the pass-by-ref of the comment parameter in the
LogLine hook still works.
* Removed RevisionDeleter::getLogLinks(), included it directly in
DeleteLogFormatter::getActionLinks(); it have a so ugly signature
that is very hard to use it somewhere else (and maintain backward
compatibility too).
* Removed the message caching system in LogEventsList since it's
not used anymore.
* Some misc cleanup to LogEventsList::logLine()
Change-Id: I96d696eed2ae35f5f5640e422ceb0a5b0c33babf
It is much more self-describing to use that method instead of
Linker::userToolLinks() with true as third parameter.
Change-Id: I30fbef2e06c7a835a66130cc54e10e114e286914
* protect/protect and protect/modify were still failing because the output on IRC is not matching the i18n messages. The bots look for comment.match(<i18n-message> + (optionally) followed by ": user comment").
* The problem with protect/protect and protect/modify is that the protection settings are also inserted in somewhere in the message. Before MediaWiki 1.19 these were included in the IRC message as part of $1 (title). That may be ugly, but that's how it has always been. Since the point is to reproduce the old output we need to fix this one as well. This will make the output like:
Krinkle * protected "[[Sandbox [edit=autoconfirmed)]]"
which is exactly how it has been before and that's the the bots rely on (which was presumably done originally like that since it was the only way to make the output match the i18n message)
* Fixes more bug 34508
* Made LegacyLogFormatter try to respect the 'plaintext' parameter.
* Changed LogPage::addEntry() to use LogFormatter to get the action text as such calls to LogPage::actionText() are broken.
* Added comment to LogPage::actionText(). It's only OK to call this from the legacy log formatter, fetched via the proper factory functions.
* Converted CheckUser to using LogFormatter so that cuc_actiontext values work. Eventually, cuc_actiontext should be replaced with new cuc_params, cuc_log_type, and cuc_log_action fields, similar to the RC table.