Bug 517

Summary: [Chameleon] gszAppWebPath code remove second from the end slash when no filename in URL
Product: Chameleon Reporter: Julien-Samuel Lacroix <jlacroix@mapgears.com>
Component: CoreAssignee: chameleon-dev <chameleon-dev@lists.maptools.org>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 1.99   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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).