Sam Reed
b0818acd86
More example conversions/additions
...
Ping r106439
2011-12-17 19:10:33 +00:00
Max Semenik
da663eaf97
Caps fix in API parameter description
2011-12-12 17:22:20 +00:00
Jan Gerber
0095c08ed2
Use database to track uploaded chunks and concatenate at the end.
...
with i18n documentation dont break phpunit
follow up r93720
2011-11-30 14:56:40 +00:00
Roan Kattouw
e83bb90997
Revert r104659 and its followup r104665: break the unit tests with a fatal error. This cripples our CI system, we can't detect new failures this way.
2011-11-30 13:54:35 +00:00
Jan Gerber
d70c169b90
Use database to track uploaded chunks and concatenate at the end.
...
follow up r93720
2011-11-30 08:55:16 +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
Sam Reed
87446c808a
Documentation
2011-11-10 20:50:21 +00:00
John Du Hart
40f19e6def
Adding context to the API
...
This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it.
2011-10-26 23:27:01 +00:00
Bryan Tong Minh
f3fc3c7f43
Follow-up r98430, use dedicated error message for filename too long error. Adds 'filename-toolong' message.
2011-10-07 18:20:55 +00:00
Sam Reed
0ca8ed8792
3 PHP Fatal error: Call to undefined method LocalFile::getFileKey() in /usr/local/apache/common-local/php-1.18/includes/api/ApiUpload.php on line 150
...
Tag: REL1_18, 1.18wmf1
2011-10-05 13:47:02 +00:00
Sam Reed
469cc76775
Return documentation
2011-09-21 16:36:43 +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
8dc7b8889f
Whitespace
...
Documentation
2011-08-11 23:58:29 +00:00
Jan Gerber
bdb437b164
dont use deprecated function WebRequest::getFileSize
2011-08-05 08:49:43 +00:00
Jan Gerber
87dc065d41
result of finished Chunk Upload has to be Success
2011-08-02 12:44:26 +00:00
Jan Gerber
5acb37d00e
use tabs. for consistant whitespaces
2011-08-02 11:01:01 +00:00
Jan Gerber
65c85b5072
Extend upload api adding an option to upload files in chunks,
...
using UploadStash to track the unfinished upload.
2011-08-02 10:13:56 +00:00
Ian Baker
aa5d7bbcea
Added a workaround for the lack of RequestContext in 1.17, so this code can be rolled into production.
...
This code can be removed in 1.18+, but it'll work either way.
2011-07-25 22:39:52 +00:00
Neil Kandalgaonkar
3241602f14
removing xdebug call
2011-07-18 18:59:56 +00:00
Sam Reed
6e84e9ccd9
Followup r92396, add help urls for most of the core (non query) modules
2011-07-17 16:38:24 +00:00
Ian Baker
9b50e7ade7
properly handle the case where a file disappears during the uploadwizard process
...
remove database records for files that move out of the stash
2011-07-14 23:01:00 +00:00
Ian Baker
c2e2c8270e
Added us_status column for future expansion re Bryan's suggestion
...
Implemented changes suggested in code review on r92009:
constructor bug handling passed repo/stash
up-to-date timestamp generation
fetching db handle from repo
iterating over select results according to convention
changed uploadstash.us_media_type to enum to mirror image.img_media_type
removed (most) new references to $wgUser, instead using ApiBase::createContext to find the user
2011-07-13 19:08:51 +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
8edf4a2d92
Fix trailing whitespace
...
Swap methods that call $this->getResult() to use temporary variable
2011-06-29 23:46:39 +00:00
Sam Reed
2b676156ba
And even more documentation
2011-05-28 18:58:51 +00:00
Antoine Musso
6a8e32e986
Single messages can be passed as strings to Api::dieUsageMsg()
...
Since r88045
2011-05-19 17:51:16 +00:00
Bryan Tong Minh
ef3d06a44c
Per CR r75906, reintroduce ApiUpload::transformWarnings()
2011-05-15 14:46:13 +00:00
Bryan Tong Minh
b21d160c83
(bug 1780) Uploading files with non-ascii characters are now forbidden on Windows. PHP on Windows does not reliably support non-ascii characters to forbid them all. Theoretically we could detect the filesystem locale and iconv the filename, but that is just too much hassle. Added message 'windows-nonascii-filename'.
2011-05-15 12:35:50 +00:00
Bryan Tong Minh
8bd336981c
API upload errors may now return the parameter that needs to be changed and a sessionkey to fix the error. This is for now only done for uploads that can be fixed by changing the filename, but may be extended later to comment and pagetext.
2011-03-25 21:22:02 +00:00
Neil Kandalgaonkar
331406bf46
don't check title permissions if upload is destined for stash anyway
2011-03-25 20:42:05 +00:00
Neil Kandalgaonkar
43cf8e6d6e
change the name of UploadBase::verifyPermissions() to verifyTitlePermissions() for clarity. A wrapper function is left for extensions that rely on the old method
2011-03-25 20:37:26 +00:00
Sam Reed
41e7860130
Implement getRequireOnlyOneParameterErrorMessages, to make the error messages requireOnlyOneParameter can throw.
...
Use in 4 modules for more dynamicness
2011-02-25 19:09:39 +00:00
Sam Reed
fa64025161
More parameter documentation
2011-02-19 00:30:18 +00:00
Bryan Tong Minh
db7a518a4f
Follow-up r70137: Unconditionalize the asyncdownload params and throw asynccopyuploadsdisabled if async is requested without $wgAllowAsyncCopyUploads.
2011-02-10 18:24:19 +00:00
Sam Reed
d251f3ddd2
Normalise casing of svn:keywords Id
...
Add missing Id to ApiFormatDump and ApiUpload
2011-01-10 22:36:26 +00:00
Sam Reed
bfd67cf818
Remove some blank lines
...
Spaces to tabs in ApiBase
2011-01-07 02:53:00 +00:00
Sam Reed
8381c3338b
Add some more requireOnlyOneParameter related errors
...
Remove some duplicated errors
2011-01-07 02:42:16 +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
Neil Kandalgaonkar
902995cb1d
core changes for UploadWizard (merged from r73549 to HEAD in branches/uploadwizard/phase3)
2010-11-03 04:32:41 +00:00
Derk-Jan Hartman
dcd547218f
Use isset to protect against Undefined index PHP notice.
2010-10-31 22:10:44 +00:00
Sam Reed
42b5c265c0
* (bug 25248) API: paraminfo errors with certain modules
...
Added a needsToken() function, rather than calling getTokenSalt, which can throw silly errors due to dependencies on parameters
2010-10-01 20:12:50 +00:00
Sam Reed
ee40f73227
Remove some unused keys from foreach
...
Documentation tweaks
2010-09-25 16:56:03 +00:00
Sam Reed
6c1273bc7d
Fill in missing params from a dieUsage
...
Braces
Fixup parameter documentation
2010-09-25 16:45:41 +00:00
Bryan Tong Minh
3e1eff2a01
Follow-up r70137: Made asynchronous upload working a bit more. It now fully works from the API; works still needs to be done for the normal UI. PHPUnit tests are updated and should cover most code paths that can be called from the API.
...
ApiUpload:
* Added "statuskey" parameter; this is the key that is returned by an async upload
* Refactored warnings transformation into its own function
* filename is no longer required on all uploads
UploadFromUrlJob:
* Moved upload results to its own entry in $_SESSION, instead of using the one from upload
* Fix storing in session by calling wfSetupSession and session_write_close where needed
Tests:
* Set $wgUser in ApiSetup, so that individual tests don't have to do this for themselves
* Added tests to cover most code paths from the API
* Fixed UploadFromUrlTestSuite so that its tests are included in a regular phpunit invocation (something strange with the AutoLoader; not sure what)
Other files:
* Allow passing session id to wfSetupSession
* Explicitly close the session before doing jobs, so that jobs can't manipulate the current session
2010-09-06 10:18:53 +00:00
Platonides
50e2405a03
Refactor to avoid defining globals inside switches.
2010-08-12 14:25:07 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Sam Reed
ddc7efbedf
stylize api up to date
2010-08-05 07:02:09 +00:00
Sam Reed
f77fff0ffb
Followup r70461 if PARAM_REQUIRED is set, use for missing param in getPossibleErrors in ApiBase
...
All but ApiQueryBacklinks
2010-08-04 19:20:15 +00:00