Commit graph

46 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Alexandre Emsenhuber
58bb669812 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia1a7230adc92079b505362317d2e03b36130cc8b
2012-05-29 13:01:11 +02:00
Antoine Musso
73247df204 Remove backslash from @return types
Ping r111103
2012-02-13 16:35:59 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
0a626db6e1 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 19:29:36 +00:00
Antoine Musso
2bf8d0db90 Fix doc for includes/upload 2012-02-08 17:03:43 +00:00
Sam Reed
121f9d2d25 Fixup some returns/return documentation 2012-01-03 15:36:46 +00:00
Sam Reed
9fec30573b Tidyup outputChunk added in r104687, remove/update documentation
Don't use undefined $path variable on line 265
2012-01-01 23:28:18 +00:00
Jan Gerber
55662971ca update mLocalFile in concatenateChunks to make chunk upload
work with recent filerepo changes
Follow up r104687
2011-12-27 04:49:08 +00:00
Aaron Schulz
875f8a28e9 In FileBackendBase/FileBackend:
* Changed concatenate to store to a specified temp FS file rather than a final storage destination. This makes it better fit the use case (chunked upload), so we can avoid extra copying around. Subclasses no longer have to implement this function now as well.
* Added extensionFromPath() helper function.
* Moved createInternal() up a bit and fixed @see comments pointing to the wrong functions.
In FSFileBackend:
* Use parent implementation of doConcatenateInternal().
In FileRepo/File:
* Added FileRepo::ALLOW_STALE and made thumbnail transforms use it.
2011-12-23 18:59:39 +00:00
Jan Gerber
d9ec1883e3 Use getPath, all operations are on filerepo level no need to get a local path. Follow up r107064 2011-12-23 09:30:02 +00:00
Jan Gerber
66c64af6aa - add comment to document us_chunk_inx in sql file
- fix chunk upload to work with recent filerepo changes
Follow up r104687
2011-12-22 13:18:49 +00:00
Neil Kandalgaonkar
1a8f61e606 fix race condition in UploadFromChunks, followup to r104687 2011-12-20 23:02:42 +00:00
Aaron Schulz
5275f9b097 Merged FileBackend branch. Manually avoiding merging the many prop-only changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. 2011-12-20 03:52:06 +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
Bryan Tong Minh
dd349d7b3a Merge r63621 and r63636 from REL1_16:
* Rollback chunked uploading support for 1.16
* 	Pass $sessionKey as parameter to UploadFromStash::initialize.
2010-03-12 18:26:12 +00:00
Mark A. Hershberger
c871b75a3e follow up r62231, r61779, r62175
* Fix up messages
* For new FileRepo::append(), use flags to determine whether to delete or not
* Add more error checking for appending
* Fix a couple of places in Revision.php and LogPage.php where DB errors were produced when comment was null
* Remove bogus checking for !$comment, etc on the DONE phase of chunked uploading
* Don't pretend to return a value when raising an exception
* Add more tests for chunked uploads
* Verify that Status::getErrorsArray() (at least where it is used in ApiUpload::execute()) returns an array that we can pass to dieUsageMessage()
* Ensure that checkWarnings(), etc work only on the complete file
2010-02-22 02:15:30 +00:00
Mark A. Hershberger
fd27d340b5 Make sure Firefogg gets the json it needs. 2010-02-11 06:14:15 +00:00
Mark A. Hershberger
c74fe71cd8 * new FauxResponse class to help with unit testing
* Add append() method to FileRepo classes to enable chunked uploading
* Change chunksessionkey to chunksession
* Remove echo json stuff
* Fix a multitude of bugs in my own code
* still to test: mwEmbed use of chunked upload
2010-02-10 10:36:11 +00:00
Mark A. Hershberger
9b07d3058f follow-up r61355 a bit more, still have several bits to fix (e.g. json handling) 2010-02-09 09:41:15 +00:00
Mark A. Hershberger
15fec3ab7f * Fix up ApiTest a bit, cookie handling works
* Start upload chunks testing
* found some problems with messages
2010-02-09 08:37:38 +00:00
Mark A. Hershberger
b5e530525b follow up r61779 - anyone who writes "!$x == null" is an idiot 2010-02-03 02:19:25 +00:00
Roan Kattouw
c7e2c70837 Whitespace fixes for r61761, r61779 2010-02-01 15:36:14 +00:00
Mark A. Hershberger
5b5d7ef6f7 follow up r61355, initial, incomplete dealing with TimStarlings CR 2010-02-01 07:05:23 +00:00
Tim Starling
3b3698ea8b For r61355:
* Removed style note, nobody cares
* Fixed indenting and braces
2010-02-01 06:06:31 +00:00
Mark A. Hershberger
eecb86354a follow up r61355 2010-01-23 05:20:31 +00:00
Mark A. Hershberger
c5d228be4c UploadChunks added from js2 branch. Refactored. Still needs to be
tested w/o the UI first.
2010-01-22 04:37:23 +00:00
Tim Starling
7688101426 Removed JS2 work (has been moved to the js2-work branch). Has been lightly tested, should mostly work. Some of the more complicated associated changes are listed below.
* Reverted HttpFunctions.php to r45549 and renamed wgSyncHTTPTimeout back to wgHTTPTimeout
* Edited out the asynchronous features from UploadFromUrl. Made fetchFile() use the curlCopy() function from new-upload r47811 instead of Http::doDownload(). Wrote my own URL validity check to avoid having to use either of the two buggy precedents.
* Removed UploadFromChunk
* Removed chunk upload and background status from ApiUpload.php
* Reverted r54669, use of addScriptClass()
* Left getHeadScripts() in its current location (OutputPage) instead of moving it back to SkinTemplate, just added wikibits.js to it to replace the removed addCoreScripts2Top()
2009-11-26 12:00:36 +00:00
Michael Dale
ab2745e92b * ( bug 21089 ) fixes js2 upload stash support.
* Tested with chunk firefogg uploads, normal js2 uploads and http copy by url uploads
2009-10-15 00:14:05 +00:00
Michael Dale
425b9410ad * bug 21063 http copy upload and upload from stash give different file path types. call "getRealPath" to go from virtual -> real if necessary 2009-10-08 22:30:04 +00:00
Michael Dale
8a8380a517 * minor fix to uploadFromChunks in case its initialized with a real path instead of a virtual path 2009-09-17 19:33:31 +00:00
Michael Dale
7efc871cba * (bug 20336) changed json_decode json_encode to static class in global functions
** we should update extensions as well
* added config for fileCheckModify date check to scriptLoader unique script id generation
2009-09-09 22:26:16 +00:00
Alexandre Emsenhuber
2684a9fd3b use wfScript() so that it uses $wgScriptExtension to get the path to api.php(5) 2009-09-04 20:12:48 +00:00
Michael Dale
717f255e61 quick fix for r55604 broken chunk upload class abstraction 2009-08-27 14:30:14 +00:00
Bryan Tong Minh
05a916153f * Cleanup ApiUpload
* UploadBase::verifyUpload now always returns a status array
* Disabled async upload by url because wfShellBackgroundExec is broken
2009-08-26 19:38:38 +00:00
Bryan Tong Minh
a5eabe67a1 Removed the $tmpFile parameter to UploadBase::verifyUpload in favour of $this->mTempFile. 2009-08-26 17:08:49 +00:00
Bryan Tong Minh
c2033042ee * Code style & commenting on upload functions.
* Move isValidURI from UploadFromUrl to HttpFunctions.
* Made some functions in UploadBase static.
2009-08-26 17:05:24 +00:00
Michael Dale
699994b520 * made wgMaxUploadSize check work with js2/firefogg uploading interface. 2009-08-06 22:25:47 +00:00
Michael Dale
260ee94552 * added check to chunk uploads to make sure we have not append beyond $wgMaxUploadSize size 2009-08-06 22:08:40 +00:00
Jack Phoenix
5af8e55976 coding style tweaks 2009-07-25 20:05:41 +00:00
Michael Dale
49bed9e5a2 * updates for strict compliance mode chunk uploading
* fixes for firefogg multiple forms on the special upload page.
2009-07-25 03:25:01 +00:00
Jack Phoenix
17943c676e coding style cleanup for upload stuff 2009-07-15 19:18:12 +00:00
Michael Dale
aefc40d749 here it is ... the upload-api, script-server, js2 (javascript phase2) branch merge 1st attempt.
Here is a short overview of changes and associated default configuration variables (most everything is off by default) also see ~soon to be updated~: http://www.mediawiki.org/wiki/Media_Projects_Overview

= Upload Improvements =
==Upload API ==
* Based on the early work of Bryan Tong and others it adds the upload option to the api.
* We rewrite Special:Upload page to include use the new refactoring
* Added in token checks in both the SpecialUpload.php page so avoids DOS / xss copy-by-url JavaScript based cross site POST file submissions

== Copy by URL==
$wgAllowCopyUploads = false;
* http class rewrite includes a new http background download see: includes/HttpFunctions.php

* spins off a php process that calls: maintenance/http_session_download.php
* pushes updates to the session and gives the user a progress bar on http copy uploads from other server progress (using js2 upload interface) (if not using the js2 upload interface it does the request in-place but the download is limited to the php ini timeout time)

== Firefogg ==
* Firefogg enables resumable upload by chunks
* progress indicators and conditional invokation (js2 system)
* and of-course client side transcoding.

= Script Server =
$wgEnableScriptLoader = false;
* off by default if $wgEnableScriptLoader is turned on script files are grouped, gziped, cached etc.
for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader

* Includes some early skin js include fixes (skin/script system still lots of love)
* Includes a "javascript class autoloader" this is packaged into mwEmbed so that the mwEmbed library can work in stand alone mode (while retaining localization and script serving) (one such application is the make page for firefogg.org : http://www.firefogg.org/make/index.html  )
* The file that contains the autojavascript loading classes is: js2/php/jsAutoloadLocalClasses.php
* One can use this auto class loading dependency system with extensions and add-ons but I need to better document that.

= js2 system  / mwEmbed=
$wgEnableJS2system = false

* includes initial rewrite towards more jquery based javascript code
* especially for the Special:Upload page.
* Also the edit page include support for the "add-media-wizard"
* includes dependency loader for javascript that optionally takes advantage of the script-loader
* remote embedding of javascript interfaces (like embedding video, or commons media searching)

* $wgDebugJavaScript = false; .. .this variable lets you always get "always fresh javascript". When used with the script-loader it does not minify the script-loader output.

= mwEmbed =
* Will commit a separate patch to oggHandler that conditionally outputs  <video tag> to use the new javascript video player.
** mv_embed player includes: play-head, volume control, remote embedding, oggz-chop support across plugins.
* add-media-wizard adds easy inserts of media to pages (with import)

== jQuery==
* we include a base install of jQuery, jQuery ui and some plugins.
* all the javascript classes are in the scriptloader so its easy to load any set of jquery ui components that you may need using the script-server. You get a callback so you can then execute js with dependencies loaded.

== other stuff ==
there is a bit more code in js2 that pertains to sequence editing, timed text display and basic image editing. We include a base import of pixastic-lib & pixastic-editor... will work with the pixastic developer to try and ensure upstream compatibility on our usage of the library for in-browser photo and sequence manipulation.
2009-07-14 23:52:14 +00:00