Commit graph

29 commits

Author SHA1 Message Date
Brian Wolff
957850f0da If you request LogEventList to display the combination of 2 log types, and one of
those logs are restricted, will generate a warning, since it removes first entry of
array, but doesn't re-index the array, and subsequent code makes assumptions of the
form if ( count( $this->types ) $singleType = $this->types[0] (which doesn't work, as
first index is 1).

Thus cause array to be re-indexed if a $wgLogRestriction causes a log type to be removed.

Steps to reproduce the issue is make deletion log restricted, then view a (non-existent) user page.

Personally I think its kind of weird/wrong that if someone restricts both the move and delete log,
then viewing a non-existent will give "This page has been deleted, here's delete log:" followed by an
entry from *any* public log.
2011-12-20 06:16:08 +00:00
Jeroen De Dauw
43f00eb80c follow up to r106393 - re-add these notices, since now they wont show for people that change the depr limit to see them 2011-12-16 00:24:00 +00:00
Jeroen De Dauw
ed8d203227 move logging pages to logging dir 2011-12-14 22:48:48 +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
Niklas Laxström
6470c75721 Quick ugly fix to avoid duplicate log entries in rc feed.
I didn't think that save() would send lines, since there was function to do that (added in r45725 - duplicating existing code).
This part of codebase could use much TLC
2011-11-03 17:07:29 +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
Platonides
d581e9dd5a Removal of unused globals 2011-10-27 20:48:09 +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
f2553a0c58 Moved PatrolLog to logging folder, sorted the autoloaded entries alphabetically 2011-09-20 08:39:29 +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
Niklas Laxström
4a24c0ba53 Drop JSON support. It was never used and causes problems like bug 30854 since PHP managed to screw up json_decode too.
It was not a good idea to autodetection of the format anyway, but it isn't such a problem with unserialize.
2011-09-14 07:47:32 +00:00
Alexandre Emsenhuber
74edef87fc Fix comment 2011-09-10 19:51:10 +00:00
Niklas Laxström
b8b5d5a69b This should fix regression reported in r96545
Notice: Undefined offset: 1 in D:\www\MW_trunk\phase3\extensions\FlaggedRevs\dataclasses\FlaggedRevsLog.php on line 156
2011-09-09 08:04:18 +00:00
Niklas Laxström
ec5a25079a Switch JSON to (un)serialize 2011-09-08 16:59:19 +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