all informations are stocked in the notifys BDD
FIXME for this time, we have only four methods to notify :
all informations are stocked in the notifys BDD
FIXME for this time, we have only four methods to notify :
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
- {
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
# Deal with the vars recept from the template
my $borrowernumber = $input->param('borrowernumber');
my $itemnumber = $input->param('itemnumber');
my $method = $input->param('method');
my $overduelevel = $input->param('overduelevel');
my $notifyId = $input->param('notifyId');
# Deal with the vars recept from the template
my $borrowernumber = $input->param('borrowernumber');
my $itemnumber = $input->param('itemnumber');
my $method = $input->param('method');
my $overduelevel = $input->param('overduelevel');
my $notifyId = $input->param('notifyId');
-my $location = $input->param('location');
+my $location = $input->param('location');
+
+# FIXME: better check that borrowernumber is defined and valid.
+# FIXME: same for itemnumber and other variables passed in here.
# now create the line in bdd (notifys)
if ( $input->param('action') eq 'add' ) {
my $addnotify =
AddNotifyLine( $borrowernumber, $itemnumber, $overduelevel, $method,
# now create the line in bdd (notifys)
if ( $input->param('action') eq 'add' ) {
my $addnotify =
AddNotifyLine( $borrowernumber, $itemnumber, $overduelevel, $method,
- RemoveNotifyLine( $borrowernumber, $itemnumber, $notify_date );
+ RemoveNotifyLine( $borrowernumber, $itemnumber, $notify_date ); # FIXME: useless variable, no TMPL code for "action" exists.
# search for location authorised value
my ($tag,$subfield) = GetMarcFromKohaField('items.location','');
my $tagslib = &GetMarcStructure(1,'');
# search for location authorised value
my ($tag,$subfield) = GetMarcFromKohaField('items.location','');
my $tagslib = &GetMarcStructure(1,'');
$overdueforbranch{'itemnumber'} = $num->{'itemnumber'};
# now we add on the template, the differents values of notify_level
$overdueforbranch{'itemnumber'} = $num->{'itemnumber'};
# now we add on the template, the differents values of notify_level
if ( $num->{'notify_level'} eq '1' ) {
$overdueforbranch{'overdue1'} = 1;
$overdueforbranch{'overdueLevel'} = 1;
}
if ( $num->{'notify_level'} eq '1' ) {
$overdueforbranch{'overdue1'} = 1;
$overdueforbranch{'overdueLevel'} = 1;
}
# initiate the templates for the overdueloop
$template->param(
overduesloop => \@overduesloop,
# initiate the templates for the overdueloop
$template->param(
overduesloop => \@overduesloop,