Merge pull request #264 from ArthurHoaro/daily-nav

Fixes #260: previous/next day links in daily
This commit is contained in:
VirtualTam 2015-07-09 00:16:07 +02:00
commit 46d83c20d7

View file

@ -948,12 +948,12 @@ function showDaily()
$days = $LINKSDB->days(); $days = $LINKSDB->days();
$i = array_search($day,$days); $i = array_search($day,$days);
if ($i==false) { $i=count($days)-1; $day=$days[$i]; } if ($i===false) { $i=count($days)-1; $day=$days[$i]; }
$previousday=''; $previousday='';
$nextday=''; $nextday='';
if ($i!==false) if ($i!==false)
{ {
if ($i>1) $previousday=$days[$i-1]; if ($i>=1) $previousday=$days[$i-1];
if ($i<count($days)-1) $nextday=$days[$i+1]; if ($i<count($days)-1) $nextday=$days[$i+1];
} }