feature 2562 added: pre-cache thumbnail at upload time

git-svn-id: http://piwigo.org/svn/trunk@13030 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2012-02-05 01:09:53 +00:00
parent 5e9026e9f5
commit 74fc041634

View file

@ -334,6 +334,24 @@ SELECT
invalidate_user_cache();
// cache thumbnail
$query = '
SELECT
id,
path
FROM '.IMAGES_TABLE.'
WHERE id = '.$image_id.'
;';
$image_infos = pwg_db_fetch_assoc(pwg_query($query));
set_make_full_url();
// in case we are on uploadify.php, we have to replace the false path
$thumb_url = preg_replace('#admin/include/i#', 'i', DerivativeImage::thumb_url($image_infos));
unset_make_full_url();
fetchRemote($thumb_url, $dest);
return $image_id;
}