Correct file_url when on drupal.org

boombatower - May 8, 2009 - 01:09
Project:Project issue file testing
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:boombatower
Status:closed
Description

The file_url:

<?php
'file_url' => url($file['filepath']),
?>

Seems to get the absolute file reference: http://d6.drupal.org/var/www/d6.drupal.org/htdocs/scripts/files/issues/pass_2.patch

#1

boombatower - May 8, 2009 - 04:56

Interestingly the following generates a proper link on d6.d.o right now.

<?php
l
($file['filename'], $file['filepath']);
?>

#2

alex_b - May 11, 2009 - 14:01

Use file_create_url() (if in files directory) or $GLOBALS['base_url'] instead of url(). Using url() on a file will break when clean URL's is not enabled.

#3

boombatower - May 29, 2009 - 03:17
Assigned to:Anonymous» boombatower
Status:active» needs review
AttachmentSize
456980-file-url.patch 1.23 KB

#4

boombatower - May 29, 2009 - 03:20
Status:needs review» fixed

Committed.

#5

System Message - June 12, 2009 - 03:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#6

boombatower - June 27, 2009 - 01:22
Status:closed» active

Seems to still occur.

#7

boombatower - June 27, 2009 - 01:29
Status:active» closed

Nevermind issue on PIFR display side. YES!

 
 

Drupal is a registered trademark of Dries Buytaert.