Skip to content

Commit

Permalink
bug 560: merge r1561 to trunk - url issue when $conf['picture_url_sty…
Browse files Browse the repository at this point in the history
…le']='file' and

filename is numeric or numeric followed by -

git-svn-id: http://piwigo.org/svn/trunk@1562 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Oct 13, 2006
1 parent 8a179eb commit 6a3aed2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions include/functions_url.inc.php
Expand Up @@ -213,16 +213,15 @@ function make_picture_url($params)
}
break;
case 'file':
if ( isset($params['image_file'])
and !is_numeric($params['image_file']) )
{
$url .= get_filename_wo_extension($params['image_file']);
}
else
if ( isset($params['image_file']) )
{
$url .= $params['image_id'];
$fname_wo_ext = get_filename_wo_extension($params['image_file']);
if (! preg_match('/^\d+(-|$)/', $fname_wo_ext) )
{
$url .= $fname_wo_ext;
break;
}
}
break;
default:
$url .= $params['image_id'];
}
Expand Down

0 comments on commit 6a3aed2

Please sign in to comment.