- 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
This commit is contained in:
rvelices
2008-04-20 22:20:20 +00:00
parent 57b03a7218
commit 23fcaf6b64
5 changed files with 58 additions and 97 deletions
+3 -4
View File
@@ -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', '<!-- ordering categories : '
. get_elapsed_time($start, get_moment())