Page MenuHomePhabricator

Accept upload description text from GET parameters
Closed, ResolvedPublic

Description

Author: andi

Description:
The idea is to move a line inside includes/SpecialUpload.php a few lines higher
to get URLs like
index.php?title=Special:Upload&wpUploadDescription=[[Category:Other Images]] working

includes/SpecialUpload.php: Line 45

function UploadForm( &$request ) {
        global $wgAllowCopyUploads;
        $this->mDestFile          = $request->getText( 'wpDestFile' );
        $this->mUploadDescription = $request->getText(

'wpUploadDescription' ); // new postion

if( !$request->wasPosted() ) {
        # GET requests just give the main form; no data except

wpDestfile.

        return;
}

# Placeholders for text injection by hooks (empty per default)
$this->uploadFormTextTop = "";
$this->uploadFormTextAfterSummary = "";

$this->mIgnoreWarning     = $request->getCheck( 'wpIgnoreWarning' );
$this->mReUpload          = $request->getCheck( 'wpReUpload' );
$this->mUpload            = $request->getCheck( 'wpUpload' );

$this->mUploadDescription = $request->getText(

'wpUploadDescription' ); // Old position


Version: unspecified
Severity: enhancement

Details

Reference
bz9575

Revisions and Commits