From: Marc MAURICE Date: Thu, 7 Oct 2010 22:48:13 +0000 (+0200) Subject: minor fixes for dbl / and index at last image X-Git-Tag: v1.0~7 X-Git-Url: http://positon.org/gitweb/?p=bizou.git;a=commitdiff_plain;h=0f1b1f83207b59b9109d3fd09b3710bc8bc1f06d minor fixes for dbl / and index at last image --- 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