Changeset 2564
- Timestamp:
- 06/13/08 03:20:08 (20 months ago)
- Location:
- branches/release-40
- Files:
-
- 5 modified
-
lib/MT/BackupRestore.pm (modified) (2 diffs)
-
lib/MT/BackupRestore/BackupFileHandler.pm (modified) (2 diffs)
-
lib/MT/CMS/Tools.pm (modified) (3 diffs)
-
lib/MT/L10N/ja.pm (modified) (1 diff)
-
tmpl/cms/restore.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-40/lib/MT/BackupRestore.pm
r2548 r2564 334 334 ); }; 335 335 336 MT->run_callbacks('restore', $objects, $deferred, $errors, $callback); 336 unless ( $@ ) { 337 MT->run_callbacks('restore', $objects, $deferred, $errors, $callback); 338 } 337 339 $$errormsg = join('; ', @$errors); 338 340 ($deferred, $blog_ids); … … 433 435 } 434 436 435 MT->run_callbacks('restore', \%objects, $deferred, $errors, $callback); 437 unless ( $@ ) { 438 MT->run_callbacks('restore', \%objects, $deferred, $errors, $callback); 439 } 436 440 my $blog_ids = scalar(@blog_ids) ? \@blog_ids : undef; 437 441 my $asset_ids = scalar(@asset_ids) ? \@asset_ids : undef; -
branches/release-40/lib/MT/BackupRestore/BackupFileHandler.pm
r2298 r2564 42 42 die MT->translate('Uploaded file was not a valid Movable Type backup manifest file.') 43 43 if !(('movabletype' eq $name) && (MT::BackupRestore::NS_MOVABLETYPE() eq $ns)); 44 unless ($self->{ignore_schema_conflicts}) {44 #unless ($self->{ignore_schema_conflicts}) { 45 45 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} ) { 47 48 $self->{critical} = 1; 48 my $message = MT->translate('Uploaded file was backed up from Movable Type with the newer schema version ([_1]) thanthe 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}); 49 50 MT->log({ 50 51 message => $message, … … 55 56 die $message; 56 57 } 57 }58 #} 58 59 $self->{start} = 0; 59 60 return 1; -
branches/release-40/lib/MT/CMS/Tools.pm
r2498 r2564 1597 1597 my ( $fh, $errormsg ) = @_; 1598 1598 my $q = $app->param; 1599 my $schema_version = 1600 $q->param('ignore_schema_conflict') 1601 ? 'ignore' 1602 : $app->config('SchemaVersion'); 1599 my $schema_version = $app->config->SchemaVersion; 1600 #my $schema_version = 1601 # $q->param('ignore_schema_conflict') 1602 # ? 'ignore' 1603 # : $app->config('SchemaVersion'); 1603 1604 my $overwrite_template = $q->param('overwrite_global_templates') ? 1 : 0; 1604 1605 … … 1655 1656 1656 1657 my $q = $app->param; 1657 my $schema_version = 1658 $q->param('ignore_schema_conflict') 1659 ? 'ignore' 1660 : $app->config('SchemaVersion'); 1658 my $schema_version = $app->config->SchemaVersion; 1659 #my $schema_version = 1660 # $q->param('ignore_schema_conflict') 1661 # ? 'ignore' 1662 # : $app->config('SchemaVersion'); 1661 1663 1662 1664 my $overwrite_template = $q->param('overwrite_global_templates') ? 1 : 0; … … 1764 1766 $param->{last} = scalar(@$files) ? 0 : ( scalar(@$assets) ? 0 : 1 ); 1765 1767 $param->{open_dialog} = 1; 1766 $param->{schema_version} = 1767 $q->param('ignore_schema_conflict') 1768 ? 'ignore' 1769 : $app->config('SchemaVersion'); 1768 $param->{schema_version} = $app->config->SchemaVersion; 1769 #$param->{schema_version} = 1770 # $q->param('ignore_schema_conflict') 1771 # ? 'ignore' 1772 # : $app->config('SchemaVersion'); 1770 1773 $param->{overwrite_templates} = $q->param('overwrite_global_templates') ? 1 : 0; 1771 1774 -
branches/release-40/lib/MT/L10N/ja.pm
r2538 r2564 864 864 865 865 ## lib/MT/BackupRestore/BackupFileHandler.pm 866 '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.' => 'ã¢ããããŒãããããã¡ã€ã«ã¯ãã®ã·ã¹ãã ã®ããŒãžã§ã³([_2])ããæ°ããããŒãžã§ã³([_1])ã§ããã¯ã¢ãããããŠããŸãããã®ãã¡ã€ã«ã䜿ã£ãŠåŸ©å867 ããããšã¯ æšå¥šãããŸããã',866 '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.' => 'ã¢ããããŒãããããã¡ã€ã«ã¯ãã®ã·ã¹ãã ã®ããŒãžã§ã³([_2])ãšã¯ç°ãªãããŒãžã§ã³([_1])ã§ããã¯ã¢ãããããŠããŸãããã®ãã¡ã€ã«ã䜿ã£ãŠåŸ©å 867 ããããšã¯ã§ããŸããã', 868 868 '[_1] is not a subject to be restored by Movable Type.' => '[_1]ã¯Movable Typeã§åŸ©å 869 869 ãã察象ã«ã¯å«ãŸããŠããŸããã', -
branches/release-40/tmpl/cms/restore.tmpl
r1212 r2564 35 35 <input name="file" type="file" size="50" /> 36 36 </mtapp:setting> 37 <mt:ignore><!-- disable the feature to ignore schema conflict. 37 38 <mtapp:setting 38 39 id="ignore_schema_conflict" … … 43 44 <label for="ignore_schema_conflict"><__trans phrase="Ignore schema version conflicts"></label> 44 45 </mtapp:setting> 46 --></mt:ignore> 45 47 <mtapp:setting 46 48 id="overwrite_global_templates"
