Renamed getThumbTarget to getImageLink

This commit is contained in:
Marc MAURICE 2010-12-30 17:46:02 +01:00
parent 8ed0bc08f5
commit e7ed1d501b
2 changed files with 4 additions and 4 deletions

View file

@ -31,8 +31,8 @@ function plugins_include($phpFile)
require "plugins/$p/$phpFile";
}
if (! function_exists('getThumbTarget')) {
function getThumbTarget($imageSimplePath)
if (! function_exists('getImageLink')) {
function getImageLink($imageSimplePath)
{
return dirname($_SERVER["SCRIPT_NAME"]).'/'.IMAGES_DIR.$imageSimplePath;
}
@ -138,7 +138,7 @@ foreach (scandir($realDir) as $file) if ($file != '.' and $file != '..')
{
$ext = strtolower(substr($file, -4));
if ($ext == ".jpg" or $ext == ".png") {
$imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => getThumbTarget("$shortPath/$file") );
$imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => getImageLink("$shortPath/$file") );
} else {
$otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" );
}

View file

@ -1,5 +1,5 @@
<?php
function getThumbTarget($imageSimplePath)
function getImageLink($imageSimplePath)
{
return dirname($_SERVER["SCRIPT_NAME"])."/plugins/viewer/view.php$imageSimplePath";
}