Commit graph

73 commits

Author SHA1 Message Date
umherirrender
b45420410f Fixed some @params documentation (includes/*)
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
2014-04-19 22:22:20 +02:00
umherirrender
edc924869f Changed some comments from /// to /** @var */
Change-Id: I55b30099e4464c272c35bcabbddbb0b1364a5d65
2014-04-07 05:01:19 +00:00
Kartik Mistry
2daafebc77 Do not use jargon in comment.
* luser -> user

Change-Id: Iab8033dea8f0cbf628563ca5434f3d939fe6b3df
2014-02-06 17:13:28 +05:30
umherirrender
073abe3e12 No variable assignment on return statement
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
2014-01-02 09:43:35 +00:00
Siebrand Mazeland
e64f4d9f12 Update documentation for log related classes
Change-Id: I4e00cda46cc7bbcbd17ac2d3d025a76281ee84b6
2013-12-06 00:07:12 +01:00
Siebrand Mazeland
86fe1da236 Break long lines in logging related classes
Also:
* Take function call out of for loop test part.
* Suppress CodeSniffer warnings for unavoidable long lines.

Change-Id: I14044f14b30d494d910541a1dac50921254a7398
2013-12-03 15:58:51 +01:00
Siebrand Mazeland
8a536b8591 Update formatting for log related classes
Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
2013-12-03 15:36:21 +01:00
umherirrender
9f14ecf829 Added space after switch/Removed spaces after unset
While at it, added/removed some other spaces in the same files

Change-Id: I84d8001aa123a008807ad5eb76f396aed7c899a4
2013-04-26 16:42:31 +02:00
umherirrender
6c38a5eb72 Fixed spacing in logging/parser/profiler/rl/revdel/search folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
2013-04-20 17:38:24 +02:00
Alexandre Emsenhuber
744c0c7541 Move subclasses of LogFormatter to their own file
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
2013-03-15 15:25:33 +01:00
jenkins-bot
6114f05fc1 Merge "Correct case of Title::getPrefixedDBkey() calls" 2013-03-12 15:13:21 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
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
2013-03-11 13:15:01 -04:00
Alexandre Emsenhuber
cd4dd7ca85 Correct case of Title::getPrefixedDBkey() calls
Change-Id: Ic9ef0cc6dbb0a8eb0ee93432299ef59759223e2c
2013-03-09 21:14:22 +01:00
Reedy
c3e4057e06 Kill off numerous unused variables
Change-Id: I7039f1328f37ee669b694f73ee282602186bffd1
2013-03-08 02:36:24 +00:00
umherirrender
d63121016d fix some spacing
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
2013-03-07 17:53:21 +01:00
umherirrender
3f58c15f5a Add username for GENDER in LogFormatter only when visible
For sanity.

bug:42621
Change-Id: If133597f06edcfdda4ad7a47506635743c80cd53
2013-03-04 12:04:47 -08:00
umherirrender
f3cf109e62 remove space before semicolon
Change-Id: Ic0d890f5e27cec017c7f7910a67d53b2edf82079
2013-02-09 22:44:24 +01:00
umherirrender
be90ce07b3 fix some spacing
Change-Id: I93f0a87ba7129bc336083e7289247d3150feb606
2013-02-04 19:54:07 +00:00
Alexandre Emsenhuber
b65893755f Added new "byemail" action to the new users log
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
2013-01-25 16:15:33 +01:00
Alex Monk
8d70936ced Show changed bits on file version (oldimage) revdel logs.
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
2013-01-03 04:06:02 +00:00
jenkins-bot
c1cfc80ed0 Merge "(bug 42211) Fix the display of some user rights log entries" 2012-12-12 18:35:05 +00:00
jan
8b5bfd8b88 (bug 24620) Add types and test for LogFormatter
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
2012-12-12 01:00:03 +00:00
Siebrand
b9e092fa4b Revert "(bug 24620) Add types to LogFormatter"
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
2012-12-10 01:24:21 +00:00
jan
1c296faf58 (bug 24620) Add types to LogFormatter
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
2012-12-09 23:50:41 +00:00
Alex Monk
baf34a747b (bug 42211) Fix the display of some user rights log entries
Change-Id: Iba8891bbf0891fa82c0e76b5a604bf05c14aded5
2012-11-17 22:13:13 +01:00
Alexandre Emsenhuber
4c69cd3ad6 Use LogFormatter to format rights log.
* 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
2012-10-22 19:28:32 +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
Siebrand Mazeland
4e1ccf0267 Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains reviewable.

Change-Id: I4950fdf8be669b52446290768ece0b8df8399d5d
2012-08-20 22:52:17 +02:00
Alexandre Emsenhuber
e93fa029e2 Moved "action links" from LogEventsList to LogFormatter.
* 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
2012-08-15 11:02:50 +02:00
Reedy
e3f2a90bf0 Remove unused variables/function values returned
Fix trailing whitespace

Change-Id: I53abf75e142f0166032b98e4adb3dabe06643017
2012-08-08 00:47:25 +01:00
Alexandre Emsenhuber
897b1cb2f6 Use Linker::userToolLinksRedContribs() in LogFormatter.
It is much more self-describing to use that method instead of
Linker::userToolLinks() with true as third parameter.

Change-Id: I30fbef2e06c7a835a66130cc54e10e114e286914
2012-07-18 12:10:13 +02:00
Alexandre Emsenhuber
44a8e83929 Make LogFormatter::msg() use RequestContext::msg() instead of reinventing the wheel and making everything itself.
Change-Id: I4df5a2d1dc9e05d6cf92a0a4f6e77a36c063c58e
2012-06-15 20:26:39 +02:00
umherirrender
d6c651f608 Add user talk page in newusers log to LinkBatch
Using NewUsersLogFormatter::getPreloadTitles for that

Change-Id: Ib3bede90e33c3d240aad5950247d52d732d8876b
2012-05-11 21:27:40 +02:00
Alexandre Emsenhuber
7d9016943d Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1815587ab2eeb24623ce4bf1c695088bd3f1c2ea
2012-04-30 09:16:10 +02:00
Max Semenik
c945156dde (bug 35565) Special:Log/patrol doesn't indicate whether patrolling was automatic
Change-Id: Ia4d9ffcfda719fd94ac5e01f0e35c4c5823d7d72
2012-03-29 03:00:19 +04:00
Krinkle
3cb731351e [IRC Log Message] Fix for protect/protect and protect/modify
* 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
2012-02-28 01:56:15 +00:00
Niklas Laxström
51220faa74 Followup, restore the irctext variable just in vase, ping r112132 2012-02-22 19:01:02 +00:00
Niklas Laxström
44e9898129 Uglier than ugly hack to fix block log any many others by not having the username prepended on the messages 2012-02-22 18:56:14 +00:00
Rob Lanphier
cba853e5bd r112045/bug 34508: Make upload/upload and overwrite match old IRC format 2012-02-22 18:29:18 +00:00
Aaron Schulz
323ae5f6ce * General log formatting fixes, like using the content language, for IRC feeds (works similar to LogPage::actionText). Use getPrefixedText() for the log title, not just the non-namespace part.
* Made patrol log IRC code behave as it did pre-r97495.
2012-02-22 02:28:17 +00:00
Aaron Schulz
c8a65f837d Made getIRCActionText() public again...since the old LogPage still uses it, ugh 2012-02-22 00:36:31 +00:00
Aaron Schulz
f5d3d02a98 Made use of new getIRCActionComment() function so that comments are back in IRC lines. 2012-02-22 00:26:29 +00:00
Sam Reed
21c569c5a2 Move parameters were backwards
Ping r112061
2012-02-22 00:00:44 +00:00
Sam Reed
b5443a3bdd Bug 34508 - [Regression] IRC string output for log messages no longer compatible
Update messages/MessagesEn.php

Add large backcompat switch conditional thing
2012-02-21 23:38:08 +00:00
Sam Reed
d7e40dbe00 Effectively revert r112042
Followup r112045, remove the irc key name changes
2012-02-21 21:54:27 +00:00
Sam Reed
a30e8a8e47 consistently use $entry 2012-02-21 21:27:39 +00:00
Sam Reed
58c7cf14d3 First merge of the rest of the code from bug 34508 patch 1 and patch 3 2012-02-21 21:26:15 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Sam Reed
0a626db6e1 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 19:29:36 +00:00
Aaron Schulz
7bcb879bc3 Fixes for r96546 (bug 33167):
* 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.
2012-02-08 19:52:04 +00:00