Commit graph

44 commits

Author SHA1 Message Date
jenkins-bot
f93d34fb75 Merge "Allow adding Deleted log entries" 2014-05-30 21:58:54 +00:00
umherirrender
d2effb755b Allow LogEntry::setRelations to work with array(tag => value)
Change-Id: I5a3d9799cd2125a02871b1c6a9ef7745eadb518d
2014-05-15 16:38:41 +00:00
csteipp
34d4901f73 Allow adding Deleted log entries
Set log_deleted when a LogEntry object's deleted property is set.

Bug: 63650
Change-Id: Iebd6f7442cba5176d112eb613e2b7ca2e67e37b1
2014-04-28 15:28:41 -07:00
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
nullzero
5c06f5f517 LogEntry: Make newFromRow work with RC object
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
2013-12-31 10:49:13 +00:00
Siebrand Mazeland
c64fc2f380 Update documentation related to newFromRow and formatRow
Change-Id: I65e5923c4dc3a63bd9cdbbc5fdcb572ab0cb9cae
2013-12-27 13:56:52 +01:00
jenkins-bot
8751d6a10f Merge "Declare visibility on log class related properties" 2013-12-26 18:40:53 +00:00
jenkins-bot
5c5255e227 Merge "Update documentation for log related classes" 2013-12-06 00:28:29 +00:00
Siebrand Mazeland
d60ff22b75 Declare visibility on log class related properties
Also add a few missing ones.

Change-Id: Iff1d9ebc79f8990bfa2e3c4eea2ff15a7c9cd55e
2013-12-05 23:07:41 +00:00
Siebrand Mazeland
e64f4d9f12 Update documentation for log related classes
Change-Id: I4e00cda46cc7bbcbd17ac2d3d025a76281ee84b6
2013-12-06 00:07:12 +01:00
Siebrand Mazeland
8c0cbe6f83 Update ternary notation
Change-Id: I553dd1d42477326848e6e40b824058b6790e2eb5
2013-12-04 09:52:51 +01:00
Siebrand Mazeland
8a536b8591 Update formatting for log related classes
Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
2013-12-03 15:36:21 +01:00
Kunal Mehta
6b1b25fad3 Move ManualLogEntry to RecentChange logic into own function
There are certain cases where extensions might want to get
a RecentChanges object without actually inserting it into
the recentchanges table.

Change-Id: I2873c648285a2918661c3650bb90e8db0e05c40c
2013-11-05 00:02:54 -08:00
MatmaRex
df8ec1e216 No spaces after (casts)
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
2013-09-04 20:05:43 +02:00
Victor Vasiliev
2961884b43 Provide a JSON recent changes feed.
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
2013-08-25 21:23:16 -07:00
Aaron Schulz
1fbb0404f5 Allow for IDatabase to be used as type hints for DatabaseBase|DBConnRef
* Use this in LogEntry to avoid needless type errors

Change-Id: I8644b35b0d9cd171243dd28de52e94ef39d361a7
2013-07-18 03:43:20 +00:00
Aaron Schulz
8c04cd7647 Added log_search tag support to ManualLogEntry
Change-Id: I7e57cd3f2b8790aecd1c1831325c59a2be600780
2013-07-06 10:42:54 -07:00
Aaron Schulz
07319ccba2 Dependency inject DB into ManualLogEntry::insert()
Change-Id: I5018a6ef6095929edca444ad2d901adcf8680ed2
2013-07-01 11:26:45 -07: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
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
umherirrender
7d2bf6aac1 Trim spaces on user supplied comments
This helps on bug 29575

Change-Id: Ic05e5898f8a7c93a95188c9342d22c70d7413b09
2013-01-20 14:08:38 +00:00
umherirrender
17652df9f9 Cache performer of a LogEntry to load it only once from the database
Change-Id: If920ba0a29b8c9b04705a20db5d8f9528b251fe5
2012-10-21 17:57:54 +02:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14: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
Marcin Cieślak
de5222aedf Unbreak maintenance/deleteDefaultMessages.php for PostgreSQL
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}
2012-03-15 01:52:38 +00:00
Sam Reed
b18ea7dee2 Normalise casing of getArticleID used in core 2012-03-11 18:54:55 +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
Aaron Schulz
689b261466 r112062: updated LogEntry publish() function too 2012-02-21 23:51:18 +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
e16a11ae16 Improve documentation
Fix whitespace


Fix weird conditional loading of DB_MASTER from specials/SpecialEditWatchlist.php
2012-02-21 21:15:05 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Sam Reed
85bbb0b080 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 18:01:10 +00:00
Aaron Schulz
44da495581 (bug 33374) - 'Deletion log summary not properly truncated' 2012-02-08 19:53:55 +00:00
Aaron Schulz
6b239b0416 Made LogEntry::getPerformer() not fail miserable if we got the LogEntry via newFromRow() on just a logging table row. Previously, the current user IP would show. 2012-02-07 22:22:27 +00:00
Jeroen De Dauw
46dc391fb3 added some docs 2012-01-15 16:13:16 +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
Niklas Laxström
1a05f8faf7 Converted patrol log to the new system 2011-09-19 14:21:05 +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
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
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
4ac56c2466 Committing my new logging classes for review. Will later commit changes that use these classes. 2011-09-07 15:32:37 +00:00