From 4e4e961621f479a35719c545691ce38adbef4755 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Sun, 16 Jun 2013 22:37:46 +0100 Subject: [PATCH] Bugfix for displaying next chant in source --- chant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chant.php b/chant.php index 78bf01c..3e67b80 100644 --- a/chant.php +++ b/chant.php @@ -92,7 +92,7 @@ if(count($c_p) > 0) { } if($prev) $sources_img .= ' '; $next = false; - if(count($chants[$s[1]]) > 1 && array_search([$id,$s[4],$s[3]], $chants[$s[1]]) < count($chants[$s[1]])) { + if(count($chants[$s[1]]) > 1 && array_search([$id,$s[4],$s[3]], $chants[$s[1]]) < count($chants[$s[1]])-1) { $next = $chants[$s[1]][array_search([$id,$s[4],$s[3]], $chants[$s[1]])+1]; } elseif(is_array($sources[$s[0]]['pages'])) { $j = $s[2];