Sorry about the late reply.
The add_success is not a hook. But you can set it up like
sub add_record {
#----------------------------------------------------------------------
my ($home) = @_;
.......
if ( defined (my $ret = $home->{db}->add($home->{cgi})) ) {
$home->auth_logging('add record ') if ( $home->{cfg}->{log_file} );
add_success($home, $ret);
}
else {
local $^W;
my $error = $GT::SQL::error;
$error =~ s/\n/<br>\n<li>/g;
add_form($home, "<font color=red><ul><li>$error</ul></font>");
}
...
}
sub add_success {
DO SOMETHING HERE
}
add_record is a pre hook.
Hope that helps.
TheStone.
B.
The add_success is not a hook. But you can set it up like
sub add_record {
#----------------------------------------------------------------------
my ($home) = @_;
.......
if ( defined (my $ret = $home->{db}->add($home->{cgi})) ) {
$home->auth_logging('add record ') if ( $home->{cfg}->{log_file} );
add_success($home, $ret);
}
else {
local $^W;
my $error = $GT::SQL::error;
$error =~ s/\n/<br>\n<li>/g;
add_form($home, "<font color=red><ul><li>$error</ul></font>");
}
...
}
sub add_success {
DO SOMETHING HERE
}
add_record is a pre hook.
Hope that helps.
TheStone.
B.