/
export_database.coretag
44 lines (40 loc) · 1.34 KB
/
export_database.coretag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2002-2007 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
UserTag export-database Order table file type
UserTag export-database addAttr
UserTag export-database Version 1.4
UserTag export-database Routine <<EOR
sub {
my($table, $file, $type, $opt) = @_;
delete $::Values->{ui_export_database}
or return undef;
if($opt->{delete} and ! $opt->{verify}) {
::logError("attempt to delete field without verify, abort");
return undef;
}
if(!$file and $type) {
#::logError("exporting as default type, no file specified");
undef $type;
}
$Vend::WriteDatabase{$table} = 1;
if(! $opt->{field}) {
#::logError("exporting:\ntable=$table\nfile=$file\ntype=$type\nsort=$opt->{sort}");
}
elsif($opt->{field} and $opt->{delete}) {
::logError("delete field:\ntable=$table\nfield=$opt->{field}\nsort=$opt->{sort}\n");
}
elsif($opt->{field}) {
::logError("add field:\ntable=$table\nfield=$opt->{field}\nsort=$opt->{sort}\n");
}
return Vend::Data::export_database(
$table,
$file,
$type,
$opt,
);
}
EOR