Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9177

extra_url() creates bad urls

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Won't Fix
    • 3.0.7-PL1
    • None
    • None
    • PHP Environment:
      Database:

    Description

      extra_url() creates bad urls like mcp.php?&f=1 where it should be mcp.php?f=1

      For example, lookup ip has this issue. To correct, I changed the extra_url() function to look like this:

      function extra_url()
      {
      	global $forum_id, $topic_id, $post_id, $report_id, $user_id;
       
      	$url_extra = array();
      	$url_extra[] = ($forum_id) ? "f=$forum_id" : '';
      	$url_extra[] = ($topic_id) ? "t=$topic_id" : '';
      	$url_extra[] = ($post_id) ? "p=$post_id" : '';
      	$url_extra[] = ($user_id) ? "u=$user_id" : '';
      	$url_extra[] = ($report_id) ? "r=$report_id" : '';
       
      	$url_extra = implode('&', $url_extra);
      	return $url_extra;
      }
      

      This makes sure that & is not added to the beginning and thus leads to a bad url.

      Thanks
      Alan

      Attachments

        Issue Links

          Activity

            People

              bantu Andreas Fischer [X] (Inactive)
              harty83 harty83
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: