Renamed getThumbTarget to getImageLink
This commit is contained in:
parent
8ed0bc08f5
commit
e7ed1d501b
2 changed files with 4 additions and 4 deletions
|
@ -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" );
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function getThumbTarget($imageSimplePath)
|
||||
function getImageLink($imageSimplePath)
|
||||
{
|
||||
return dirname($_SERVER["SCRIPT_NAME"])."/plugins/viewer/view.php$imageSimplePath";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue