Commit f8001c38 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan

Fixed dates in recent blog entries blocktype. Fixes bug #1856.

parent 4d842597
......@@ -48,7 +48,7 @@ class PluginBlocktypeRecentposts extends PluginBlocktype {
if (!empty($configdata['artefactids'])) {
$artefactids = implode(', ', array_map('db_quote', $configdata['artefactids']));
if (!$mostrecent = get_records_sql_array(
'SELECT a.title, a.ctime, p.title AS parenttitle, a.id, a.parent
'SELECT a.title, ' . db_format_tsfield('a.ctime', 'ctime') . ', p.title AS parenttitle, a.id, a.parent
FROM {artefact} a
JOIN {artefact} p ON a.parent = p.id
WHERE a.artefacttype = \'blogpost\'
......@@ -60,7 +60,7 @@ class PluginBlocktypeRecentposts extends PluginBlocktype {
}
// format the dates
foreach ($mostrecent as &$data) {
$data->displaydate = format_date(time($data->ctime));
$data->displaydate = format_date($data->ctime);
}
$smarty = smarty_core();
$smarty->assign('mostrecent', $mostrecent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment