|
Lines 28-33
use Koha::ProblemReport;
Link Here
|
| 28 |
use Koha::Libraries; |
28 |
use Koha::Libraries; |
| 29 |
use Koha::Patrons; |
29 |
use Koha::Patrons; |
| 30 |
use Koha::Util::Navigation; |
30 |
use Koha::Util::Navigation; |
|
|
31 |
use URI::Escape; |
| 32 |
use Encode; |
| 31 |
|
33 |
|
| 32 |
my $input = new CGI; |
34 |
my $input = new CGI; |
| 33 |
|
35 |
|
|
Lines 46-52
if ( !C4::Context->preference('OPACReportProblem')
Link Here
|
| 46 |
print $input->redirect("/cgi-bin/koha/errors/404.pl"); |
48 |
print $input->redirect("/cgi-bin/koha/errors/404.pl"); |
| 47 |
} |
49 |
} |
| 48 |
|
50 |
|
| 49 |
my $problempage = C4::Context->preference('OPACBaseURL') . Koha::Util::Navigation::local_referer($input ); |
51 |
my $referer = Koha::Util::Navigation::local_referer($input ); |
|
|
52 |
$referer = Encode::decode_utf8 uri_unescape $referer, |
| 50 |
|
53 |
|
| 51 |
my $patron = Koha::Patrons->find($borrowernumber); |
54 |
my $patron = Koha::Patrons->find($borrowernumber); |
| 52 |
my $username = $patron->userid; |
55 |
my $username = $patron->userid; |
|
Lines 56-62
my @messages;
Link Here
|
| 56 |
|
59 |
|
| 57 |
$template->param( |
60 |
$template->param( |
| 58 |
username => $username, |
61 |
username => $username, |
| 59 |
problempage => $problempage, |
62 |
problempage => $referer, |
| 60 |
library => $library, |
63 |
library => $library, |
| 61 |
); |
64 |
); |
| 62 |
|
65 |
|
|
Lines 66-71
if ( $op eq 'addreport' ) {
Link Here
|
| 66 |
my $subject = $input->param('subject'); |
69 |
my $subject = $input->param('subject'); |
| 67 |
my $message = $input->param('message'); |
70 |
my $message = $input->param('message'); |
| 68 |
my $problempage = $input->param('problempage'); |
71 |
my $problempage = $input->param('problempage'); |
|
|
72 |
$problempage = Encode::decode_utf8 uri_unescape $problempage; |
| 69 |
my $recipient = $input->param('recipient') || 'admin'; |
73 |
my $recipient = $input->param('recipient') || 'admin'; |
| 70 |
|
74 |
|
| 71 |
try { |
75 |
try { |
| 72 |
- |
|
|