CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#6013] URLs generated in FileManager are missing a slash

avatar
Created By: Joel Williams (joelby)
Date Submitted: Tue Jan 18 07:33:16 -0500 2011

Assigned To:
Version: 1.9.2
CMSMS Version: None
Severity: Minor
Resolution: Works For Me
State: Closed
Summary:
URLs generated in FileManager are missing a slash
Detailed Description:
URLs generated by the File View in FileManager cannot be clicked because they
are of the form http://example.comuploads/Test.pdf .

config.php states that root_url should not contain a trailing slash, but
FileManager.module.php line 496 is:

$info["url"]=$this->Slashes($config["root_url"].$this->Slash($path,$file));

This should be replaced by:

$info["url"]=$this->Slashes($config["root_url"]."/".$this->Slash($path,$file));



History

Comments
avatar
Date: 2011-01-19 13:15
Posted By: Rolf (rolf1)

Hello Joel

Tested this in both release 1.9.2 and the latest SVN revision: 6864 
In both cases it works for me.

Regards, Rolf
      
avatar
Date: 2011-01-19 19:57
Posted By: Joel Williams (joelby)

Thanks, it looks like a config.php problem on my end.

If root_path ends with a /, then FileManager->upDir() returns "uploads" instead
of "/uploads".

Perhaps the "Path Settings" comment in config.php could be amended to say "No
paths specified in this section should end in a slash" (or to make it idiot
proof, strip the final slash from all paths in this section of the config file).

I must have assumed that "Document root as seen from the webserver.  No slash at
the end" only applied to the URLs or something.
      
avatar
Date: 2011-01-20 04:02
Posted By: Rolf (rolf1)

Cool, I will close the tracker then.
      
Updates

Updated: 2011-01-20 04:03
state: Open => Closed

Updated: 2011-01-19 13:15
resolution_id: => 11