Fixes #260: previous/next day links in daily
The bug was occuring only if we tried to access to the first day.
This commit is contained in:
parent
eee711c0a8
commit
f3db3774f9
1 changed files with 6 additions and 6 deletions
|
@ -948,12 +948,12 @@ function showDaily()
|
|||
|
||||
$days = $LINKSDB->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='';
|
||||
$nextday='';
|
||||
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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue