Show
Ignore:
Timestamp:
06/13/08 03:20:08 (18 months ago)
Author:
fumiakiy
Message:

Do not proceed restoring from the backup which was from *different* version of MT (not just newer, but different version would not be allowed). BugId:80102

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-40/lib/MT/BackupRestore/BackupFileHandler.pm

    r2298 r2564  
    4242        die MT->translate('Uploaded file was not a valid Movable Type backup manifest file.') 
    4343            if !(('movabletype' eq $name) && (MT::BackupRestore::NS_MOVABLETYPE() eq $ns)); 
    44         unless ($self->{ignore_schema_conflicts}) { 
     44        #unless ($self->{ignore_schema_conflicts}) { 
    4545            my $schema = $attrs->{'{}schema_version'}->{Value}; 
    46             if (('ignore' ne $self->{schema_version}) && ($schema > $self->{schema_version})) { 
     46            #if (('ignore' ne $self->{schema_version}) && ($schema > $self->{schema_version})) { 
     47            if ( $schema != $self->{schema_version} ) { 
    4748                $self->{critical} = 1; 
    48                 my $message = MT->translate('Uploaded file was backed up from Movable Type with the newer schema version ([_1]) than the one in this system ([_2]).  It is not safe to restore the file to this version of Movable Type.', MT::I18N::encode_text(MT::I18N::utf8_off($schema), 'utf-8'), $self->{schema_version}); 
     49                my $message = MT->translate('Uploaded file was backed up from Movable Type but the different schema version ([_1]) from the one in this system ([_2]).  It is not safe to restore the file to this version of Movable Type.', MT::I18N::encode_text(MT::I18N::utf8_off($schema), 'utf-8'), $self->{schema_version}); 
    4950                MT->log({  
    5051                    message => $message, 
     
    5556                die $message; 
    5657            } 
    57         } 
     58        #} 
    5859        $self->{start} = 0; 
    5960        return 1;