Ignore:
Timestamp:
Jan 23, 2010, 11:57:01 PM (14 years ago)
Author:
plg
Message:

merge r4730 from branch 2.0 to trunk

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_global.php

    r4334 r4731  
    8686      if (count($deletables) > 0)
    8787      {
    88         // what will be the categories to update? (to avoid orphan on
    89         // representative_picture_id)
    90         $query = '
    91 SELECT
    92     category_id
    93   FROM '.IMAGE_CATEGORY_TABLE.'
    94   WHERE image_id IN ('.implode(',', $deletables).')
    95 ;';
    96         $categories_to_update = array_from_query($query, 'category_id');
    97          
    9888        $physical_deletion = true;
    9989        delete_elements($deletables, $physical_deletion);
    100 
    101         update_category($categories_to_update);
    10290
    10391        array_push(
Note: See TracChangeset for help on using the changeset viewer.