Ignore:
Timestamp:
Nov 17, 2004, 12:38:34 AM (20 years ago)
Author:
plg
Message:
  • images.path column added to reduce database access
  • function mass_inserts moved from admin/remote_sites.php to admin/include/function.php
  • function mass_inserts used in admin/update.php
File:
1 edited

Legend:

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

    r593 r606  
    220220  {
    221221    $query = '
    222 SELECT file,tn_ext,'.$conf['calendar_datefield'].',storage_category_id
     222SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
    223223  FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.'
    224224  '.$page['where'].'
     
    230230    $row = mysql_fetch_array(pwg_query($query));
    231231   
    232     $thumbnail_src = get_thumbnail_src($row['file'],
    233                                        $row['storage_category_id'],
    234                                        @$row['tn_ext']);
     232    $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
    235233   
    236234    $name = $calendar_year.' ('.$nb_pics.')';
     
    267265  {
    268266    $query = '
    269 SELECT file,tn_ext,'.$conf['calendar_datefield'].',storage_category_id
     267SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
    270268  FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.'
    271269  '.$page['where'].'
     
    278276    $row = mysql_fetch_array(pwg_query($query));
    279277   
    280     $thumbnail_src = get_thumbnail_src($row['file'],
    281                                        $row['storage_category_id'],
    282                                        @$row['tn_ext']);
     278    $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
    283279   
    284280    $name = $lang['month'][$calendar_month];
     
    323319  {
    324320    $query = '
    325 SELECT file,tn_ext,'.$conf['calendar_datefield'].',storage_category_id
     321SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
    326322  FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.'
    327323  '.$page['where'].'
     
    333329    $row = mysql_fetch_array(pwg_query($query));
    334330   
    335     $thumbnail_src = get_thumbnail_src($row['file'],
    336                                        $row['storage_category_id'],
    337                                        @$row['tn_ext']);
     331    $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
    338332
    339333    list($year,$month,$day) = explode('-', $calendar_day);
     
    386380   
    387381    $query = '
    388 SELECT file,tn_ext,'.$conf['calendar_datefield'].',storage_category_id
     382SELECT file,tn_ext,'.$conf['calendar_datefield'].',path
    389383  FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.'
    390384  '.$page['where'].'
     
    402396    $row = mysql_fetch_array(pwg_query($query));
    403397   
    404     $thumbnail_src = get_thumbnail_src($row['file'],
    405                                        $row['storage_category_id'],
    406                                        @$row['tn_ext']);
     398    $thumbnail_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
    407399   
    408400    $thumbnail_title = $lang['calendar_picture_hint'].$name;
Note: See TracChangeset for help on using the changeset viewer.