Some typo simplification for the getThumbTarget call

This commit is contained in:
Marc MAURICE 2010-12-30 11:16:33 +01:00
parent fe20539226
commit 8ed0bc08f5

View file

@ -138,11 +138,7 @@ foreach (scandir($realDir) as $file) if ($file != '.' and $file != '..')
{ {
$ext = strtolower(substr($file, -4)); $ext = strtolower(substr($file, -4));
if ($ext == ".jpg" or $ext == ".png") { if ($ext == ".jpg" or $ext == ".png") {
$link = dirname($scriptUrlPath)."/$realDir/$file"; $imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => getThumbTarget("$shortPath/$file") );
$link = getThumbTarget("$shortPath/$file");
$imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => $link );
} else { } else {
$otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" ); $otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" );
} }