Sam Reed
a8f6a731d7
* (bug 27595) sha1 search of list=filearchive does not work
...
Still disabled in misermode, but switched for LIKE rather than =
2011-06-05 23:48:39 +00:00
Sam Reed
d2b35ca13a
* (bug 21346) Make deleted images searchable by hash (disabled in Miser Mode)
...
Effectively reverts r83411, but with the addition of it only works in !$wgMiserMode
2011-06-05 23:40:57 +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
d48986abc5
Followup r84356, don't pass title string, pass a title object
2011-03-26 18:46:15 +00:00
Platonides
b37e81b76b
Use class name Html in canonical form.
...
Removed unused globals $wgHooks, $wgBlockAllowsUTEdit, $wgUser, $wgOut
$wgUser was already set global at function beginning.
Moved global out of switch
2011-03-24 21:35:14 +00:00
Sam Reed
b3ca74bd57
* (bug 27343) Add parseddescription to list=filearchive
2011-03-19 22:54:43 +00:00
Sam Reed
478bcebf12
Improve query building if's to cater for addition of columns
2011-03-18 20:50:40 +00:00
Sam Reed
1100285027
Followup r84260, normalise API behaviour, and fixup description
2011-03-18 20:30:06 +00:00
Sam Reed
da4807d62a
Followup r83862, add notation that page count will be added if appropriate
2011-03-18 19:55:34 +00:00
Sam Reed
09c2fbf75e
* (bug 27585) add pagecount to list=filearchive
2011-03-13 23:04:51 +00:00
Sam Reed
67dc654a9f
* (bug 27203) add fato param to list=filearchive
...
Cleanup some whitespace also
2011-03-13 17:41:47 +00:00
Bryan Tong Minh
9ad9f1b353
Follow-up r83461, replace deleted with hidden and reverse the word, e.g. deletedfile->filehidden. Consistency with prop=revision etc. (In Soviet-Russia, file hides you!)
2011-03-07 17:17:57 +00:00
Bryan Tong Minh
3d3f61a0ab
(bug 27722) list=filearchive now supports revdel
...
* Adds a condition fa_deleted=0 if the user does not have the suppressrevision rights. This field is unindexed. This should however not be a big problem as files with fa_deleted are rare. Unfortunately this hides files that do not have DELETED_RESTRICTED, but I don't know how bad fa_deleted & DELETED_RESTRICTED = 0 is for performance
* Added deletedfile, deletedcomment, deleteduser and deletedrestricted to the output for what I think are appropriate fa_deleted fields, but it's hard to tell what's corrent without a single line of documentation or even comment in the code. Perhaps somebody can dig up a commit message where the purpose of the constants is explained?
2011-03-07 17:07:10 +00:00
Bryan Tong Minh
29eaa85c82
Kill filtering by hash because the query is unindexed. We need a condition on fa_storage_group, but I'm not sure how index merging will work out. I don't have time to investigate this at the moment, so killing it in its entirety seems the safest option for now.
2011-03-06 22:16:34 +00:00
Bryan Tong Minh
9770ff88f5
Breaking change: remove faminsize/famaxsize because they lead to an unindexed query, which takes a very long time if there are only few rows that match the filter. Introduced in r66168, so luckily only live since 1.17.
2011-03-06 22:03:45 +00:00
Sam Reed
2dc186a1d7
Followup r83399, add back base conversion
2011-03-06 20:20:24 +00:00
Sam Reed
56aefb445f
* (bug 27588) list=filearchive&faprop=sha1 returns empty attribute
...
Refactored code out, to be reused in ApiQueryFilearchive
Simplified too per Bryan on IRC
2011-03-06 20:05:41 +00:00
Bryan Tong Minh
51b0552b75
(bug 27587) list=filearchive now outputs full title info
2011-03-05 15:00:23 +00:00
Sam Reed
41cbdab221
Display userid, and actually put username in user (like usual)
...
Fix up a bad description
2011-02-25 17:21:34 +00:00
Roan Kattouw
b81ac8ea52
Improve some of the descriptions added in r68482
2010-12-14 11:47:13 +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
Roan Kattouw
70824ccccc
API: Make output containing private or user-specific data uncacheable for logged-in users by setting Vary: Cookie or Cache-Control: private, whichever is appropriate. Fixes instances in core and WMF-deployed extensions only. Without this change, the output of requests like ?action=query&list=recentchanges&rcprop=patrolled&smaxage=3600 would be cached in Squid and viewable for anyone using the same URL, even if they don't have patrol rights. Other, more serious exploits are also possible. Also avoid using $wgUser in one place, kill some unused global $wgUser; instances and tweak a comment.
2010-07-14 19:00:54 +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
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
1061d519f8
Followup r66259 r66168
...
Wrong column used...
2010-05-12 09:00:09 +00:00
Matthew Britton
043169516f
followup r66168: fix typo in variable name
2010-05-12 08:22:18 +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
Sam Reed
280c227403
Further followup to r66168
...
Fixup rest per Roans comments, though, not exactly as he wrote ;)
2010-05-11 21:37:10 +00:00
Sam Reed
081ed1b9ef
Followup to r66168
...
sha1 overrides sha1base36
Update ApiQueryAllimages similarily, seeing as it doesn't state it either
2010-05-11 21:17:23 +00:00
Sam Reed
e4eca2c65e
* (bug 21346) Make deleted images searchable by hash
...
Based roughly on ApiQueryAllimages
2010-05-10 22:41:16 +00:00