• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
html_helper link_tag() 6th parameter

#1
[eluser]skunkbad[/eluser]
From what I understand, the 6th parameter of link_tag() should build the link with either a relative link, or an absolute link, depending on if TRUE or FALSE. In it's current state, the link_tag function will always prepend the value of the href with the base_url.

Lines 302 through 309 (if $href is an array):
Code:
if ($index_page === TRUE)
{
    $link .= ' href="'.$CI->config->site_url($v).'" ';
}
else
{
    $link .= ' href="'.$CI->config->slash_item('base_url').$v.'" ';
}

Lines 325 through 332 (if $href is not an array):

Code:
elseif ($index_page === TRUE)
{
    $link .= ' href="'.$CI->config->site_url($href).'" ';
}
else
{
    $link .= ' href="'.$CI->config->slash_item('base_url').$href.'" ';
}

Am I right?

If I am right, both lines 308 and 331 should be changed:
Code:
// Line 308
$link .= ' href="'.$v.'" ';
Code:
// Line 331
$link .= ' href="'.$href.'" ';

#2
[eluser]skunkbad[/eluser]
so, nobody cares about link_tag() ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.