[interchange] Allow admin user to export tables upon request despite NoExportExternal
Jon Jensen <[email protected]> Fri, 29 Apr 2016 03:03:24 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit bc1eb7e66228faa28d5d20790a9e84f4f624bb40 Author: Jon Jensen <[email protected]> Date: Thu Mar 31 23:41:30 2016 -0600 Allow admin user to export tables upon request despite NoExportExternal NoExportExternal was intended to ensure automatic products/ exports don't happen, but we shouldn't stop manual exports to the download directory. code/UI_Tag/backup_database.coretag | 5 +++-- dist/lib/UI/pages/admin/dbdownload.html | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) --- diff --git a/code/UI_Tag/backup_database.coretag b/code/UI_Tag/backup_database.coretag index d17a1d5..f6cb251 100644 --- a/code/UI_Tag/backup_database.coretag +++ b/code/UI_Tag/backup_database.coretag @@ -1,4 +1,4 @@ -# Copyright 2002-2009 Interchange Development Group and others +# Copyright 2002-2016 Interchange Development Group and others # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -7,7 +7,7 @@ UserTag backup-database Order tables UserTag backup-database AddAttr -UserTag backup-database Version 1.11 +UserTag backup-database Version 1.12 UserTag backup-database Routine <<EOR sub { my ($tables, $opt) = @_; @@ -59,6 +59,7 @@ sub { $fn =~ s:.*/::; my $file = "$backup_dir/$fn"; my $status; + local $Vend::Cfg->{NoExportExternal} if $opt->{force}; eval { $status = export( $table, diff --git a/dist/lib/UI/pages/admin/dbdownload.html b/dist/lib/UI/pages/admin/dbdownload.html index 63bfa06..2f16d11 100644 --- a/dist/lib/UI/pages/admin/dbdownload.html +++ b/dist/lib/UI/pages/admin/dbdownload.html @@ -23,6 +23,7 @@ xls="[cgi ui_export_xls]" max_xls_string="[cgi ui_export_max_xls_string]" tables="[scratch exported_tables]" + force=1 ]']%s tables backed up.[/msg] </BLOCKQUOTE> [/if]