Merge "Change special page group for BookSources"
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index 7c05001..27ba78e 100644 (file)
@@ -220,7 +220,7 @@ class SpecialUpload extends SpecialPage {
        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,
@@ -348,9 +348,14 @@ class SpecialUpload extends SpecialPage {
                        } 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();