Bug 517 - [Chameleon] gszAppWebPath code remove second from the end slash when no filename in URL
: [Chameleon] gszAppWebPath code remove second from the end slash when no filen...
Status: RESOLVED FIXED
: Chameleon
Core
: 1.99
: PC Linux
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-07-13 14:41 by
Modified: 2004-08-10 15:37 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-07-13 14:41:24
The code that build gszAppWebPath remove the second from the end slash in a URL
where there's no filename in the URL.
So http://de1.dmsolutions.ca/msapps/cfs-dds/cfs_demo/htdocs/
Becomes http://de1.dmsolutions.ca/msapps/cfs-dds/cfs_demohtdocs/

I noticed this when I tried to add the Ruler widget in a application. This
widget use the gszAppWebPath variable to build its path to the image. However,
since I access the application without the filename, I noticed the bug.
------- Comment #1 From 2004-07-13 14:43:48 -------
I fix the problem. The path was truncated with the pathinfo() php function. This
function remove last slash in all values returned. I made this patch to fix.

159c159,162
<         $szPath = $aszPath['dirname'].$aszPath['basename'].'/';
---
>         if(substr($aszPath['dirname'], -1) != '/')
>             $szPath = $aszPath['dirname']."/".$aszPath['basename'].'/';
>         else
>             $szPath = $aszPath['dirname'].$aszPath['basename'].'/';


Marking as FIXED
------- Comment #2 From 2004-08-10 15:37:17 -------
Changing Version to 1.99 (2.0 not being worked on yet).