diff --git a/htdocs/newlogs.php b/htdocs/newlogs.php index 291aeed6..0a9b1e0e 100644 --- a/htdocs/newlogs.php +++ b/htdocs/newlogs.php @@ -81,20 +81,28 @@ LIMIT 1", $rLog['id']); if ($rPic = sql_fetch_assoc($rsPic)) { - if (count($newLogs)) + if (count($newLogs) >= 2) + { + $newLogs[count($newLogs)-2]['pic_uuid'] = $rPic['uuid']; + $newLogs[count($newLogs)-2]['pic_url'] = $rPic['url']; + $newLogs[count($newLogs)-2]['title'] = $rPic['title']; + $pics = $lines_per_pic; + } + else if (count($newLogs) == 1) { $newLogs[count($newLogs)-1]['pic_uuid'] = $rPic['uuid']; $newLogs[count($newLogs)-1]['pic_url'] = $rPic['url']; $newLogs[count($newLogs)-1]['title'] = $rPic['title']; + $pics = $lines_per_pic+1; } else { $rLog['pic_uuid'] = $rPic['uuid']; $rLog['pic_url'] = $rPic['url']; $rLog['title'] = $rPic['title']; + $pics = $lines_per_pic+2; } $rLog['picshown'] = true; - $pics = $lines_per_pic; } sql_free_result($rsPic); } diff --git a/htdocs/templates2/ocstyle/newlogs.tpl b/htdocs/templates2/ocstyle/newlogs.tpl index 6c672324..c7d6e746 100644 --- a/htdocs/templates2/ocstyle/newlogs.tpl +++ b/htdocs/templates2/ocstyle/newlogs.tpl @@ -9,7 +9,7 @@ {t}Latest logs entries{/t} {if $rest}{t}Without Germany{/t}{/if} - +
{assign var='lastCountry' value=''} {foreach name=newLogs from=$newLogs item=newLog}