aboutsummaryrefslogtreecommitdiffstats
path: root/includes/logging/LogEntry.php
Commit message (Collapse)AuthorAgeFilesLines
...
* LogEntry: Boring whitespace and comment changes, some documentation tooBartosz Dziewoński2016-01-071-46/+54
| | | | Change-Id: If501a3c276c3dc341ef73d5ffdb255f68cbe0ab7
* Option to associate a rev id to a RC log entry, allowing unpatrolled statuscenarium2015-12-211-1/+30
| | | | | | | | | | | | | | | | | | | | | | | This provides a mechanism to associate a revision id to an action. For example in core, it makes sense for moves and uploads, which both generate null revisions (also protections, but it isn't interesting if one has patrolling in mind). Crucially, in that case an unpatrolled status is allowed for the RC item. So if the performer of the action is not autopatrolled, it will be displayed as unpatrolled, and if the performer is autopatrolled, it will record an autopatrol action. When one associates a rev id to a type of action, one should also implement a mechanism to patrol said action, since getting the diff for the associated revision is not user friendly and works only if RC patrol is enabled. This is done for uploads in If71af58719a4461f12d125455b7bef07164525ca (with a new file patrol) and for moves in Ie0fa417feaf930c096b69521fc54d57aecd6cd51 (within RC patrol). Extensions might possess other such actions that could benefit from patrolling. Bug: T122089 Change-Id: I694424eca32b69e277f89d4c15183870983d0993
* Use mediawiki/at-ease library for suppressing warningsKunal Mehta2015-06-111-2/+2
| | | | | | | | | | | | | | | wfSuppressWarnings() and wfRestoreWarnings() were split out into a separate library. All usages in core were replaced with the new functions, and the wf* global functions are marked as deprecated. Additionally, some uses of @ were replaced due to composer's autoloader being loaded even earlier. Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to mediawiki/vendor. Bug: T100923 Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
* Added LogEntryBase::extractParams/makeParamBlobumherirrender2015-04-071-4/+26
| | | | | | | Centralize the serialize and unserialize call in the new logging system into two functions to allow reuse by tests. Change-Id: Ibedca39558cbd566661b20e7ebb9d2b6537e4f24
* Removed BloomFilter classesAaron Schulz2015-04-031-4/+0
| | | | | | | | * This ends up being more complex than its worth and even more so for multi-DC support Bug: T93006 Change-Id: Iaa774fe69061e42955b11dc82d30dba93208e606
* Fix IRC lines for blocks published with the old logging systemumherirrender2015-03-141-0/+21
| | | | | | | | | | | | | | | | | | The CheckUser and GlobalBlocking extension are inserting the block logs over the old logging system, where the keys are numeric. This case is not known when building the irc line, because that was already migrated to just get the new style. Added compatibility code for legacy rows. Needs the legacy flag also in ManualLogEntry to make this happen, because it is using the LogFormatter of the new logging system to format the actionText. Have not found the old way for block/reblock, so just for block/block. Bug: T92713 Follow-Up: Ibc7fcaa5a952ff90d42a6477da4baa429f3de64b Change-Id: I08aea8399ce766e98c1a76e237169f220c6cc751
* Fix doc for ManualLogEntry::setParameters()Brad Jorsch2015-01-281-6/+7
| | | | | | | Numbered-and-named parameters are "number:type:name" (where "type" is often empty), not "number:name". Change-Id: I417a3d6caf929a94ffed5e315692950295b3be0d
* Added BloomCache classesAaron Schulz2014-09-031-0/+4
| | | | | | | | | | * Implemented a version of BloomCache using Redis * Added a BloomCheckTitleHasLogs handler class for avoiding slow logging table queries when large amounts of 404 pages are viewed (by various web crawlers at the moment). bug: 67439 Change-Id: I26e5034755e3a7208a45991b1cf2f12467679cc1
* Merge "Allow adding Deleted log entries"jenkins-bot2014-05-301-0/+4
|\
| * Allow adding Deleted log entriescsteipp2014-04-281-0/+4
| | | | | | | | | | | | | | Set log_deleted when a LogEntry object's deleted property is set. Bug: 63650 Change-Id: Iebd6f7442cba5176d112eb613e2b7ca2e67e37b1
* | Allow LogEntry::setRelations to work with array(tag => value)umherirrender2014-05-151-1/+6
|/ | | | Change-Id: I5a3d9799cd2125a02871b1c6a9ef7745eadb518d
* Fixed some @params documentation (includes/*)umherirrender2014-04-191-5/+5
| | | | | | | | | 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
* LogEntry: Make newFromRow work with RC objectnullzero2013-12-311-2/+3
| | | | | | | | | | | | | LogEntry::newFromRow is supposed to give a RCDatabaseLogEntry if the given row is a RC log entry. The previous code only did this if an array was passed as the $row argument. This adds a type cast and fixes the function so that the proper LogEntry subclass is returned no matter what variable type is passed to the function. Bug: 52053 Change-Id: I6f64358837b37c54d00a7544e9e8a92c216bbe89
* Update documentation related to newFromRow and formatRowSiebrand Mazeland2013-12-271-1/+1
| | | | Change-Id: I65e5923c4dc3a63bd9cdbbc5fdcb572ab0cb9cae
* Merge "Declare visibility on log class related properties"jenkins-bot2013-12-261-0/+8
|\
| * Declare visibility on log class related propertiesSiebrand Mazeland2013-12-051-0/+8
| | | | | | | | | | | | Also add a few missing ones. Change-Id: Iff1d9ebc79f8990bfa2e3c4eea2ff15a7c9cd55e
* | Merge "Update documentation for log related classes"jenkins-bot2013-12-061-13/+32
|\|
| * Update documentation for log related classesSiebrand Mazeland2013-12-061-13/+32
| | | | | | | | Change-Id: I4e00cda46cc7bbcbd17ac2d3d025a76281ee84b6
* | Update ternary notationSiebrand Mazeland2013-12-041-1/+1
|/ | | | Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5
* Update formatting for log related classesSiebrand Mazeland2013-12-031-9/+11
| | | | Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
* Move ManualLogEntry to RecentChange logic into own functionKunal Mehta2013-11-051-10/+21
| | | | | | | | There are certain cases where extensions might want to get a RecentChanges object without actually inserting it into the recentchanges table. Change-Id: I2873c648285a2918661c3650bb90e8db0e05c40c
* No spaces after (casts)MatmaRex2013-09-041-6/+6
| | | | | | | | | | Also removed some unnecessary ones. I think I've caught them all. The spaceless version already appears in core ~300 times (after accounting for false positives when grepping). Some consistency would be nice. Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
* Provide a JSON recent changes feed.Victor Vasiliev2013-08-251-1/+1
| | | | | | | | | This introduces a new configuration variable, $wgRCFeeds, which allows the user to configure multiple destinations for RC notifications. It also allows the notification format to be customized. Two formats are included by default: the older IRC format and a new JSON format. Change-Id: I270bde418a82985c94372ac4579100435b6ee026
* Allow for IDatabase to be used as type hints for DatabaseBase|DBConnRefAaron Schulz2013-07-181-2/+2
| | | | | | * Use this in LogEntry to avoid needless type errors Change-Id: I8644b35b0d9cd171243dd28de52e94ef39d361a7
* Added log_search tag support to ManualLogEntryAaron Schulz2013-07-061-0/+30
| | | | Change-Id: I7e57cd3f2b8790aecd1c1831325c59a2be600780
* Dependency inject DB into ManualLogEntry::insert()Aaron Schulz2013-07-011-2/+3
| | | | Change-Id: I5018a6ef6095929edca444ad2d901adcf8680ed2
* Fixed spacing in logging/parser/profiler/rl/revdel/search folderumherirrender2013-04-201-3/+3
| | | | | | | Added spaces before if, foreach Added some braces for one line statements Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
* Fixed @param tags to conform with Doxygen format.Tyler Anthony Romeo2013-03-111-3/+3
| | | | | | | | | | | 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
* Trim spaces on user supplied commentsumherirrender2013-01-201-1/+4
| | | | | This helps on bug 29575 Change-Id: Ic05e5898f8a7c93a95188c9342d22c70d7413b09
* Cache performer of a LogEntry to load it only once from the databaseumherirrender2012-10-211-16/+23
| | | | Change-Id: If920ba0a29b8c9b04705a20db5d8f9528b251fe5
* Remove a bunch of trailing spaces and unneeded newlinesumherirrender2012-10-101-14/+14
| | | | Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-04-301-0/+15
| | | | | | Also made file/class documentation more consistent. Change-Id: I1815587ab2eeb24623ce4bf1c695088bd3f1c2ea
* Unbreak maintenance/deleteDefaultMessages.php for PostgreSQLMarcin Cieślak2012-03-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deleteDefaultMessages.php was failing during upgrade from MediaWiki 1.7.3 with a databaser error. A stub user: $user = User::newFromName( 'MediaWiki default' ); has user ID 0, so that $user->isAnon() is true. Unfortunately, ManualLogEntry::publish() from r96441 tries to insert $user->getName() ("MediaWiki default") into rc_ip. PostgreSQL won't allow this, because rc_ip is of Postgres-specific CIDR type. Traceback: Checking existence of old default messages... ...deleting old default messages (this may take a long time!)...A database query syntax error has occurred. The last attempted database query was: "INSERT INTO "recentchanges" (rc_timestamp,rc_cur_time,rc_namespace,rc_title,rc_type,rc_minor,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_moved_to_ns,rc_moved_to_title,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('2012-03-14 21:51:05 GMT','2012-03-14 21:51:05 GMT','8','1movedto2','3','0','0','MediaWiki default','No longer required','0','0',1,'0','','MediaWiki default','1','0',NULL,NULL,'0','1','delete','delete','a:0:{}','1')" from within function "RecentChange::save". MySQL returned error "1: ERROR: invalid input syntax for type cidr: "MediaWiki default" LINE 1: ...ki default','No longer required','0','0',1,'0','','MediaWiki... ^" Backtrace: #0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(332): DatabaseBase->reportQueryError('ERROR: invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '') #1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(904): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '') #2 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(604): DatabaseBase->query('INSERT INTO "re...', 'RecentChange::s...', '') #3 /usr/home/saper/public_html/pg/w/includes/RecentChange.php(199): DatabasePostgres->insert('recentchanges', Array, 'RecentChange::s...') #4 /usr/home/saper/public_html/pg/w/includes/logging/LogEntry.php(479): RecentChange->save('pleasedontudp') #5 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(2042): ManualLogEntry->publish('1') #6 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(1937): WikiPage->doDeleteArticleReal('No longer requi...', false, 0, false, '', Object(User)) #7 /usr/home/saper/public_html/pg/w/maintenance/deleteDefaultMessages.php(73): WikiPage->doDeleteArticle('No longer requi...', false, 0, false, '', Object(User)) #8 /usr/home/saper/public_html/pg/w/maintenance/update.php(128): DeleteDefaultMessages->execute() #9 /usr/home/saper/public_html/pg/w/maintenance/doMaintenance.php(105): UpdateMediaWiki->execute() #10 /usr/home/saper/public_html/pg/w/maintenance/update.php(151): require_once('/usr/home/saper...') #11 {main} Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113888
* Normalise casing of getArticleID used in coreSam Reed2012-03-111-1/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113580
* Made use of new getIRCActionComment() function so that comments are back in ↵Aaron Schulz2012-02-221-1/+1
| | | | | | | IRC lines. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112070
* r112062: updated LogEntry publish() function tooAaron Schulz2012-02-211-2/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112065
* First merge of the rest of the code from bug 34508 patch 1 and patch 3Sam Reed2012-02-211-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112045
* Improve documentationSam Reed2012-02-211-0/+3
| | | | | | | | | | Fix whitespace Fix weird conditional loading of DB_MASTER from specials/SpecialEditWatchlist.php Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112043
* More return documentationSam Reed2012-02-091-0/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111102
* Fixing some of the "@return true" or "@return false", need to be "@return ↵Sam Reed2012-02-091-1/+1
| | | | | | | | | bool" and then the metadata can say true if foo, false if bar Other documentation improvements Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111052
* (bug 33374) - 'Deletion log summary not properly truncated'Aaron Schulz2012-02-081-1/+6
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110955
* Made LogEntry::getPerformer() not fail miserable if we got the LogEntry via ↵Aaron Schulz2012-02-071-3/+7
| | | | | | | newFromRow() on just a logging table row. Previously, the current user IP would show. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/110885
* added some docsJeroen De Dauw2012-01-151-0/+46
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/108989
* Quick ugly fix to avoid duplicate log entries in rc feed.Niklas Laxström2011-11-031-1/+1
| | | | | | | | 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 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101834
* Kill various unused variablesSam Reed2011-10-291-3/+1
| | | | | | | | | Comment some out also Add some bits of documentation Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101240
* Removal of unused globalsPlatonides2011-10-271-3/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101043
* Converted patrol log to the new systemNiklas Laxström2011-09-191-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/97495
* Drop JSON support. It was never used and causes problems like bug 30854 ↵Niklas Laxström2011-09-141-8/+2
| | | | | | | | | 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/97039
* This should fix regression reported in r96545Niklas Laxström2011-09-091-1/+1
| | | | | | | | Notice: Undefined offset: 1 in D:\www\MW_trunk\phase3\extensions\FlaggedRevs\dataclasses\FlaggedRevsLog.php on line 156 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96649
* Switch JSON to (un)serializeNiklas Laxström2011-09-081-7/+15
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/96585