21/02/2013, 00:42:50
Tiens, on reviens sur un bug du svn 8553, voici la proposition que j'avais donné en message privé à Calguy, mais auquel il n'y a eu aucun suivi.
Citation :Hi,
The removal (8553) works, but the $path still incorrect: \/
ValidRelativePath($path) is used to check if a path is valid and it is not (I think so that this function should be in Files.php and not ImageManager.php).
All functions ImageManager and $relative call fixPath().
This is the function fixPath() that corrects the path and it is what must be used.
Here are the changes I propose for this function and you will not say more, I hate windoze
Code :static function fixPath($path)
{
//replace \ with / if needed
$path = str_replace('\\','/',$path);
//append a slash to the path if it doesn't exists.
if(!(substr($path,-1) == '/'))
$path .= '/';
return $path;
}
Eg: ImageManager line 325 :
Code :function getThumbURL($relative)
{
$path_parts = pathinfo($relative);
$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
//if($path_parts['dirname']=='\\') $path_parts['dirname']='/'; //no more needed with fixPath
Thanks for your attention and your great work
Jean-Marc