bug 5045 - Help works even when the referrer is being stripped
authorRobin Sheat <robin@catalyst.net.nz>
Fri, 31 Dec 2010 16:19:17 +0000 (11:19 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Sat, 1 Jan 2011 20:20:01 +0000 (09:20 +1300)
This fix puts the URL of the source page as a parameter to help.pl,
which will override the referrer value, if it's provided. This deals
with people sitting behind proxies that strip the referrer information
out.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc

index 4a81e97..a7c1ab8 100644 (file)
@@ -68,6 +68,6 @@
         <!-- TMPL_ELSE -->
             You are not logged in |
         <!-- /TMPL_IF -->
-        <a href="/cgi-bin/koha/help.pl" id="helper" onclick="window.open('/cgi-bin/koha/help.pl','Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); return false;">[ ? ]</a>
+        <a href="/cgi-bin/koha/help.pl" id="helper" onclick="window.open('/cgi-bin/koha/help.pl?url='+escape(document.URL),'Koha_Help','width=600,height=600,toolbar=false,scrollbars=yes'); return false;">[ ? ]</a>
     </div>
 </div>