Changeset 606 for trunk/picture.php


Ignore:
Timestamp:
Nov 17, 2004, 12:38:34 AM (19 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/picture.php

    r605 r606  
    143143  }
    144144 
    145   if ( !isset($array_cat_directories[$row['storage_category_id']]))
    146   {
    147     $array_cat_directories[$row['storage_category_id']] =
    148       get_complete_dir( $row['storage_category_id'] );
    149   }
    150   $cat_directory = $array_cat_directories[$row['storage_category_id']];
     145  $cat_directory = dirname($row['path']);
    151146  $file_wo_ext = get_filename_wo_extension($row['file']);
    152147
     
    166161  if ($picture[$i]['is_picture'])
    167162  {
    168     $picture[$i]['src'] = $cat_directory.$row['file'];
     163    $picture[$i]['src'] = $row['path'];
    169164    // if we are working on the "current" element, we search if there is a
    170165    // high quality picture
     
    182177  if (!$picture[$i]['is_picture'])
    183178  {
    184     $picture[$i]['download'] = $cat_directory.$row['file'];
    185   }
    186 
    187   $picture[$i]['thumbnail'] = get_thumbnail_src($row['file'],
    188                                                 $row['storage_category_id'],
    189                                                 @$row['tn_ext']);
     179    $picture[$i]['download'] = $row['path'];
     180  }
     181
     182  $picture[$i]['thumbnail'] = get_thumbnail_src($row['path'], @$row['tn_ext']);
    190183 
    191184  if ( !empty( $row['name'] ) )
Note: See TracChangeset for help on using the changeset viewer.