summaryrefslogtreecommitdiff
path: root/templates/themes/recent/theme.php
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-04-25 00:09:35 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-04-25 00:09:35 +0900
commitbea631d3f5e7d533185187e284cd392da73de325 (patch)
tree53bf1b5863d57b067ae535dfc988e97e25b0979f /templates/themes/recent/theme.php
parent501f2694ffc48968abbf75309522af4171805935 (diff)
Changes to add recent news to the Recent Posts Theme for the front page
Diffstat (limited to 'templates/themes/recent/theme.php')
-rw-r--r--templates/themes/recent/theme.php6
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,
));
}
};