$sessionKey = $this->mUpload->stashSession(); if ( !$sessionKey ) $this->dieUsage( 'Stashing temporary file failed', 'stashfailed' ); $result['sessionkey'] = $sessionKey; return $result; } */ } // Check whether the user has the appropriate permissions to upload anyway $permission = $mUpload->isAllowed($wgUser); if ($permission !== true) { if (!$wgUser->isLoggedIn()) { $error = "mustbeloggedin"; } else { $error = "badaccess-groups"; } } // Use comment as initial page text by default if (is_null($text)) { $text = $comment; } #wfFiUploadComplete($mUpload); // No errors, no warnings: do the upload $status = $mUpload->performUpload($comment, $text, $watch, $wgUser); if (!$status->isGood()) {