From bc6358dfc288953942741522994f7759f4f68361 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 4 Apr 2006 23:07:40 +0000 Subject: bug fixed: I had forgotten to re-add storage_category_id in the list of fields to insert in #images. To avoid future mistakes, I extract automatically all keys of the first array to insert. git-svn-id: http://piwigo.org/svn/trunk@1122 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/site_update.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'admin/site_update.php') diff --git a/admin/site_update.php b/admin/site_update.php index 3562046ae..d6129826b 100644 --- a/admin/site_update.php +++ b/admin/site_update.php @@ -538,19 +538,14 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id // inserts all new elements mass_inserts( IMAGES_TABLE, - array( - 'id', 'file', 'date_available', 'tn_ext', 'representative_ext', - 'has_high', 'path', - ), + array_keys($inserts[0]), $inserts ); // inserts all links between new elements and their storage category mass_inserts( IMAGE_CATEGORY_TABLE, - array( - 'image_id','category_id', - ), + array_keys($insert_links[0]), $insert_links ); } -- cgit v1.2.3