Lines 1-11
Link Here
|
1 |
package Koha::App::Controller::CGI; |
1 |
package Koha::App::Controller::CGI; |
2 |
|
2 |
|
|
|
3 |
# Koha is free software; you can redistribute it and/or modify it |
4 |
# under the terms of the GNU General Public License as published by |
5 |
# the Free Software Foundation; either version 3 of the License, or |
6 |
# (at your option) any later version. |
7 |
# |
8 |
# Koha is distributed in the hope that it will be useful, but |
9 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 |
# GNU General Public License for more details. |
12 |
# |
13 |
# You should have received a copy of the GNU General Public License |
14 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
15 |
|
3 |
use Mojo::Base 'Mojolicious::Controller'; |
16 |
use Mojo::Base 'Mojolicious::Controller'; |
4 |
|
17 |
|
5 |
use CGI::Compile; |
18 |
use CGI::Compile; |
6 |
use CGI::Emulate::PSGI; |
19 |
use CGI::Emulate::PSGI; |
7 |
use CGI; |
20 |
use CGI; |
8 |
|
21 |
|
|
|
22 |
=head1 NAME |
23 |
|
24 |
Koha::App::Controller::CGI - Mojolicious controller for all CGI scripts |
25 |
|
26 |
=cut |
27 |
|
9 |
# CGI::Compile calls CGI::initialize_globals before each request, which resets PARAM_UTF8 to 0 |
28 |
# CGI::Compile calls CGI::initialize_globals before each request, which resets PARAM_UTF8 to 0 |
10 |
# We need to set it back to the correct value |
29 |
# We need to set it back to the correct value |
11 |
{ |
30 |
{ |
Lines 17-22
use CGI;
Link Here
|
17 |
}; |
36 |
}; |
18 |
} |
37 |
} |
19 |
|
38 |
|
|
|
39 |
=head1 METHODS |
40 |
|
41 |
=head2 intranet |
42 |
|
43 |
Controller action that routes the request to the corresponding intranet CGI script |
44 |
|
45 |
=cut |
46 |
|
20 |
sub intranet { |
47 |
sub intranet { |
21 |
my ($c) = @_; |
48 |
my ($c) = @_; |
22 |
|
49 |
|
Lines 28-33
sub intranet {
Link Here
|
28 |
$c->_render_script($script); |
55 |
$c->_render_script($script); |
29 |
} |
56 |
} |
30 |
|
57 |
|
|
|
58 |
=head2 opac |
59 |
|
60 |
Controller action that routes the request to the corresponding OPAC CGI script |
61 |
|
62 |
=cut |
63 |
|
31 |
sub opac { |
64 |
sub opac { |
32 |
my ($c) = @_; |
65 |
my ($c) = @_; |
33 |
|
66 |
|
34 |
- |
|
|