Commit graph

41 commits

Author SHA1 Message Date
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
Aaron Schulz
1a40d93949 In LogFormatter:
* Changed LogFormatter to support displaying redacting log items if the context user can see them. The default mode is still "show only public items".
* Fixed static calls to non-static getRestrictedElement() function.
* Cleaned up LogFormatter that build up vars only to then throw them away and replace them with rev-deleted placeholders.
In RevDel_LogItem:
* Use LogFormatter instead of raw LogPage::actionText call as such calls are broken and just displayed things like the string "move" (the log action name) instead of "x moved a to b: reason" and such. Fixes r96546.
2012-02-07 23:12:17 +00:00
Niklas Laxström
2ad96d59c8 Can't PHP just DWIM? Ping r109628 2012-01-20 19:09:55 +00:00
Niklas Laxström
35301bc19c Reducy query flood in r96546. Allow formatters to provide titles for LinkBatch. 2012-01-20 16:57:46 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Aaron Schulz
82277e5fdc Fixed doc typo 2011-11-06 05:43:03 +00:00
Sam Reed
9d41b95053 Kill various unused variables
Comment some out also

Add some bits of documentation
2011-10-29 01:17:26 +00:00
John Du Hart
f31602e621 Followup r100396, use is_string instead of !is_array 2011-10-21 20:24:03 +00:00
John Du Hart
a34075b217 Bugfix to r96441, class_exists throws warnings when arrays are passed to it 2011-10-21 00:09:56 +00:00
Niklas Laxström
894de88cfb Followup r97138 - could not reproduce myself 2011-10-03 03:35:18 +00:00
Niklas Laxström
d19db48793 Followup r98135
* Added gender parameter to newuserlog-create2-entry
* Hide old comments (for all log types!)
* logentry-newusers-newusers needs a message after all
* Move user tool links away from the action links and drop the User: prefix from create2
2011-09-28 20:28:40 +00:00
Niklas Laxström
1a05f8faf7 Converted patrol log to the new system 2011-09-19 14:21:05 +00:00
Daniel Friesen
391736c081 Use IContextSource instead of RequestContext inside type hints and instanceof checks. All we need is something that implements IContextSource and it's possible we may want to implement types of RequestContext that don't directly extend RequestContext but are perfectly valid to be passed to classes. 2011-09-15 15:19:49 +00:00
Niklas Laxström
1955323636 This should fix the following PHP notice and the display of some yet another kind of legacy log entries for suppression log
PHP Notice:  Undefined offset: 6 in /www/w/includes/logging/LogFormatter.php on line 379
2011-09-15 07:51:25 +00:00
Niklas Laxström
3631972140 Added a bit defensive programming, as suggested by Aaron in r97040 2011-09-14 10:39:58 +00:00
Niklas Laxström
a9c243b7b5 RevisionDeleter:
* Fixed comment of getChanges and made it public
* Removed getLogMessage and expandMessageArray, now unused
LogFormatter:
* Cache parsed parameters locally, since this function is going to be called few times for every log entry
DefaultSettings:
* Could not find any use of suppress/file log
LogPage:
* Removed old formatting code, now unused
WikiPage:
* Converted (suppress|delete)/delete logs to new format

Added DeleteLogFormatter, handles part of suppression log as well.
Updated messages.
This also addresses bug 18578.
2011-09-14 10:36:24 +00:00
Niklas Laxström
7baf63be52 There was a double space between log action text and user comment. Remove the space produced by linker. 2011-09-14 08:30:11 +00:00
Niklas Laxström
827f08f6ee Instead of throwing fatals, accept null titles in old log entries.
New log entries will still die with fatal few lines below, but that's good since that should never happen.
2011-09-14 07:49:39 +00:00
Alexandre Emsenhuber
74edef87fc Fix comment 2011-09-10 19:51:10 +00:00
Niklas Laxström
a07ade165e Enabled MoveLogFormatter
-> This brings better i18n even to existing move log entries
Fixed the class name from r96441, it's Move not Block
Added notes about new naming conventions to DefaultSettings.php
-> didn't bother the remain existing messages now, they will keep working
Didn't remove 1movedto2*, they are still used until I commit the code which actually makes new style log entries.
2011-09-08 09:09:38 +00:00
Sam Reed
a509bf41be Fix whitespace
Swap xor for ^

Documentation
2011-09-07 21:14:55 +00:00
Siebrand Mazeland
557a8dcc6a Ran stylize.php. Required manual corrections:
* $params[$index-1] was changed to $params[$index -1] instead of $params[$index - 1]
* ///!< @var string was changed to /// !< @var string, but should have remain unchanged.
2011-09-07 17:25:52 +00:00
Niklas Laxström
068fc34a02 Ffixes to r96443 and r96441 2011-09-07 16:11:37 +00:00
Niklas Laxström
4ac56c2466 Committing my new logging classes for review. Will later commit changes that use these classes. 2011-09-07 15:32:37 +00:00