diff options
Diffstat (limited to 'templates/themes/recent/theme.php')
| -rw-r--r-- | templates/themes/recent/theme.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/themes/recent/theme.php b/templates/themes/recent/theme.php index d4d4e9b8..7081346b 100644 --- a/templates/themes/recent/theme.php +++ b/templates/themes/recent/theme.php @@ -147,13 +147,17 @@ $stats['active_content'] += array_sum($matches[1]); } + $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC" . ($settings['limit_news'] ? ' LIMIT ' . $settings['limit_news'] : '')) or error(db_error()); + $recent_news = $query->fetchAll(PDO::FETCH_ASSOC); + return Element('themes/recent/recent.html', Array( 'settings' => $settings, 'config' => $config, 'boardlist' => createBoardlist(), 'recent_images' => $recent_images, 'recent_posts' => $recent_posts, - 'stats' => $stats + 'stats' => $stats, + 'recent_news' => $recent_news, )); } }; |
