aboutsummaryrefslogtreecommitdiffstats
path: root/admin/element_set_global.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-01-23 22:56:11 +0000
committerplegall <plg@piwigo.org>2010-01-23 22:56:11 +0000
commitbec299bc363f09c006eea80fe8cd25bddf0d638d (patch)
tree8214b36466017bdcfd9f7602ab86c204e1e24e5d /admin/element_set_global.php
parentac0929fe84f8fdace0707192b3e7a5c36de53475 (diff)
bug 1396: when a photo was deleted, the code to avoid orphans as category
representative was 1) wrong (because a photo doesn't have to belong to a category to represent it) 2) at the wrong place. git-svn-id: http://piwigo.org/svn/branches/2.0@4730 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/element_set_global.php')
-rw-r--r--admin/element_set_global.php12
1 files changed, 0 insertions, 12 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index 05f4158b7..7bc8afe50 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -91,21 +91,9 @@ SELECT
if (count($deletables) > 0)
{
- // what will be the categories to update? (to avoid orphan on
- // representative_picture_id)
- $query = '
-SELECT
- category_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE image_id IN ('.implode(',', $deletables).')
-;';
- $categories_to_update = array_from_query($query, 'category_id');
-
$physical_deletion = true;
delete_elements($deletables, $physical_deletion);
- update_category($categories_to_update);
-
array_push(
$page['infos'],
sprintf(