Splitting backend upload code from SpecialUpload.
[lhc/web/wiklou.git] / docs / upload.txt
1 Special:Upload:
2
3 wfSpecialUpload
4 new UploadForm
5 mUpload = new UploadFrom...
6 execute()
7 $wgEnableUploads
8 isAllowed(upload)
9 isBlocked()
10 wfReadOnly()
11 processUpload()
12 internalProcessUpload()
13 wfRunHooks(UploadForm:BeforeProcessing)
14 mUpload->getTitle()
15 wfStripIllegalFilenameChars
16 splitExtensions()
17 checkFileExtension()
18 Title::makeTitleSafe
19 getUserPermissionsErrors(edit; upload; create)
20 mUpload->verifyUpload()
21 empty(mFileSize)
22 getTitle()
23 checkOverwrite()
24 verifyFile()
25 checkMacBinary()
26 wfRunHooks(UploadVerification)
27 if(!ignoreWarning) mUpload->checkWarnings()
28 getInitialPageText()
29 mUpload->performUpload()
30 mLocalFile->upload()
31 if(isGood() && $watch) addWatch()
32 if(isGood()) wfRunHooks(UploadComplete)
33 wfRunHooks(SpecialUploadComplete)
34
35 Changes:
36 * "Your file will be renamed to $1" check now done on the result of
37 Title::makeTitleSafe instead of filteredName
38 * getExistWarning only really does existence checks
39 * Other stuff forgotten to be documented
40