- my $dbh = C4::Context->dbh;
- if ($input->param('modif')) {
- my $sth=$dbh->prepare("UPDATE auth_types SET authtypetext=? ,auth_tag_to_report=?, summary=? WHERE authtypecode=?");
- $sth->execute($input->param('authtypetext'),$input->param('auth_tag_to_report'),$input->param('summary'),$input->param('authtypecode'));
- $sth->finish;
- } else {
- my $sth=$dbh->prepare("INSERT INTO auth_types SET authtypetext=? ,auth_tag_to_report=?, summary=?, authtypecode=?");
- $sth->execute($input->param('authtypetext'),$input->param('auth_tag_to_report'),$input->param('summary'),$input->param('authtypecode'));
- $sth->finish;
- }
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authtypes.pl\"></html>";
+ my $sth = $input->param('modif') ?
+ $dbh->prepare("UPDATE auth_types SET authtypetext=? ,auth_tag_to_report=?, summary=? WHERE authtypecode=?") :
+ $dbh->prepare("INSERT INTO auth_types SET authtypetext=?, auth_tag_to_report=?, summary=?, authtypecode=?") ;
+ $sth->execute($input->param('authtypetext'),$input->param('auth_tag_to_report'),$input->param('summary'),$input->param('authtypecode'));
+ print $input->redirect($script_name); # FIXME: unnecessary redirect