[drupal-devel] [bug] url() does not obey $absolute parameter
properly
jim sloan
drupal at enkapsis.com
Tue Aug 9 16:04:33 UTC 2005
The purpose of the $absolute parameter is to build a link with an
absolute path ... this would be used in feeds and such. You may have
thought that it would be to create a link to an external url, but that
is not the case. url() does not handle external links and this is being
addressed: see http://www.drupal.org/node/10888
jim sloan
crunchywelch wrote:
> Issue status update for http://drupal.org/node/28491
> Post a follow up: http://drupal.org/project/comments/add/28491
>
> Project: Drupal
> Version: 4.6.0
> Component: base system
> Category: bug reports
> Priority: critical
> Assigned to: crunchywelch
> Reported by: crunchywelch
> Updated by: crunchywelch
> Status: patch (code needs review)
>
> in common.inc the url() function inverts the treatment of the $absolute
> parameter on line 1467 in v4.6:
>
>
> $base = ($absolute ? $base_url .'/' : '');
>
>
> This prepends the $base_url to the path if $absolute is TRUE, which is
> inverted logic, it should be:
>
>
> $base = ($absolute ? '' : $base_url .'/');
>
>
> This is still a problem in cvs, but I dont have the line number. I can
> submit a proper patch if needed.
>
>
>
>
> crunchywelch
>
>
More information about the drupal-devel
mailing list