From 30ef1534d45b4bf14d59e78df79ee461431e208a Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Fri, 1 Jan 2010 09:12:02 -0500 Subject: Fixed 2010 calendar bug Because of a bug in the formula used to calculate the calendar color for each year, 2010 returned 0 instead of 4. --- pages/blog.php | 4 ++-- pages/viewPost.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/blog.php b/pages/blog.php index 59af93d..1024ebb 100755 --- a/pages/blog.php +++ b/pages/blog.php @@ -67,7 +67,7 @@ if (isset($_GET['post'])) } $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], - 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), + 'YEARID' => (((date('Y',strtotime($getpost3['pubDate']))-2007) % 4) + 1), 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 'DAY' => date('d',strtotime($getpost3['pubDate'])), @@ -166,7 +166,7 @@ if (isset($_GET['post'])) } $template->add_ref($curID, 'POST', array( 'ID' => $getpost3['id'], - 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), + 'YEARID' => (((date('Y',strtotime($getpost3['pubDate']))-2007) % 4) + 1), 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 'DAY' => date('d',strtotime($getpost3['pubDate'])), diff --git a/pages/viewPost.php b/pages/viewPost.php index 5885bc9..0d84df7 100644 --- a/pages/viewPost.php +++ b/pages/viewPost.php @@ -36,7 +36,7 @@ if (!isAdmin()) if ($getpost3['id'] == $_GET['id']) { $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], - 'YEARID' => ((date('Y')-2006) % 4), + 'YEARID' => (((date('Y')-2007) % 4) + 1), 'DATE' => date('F jS Y \a\\t g:i:s a'), 'MONTH' => date('M'), 'DAY' => date('d'), -- cgit 1.4.1