mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Issue #44: Fix archive widget so that dates render correctly
This commit is contained in:
parent
8f0a81e1f5
commit
74c5545e0c
@ -50,10 +50,10 @@ class ArchiveWidget extends Widget {
|
|||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Dates() {
|
function getDates() {
|
||||||
Requirements::themedCSS('archivewidget');
|
Requirements::themedCSS('archivewidget');
|
||||||
|
|
||||||
$results = new DataObjectSet();
|
$results = new ArrayList();
|
||||||
$container = BlogTree::current();
|
$container = BlogTree::current();
|
||||||
$ids = $container->BlogHolderIDs();
|
$ids = $container->BlogHolderIDs();
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ class ArchiveWidget extends Widget {
|
|||||||
$month = ($isMonthDisplay) ? $monthVal : 1;
|
$month = ($isMonthDisplay) ? $monthVal : 1;
|
||||||
$year = ($sqlResult['Year']) ? (int) $sqlResult['Year'] : date('Y');
|
$year = ($sqlResult['Year']) ? (int) $sqlResult['Year'] : date('Y');
|
||||||
|
|
||||||
$date = DBField::create('Date', array(
|
$date = DBField::create_field('Date', array(
|
||||||
'Day' => 1,
|
'Day' => 1,
|
||||||
'Month' => $month,
|
'Month' => $month,
|
||||||
'Year' => $year
|
'Year' => $year
|
||||||
|
Loading…
Reference in New Issue
Block a user