Changeset 17013


Ignore:
Timestamp:
07/25/12 15:22:56 (7 years ago)
Author:
mistic100
Message:

clean up table when a category is deleted

Location:
extensions/SmartAlbums
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/include/functions.inc.php

    r16924 r17013  
    538538} 
    539539 
     540/** 
     541 * clean table when categories are deleted 
     542 */ 
     543function smart_delete_categories($ids) 
     544{ 
     545  $query = ' 
     546DELETE FROM '.CATEGORY_FILTERS_TABLE.' 
     547  WHERE category_id IN('.implode(',', $ids).') 
     548;'; 
     549  pwg_query($query); 
     550} 
     551 
    540552?> 
  • extensions/SmartAlbums/main.inc.php

    r16939 r17013  
    4040    add_event_handler('tabsheet_before_select','smart_tab', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);  
    4141    add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu'); 
     42    add_event_handler('delete_categories', 'smart_delete_categories'); 
    4243  } 
    4344} 
Note: See TracChangeset for help on using the changeset viewer.