Changeset 2003


Ignore:
Timestamp:
May 8, 2007, 12:00:47 AM (17 years ago)
Author:
plg
Message:

Bug 538 fixed: when managing elements of a virtual category, dissociating
some elements of the current category now instantly removes the elements of
the element list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_global.php

    r1958 r2003  
    115115    $dissociables = array_from_query($query, 'id');
    116116
    117   if (!empty($dissociables))
    118   {
    119     $query = '
     117    if (!empty($dissociables))
     118    {
     119      $query = '
    120120DELETE
    121121  FROM '.IMAGE_CATEGORY_TABLE.'
     
    123123    AND image_id IN ('.implode(',', $dissociables).')
    124124';
    125     pwg_query($query);
    126   }
     125      pwg_query($query);
     126
     127      $page['cat_elements_id'] = array_diff(
     128        $page['cat_elements_id'],
     129        $dissociables
     130      );
     131    }
    127132
    128133    update_category($_POST['dissociate']);
Note: See TracChangeset for help on using the changeset viewer.