#548 [Opn]: patch: add URI query string Login link
| From: | danielc at analysisandsolutions dot com | Date: | Thu, 08 Jan 2004 21:59:43 +0000 |
| Subject: | #548 [Opn]: patch: add URI query string Login link | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-1199@lists.php.net to get a copy of this message | ||
ID: 548
User updated by: danielc at analysisandsolutions dot com
Reported By: danielc at analysisandsolutions dot com
Status: Open
Bug Type: Web Site
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
Here's a more comprehensive solution:
http://www.panix.com/~danielc/web.loginuri.diff
Previous Comments:
------------------------------------------------------------------------
[2004-01-08 16:22:53] danielc at analysisandsolutions dot com
I didn't look at the print_link() function, but assumed it was encoded
query stirngs. I was wrong. I'll post another patch in a few minutes.
------------------------------------------------------------------------
[2004-01-08 15:53:22] danielc at analysisandsolutions dot com
Description:
------------
Hi:
To make the Login link at the top of each page really functional, it
needs to include the URI query string, if any. This way, one can be
looking at a bug, log in and then edit the bug. Right now, login just
takes maintainers back to the main bugs page, not the bug they were
looking at.
A patch is below.
Thanks!
Expected result:
----------------
Index: pear-format-html.php
===================================================================
RCS file: /repository/pearweb/include/pear-format-html.php,v
retrieving revision 1.75
diff -u -r1.75 pear-format-html.php
--- pear-format-html.php 5 Jan 2004 20:07:21 -0000 1.75
+++ pear-format-html.php 8 Jan 2004 20:53:35 -0000
@@ -118,7 +118,7 @@
<?php
if (empty($_COOKIE['PEAR_USER'])) {
- print_link('/login.php?redirect=' . $_SERVER['PHP_SELF'],
'Login', false, 'class="menuBlack"');
+ print_link('/login.php?redirect=' . $_SERVER['PHP_SELF'] .
($_SERVER['QUERY_STRING'] ? "?{$_SERVER['QUERY_STRING']}" :
''),
'Login', false, 'class="menuBlack"');
} else {
print '<span class="menuWhite"><small>';
print '<a href="/user/' . $_COOKIE['PEAR_USER'] .
'">logged in
as ';
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=548&edit=1