minor fixes for dbl / and index at last image
This commit is contained in:
parent
a4fb65e857
commit
0f1b1f8320
2 changed files with 2 additions and 2 deletions
|
@ -93,7 +93,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")
|
||||||
$imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => dirname($scriptUrlPath)."/view/$shortPath/$file" );
|
$imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => dirname($scriptUrlPath)."/view$shortPath/$file" );
|
||||||
else
|
else
|
||||||
$otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" );
|
$otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" );
|
||||||
}
|
}
|
||||||
|
|
2
view.php
2
view.php
|
@ -26,7 +26,7 @@ $prevImage = '';
|
||||||
$nextImage = '';
|
$nextImage = '';
|
||||||
if ($pos > 0)
|
if ($pos > 0)
|
||||||
$prevImage = $images[$pos-1];
|
$prevImage = $images[$pos-1];
|
||||||
if ($pos < sizeof($images))
|
if ($pos < sizeof($images)-1)
|
||||||
$nextImage = $images[$pos+1];
|
$nextImage = $images[$pos+1];
|
||||||
|
|
||||||
// template variables
|
// template variables
|
||||||
|
|
Loading…
Reference in a new issue