From a7f507dc68c851b1ff6e7820618546fdf9990756 Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 5 Oct 2008 22:30:35 +0000 Subject: bug 888 fixed: pwg.images.add updates the associated categories so that a category doesn't remain without representant while containing photos. git-svn-id: http://piwigo.org/svn/trunk@2672 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_functions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index c2e8c1778..57a12ac3b 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -1120,7 +1120,7 @@ SELECT { if ('auto' == $rank_on_category[$cat_id]) { - $rank_on_category[$cat_id] = $current_rank_of[$cat_id] + 1; + $rank_on_category[$cat_id] = $current_rank_of[$cat_id] + 1; } } } @@ -1144,6 +1144,8 @@ SELECT array_keys($inserts[0]), $inserts ); + + update_category($cat_ids); } } -- cgit v1.2.3