Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -313,11 +313,13 @@ |
314 | 314 | * warnings and the should continue processing like there was no warning |
315 | 315 | */ |
316 | 316 | protected function showUploadWarning( $warnings ) { |
317 | | - # If there are no warnings, or warnings we can ignore, return early |
318 | | - if ( |
319 | | - !$warnings || ( count( $warnings ) == 1 && |
320 | | - isset( $warnings['exists']) && $this->mDestWarningAck ) |
321 | | - ) |
| 317 | + # If there are no warnings, or warnings we can ignore, return early. |
| 318 | + # mDestWarningAck is set when some javascript has shown the warning |
| 319 | + # to the user. mForReUpload is set when the user clicks the "upload a |
| 320 | + # new version" link. |
| 321 | + if ( !$warnings || ( count( $warnings ) == 1 && |
| 322 | + isset( $warnings['exists'] ) && |
| 323 | + ( $this->mDestWarningAck || $this->mForReUpload ) ) ) |
322 | 324 | { |
323 | 325 | return false; |
324 | 326 | } |
— | — | @@ -936,7 +938,7 @@ |
937 | 939 | protected function getOptionsSection() { |
938 | 940 | global $wgUser; |
939 | 941 | |
940 | | - if( $wgUser->isLoggedIn() ) { |
| 942 | + if ( $wgUser->isLoggedIn() ) { |
941 | 943 | $descriptor = array( |
942 | 944 | 'Watchthis' => array( |
943 | 945 | 'type' => 'check', |
— | — | @@ -947,7 +949,7 @@ |
948 | 950 | ) |
949 | 951 | ); |
950 | 952 | } |
951 | | - if( !$this->mHideIgnoreWarning ) { |
| 953 | + if ( !$this->mHideIgnoreWarning ) { |
952 | 954 | $descriptor['IgnoreWarning'] = array( |
953 | 955 | 'type' => 'check', |
954 | 956 | 'id' => 'wpIgnoreWarning', |
— | — | @@ -956,11 +958,19 @@ |
957 | 959 | ); |
958 | 960 | } |
959 | 961 | |
960 | | - $descriptor['wpDestFileWarningAck'] = array( |
| 962 | + $descriptor['DestFileWarningAck'] = array( |
961 | 963 | 'type' => 'hidden', |
962 | 964 | 'id' => 'wpDestFileWarningAck', |
963 | 965 | 'default' => $this->mDestWarningAck ? '1' : '', |
964 | 966 | ); |
| 967 | + |
| 968 | + if ( $this->mForReUpload ) { |
| 969 | + $descriptor['ForReUpload'] = array( |
| 970 | + 'type' => 'hidden', |
| 971 | + 'id' => 'wpForReUpload', |
| 972 | + 'default' => '1', |
| 973 | + ); |
| 974 | + } |
965 | 975 | |
966 | 976 | return $descriptor; |
967 | 977 | } |