From 23fcaf6b6493c8d479a30201ea9fff3e5cffe4ff Mon Sep 17 00:00:00 2001 From: rvelices Date: Sun, 20 Apr 2008 22:20:20 +0000 Subject: - merged function ordering() with update_global_rank() and also optimized the queries git-svn-id: http://piwigo.org/svn/trunk@2306 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/site_update.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'admin/site_update.php') diff --git a/admin/site_update.php b/admin/site_update.php index 934366808..8dcf601d2 100644 --- a/admin/site_update.php +++ b/admin/site_update.php @@ -446,9 +446,9 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id continue; } - if ( isset( $conf['flip_picture_ext'][get_extension($filename)] ) + if ( isset( $conf['flip_picture_ext'][get_extension($filename)] ) and !isset($fs[$path]['tn_ext']) ) - { // For a picture thumbnail is mandatory and for non picture element, + { // For a picture thumbnail is mandatory and for non picture element, // thumbnail and representative are optionnal array_push( $errors, @@ -470,7 +470,7 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id : null, 'storage_category_id' => $db_fulldirs[$dirname], ); - + if ( $_POST['privacy_level']!=0 ) { $insert['level'] = $_POST['privacy_level']; @@ -621,7 +621,6 @@ if (isset($_POST['submit']) . get_elapsed_time($start,get_moment()) . ' -->' ); $start = get_moment(); - ordering(); update_global_rank(); $template->append('footer_elements', '