PreloadUploadForm/Source

Aus Free Software
Zur Navigation springen Zur Suche springen

SourceCode of the PreloadUploadForm extension.

<?php
# hook definition
$wgHooks['UploadForm:initial'][] = array('PreloadUploadForm');

function PreloadUploadForm ( $wgUploadPage )
{
        global $wgRequest;

        if ( ($Summary = $wgRequest->getVal('summary')) != '' )
                $wgUploadPage->mUploadDescription .= $Summary;
        if ( ($Destination = $wgRequest->getVal('destination')) != '' )
                $wgUploadPage->mDestFile .= $Destination;
        return true;
}

?>