Restructured upload-by-url:
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 28 Jul 2010 17:14:51 +0000 (17:14 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 28 Jul 2010 17:14:51 +0000 (17:14 +0000)
commit796933d11f169036981bbb76ea06acb1840a292b
tree3dd8caec60cd6904d962caea6ca7320eef9791e6
parent8bb2b3e3bf67bd789ebf8f667fb779949c0139df
Restructured upload-by-url:
* In ApiUpload: moved stuff that is checking instead of actual uploading out of performUpload method
* Made UploadFromUrl conform to standards:
** In initialize* do only initialization, no actual work
** Moved file fetching to fetchFile
** Consistent use of tempnam()
** Perform the uploading in performUpload, don't define our own doUpload method
* Moved almost all job magic to the UploadFromUrlJob class. This way the job is almost a regular client, and we don't need many special cases to deal with async uploading.
* Made leaving a message optional; results will be stored in the session otherwise

I did not actually test the async uploading, because I first wanted to commit a properly working synchronous upload-by-url system.
includes/api/ApiUpload.php
includes/job/UploadFromUrlJob.php
includes/specials/SpecialUpload.php
includes/upload/UploadBase.php
includes/upload/UploadFromUrl.php