Index: trunk/extensions/MultiUpload/MultiUpload.body.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | public function __construct( $request = null ) { |
28 | 28 | global $wgRequest; |
29 | 29 | |
30 | | - parent::SpecialPage( 'MultipleUpload', 'upload' ); |
| 30 | + SpecialPage::__construct( 'MultipleUpload', 'upload' ); |
31 | 31 | |
32 | 32 | $this->loadRequest( is_null( $request ) ? $wgRequest : $request ); |
33 | 33 | $this->mUploadHasBeenShown = false; |
— | — | @@ -45,7 +45,9 @@ |
46 | 46 | global $wgUser, $wgMaxUploadFiles; |
47 | 47 | |
48 | 48 | // let's make the parent happy |
| 49 | + wfSuppressWarnings(); |
49 | 50 | $_FILES['wpUploadFile'] = $_FILES['wpUploadFile0']; |
| 51 | + wfRestoreWarnings(); |
50 | 52 | // Guess the desired name from the filename if not provided |
51 | 53 | $this->mDesiredDestNames = array(); |
52 | 54 | $this->mUploads = array(); |
— | — | @@ -77,10 +79,14 @@ |
78 | 80 | if( !$this->mDesiredDestNames[$i] && $request->getFileName( 'wpUploadFile' . $i ) !== null ) { |
79 | 81 | $this->mDesiredDestNames[$i] = $request->getFileName( 'wpUploadFile' . $i ); |
80 | 82 | } |
| 83 | + wfSuppressWarnings(); |
81 | 84 | $request->setVal( 'wpUploadFile', $_FILES['wpUploadFile' . $i] ); |
| 85 | + wfRestoreWarnings(); |
82 | 86 | $request->setVal( 'wpDestFile', $request->getVal( 'wpDestFile' . $i ) ); |
83 | 87 | move_uploaded_file( 'wpUploadFile' . $i, 'wpUploadFile' ); |
| 88 | + wfSuppressWarnings(); |
84 | 89 | $_FILES['wpUploadFile'] = $_FILES['wpUploadFile' . $i]; |
| 90 | + wfRestoreWarnings(); |
85 | 91 | $up = UploadBase::createFromRequest( $request ); |
86 | 92 | $this->mUploads[$i] = $up; |
87 | 93 | } |