Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9177

extra_url() creates bad urls

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Trivial Trivial
    • None
    • 3.0.7-PL1
    • None
    • PHP Environment:
      Database:

      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

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

              Created:
              Updated:
              Resolved: