Changes to add recent news to the Recent Posts Theme for the front page

This commit is contained in:
Benjamin Southall 2017-04-25 00:09:35 +09:00
parent 4139277cff
commit aa8eb39dab
4 changed files with 34 additions and 3 deletions

View file

@ -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,
));
}
};