From f53d084c0061c47c571cbbce7c0d893289055191 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 19 Feb 2008 11:26:08 +1300 Subject: [PATCH] bug 1803 - fix error page handling Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .htaccess | 10 +++--- Makefile.PL | 2 +- errors/400.pl | 37 ++++++++++++++++++++ errors/401.pl | 37 ++++++++++++++++++++ errors/402.pl | 37 ++++++++++++++++++++ errors/403.pl | 37 ++++++++++++++++++++ errors/404.pl | 37 ++++++++++++++++++++ errors/500.pl | 37 ++++++++++++++++++++ etc/koha-httpd.conf | 13 +++++++ koha-tmpl/errors/400.pl | 37 -------------------- koha-tmpl/errors/401.pl | 37 -------------------- koha-tmpl/errors/402.pl | 37 -------------------- koha-tmpl/errors/403.pl | 37 -------------------- koha-tmpl/errors/404.pl | 37 -------------------- koha-tmpl/errors/500.pl | 37 -------------------- .../opac-tmpl/prog/en/modules/errors/400.tmpl | 29 +++++++++++++++ .../opac-tmpl/prog/en/modules/errors/401.tmpl | 30 ++++++++++++++++ .../opac-tmpl/prog/en/modules/errors/403.tmpl | 29 +++++++++++++++ .../opac-tmpl/prog/en/modules/errors/404.tmpl | 29 +++++++++++++++ .../opac-tmpl/prog/en/modules/errors/500.tmpl | 29 +++++++++++++++ opac/errors/400.pl | 37 ++++++++++++++++++++ opac/errors/401.pl | 37 ++++++++++++++++++++ opac/errors/402.pl | 37 ++++++++++++++++++++ opac/errors/403.pl | 37 ++++++++++++++++++++ opac/errors/404.pl | 37 ++++++++++++++++++++ opac/errors/500.pl | 37 ++++++++++++++++++++ 26 files changed, 609 insertions(+), 228 deletions(-) create mode 100755 errors/400.pl create mode 100755 errors/401.pl create mode 100755 errors/402.pl create mode 100755 errors/403.pl create mode 100755 errors/404.pl create mode 100755 errors/500.pl delete mode 100755 koha-tmpl/errors/400.pl delete mode 100755 koha-tmpl/errors/401.pl delete mode 100755 koha-tmpl/errors/402.pl delete mode 100755 koha-tmpl/errors/403.pl delete mode 100755 koha-tmpl/errors/404.pl delete mode 100755 koha-tmpl/errors/500.pl create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl create mode 100755 opac/errors/400.pl create mode 100755 opac/errors/401.pl create mode 100755 opac/errors/402.pl create mode 100755 opac/errors/403.pl create mode 100755 opac/errors/404.pl create mode 100755 opac/errors/500.pl diff --git a/.htaccess b/.htaccess index 179a894..493fba5 100755 --- a/.htaccess +++ b/.htaccess @@ -1,9 +1,9 @@ # .htaccess -ErrorDocument 400 /cgi-bin/koha/koha-tmpl/errors/400.pl -ErrorDocument 401 /cgi-bin/koha/koha-tmpl/errors/401.pl -ErrorDocument 403 /cgi-bin/koha/koha-tmpl/errors/403.pl -ErrorDocument 404 /cgi-bin/koha/koha-tmpl/errors/404.pl -ErrorDocument 500 /cgi-bin/koha/koha-tmpl/errors/500.pl +ErrorDocument 400 /cgi-bin/koha/errors/400.pl +ErrorDocument 401 /cgi-bin/koha/errors/401.pl +ErrorDocument 403 /cgi-bin/koha/errors/403.pl +ErrorDocument 404 /cgi-bin/koha/errors/404.pl +ErrorDocument 500 /cgi-bin/koha/errors/500.pl diff --git a/Makefile.PL b/Makefile.PL index bac9ff9..d0e277d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -250,7 +250,7 @@ my $target_map = { './help.pl' => 'INTRANET_CGI_DIR', './installer-CPAN.pl' => 'NONE', './installer' => 'INTRANET_CGI_DIR', - './koha-tmpl/errors' => {target => 'INTRANET_CGI_DIR', trimdir => 2}, + './errors' => {target => 'INTRANET_CGI_DIR'}, './koha-tmpl/intranet-tmpl' => {target => 'INTRANET_TMPL_DIR', trimdir => -1}, './koha-tmpl/opac-tmpl' => {target => 'OPAC_TMPL_DIR', trimdir => -1}, './kohaversion.pl' => 'INTRANET_CGI_DIR', diff --git a/errors/400.pl b/errors/400.pl new file mode 100755 index 0000000..431792b --- /dev/null +++ b/errors/400.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/400.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/errors/401.pl b/errors/401.pl new file mode 100755 index 0000000..9374765 --- /dev/null +++ b/errors/401.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/401.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/errors/402.pl b/errors/402.pl new file mode 100755 index 0000000..c7f6641 --- /dev/null +++ b/errors/402.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/402.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/errors/403.pl b/errors/403.pl new file mode 100755 index 0000000..b6ffe0d --- /dev/null +++ b/errors/403.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/403.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/errors/404.pl b/errors/404.pl new file mode 100755 index 0000000..ee0fb2a --- /dev/null +++ b/errors/404.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/404.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/errors/500.pl b/errors/500.pl new file mode 100755 index 0000000..f4341ed --- /dev/null +++ b/errors/500.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/500.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index 542e2e6..d8fc923 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -18,6 +18,12 @@ SetEnv PERL5LIB "__PERL_MODULE_DIR__" Options +FollowSymLinks + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + # Rewrite Rules RewriteEngine On @@ -46,6 +52,13 @@ SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml" SetEnv PERL5LIB "__PERL_MODULE_DIR__" Options +FollowSymLinks + + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + RewriteEngine On # Uncomment to turn on rewrite logging # RewriteLog __LOG_DIR__/koha-intranet-rewrite.log diff --git a/koha-tmpl/errors/400.pl b/koha-tmpl/errors/400.pl deleted file mode 100755 index 431792b..0000000 --- a/koha-tmpl/errors/400.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/400.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/errors/401.pl b/koha-tmpl/errors/401.pl deleted file mode 100755 index 9374765..0000000 --- a/koha-tmpl/errors/401.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/401.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/errors/402.pl b/koha-tmpl/errors/402.pl deleted file mode 100755 index c7f6641..0000000 --- a/koha-tmpl/errors/402.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/402.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/errors/403.pl b/koha-tmpl/errors/403.pl deleted file mode 100755 index b6ffe0d..0000000 --- a/koha-tmpl/errors/403.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/403.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/errors/404.pl b/koha-tmpl/errors/404.pl deleted file mode 100755 index ee0fb2a..0000000 --- a/koha-tmpl/errors/404.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/404.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/errors/500.pl b/koha-tmpl/errors/500.pl deleted file mode 100755 index f4341ed..0000000 --- a/koha-tmpl/errors/500.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA - - -use strict; -use CGI; -use C4::Auth; -use C4::Output; -use C4::Context; - -my $query = new CGI; -my $admin = C4::Context->preference('KohaAdminEmailAddress'); -my ( $template, $loggedinuser, $cookie ) = get_template_and_user( - { - template_name => "errors/500.tmpl", - query => $query, - type => "intranet", - authnotrequired => 1, - debug => 1, - } -); -$template->param( admin => $admin ); -output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl new file mode 100644 index 0000000..b4a0c90 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl @@ -0,0 +1,29 @@ +Koha Online Catalog › An Error Has Occurred + + + + + + +
+
+
+
+

An Error has Occurred

+

Error 404

+
    +
  • This error means that the Koha is pointed an invalid link.
  • +
  • To report this error, you can + ">email the Koha Administrator.
  • +
  • Use top menu bar to navigate to another part of Koha.
  • +
+
+
+
+
+
+ + + + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl new file mode 100644 index 0000000..7d70c01 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl @@ -0,0 +1,30 @@ +Koha Online Catalog › An Error Has Occurred + + + + + + +
+
+
+
+

An Error has Occurred

+

Error 404

+
    +
  • This error means that the you are trying to access a link that you're not authorized to see.
  • +
  • Try logging in to the catalog
  • +
  • To report this error, you can + ">email the Koha Administrator.
  • +
  • Use top menu bar to navigate to another part of Koha.
  • +
+
+
+
+
+
+ + + + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl new file mode 100644 index 0000000..d8fc6b2 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl @@ -0,0 +1,29 @@ +Koha Online Catalog › An Error Has Occurred + + + + + + +
+
+
+
+

An Error has Occurred

+

Error 404

+
    +
  • This error means that you are forbidden for some reason to see this page.
  • +
  • To report this error, you can + ">email the Koha Administrator.
  • +
  • Use top menu bar to navigate to another part of Koha.
  • +
+
+
+
+
+
+ + + + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl new file mode 100644 index 0000000..bb07e53 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/404.tmpl @@ -0,0 +1,29 @@ +Koha Online Catalog › An Error Has Occurred + + + + + + +
+
+
+
+

An Error has Occurred

+

Error 404

+
    +
  • This error means that the link was broken and that the page doesn't exist.
  • +
  • To report this error, you can + ">email the Koha Administrator.
  • +
  • Use top menu bar to navigate to another part of Koha.
  • +
+
+
+
+
+
+ + + + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl new file mode 100644 index 0000000..27121ff --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl @@ -0,0 +1,29 @@ +Koha Online Catalog › An Error Has Occurred + + + + + + +
+
+
+
+

An Error has Occurred

+

Error 404

+
    +
  • An error occurred while try to process your request.
  • +
  • To report this error, you can + ">email the Koha Administrator.
  • +
  • Use top menu bar to navigate to another part of Koha.
  • +
+
+
+
+
+
+ + + + + diff --git a/opac/errors/400.pl b/opac/errors/400.pl new file mode 100755 index 0000000..16c169c --- /dev/null +++ b/opac/errors/400.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/400.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/errors/401.pl b/opac/errors/401.pl new file mode 100755 index 0000000..c6573f4 --- /dev/null +++ b/opac/errors/401.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/401.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/errors/402.pl b/opac/errors/402.pl new file mode 100755 index 0000000..8620f88 --- /dev/null +++ b/opac/errors/402.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/402.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/errors/403.pl b/opac/errors/403.pl new file mode 100755 index 0000000..d223ffb --- /dev/null +++ b/opac/errors/403.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/403.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/errors/404.pl b/opac/errors/404.pl new file mode 100755 index 0000000..0c5408c --- /dev/null +++ b/opac/errors/404.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/404.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/errors/500.pl b/opac/errors/500.pl new file mode 100755 index 0000000..29ee3e0 --- /dev/null +++ b/opac/errors/500.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + + +use strict; +use CGI; +use C4::Auth; +use C4::Output; +use C4::Context; + +my $query = new CGI; +my $admin = C4::Context->preference('KohaAdminEmailAddress'); +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "errors/500.tmpl", + query => $query, + type => "opac", + koha-tmpl/authnotrequired => 1, + debug => 1, + } +); +$template->param( admin => $admin ); +output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.2.5