Ignore:
Timestamp:
Jun 27, 2012, 11:14:46 PM (12 years ago)
Author:
mistic100
Message:

an try to not delete an image subscription when a category with the same id is deleted!!!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Subscribe_to_comments/include/subscribe_to_comments.inc.php

    r16105 r16106  
    379379  $query = '
    380380DELETE FROM '.SUBSCRIBE_TO_TABLE.'
    381   WHERE element_id IN ('.implode(',', $ids).')
     381  WHERE
     382    element_id IN ('.implode(',', $ids).')
     383    AND type = "image"
    382384';
    383385  pwg_query($query);
    384386}
     387function stc_delete_categories($ids)
     388{
     389  $query = '
     390DELETE FROM '.SUBSCRIBE_TO_TABLE.'
     391  WHERE
     392    element_id IN ('.implode(',', $ids).')
     393    AND (type = "album" OR type = "album-images")
     394';
     395  pwg_query($query);
     396}
    385397
    386398
Note: See TracChangeset for help on using the changeset viewer.