Bugzilla – Attachment 11921 Details for
Bug 8705
Software error on help of main page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (revised)
Bug-8705-Software-error-on-help-of-main-page.patch (text/plain), 1.25 KB, created by
Fridolin Somers
on 2012-08-31 15:01:55 UTC
(
hide
)
Description:
Proposed patch (revised)
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2012-08-31 15:01:55 UTC
Size:
1.25 KB
patch
obsolete
>From ed624abf92bb22679d0cb0c5b644b91f2c57c7ab Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 30 Aug 2012 18:42:26 +0200 >Subject: [PATCH] Bug 8705: Software error on help of main page > >--- > help.pl | 19 +++++++++++++------ > 1 file changed, 13 insertions(+), 6 deletions(-) > >diff --git a/help.pl b/help.pl >index 97f3462..30739bc 100755 >--- a/help.pl >+++ b/help.pl >@@ -25,19 +25,26 @@ use C4::Output; > use C4::Context; > use CGI; > >+sub _help_template_file_of_url($) { >+ my $url = shift; >+ my $file; >+ if ($url =~ /koha\/(.*)\.pl/) { >+ $file = $1; >+ } else { >+ $file = 'mainpage'; >+ } >+ $file =~ s/[^a-zA-Z0-9_\-\/]*//g; >+ return "help/$file.tt"; >+} >+ > my $query = new CGI; > > # find the script that called the online help using the CGI referer() > our $refer = $query->param('url'); > $refer = $query->referer() if !$refer || $refer eq 'undefined'; >- >-$refer =~ /koha\/(.*)\.pl/; >-my $file = $1; >-$file =~ s/[^a-zA-Z0-9_\-\/]*//g; >-my $from = "help/$file.tt"; >+my $from = _help_template_file_of_url($refer); > > my $template = C4::Templates::gettemplate($from, 'intranet', $query); > $template->param( referer => $refer ); > > output_html_with_http_headers $query, "", $template->output; >- >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8705
:
11898
|
11899
|
11921
|
11924
|
11944