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
Sam Reed
63623255e5
r71834, params and desc would be good
2010-08-28 00:57:58 +00:00
Sam Reed
c2a1fe9677
Couple more userid properties for Bug 19195
2010-08-28 00:52:38 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Sam Reed
5387b8a806
Stylize API up to date
...
Fix spaces from r69755
Minor update to RELEASE-NOTES per r69753
2010-07-23 07:33:40 +00:00
Tim Starling
b2dc451c82
Rewrote r69339 etc. to clean up API cache header handling.
...
* Introduced a "cache mode" concept to simplify the header generation code, and to avoid odd results when conflicting cache header requests are received from submodules, or at least to formalise the handling of such cases.
* Made the cache mode private by default, so that code written in ignorance of caching tends to be safe. If different query modules are used in a single request, private caching is preferred over public caching.
* Removed the "must-revalidate" option from all CC headers, this is really specific to page views with a hacked squid in front, I don't think it's applicable here.
* Made the watchlist module private. This is really the definition of private data. There's nothing in the HTTP spec that says the URL for a CC:public request is private and can't be leaked. CC:private provides protection against unknown proxy behaviour.
* In ApiQueryAllmessages: avoid calling $wgLang->getCode() to check if it's necessary to make a new $wgLang when lang= is specified, since this is the only thing that unstubs $wgUser.
* Removed "FIXME: should this check $user instead of $wgUser?" Answer is no.
2010-07-23 07:17:56 +00:00
Sam Reed
8f1d2cb199
Big blitz on unused variables (a lot of $db = $this->getDb() )
2010-07-22 22:13:21 +00:00
Mark A. Hershberger
894f7a21dd
follow up r69339: Add a missing setVaryCookie for consistency and to avoid user X with skin Y getting the response marked up for skin B.
2010-07-14 21:00:09 +00:00
Sam Reed
f5c639fd10
Stylize API
...
Add a few braces
2010-07-06 13:15:59 +00:00
Sam Reed
2d21295243
* (bug 23473) - Give description of properties on all modules
...
Commit patch by John Du Hart with a few minor tweaks/fixes
2010-06-23 19:36:26 +00:00
Sam Reed
19d004fa66
* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
...
Patch by John Du Hart
Add a couple of missing braces
2010-06-23 12:34:59 +00:00
Derk-Jan Hartman
921619b119
Correct the address of the FSF in some of the GPL headers
...
59 Temple Place -> 51 Franklin Street
2010-06-21 13:13:32 +00:00
Sam Reed
faf34b4073
Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while ( $row = $db->fectchObject( $res ) ) to foreach ( $res as row )
...
On ApiQueryUsers switch $r to row, and remove nested brackets
2010-06-20 18:48:34 +00:00
Sam Reed
a90a0783de
Nuke $db->freeResult() from Api stuffs
2010-06-20 17:48:21 +00:00
Sam Reed
e55ed729c4
Mixture of things.
...
Couple of class comments
Normalisation of "." usage at end of lines (removed)
Normalisation of {prefix}parameter as per bug 23461
2010-05-11 22:30:18 +00:00
Matthew Britton
fb18f9d8e7
(bug 22868) don't list infinite block expiry date as "now" in API logevents
2010-03-31 14:44:35 +00:00
Sam Reed
8328c6d619
Fixup r63301 as per Roan comment
...
Still not using an index...
2010-03-06 18:03:05 +00:00
Sam Reed
abe0f5cc07
* (bug 22738) Allow filtering by action type on query=logevent
...
Needs patrol fixing (but not an api problem)
2010-03-05 23:21:38 +00:00
Jack Phoenix
eba6c94002
API: fix copyright symbol, coding style cleanup, more braces
2010-02-24 14:45:19 +00:00
Sam Reed
1f9a7d791c
Implement 9 modules dieUsage errors
2010-02-13 00:48:31 +00:00