mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-10-30 21:52:00 +01:00
- calendar : use MySQL instead of PHP to find the day of the week
git-svn-id: http://piwigo.org/svn/trunk@697 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
1 parent
908a78d2b4
commit
b9f05888cb
1 file changed
+2
-2
@@ -320,6 +320,7 @@ elseif (!isset($page['calendar_day']))
|
||||
{
|
||||
$query = '
|
||||
SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
|
||||
, DAYOFWEEK(\''.$calendar_day.'\') AS dow
|
||||
FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id
|
||||
'.$page['where'].'
|
||||
AND '.$conf['calendar_datefield'].' = \''.$calendar_day.'\'
|
||||
@@ -331,8 +332,7 @@ SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
|
||||
$thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
|
||||
|
||||
list($year,$month,$day) = explode('-', $calendar_day);
|
||||
$unixdate = mktime(0,0,0,$month,$day,$year);
|
||||
$name = $lang['day'][date("w", $unixdate)];
|
||||
$name = $lang['day'][$row['dow']-1];
|
||||
$name.= ' '.$day;
|
||||
$name.= ' ('.$nb_pics.')';
|
||||
|
||||
|
||||
Reference in new issue
Block a user