Issue #44: Fix archive widget so that dates render correctly

This commit is contained in:
Morven Lewis-Everley 2012-08-14 15:40:18 +01:00
parent 8f0a81e1f5
commit 74c5545e0c

View File

@ -50,10 +50,10 @@ class ArchiveWidget extends Widget {
return $fields;
}
function Dates() {
function getDates() {
Requirements::themedCSS('archivewidget');
$results = new DataObjectSet();
$results = new ArrayList();
$container = BlogTree::current();
$ids = $container->BlogHolderIDs();
@ -86,7 +86,7 @@ class ArchiveWidget extends Widget {
$month = ($isMonthDisplay) ? $monthVal : 1;
$year = ($sqlResult['Year']) ? (int) $sqlResult['Year'] : date('Y');
$date = DBField::create('Date', array(
$date = DBField::create_field('Date', array(
'Day' => 1,
'Month' => $month,
'Year' => $year