php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55961 patch: add URI query string Login link
Submitted: 2004-01-08 15:53 UTC Modified: 2004-01-09 16:02 UTC
From: danielc at analysisandsolutions dot com Assigned: mj (profile)
Status: Closed Package: PECL website (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danielc at analysisandsolutions dot com
New email:
PHP Version: OS:

 

 [2004-01-08 15:53 UTC] 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 ';



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-08 16:22 UTC] 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 16:59 UTC] danielc at analysisandsolutions dot com
Here's a more comprehensive solution: http://www.panix.com/~danielc/web.loginuri.diff
 [2004-01-09 16:02 UTC] mj@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PEAR better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC