diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-04-20 22:25:40 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-04-20 22:25:40 +0000 |
commit | cd30335df7f2a4c3b15c5f2ba181dc1b0444f00a (patch) | |
tree | 08ed00c2786c92b9b7b786f668ebd4816113cca5 /admin/site_update.php | |
parent | e74943520a928e32a2dd9df1049174594abf89a9 (diff) |
merge r 2306 from trunk to branch-1_7
- merged function ordering() with update_global_rank() and also optimized the queries
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2307 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/site_update.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/admin/site_update.php b/admin/site_update.php index fc69a940b..df05e11eb 100644 --- a/admin/site_update.php +++ b/admin/site_update.php @@ -242,7 +242,7 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id // If $_POST['subcats-included'] != 1 ("Search in subcategories" is unchecked) // $db_fulldirs doesn't include any subdirectories and $fs_fulldirs does - // So $fs_fulldirs will be limited to the selected basedir + // So $fs_fulldirs will be limited to the selected basedir // (if that one is in $fs_fulldirs) if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1) { @@ -253,7 +253,7 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id // print_r( array_diff($fs_fulldirs, array_keys($db_fulldirs)) ); echo "<br>"; // die('That\'s why dirs or files synchronizations were duplicating cats.'); - $inserts = array(); + $inserts = array(); // new categories are the directories not present yet in the database foreach (array_diff($fs_fulldirs, array_keys($db_fulldirs)) as $fulldir) { @@ -670,7 +670,6 @@ if (isset($_POST['submit']) echo get_elapsed_time($start,get_moment()); echo ' -->'."\n"; $start = get_moment(); - ordering(); update_global_rank(); echo '<!-- ordering categories : '; echo get_elapsed_time($start, get_moment()); @@ -828,14 +827,14 @@ SELECT id array_push($has_high_images, $row['id']); } } - + foreach ( $files as $id=>$file ) { $data = $site_reader->get_element_metadata( $file, in_array($id, $has_high_images) ); - + if ( is_array($data) ) { $data['date_metadata_update'] = CURRENT_DATE; @@ -872,7 +871,7 @@ SELECT id if (count($datas) > 0) { // echo '<pre>', print_r($datas); echo '</pre>'; - + mass_updates( IMAGES_TABLE, // fields |