protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) {
# Initialize form
$context = new DerivativeContext( $this->getContext() );
- $context->setTitle( $this->getTitle() ); // Remove subpage
+ $context->setTitle( $this->getPageTitle() ); // Remove subpage
$form = new UploadForm( array(
'watch' => $this->getWatchCheck(),
'forreupload' => $this->mForReUpload,
} elseif ( $warning == 'duplicate' ) {
$msg = $this->getDupeWarning( $args );
} elseif ( $warning == 'duplicate-archive' ) {
- $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
- Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
- . "</li>\n";
+ if ( $args === '' ) {
+ $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate-notitle' )->parse()
+ . "</li>\n";
+ } else {
+ $msg = "\t<li>" . $this->msg( 'file-deleted-duplicate',
+ Title::makeTitle( NS_FILE, $args )->getPrefixedText() )->parse()
+ . "</li>\n";
+ }
} else {
if ( $args === true ) {
$args = array();
* @return string
*/
function getLabelHtml( $cellAttributes = array() ) {
- $id = $this->mParams['id'];
- $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
-
if ( !empty( $this->mParams['radio'] ) ) {
+ $id = "wpSourceType{$this->mParams['upload-type']}";
$attribs = array(
'name' => 'wpSourceType',
'type' => 'radio',
if ( !empty( $this->mParams['checked'] ) ) {
$attribs['checked'] = 'checked';
}
+ $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
$label .= Html::element( 'input', $attribs );
+ } else {
+ $id = $this->mParams['id'];
+ $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel );
}
-
return Html::rawElement( 'td', array( 'class' => 'mw-label' ) + $cellAttributes, $label );
}