[dev] Question about download links in IMP ...

Chris chris at jeks.net
Thu Dec 12 10:02:27 PST 2002


... just noticed my download attachment links don't work.

Odd code responsible is in horde/lib/Browser.php downloadUrl():

The comment with the function says if the url param is null then it will
use the appropriate view.php ...

But the code generates '/horde/download/?module=imp':

if (is_null($url)) {
	global $registry;
	$url = Horde::addParameter(Horde::url($registry->getParam('webroot', 'horde') . '/download/'), 'module=' . $registry->getApp());

Of course, the path /download/ doesn't exist and makes all these urls unusable ...

Can anyone shed some light on what's meant to be in here?

As a test I replaced the entire contents of that Horde::url call with just 'view.php'
and it worked for IMP. Doubt it would work for all the apps though (I have IMP as my
document root)....

Maybe something like: 

if (is_null($url)) {
  global $registry;
  $url = Horde::url($registry->getParam('webroot', $registry->getApp()) . '/view.php');

 ... would be more appropriate?

 -chris

-- 
~ ~ ~
Chris Hyde

'Life is like a grapefruit.' - Ford Prefect

~ ~ ~


More information about the dev mailing list