X-Git-Url: https://git.bts.cx/garden.git/blobdiff_plain/e5a40d56a7e31209bae79ffddeda5f70749f6d2f..773b428bc341a04fd541da306f0f26aafb18c1ab:/garden.php?ds=sidebyside diff --git a/garden.php b/garden.php index 6035ee8..8c01277 100644 --- a/garden.php +++ b/garden.php @@ -529,7 +529,14 @@ function garden_generate_atom($output_directory, $output_filename, $content_item continue; } - $recent_items[$item->date] = $item; + $date_key = $item->date; + + // Hack to support sorting without missing entries + while (isset($recent_items[$date_key])) { + $date_key += 1; + } + + $recent_items[$date_key] = $item; } // Sort by date...