the 2 fixes for 2.2.2b

This commit is contained in:
tipaul 2005-04-28 08:26:38 +00:00
parent a689c174ec
commit ad08bca80c
2 changed files with 18 additions and 16 deletions

View File

@ -130,7 +130,7 @@ sub get_template_and_user {
# We are going to use the $flags returned by checkauth
# to create the template's parameters that will indicate
# which menus the user can access.
if ($flags->{superlibrarian} == 1)
if ($flags && $flags->{superlibrarian} == 1)
{
$template->param(CAN_user_circulate => 1);
$template->param(CAN_user_catalogue => 1);
@ -146,53 +146,53 @@ sub get_template_and_user {
$template->param(CAN_user_management => 1);
$template->param(CAN_user_tools => 1); }
if ($flags->{circulate} == 1) {
if ($flags && $flags->{circulate} == 1) {
$template->param(CAN_user_circulate => 1); }
if ($flags->{catalogue} == 1) {
if ($flags && $flags->{catalogue} == 1) {
$template->param(CAN_user_catalogue => 1); }
if ($flags->{parameters} == 1) {
if ($flags && $flags->{parameters} == 1) {
$template->param(CAN_user_parameters => 1);
$template->param(CAN_user_management => 1);
$template->param(CAN_user_tools => 1); }
if ($flags->{borrowers} == 1) {
if ($flags && $flags->{borrowers} == 1) {
$template->param(CAN_user_borrowers => 1); }
if ($flags->{permissions} == 1) {
if ($flags && $flags->{permissions} == 1) {
$template->param(CAN_user_permission => 1); }
if ($flags->{reserveforothers} == 1) {
if ($flags && $flags->{reserveforothers} == 1) {
$template->param(CAN_user_reserveforothers => 1); }
if ($flags->{borrow} == 1) {
if ($flags && $flags->{borrow} == 1) {
$template->param(CAN_user_borrow => 1); }
if ($flags->{reserveforself} == 1) {
if ($flags && $flags->{reserveforself} == 1) {
$template->param(CAN_user_reserveforself => 1); }
if ($flags->{editcatalogue} == 1) {
if ($flags && $flags->{editcatalogue} == 1) {
$template->param(CAN_user_editcatalogue => 1); }
if ($flags->{updatecharges} == 1) {
if ($flags && $flags->{updatecharges} == 1) {
$template->param(CAN_user_updatecharge => 1); }
if ($flags->{acquisition} == 1) {
if ($flags && $flags->{acquisition} == 1) {
$template->param(CAN_user_acquisition => 1); }
if ($flags->{management} == 1) {
if ($flags && $flags->{management} == 1) {
$template->param(CAN_user_management => 1);
$template->param(CAN_user_tools => 1); }
if ($flags->{tools} == 1) {
if ($flags && $flags->{tools} == 1) {
$template->param(CAN_user_tools => 1); }
}

View File

@ -38,8 +38,10 @@ if ($op eq 'serialchangestatus') {
if ($serialids[$i]) {
serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
} else {
my $subscription=getsubscription($subscriptionid);
newissue($serialseqs[$i],$subscriptionid,$subscription->{biblionumber},$status[$i], format_date_in_iso($planneddates[$i]));
if ($serialseqs[$i]) {
my $subscription=getsubscription($subscriptionid);
newissue($serialseqs[$i],$subscriptionid,$subscription->{biblionumber},$status[$i], format_date_in_iso($planneddates[$i]));
}
}
}
}