Commit graph

136 commits

Author SHA1 Message Date
Brian Wolff
8c328d030f Add identifying info (img_timestamp and img_sha1) to upload log.
I came across people complaining that it was hard to associate
upload log events to actual images since img_timestamp could
be different from log_timestamp, and generally no unique id.

Well I was there I made uploads use the new logging system.

Change-Id: Icd8662ecb9eb0f6c0ff9841bdbd5736d6dd0d015
2013-05-10 21:10:49 +00:00
umherirrender
da39005596 Removed space after isset
While at it, added/removed some other spaces in the same files

Change-Id: Iabb23a448f6f53eb6020155f9c744f74f8b11786
2013-04-26 14:18:06 +02:00
umherirrender
a35cce4be0 Fixed spacing in api folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Id7779dca4d1185245cf5764102b8de8b232c34b6
2013-04-20 07:47:36 +00:00
Yuri Astrakhan
0aa24ae558 Fixed many small spelling mistakes and php docs, var decl.
Change-Id: I1508ed7eb77e5e4f700fb63955d626c4f5915840
2013-03-10 23:45:51 -04:00
umherirrender
2e8da558ba fix some spacing
Change-Id: Id7eda67a43f9040117edd79fdbeb678f1c3a6da2
2013-01-26 22:11:09 +01:00
Yuri Astrakhan
503cd2f4ae (bug 35885) remove api version string and parameter
API was using SVN's version keyword which GIT does not support.
All related methods were either removed, or for those that
could have been used from extensions, emptied out.
api.php?version now shows unrecognized param warning.

Change-Id: I910ca1448ed2ed697ac19b17c486d130aa1d7e03
2013-01-18 12:41:18 -05:00
Yuri Astrakhan
32fd68f81c Minor cleanup
Fixed spacing, eol chars, "string" --> 'string'

Change-Id: I630247c6c5b469efb67ec9de32e8533ae88e59fb
2013-01-12 01:50:48 -05:00
jenkins-bot
c825abc4f9 Merge "Follow-up I5f7f6da0 (cefb9ef): pass the User parameter to more LogEventsList::getExcludeClause() calls" 2013-01-07 23:39:34 +00:00
Marius Hoch
6571047c31 Fix ApiQueryLogEvents::addLogParams for unknown types using the new format
Fixed ApiQueryLogEvents::addLogParams for unknown (probably extension)
log types which use the new log format (with keys like 4:foo:paramname).
Until now such keys we're directly put into the XML output resulting
in invalid XML (see bug 43221, which will be fixed by this). To prevent
this we just remove everything except the plain parameter name and use that
as key for the output.

Change-Id: I1a3c7ac624eb575b879d068d47d3a13c9972b1a1
2012-12-20 13:04:33 +00:00
Alexandre Emsenhuber
e506fccbaf Follow-up I5f7f6da0 (cefb9ef): pass the User parameter to more LogEventsList::getExcludeClause() calls
Per comment of Umherirrender, this is needed after the merge of Ia9709ed5 (c326de4).

Change-Id: I7e9c2c7ee7de4e8f26008134c54b6f341ed91f7f
2012-12-19 17:10:13 +01:00
Alex Monk
c326de4581 (bug 43096) Fix querying suppression logs
Change-Id: Ia9709ed5f694e07b7544887b49c99db5ed7063df
2012-12-17 19:58:41 +00:00
umherirrender
e808e38d1b Undefined offset in ApiQueryLogEvents
Follow up Ie188bc6f: Necessary changes to api for rights log changes

Getting for new style logs:
Notice: Undefined offset: 1 in \includes\api\ApiQueryLogEvents.php on
line 245
Notice: Undefined offset: 0 in \includes\api\ApiQueryLogEvents.php on
line 245

Added a legacy part as seen by patrol and move for the rights log action

Change-Id: I1d0bdfb483dba30572e8dcf8faac331a77eb04c6
2012-11-17 22:02:07 +01:00
Catrope
5fe12fad12 Apparently setIndexedTagName_recursive() wasn't enough here
Change-Id: I090b2a315040bc5594a31e5d44dcb9721b4750a6
2012-09-12 12:57:04 -07:00
Catrope
d7a50ae34c Fix fatal error in rcprop=loginfo
There was a recentchanges row on enwiki whose rc_params looked like
array('4::tags'=>array('db-g11')), and the tag name wasn't set
recursively so the inner array didn't get a tag name.

This still generates invalid XML of course, because <4::tags> isn't a
valid tag, but at least it doesn't fatal any more. RAWR XML GRUMBLE

Change-Id: Ibb775df4bd010bdce5632914f789230d8626c9e7
2012-09-10 16:44:43 -07:00
Siebrand Mazeland
c848f486bc Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains
reviewable. This should be the one but last change set with the "easy"
ones for core.

Change-Id: If894a92dd65b2f5f4f096b9133685eb3b067a1d8
2012-08-21 21:58:47 +02:00
Catrope
a8aa44b79f Merge "Fix regression in API log events (bug 35635)" 2012-07-24 23:18:41 +00:00
Antoine Musso
4f5d2386f3 escape HTML elements in docblock with double quotes
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:

 <Firstname>.<Lastname>@gmail.com
 <Firstname><Lastname>@gmail.com

Which becomes:

 "<Firstname>.<Lastname>@gmail.com"
 "<Firstname><Lastname>@gmail.com"

Tested locally, it prevents doxygen 1.8.0 related warnings.

Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
2012-07-15 22:15:45 +02:00
Niklas Laxström
357c9be1b1 Fix regression in API log events (bug 35635)
Patch set 2: Fixed minor typo (redier -> redir)

Change-Id: Ia38075db1e687f33b77c733994e0f19815444a78
2012-07-15 17:47:53 +01:00
Petr Onderka
80aa025528 Added result properties to action=paraminfo
Added information about the properties of the results of API calls
to action=paraminfo, including information about "property groups":
what should the prop parameter be set to to get that property.

Uses the same format for types as parameters already do.
The output format of some modules doesn't fit this, so the result
properties for them weren't added, or only partially.

Partially implemented modules:
* expandtemplates:
  parsetree is in its own tag
* protect, allusers, backlinks, deletedrevs, info, imageinfo,
  logevents, querypage, recentchanges, revisions, searchinfo,
  usercontribs, userinfo, users, watchlist, upload:
  response with partially complex structure

Not implemented modules:
* feedcontributions, feedwatchlist, opensearch, rds:
  non-standard reponse
* help:
  error is normal response; not very useful for automated tools anyway
* paraminfo, parse, pageprops, siteinfo, userrights:
  response with complex structure

Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
2012-06-06 19:24:59 +02:00
Sam Reed
08e4a19369 Documentation updates
Normalise method returns
2012-03-05 15:23:04 +00:00
Sam Reed
87aeeb0fcf Followup r112374/bug 34653
We still get legacy log entries, so grab the data from parameters as applicable

Should probably be encapsulated into DatabaseLogEntry itself, with a getParamValue esk wrapper

This fixes issues noticed on live site for the moment

TODO: Check if rights/block are still ok (probably not?)
TODO: If (especially if above needs doing) encapsulate grabbing of old/new parameters to logging code
2012-02-29 17:50:02 +00:00
Arthur Richards
0d6cf02826 Attempting to address bug 34653; It seems ApiQueryLogEvents has not kept up with changes to the Logging classes. I've changed some aspects of the ApiQueryLogEvents to use a DatabaseLogEntry object when extracting log row information and updated addLogParams to use this new scheme for handling parameters. I have not been able to sufficiently test this and I am still concerned about backwards compatibility with old parameter formats for older log records as well as parameter handling for the 'rights' and 'block' log types. 2012-02-24 23:39:42 +00:00
Sam Reed
53000baecf Oh noes, moar http:// -> https:// 2011-11-28 15:43:11 +00:00
John Du Hart
2e7d867478 Removed the 'eclipse helper' bit on top of every API module
It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs.
I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it.
2011-11-16 00:17:26 +00:00
Bryan Tong Minh
c18151c38c (bug 29392) Setting the start or end parameter now works with lists blocks, categorymembers, deletedrevs, logevents, protectedtitles, usercontributions and watchlist in Postgres.
Since all those used ApiQueryBase::addWhereRange, added ApiQueryBase::addTimestampWhereRange, which does automagic timestamp conversion. Not tested whether this actually fixes problems in Postgres, but at least the API modules are still functional in SQLite
2011-10-06 20:46:24 +00:00
Alexandre Emsenhuber
da4edaaf40 Call Linker methods statically 2011-09-16 19:35:14 +00:00
Roan Kattouw
f809f1ed7c Revert r95058 (make letype multivalue): has been applied before in r88722 and reverted in r89348. 2011-08-20 07:19:10 +00:00
Sam Reed
b1968df5f9 Upstream wikia change
Make type multi
2011-08-19 23:21:34 +00:00
Sam Reed
a5628f5734 Based on diff to wikia, set more functions consistently public rather than protected 2011-08-17 22:24:21 +00:00
Sam Reed
9c37ab4fb3 * (bug 28817) Add reference help page link to API Modules
Last followup of r92396

Should be all modules with documentation pages in core now documented...
2011-07-17 17:02:06 +00:00
Sam Reed
8edf4a2d92 Fix trailing whitespace
Swap methods that call $this->getResult() to use temporary variable
2011-06-29 23:46:39 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Sam Reed
9574e81006 Followup r89348
Fix code style, and remove hint that variable may be multi
2011-06-02 18:39:55 +00:00
Roan Kattouw
ec83e2da6e Revert r88722 (allow multiple values for letype): this won't play nice with query indexing 2011-06-02 16:13:42 +00:00
Sam Reed
289af6c964 Add some documentation
Swap if ( $foo ) { $this->addFields( 'foo' ); } for $this->addFieldsIf( 'foo', $foo ); etc

Also swap $this->addFieldsIf( 'foo', $foo ); $this->addFieldsIf( 'foo2', $foo ); for $this->addFieldsIf( array( 'foo', 'foo2' ), $foo );


Micro-optimisation and readability!
2011-06-01 16:40:59 +00:00
Sam Reed
cfd071328f * (bug 29120) ApiQueryLogEvents: let letype accept multiple values
Description already hinted at multiple
2011-05-24 16:04:03 +00:00
Sam Reed
f8d56fe7ae * (bug 29063) When viewing list=recentchanges&rcprop=loginfo for an unblock entry, get undefined index
Unblocks have no params, so skip adding info
2011-05-20 22:01:50 +00:00
Sam Reed
40f33eb663 Add some more spacing due to long parameter names
Use str_repeat for ease rather than "     " etc

Fix MiserMode to MiserMode
2011-04-23 13:29:11 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Happy-melon
476fd7589a Missed one instance of Block::infinity() from r84279. 2011-03-18 23:29:17 +00:00
Happy-melon
ad0e525ede First forays into the swamp of the Block.php backend:
* Move Block::parseExpiryInput() to the frontend SpecialBlock::parseExpiryInput()
* consolidate the several implementations of the MediaWiki:Ipblockoptions parsing into SpecialBlock::getSuggestedDurations()
2011-03-18 16:35:22 +00:00
Sam Reed
4c3fba4f60 Followup r83856
Per BRYAN (;P) don't use a conditional parameter, just die if miser mode and prefix set
2011-03-13 22:12:57 +00:00
Sam Reed
2109e5fc4a * (bug 27020) API: Allow title prefix search of logevents (only when not in miser mode)
Won't work on WMF wiki's as miser mode is enabled, but won't show as an available option either
2011-03-13 21:43:20 +00:00
Sam Reed
a5db765083 Fix undefined $p from r83797 2011-03-13 21:33:35 +00:00
Sam Reed
8c6f2012b9 * (bug 27670) Ordering by timestamp (and usage of start and end) isn't as clear in auto generated document, as it is on mw.org
where dir = (newer|older)

Will look at doing (asc|desc)(ending)?
2011-03-12 23:39:15 +00:00
Sam Reed
1f05665cf3 Styleli[zs]e the API up to date (Been a while since) 2010-12-30 17:06:09 +00:00
Sam Reed
6309c920dd Delete all the "API for MediaWiki 1.8+" comments
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Roan Kattouw
b81ac8ea52 Improve some of the descriptions added in r68482 2010-12-14 11:47:13 +00:00
Sam Reed
4a0c3d8ff5 Comment return types, some explicit class variable declaration 2010-10-09 00:01:45 +00:00
Sam Reed
3013d5baf6 Few explicit class variable definitions 2010-10-01 11:21:46 +00:00