r65026 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65025‎ | r65026 | r65027 >
Date:13:59, 14 April 2010
Author:catrope
Status:deferred
Tags:
Comment:
1.16wmf4: MFT r65025
Modified paths:
  • /branches/wmf/1.16wmf4/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/specials/SpecialUpload.php
@@ -308,10 +308,15 @@
309309 protected function showUploadWarning( $warnings ) {
310310 global $wgUser;
311311
312 - # If there are no warnings, or warnings we can ignore, return early
 312+ # If there are no warnings, or warnings we can ignore, return early.
 313+ # mDestWarningAck is set when some javascript has shown the warning
 314+ # to the user. mForReUpload is set when the user clicks the "upload a
 315+ # new version" link.
313316 if ( !$warnings || ( count( $warnings ) == 1 &&
314 - isset( $warnings['exists']) && $this->mDestWarningAck ) ) {
315 - return false;
 317+ isset( $warnings['exists'] ) &&
 318+ ( $this->mDestWarningAck || $this->mForReUpload ) ) )
 319+ {
 320+ return false;
316321 }
317322
318323 $sessionKey = $this->mUpload->stashSession();
@@ -930,7 +935,7 @@
931936 protected function getOptionsSection() {
932937 global $wgUser, $wgOut;
933938
934 - if( $wgUser->isLoggedIn() ) {
 939+ if ( $wgUser->isLoggedIn() ) {
935940 $descriptor = array(
936941 'Watchthis' => array(
937942 'type' => 'check',
@@ -941,7 +946,7 @@
942947 )
943948 );
944949 }
945 - if( !$this->mHideIgnoreWarning ) {
 950+ if ( !$this->mHideIgnoreWarning ) {
946951 $descriptor['IgnoreWarning'] = array(
947952 'type' => 'check',
948953 'id' => 'wpIgnoreWarning',
@@ -950,11 +955,19 @@
951956 );
952957 }
953958
954 - $descriptor['wpDestFileWarningAck'] = array(
 959+ $descriptor['DestFileWarningAck'] = array(
955960 'type' => 'hidden',
956961 'id' => 'wpDestFileWarningAck',
957962 'default' => $this->mDestWarningAck ? '1' : '',
958963 );
 964+
 965+ if ( $this->mForReUpload ) {
 966+ $descriptor['ForReUpload'] = array(
 967+ 'type' => 'hidden',
 968+ 'id' => 'wpForReUpload',
 969+ 'default' => '1',
 970+ );
 971+ }
959972
960973 return $descriptor;
961974

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65025(bug 23176) Fixed regression: "upload new version" link should not trigger a ...btongminh13:53, 14 April 2010

Status & tagging log