diff options
author | plegall <plg@piwigo.org> | 2005-10-17 21:11:19 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-10-17 21:11:19 +0000 |
commit | 92d9dddd2bc5b3b61d7c63e2f5fd48d5b3597db3 (patch) | |
tree | 354e5d5d70c2066555943a67232066238b82cb10 | |
parent | 4832bc77062ead5b8310a6d8b8416ed54d4a43c1 (diff) |
- bug 154 fixed: "Calendar category, too precise dates". Bug came from the
bigger precision of creation_date and available_date in images
tables. Need to retrieve only the year-month-day information.
git-svn-id: http://piwigo.org/svn/trunk@896 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | doc/ChangeLog | 7 | ||||
-rw-r--r-- | include/category_calendar.inc.php | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 2d17c54dc..b53b56630 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,12 @@ 2005-10-17 Pierrick LE GALL + * bug 154 fixed: "Calendar category, too precise dates". Bug came + from the bigger precision of creation_date and available_date in + images tables. Need to retrieve only the year-month-day + information. + +2005-10-17 volcom + * new: history details by month,day 2005-10-15 Pierrick LE GALL diff --git a/include/category_calendar.inc.php b/include/category_calendar.inc.php index 2ef31d7e0..a355a9339 100644 --- a/include/category_calendar.inc.php +++ b/include/category_calendar.inc.php @@ -157,7 +157,9 @@ elseif (!isset($page['calendar_day'])) // creation of hash associating the number of the day in the month with // the number of picture for this day : $calendar_days $query = ' -SELECT DISTINCT('.$conf['calendar_datefield'].') AS day, COUNT(id) AS count +SELECT + DISTINCT DATE_FORMAT('.$conf['calendar_datefield'].', \'%Y-%m-%d\') AS day + , COUNT(id) AS count FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id '.$page['where'].' AND '.$conf['calendar_datefield'].' |