summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2002-03-21 06:57:20 +0000
committerivan <ivan>2002-03-21 06:57:20 +0000
commit415150fe1997eb2688dfd492710f644574e29daf (patch)
treea13a70ee3469bc61e8e63a805536c15b3685088d /httemplate/edit
parentf1038a648b3d53db925b23519e7cd2a30c6837ed (diff)
more for the new world of export...
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/part_export.cgi2
-rw-r--r--httemplate/edit/process/part_export.cgi18
2 files changed, 7 insertions, 13 deletions
diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi
index a44bd39d5..7ba6fa12b 100644
--- a/httemplate/edit/part_export.cgi
+++ b/httemplate/edit/part_export.cgi
@@ -70,7 +70,7 @@ my %exports = (
'password' => { label=>'Database password' },
},
'nodomain' => 'Y',
- 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, etc., from Conf.pm && export.html etc.',
+ 'notes' => 'Not specifying datasrc will export to the freeside database? (no... notes on MySQL replication, DBI::Proxy, etc., from Conf.pm && export.html etc.',
},
'cyrus' => {
'desc' => 'Real-time export to Cyrus IMAP server',
diff --git a/httemplate/edit/process/part_export.cgi b/httemplate/edit/process/part_export.cgi
index 8160527f6..b4ce0b352 100644
--- a/httemplate/edit/process/part_export.cgi
+++ b/httemplate/edit/process/part_export.cgi
@@ -1,7 +1,5 @@
<%
-my $dbh = dbh;
-
my $exportnum = $cgi->param('exportnum');
my $old = qsearchs('part_export', { 'exportnum'=>$exportnum } ) if $exportnum;
@@ -26,21 +24,17 @@ local $FS::UID::AutoCommit = 0;
my $error;
if ( $exportnum ) {
- $error = $new->replace($old);
+ $error = $new->replace($old,\%options);
} else {
- $error = $new->insert;
- $exportnum = $new->exportnum;
+ $error = $new->insert,\%options);
+# $exportnum = $new->exportnum;
}
+
if ( $error ) {
- $dbh->rollback;
$cgi->param('error', $error );
print $cgi->redirect(popurl(2). "part_export.cgi?". $cgi->query_string );
- myexit();
+} else {
+ print $cgi->redirect(popurl(3). "browse/part_svc.cgi");
}
-#options
-
-$dbh->commit or die $dbh->errstr;
-print $cgi->redirect(popurl(3). "browse/part_svc.cgi");
-
%>