Changeset 877
- Timestamp:
- 12/11/06 09:20:59 (2 years ago)
- Files:
-
- branches/wheeljack/lib/MT/App/CMS.pm (modified) (2 diffs)
- branches/wheeljack/lib/MT/App/Wizard.pm (modified) (2 diffs)
- branches/wheeljack/lib/MT/BackupRestore.pm (modified) (1 diff)
- branches/wheeljack/lib/MT/L10N/en_us.pm (modified) (1 diff)
- branches/wheeljack/mt-check.cgi.pre (modified) (2 diffs)
- branches/wheeljack/tmpl/cms/backup_end.tmpl (modified) (2 diffs)
- branches/wheeljack/tmpl/cms/backup_restore.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/lib/MT/App/CMS.pm
r876 r877 10922 10922 $param{system_overview_nav} = 1; 10923 10923 $param{nav_backup} = 1; 10924 my $missing_tgz = 0; 10924 10925 eval "require Archive::Tar;"; 10926 $missing_tgz = 1 if $@; 10925 10927 eval "require Compress::Zlib;"; 10926 $param{targz} = $@ ? 0 : 1; 10928 $missing_tgz = 1 if $@; 10929 $param{targz} = !$missing_tgz; 10930 my $missing_zip = 0; 10927 10931 eval "require Archive::Zip;"; 10932 $missing_zip = 1 if $@; 10928 10933 eval "require IO::String;"; 10929 $param{zip} = $@ ? 0 : 1; 10934 $missing_zip = 1 if $@; 10935 $param{zip} = !$missing_zip; 10936 10937 eval "require XML::XPath"; 10938 $param{missing_xpath} = 1 if $@; 10930 10939 10931 10940 $app->build_page('backup_restore.tmpl', \%param); … … 11105 11114 if ('0' eq $archive) { 11106 11115 $param->{files_loop} = \@files; 11116 $param->{tempdir} = $temp_dir; 11107 11117 $app->_backup_finisher($fname, $param); 11108 11118 } elsif ('1' eq $archive) { # tar.gz branches/wheeljack/lib/MT/App/Wizard.pm
r799 r877 39 39 [ 'IO::String', 0, 0, 'IO::String is required in order to archive files in backup/restore operation.', 'I/O String'], 40 40 [ 'Archive::Zip', 0, 0, 'Archive::Zip is required in order to archive files in backup/restore operation.', 'Archive Zip'], 41 [ 'XML::XPath', 0, 0, 'XML::XPath and/or its dependencies is required in order to restore.', 'XML XPath'], 41 42 ); 42 43 … … 595 596 my($mod, $ver, $req, $desc, $name) = @$ref; 596 597 eval("use $mod" . ($ver ? " $ver;" : ";")); 597 if ($@ ) {598 if ($@ || !($mod->VERSION)) { 598 599 push @missing, { module => $mod, 599 600 version => $ver, branches/wheeljack/lib/MT/BackupRestore.pm
r847 r877 261 261 unless ($manifest) { 262 262 $$error = MT->translate("No manifest file could be found in your import directory [_1].", $dir); 263 return 0;263 return undef; 264 264 } 265 265 branches/wheeljack/lib/MT/L10N/en_us.pm
r862 r877 47 47 '_USAGE_BACKUP_FILES' => 'TBD', 48 48 '_USAGE_RESTORE' => 'TBD', 49 '_BACKUP_TEMPDIR_WARNING' => 'Requesed data backed up successfully. Make sure that you download and <strong>then delete</strong> files listed above from [_1] <strong>immediately</strong> because backup files contain sensitive information.', 49 '_BACKUP_TEMPDIR_WARNING' => 'Requesed data backed up successfully in the [_1] directory. Make sure that you download and <strong>then delete</strong> files listed above from [_1] <strong>immediately</strong> because backup files contain sensitive information.', 50 '_BACKUP_DOWNLOAD_MESSAGE' => 'Downloading of the backup file will start automatically in a few seconds. If for some reason it does not, click <a href=\'#\' onclick=\'submit_form()\'>here</a> to start downloading manually. Please note that you can download the backup file only once for a session.', 50 51 '_USAGE_BOOKMARKLET_1' => 'Setting up QuickPost to post to Movable Type allows you to perform one-click posting and publishing without ever entering through the main Movable Type interface.', 51 52 '_USAGE_BOOKMARKLET_2' => 'Movable Type\'s QuickPost structure allows you to customize the layout and fields on your QuickPost page. For example, you may wish to add the ability to add excerpts through the QuickPost window. By default, a QuickPost window will always have: a pulldown menu for the weblog to post to; a pulldown menu to select the Post Status (Draft or Publish) of the new entry; a text entry box for the Title of the entry; and a text entry box for the entry body.', branches/wheeljack/mt-check.cgi.pre
r797 r877 234 234 235 235 [ 'Archive::Zip', 0, 0, translate('Archive::Zip is required in order to archive files in backup/restore operation.')], 236 237 [ 'XML::XPath', 0, 0, translate('XML::XPath and/or its dependencies is required in order to restore.')], 236 238 ); 237 239 … … 321 323 ($ver ? " (version >= $ver)" : "") . "</h3>"; 322 324 eval("use $mod" . ($ver ? " $ver;" : ";")); 323 if ($@ ) {325 if ($@ || !($mod->VERSION)) { 324 326 $is_good = 0 if $req; 325 327 my $msg = $ver ? branches/wheeljack/tmpl/cms/backup_end.tmpl
r838 r877 43 43 </form> 44 44 <script type="text/javascript"> 45 var timer; 46 45 47 function submit_form() { 48 window.clearTimeout(timer); 46 49 var f = document['file_download']; 47 50 if (f) { … … 50 53 } 51 54 52 var timer; 53 timer = window.setTimeout("submit_form()", 1000); 55 timer = window.setTimeout("submit_form()", 3000); 54 56 </script> 57 <p><strong><MT_TRANS phrase="_BACKUP_DOWNLOAD_MESSAGE"></strong></p> 55 58 </TMPL_IF> 56 59 <TMPL_ELSE> branches/wheeljack/tmpl/cms/backup_restore.tmpl
r856 r877 83 83 </div> 84 84 <div id="restore-panel" style="display: none;"> 85 85 <TMPL_IF NAME=MISSING_XPATH> 86 <div class="error-message"><MT_TRANS phrase="Perl module XML::XPath and/or its dependencies is missing - Movable Type can not restore system without it."></div> 87 <TMPL_ELSE> 86 88 <form method="post" enctype="multipart/form-data" action="<TMPL_VAR NAME=SCRIPT_URL>"> 87 89 <input type="hidden" name="__mode" value="restore" /> … … 119 121 </fieldset> 120 122 </form> 121 123 </TMPL_IF> 122 124 </div> 123 125 <div id="bottom"></div>
