diff options
author | plegall <plg@piwigo.org> | 2004-12-04 17:42:07 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2004-12-04 17:42:07 +0000 |
commit | b3336f57d5d61eaa5d465b816962b12ea16c24ae (patch) | |
tree | fcaba01eccc65bfdec84fce49c6c4faf54a0fad1 /admin/update.php | |
parent | a383f3148cb7c9a23dadbdcd12ede4e1de274af5 (diff) |
- shows the element representing a non empty category in cat_modify
- possibility to set a random representing element for a category
- bug fixed : update_category function could not update nb_images
- bug fixed : mass_updates was inserting in the wrong table
git-svn-id: http://piwigo.org/svn/trunk@633 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/update.php')
-rw-r--r-- | admin/update.php | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/admin/update.php b/admin/update.php index 45bef3bce..aca5307ea 100644 --- a/admin/update.php +++ b/admin/update.php @@ -515,21 +515,7 @@ INSERT INTO '.IMAGE_CATEGORY_TABLE.' ;'; pwg_query($query); - // set a new representative element for this category - $query = ' -SELECT image_id - FROM '.IMAGE_CATEGORY_TABLE.' - WHERE category_id = '.$category_id.' - ORDER BY RAND() - LIMIT 0,1 -;'; - list($representative) = mysql_fetch_array(pwg_query($query)); - $query = ' -UPDATE '.CATEGORIES_TABLE.' - SET representative_picture_id = '.$representative.' - WHERE id = '.$category_id.' -;'; - pwg_query($query); + set_random_representant(array($category_id)); } return $output; } |