@@ -, +, @@
- Turn OPACPrivacy on
- Go to opac-privacy.pl
- Click the "Immediate deletion button" to delete the reading history
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt | 4 +++-
opac/opac-privacy.pl | 9 +++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
@@ -27,7 +27,9 @@
[% IF deleted %]
Your reading history has been deleted.
- [% ELSE %]
+ [% ELSIF err_history_not_deleted %]
+ The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your library of this error
+ [% ELSIF nothing_to_delete %]
No reading history to delete
[% END %]
--- a/opac/opac-privacy.pl
+++ a/opac/opac-privacy.pl
@@ -63,8 +63,13 @@ elsif ( $op eq "delete_record" ) {
my $rows = eval {
Koha::Patrons->search({ 'me.borrowernumber' => $borrowernumber })->anonymise_issue_history;
};
- $rows = $@ ? 0 : int($rows);
- $template->param( 'deleted' => $rows );
+ $template->param(
+ (
+ $@ ? ( history_not_deleted => 1 )
+ : $rows ? ( deleted => int($rows) )
+ : ( nothing_to_delete => 1 )
+ )
+ );
}
# get borrower privacy ....
--