From 0f1b1f83207b59b9109d3fd09b3710bc8bc1f06d Mon Sep 17 00:00:00 2001 From: Marc MAURICE Date: Fri, 8 Oct 2010 00:48:13 +0200 Subject: [PATCH] minor fixes for dbl / and index at last image --- index.php | 2 +- view.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index b260d73..db2a590 100644 --- a/index.php +++ b/index.php @@ -93,7 +93,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" => dirname($scriptUrlPath)."/view/$shortPath/$file" ); + $imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => dirname($scriptUrlPath)."/view$shortPath/$file" ); else $otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" ); } diff --git a/view.php b/view.php index 99e7f9c..2d6aaa5 100644 --- a/view.php +++ b/view.php @@ -26,7 +26,7 @@ $prevImage = ''; $nextImage = ''; if ($pos > 0) $prevImage = $images[$pos-1]; -if ($pos < sizeof($images)) +if ($pos < sizeof($images)-1) $nextImage = $images[$pos+1]; // template variables -- 1.7.10.4