Lines 40-57
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
40 |
} |
40 |
} |
41 |
); |
41 |
); |
42 |
|
42 |
|
43 |
my $op = $query->param("op"); |
43 |
my $op = $query->param("op"); |
44 |
my $privacy = $query->param("privacy"); |
44 |
my $privacy = $query->param("privacy"); |
|
|
45 |
my $privacy_relative_checkouts = $query->param("privacy_relative_checkouts"); |
45 |
|
46 |
|
46 |
if ($op eq "update_privacy") |
47 |
if ( $op eq "update_privacy" ) { |
47 |
{ |
48 |
ModMember( |
48 |
ModPrivacy($borrowernumber,$privacy); |
49 |
borrowernumber => $borrowernumber, |
49 |
$template->param('privacy_updated' => 1); |
50 |
privacy => $privacy, |
|
|
51 |
privacy_relative_checkouts => $privacy_relative_checkouts, |
52 |
); |
53 |
$template->param( 'privacy_updated' => 1 ); |
50 |
} |
54 |
} |
51 |
if ($op eq "delete_record") { |
55 |
elsif ( $op eq "delete_record" ) { |
|
|
56 |
|
52 |
# delete all reading records for items returned |
57 |
# delete all reading records for items returned |
53 |
# uses a hardcoded date ridiculously far in the future |
58 |
# uses a hardcoded date ridiculously far in the future |
54 |
my ($rows,$err_history_not_deleted) = AnonymiseIssueHistory('2999-12-12',$borrowernumber); |
59 |
my ( $rows, $err_history_not_deleted ) = |
|
|
60 |
AnonymiseIssueHistory( '2999-12-12', $borrowernumber ); |
61 |
|
55 |
# confirm the user the deletion has been done |
62 |
# confirm the user the deletion has been done |
56 |
if ( !$err_history_not_deleted ) { |
63 |
if ( !$err_history_not_deleted ) { |
57 |
$template->param( 'deleted' => 1 ); |
64 |
$template->param( 'deleted' => 1 ); |
Lines 60-73
if ($op eq "delete_record") {
Link Here
|
60 |
$template->param( 'err_history_not_deleted' => 1 ); |
67 |
$template->param( 'err_history_not_deleted' => 1 ); |
61 |
} |
68 |
} |
62 |
} |
69 |
} |
|
|
70 |
|
63 |
# get borrower privacy .... |
71 |
# get borrower privacy .... |
64 |
my ( $borr ) = GetMemberDetails( $borrowernumber ); |
72 |
my $borrower = GetMemberDetails( $borrowernumber ); |
65 |
|
73 |
|
66 |
$template->param( 'Ask_data' => '1', |
74 |
$template->param( |
67 |
'privacy'.$borr->{'privacy'} => 1, |
75 |
'Ask_data' => 1, |
68 |
'firstname' => $borr->{'firstname'}, |
76 |
'privacy' . $borrower->{'privacy'} => 1, |
69 |
'surname' => $borr->{'surname'}, |
77 |
'privacyview' => 1, |
70 |
'privacyview' => 1, |
78 |
'borrower' => $borrower, |
|
|
79 |
'surname' => $borrower->{surname}, |
80 |
'firstname' => $borrower->{firstname}, |
71 |
); |
81 |
); |
72 |
|
82 |
|
73 |
output_html_with_http_headers $query, $cookie, $template->output; |
83 |
output_html_with_http_headers $query, $cookie, $template->output; |