Changeset 697 for trunk/include


Ignore:
Timestamp:
Jan 16, 2005, 6:27:34 PM (20 years ago)
Author:
plg
Message:
  • calendar : use MySQL instead of PHP to find the day of the week
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_calendar.inc.php

    r675 r697  
    321321    $query = '
    322322SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
     323       , DAYOFWEEK(\''.$calendar_day.'\') AS dow
    323324  FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id
    324325  '.$page['where'].'
     
    332333
    333334    list($year,$month,$day) = explode('-', $calendar_day);
    334     $unixdate = mktime(0,0,0,$month,$day,$year);
    335     $name = $lang['day'][date("w", $unixdate)];
     335    $name = $lang['day'][$row['dow']-1];
    336336    $name.= ' '.$day;
    337337    $name.= ' ('.$nb_pics.')';
Note: See TracChangeset for help on using the changeset viewer.