aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_recent_cats.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2004-11-16 23:38:34 +0000
committerplegall <plg@piwigo.org>2004-11-16 23:38:34 +0000
commit1bf3753f1449eedc4bd39c79b6ca17dc4f396e76 (patch)
tree7d7443b94356cd18a038b3f104f6e21a35d01279 /include/category_recent_cats.inc.php
parent973e0f8806cd6d569c01977ad5112e16cc7a7f6f (diff)
- 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
Diffstat (limited to 'include/category_recent_cats.inc.php')
-rw-r--r--include/category_recent_cats.inc.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/category_recent_cats.inc.php b/include/category_recent_cats.inc.php
index 7d4de1c57..3da82c1f8 100644
--- a/include/category_recent_cats.inc.php
+++ b/include/category_recent_cats.inc.php
@@ -66,7 +66,7 @@ while ( $row = mysql_fetch_array( $result ) )
$name = get_cat_display_name($cat_infos['name'],'<br />','',false);
$query = '
-SELECT id,file,tn_ext,storage_category_id
+SELECT path,file,tn_ext
FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.'
WHERE category_id = '.$row['category_id'].'
AND date_available > SUBDATE(CURRENT_DATE
@@ -75,11 +75,9 @@ SELECT id,file,tn_ext,storage_category_id
ORDER BY RAND()
LIMIT 0,1
;';
- $subrow = mysql_fetch_array( pwg_query( $query ) );
+ $subrow = mysql_fetch_array(pwg_query($query));
- $thumbnail_src = get_thumbnail_src($subrow['file'],
- $subrow['storage_category_id'],
- @$subrow['tn_ext']);
+ $thumbnail_src = get_thumbnail_src($subrow['path'], @$subrow['tn_ext']);
$url_link = PHPWG_ROOT_PATH.'category.php?cat='.$row['category_id'];