Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index 59f9796..024034a 100644 (file)
@@ -344,15 +344,16 @@ class SpecialUpload extends SpecialPage {
                $stashStatus = $this->mUpload->tryStashFile( $this->getUser() );
                if ( $stashStatus->isGood() ) {
                        $sessionKey = $stashStatus->getValue()->getFileKey();
+                       $uploadWarning = 'upload-tryagain';
                } else {
                        $sessionKey = null;
-                       // TODO Add a warning message about the failure to stash here?
+                       $uploadWarning = 'upload-tryagain-nostash';
                }
                $message = '<h2>' . $this->msg( 'uploaderror' )->escaped() . "</h2>\n" .
                        '<div class="error">' . $message . "</div>\n";
 
                $form = $this->getUploadForm( $message, $sessionKey );
-               $form->setSubmitText( $this->msg( 'upload-tryagain' )->escaped() );
+               $form->setSubmitText( $this->msg( $uploadWarning )->escaped() );
                $this->showUploadForm( $form );
        }
 
@@ -379,9 +380,10 @@ class SpecialUpload extends SpecialPage {
                $stashStatus = $this->mUpload->tryStashFile( $this->getUser() );
                if ( $stashStatus->isGood() ) {
                        $sessionKey = $stashStatus->getValue()->getFileKey();
+                       $uploadWarning = 'uploadwarning-text';
                } else {
                        $sessionKey = null;
-                       // TODO Add a warning message about the failure to stash here?
+                       $uploadWarning = 'uploadwarning-text-nostash';
                }
 
                // Add styles for the warning, reused from the live preview
@@ -443,7 +445,7 @@ class SpecialUpload extends SpecialPage {
                        $warningHtml .= $msg;
                }
                $warningHtml .= "</ul></div>\n";
-               $warningHtml .= $this->msg( 'uploadwarning-text' )->parseAsBlock();
+               $warningHtml .= $this->msg( $uploadWarning )->parseAsBlock();
 
                $form = $this->getUploadForm( $warningHtml, $sessionKey, /* $hideIgnoreWarning */ true );
                $form->setSubmitText( $this->msg( 'upload-tryagain' )->text() );