forked from leftypol/leftypol
adds news to front page
This commit is contained in:
parent
eb5dee5283
commit
a7e2bbbd87
1 changed files with 3 additions and 1 deletions
|
@ -28,13 +28,15 @@
|
||||||
// Build homepage
|
// Build homepage
|
||||||
public static function homepage($settings) {
|
public static function homepage($settings) {
|
||||||
global $config;
|
global $config;
|
||||||
|
$query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error());
|
||||||
|
$news = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||||
return Element(
|
return Element(
|
||||||
'themes/categories/frames.html',
|
'themes/categories/frames.html',
|
||||||
Array(
|
Array(
|
||||||
'config' => $config,
|
'config' => $config,
|
||||||
'settings' => $settings,
|
'settings' => $settings,
|
||||||
'categories' => Categories::getCategories($config),
|
'categories' => Categories::getCategories($config),
|
||||||
|
'news' => $news,
|
||||||
'boardlist' => createBoardlist(false)
|
'boardlist' => createBoardlist(false)
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue