Commit graph

20 commits

Author SHA1 Message Date
umherirrender
ca31ebad3f fix some spacing
Added/removed spaces after opening/before closing parentheses

Added a space after a comma

Removed unneeded parentheses in condition

Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b
2013-02-09 23:03:53 +01:00
Antoine Musso
f6b92231fd style: normalize end of files
By PSR2 PHP Standard, the files should ends with exactly one newline.
Some of our files have 2 or more and some other were missing a newline.

Fix almost all occurences of CodeSniffer sniff:
PSR2.Files.EndFileNewline.TooMany

I have not fixed the selenium files, I believe we will drop them.

Change-Id: I89fca8c1786fee94855b7b77bb0f364001ee84b6
2013-02-03 15:04:39 +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
umherirrender
dbea761c29 prop=imageinfo&iiprop=url|thumbmime needs iiurlwidth=
A thumb is only generated when prop=url and a urlwidth is given. Adding
a hint to param description.
list=allpages does not have a urlwidth param and therefor cannot get the
thumbmime, adding thumbmime to the filter list to remove it from output

Change-Id: Ic1dbdb9b07f6325756058d6a0aa6ea148499fdfb
2012-07-13 17:25:22 +02: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
a5628f5734 Based on diff to wikia, set more functions consistently public rather than protected 2011-08-17 22:24:21 +00:00
Ian Baker
ee926cf336 Actually alias sessionkey to filekey, fixes bug in r92459 2011-07-21 22:28:11 +00:00
Ian Baker
5f13517e36 changed sessionkey to filekey to keep consistent with the rest of UploadStash (while retaining sessionkey for backwards compatibility) 2011-07-18 19:31:38 +00:00
Ian Baker
9d4fd0c567 Refactored UploadStash and related classes to use the database for file metadata storage instead of the session, see bug 26179
Tweaked the UploadWizard to work properly with the new backend code, updated tests
2011-07-12 21:11:43 +00:00
Sam Reed
2b676156ba And even more documentation 2011-05-28 18:58:51 +00:00
Sam Reed
280355d209 * (bug 27586) Remove duplication of props in ApiQueryStashImageInfo by using ApiQueryImageInfo
Programatically do properties and descriptions. Reduces text duplication, and hence normalises descriptions! :)

Follows up r84502, r84433
2011-03-22 00:08:45 +00:00
Sam Reed
442bec4f9b Commit stuff from my w/c
Remove white line

Make second if else if (they're opposites)
2011-02-25 16:53:33 +00:00
Sam Reed
ec07a4fe7b Bit of documentation, explicitness, variable definition 2011-02-24 23:03:00 +00:00
Sam Reed
adf3254f47 Remove error duplication in ApiQueryStashImageInfo by using non hardcoded prefix in ApiQueryImageInfo 2011-02-20 13:51:24 +00:00
Sam Reed
7c02dc5f13 Per comment on r82477, update output for prop=statimageinfo 2011-02-20 13:50:15 +00:00
Brian Wolff
fc5df5e52d (follow-up r81558) Per suggestion, make this use media handler's getParamString/parseParamString
Additionally, rename makeThumbParam back to getScale since that makes more sense now.
Also update the version number used in ForeignAPIRepo user-agent, since this is kind of significant change.
2011-02-13 07:30:49 +00:00
Brian Wolff
ec2af084d2 (bug 26548) Make multi-paged documents (PDFs) work with ForeignAPIRepo (aka InstantCommons).
This adds a new parameter to the query=imageinfo (and query=stashimageinfo) that takes rendering
parameters other than width and height. This could be page for pdf's and DjVu, or thumbtime for ogg's, etc.
Syntax is &iiurlparam=param1=value1|param2=value2|... I'm not sure if that really fits with the normal way
of doing things in the api, but couldn't think of anything better since the parameters are arbitrary.

I also noticed that some of the pre-existing error codes in query=imageinfo seem to duplicate the module prefix. I'm
not sure what the deal with that is, but i did not follow that example in the new error codes i introduced.

Note: In order for this to work, both the foreign repo and the local wiki have to be running this code.
2011-02-05 08:49:48 +00:00
Bryan Tong Minh
9fff147a37 Make the UploadStash repo specific by creating FileRepo::getUploadStash(). In practice this will probably not be used and makes getting an UploadStash object slightly more type work, but I think it is cleaner to have an upload stash explicitly bound to a repo. 2011-01-25 21:26:53 +00:00
Sam Reed
e0373cc450 Per CR on r68482, fix adss to add
Also remove trailing whitespace in files
2010-12-30 00:56:30 +00:00
Neil Kandalgaonkar
59339ca723 Fixed bug#25784 (thumbnails of stashed files had wrong description URLs).
This fixes the more general problem that the imageinfo returned with stashed uploads was inaccurate, since it was relying on
code that only worked with non-stashed files.

So, I had to:
- move the ApiQueryStashImageInfo module into core. Which others had asked for anyway, and was anticipated sometime later.
  - add lines to AutoLoader and ApiQuery to accomodate the new module

- add an ugly if/then to UploadBase -- based on the type of uploaded file, it will use a different API module to simulate a getImageInfo call. 
  I left a TODO that this situation wasn't ideal, but the way things are now, imageInfo is constructed by the API modules, when it should probably
  really be the File modules. Then the API can wrap that info into various formats.

- add a few new lines to the tests to check imageinfo information in both regular and stashed upload files
2010-11-16 06:57:46 +00:00