X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=help.pl;h=f641fe6aff9710c83a3050b31956e612baa9e19b;hb=e3f6a746602028d02c125ad0927a12989b40b84a;hp=78f225b94244d6141b08beb5e089b2aa2bf83a90;hpb=ee3eee451d2c36ff58f9443c86a8522ef905eca1;p=koha_fer diff --git a/help.pl b/help.pl index 78f225b942..f641fe6aff 100755 --- a/help.pl +++ b/help.pl @@ -43,6 +43,16 @@ my $query = new CGI; our $refer = $query->param('url'); $refer = $query->referer() if !$refer || $refer eq 'undefined'; my $from = _help_template_file_of_url($refer); +my $htdocs = C4::Context->config('intrahtdocs'); + +# +# checking that the help file exist, otherwise, display nohelp.tt page +# +my ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); +unless ( -e "$htdocs/$theme/$lang/modules/$from" ) { + $from = "help/nohelp.tt"; + ( $theme, $lang ) = C4::Templates::themelanguage( $htdocs, $from, "intranet", $query ); +} my $template = C4::Templates::gettemplate($from, 'intranet', $query); $template->param( referer => $refer );