- 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


git-svn-id: http://piwigo.org/svn/trunk@606 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2004-11-16 23:38:34 +00:00
parent 973e0f8806
commit 1bf3753f14
15 changed files with 103 additions and 170 deletions
+2 -4
View File
@@ -140,7 +140,7 @@ while ($row = mysql_fetch_array($result))
// for each picture, getting informations for displaying thumbnail and
// link to the full size picture
$query = '
SELECT name,file,storage_category_id as cat_id,tn_ext
SELECT name,file,storage_category_id as cat_id,tn_ext,path
FROM '.IMAGES_TABLE.'
WHERE id = '.$row['image_id'].'
;';
@@ -166,9 +166,7 @@ SELECT name,file,storage_category_id as cat_id,tn_ext
}
$name.= ' [ '.$subrow['file'].' ]';
// source of the thumbnail picture
$thumbnail_src = get_thumbnail_src($subrow['file'],
$subrow['cat_id'],
@$subrow['tn_ext']);
$thumbnail_src = get_thumbnail_src($subrow['path'], @$subrow['tn_ext']);
// link to the full size picture
$url = PHPWG_ROOT_PATH.'picture.php?cat='.$category_id;
$url.= '&image_id='.$row['image_id'];