registration: Use the correct key for skin dependencies
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index 53b7a2f..2eeafe6 100644 (file)
@@ -387,7 +387,7 @@ class SpecialUpload extends SpecialPage {
                }
 
                // Add styles for the warning, reused from the live preview
-               $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
+               $this->getOutput()->addModuleStyles( 'mediawiki.special' );
 
                $linkRenderer = $this->getLinkRenderer();
                $warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
@@ -617,7 +617,13 @@ class SpecialUpload extends SpecialPage {
                        $licenseText = '== ' . $msg['license-header'] . " ==\n{{" . $license . "}}\n";
                }
 
-               $pageText = $comment == '' ? '' : '== ' . $msg['filedesc'] . " ==\n" . $comment . "\n";
+               $pageText = $comment . "\n";
+               $headerText = '== ' . $msg['filedesc'] . ' ==';
+               if ( $comment !== '' && strpos( $comment, $headerText ) === false ) {
+                       // prepend header to page text unless it's already there (or there is no content)
+                       $pageText = $headerText . "\n" . $pageText;
+               }
+
                if ( $config->get( 'UseCopyrightUpload' ) ) {
                        $pageText .= '== ' . $msg['filestatus'] . " ==\n" . $copyStatus . "\n";
                        $pageText .= $licenseText;