Index: cat_event_handler.php =================================================================== --- cat_event_handler.php (revision 13936) +++ cat_event_handler.php (working copy) @@ -989,6 +989,22 @@ $this->processAdditionalCategories($object, 'update'); } } + + $recycle_bin = $this->Application->ConfigValue('RecycleBinFolder'); + + if ($recycle_bin) { + $object =& $event->getObject(); + /* @var $object kCatDBItem */ + + $sql = 'SELECT CategoryId + FROM ' . $this->Application->getUnitOption('ci', 'TableName') . ' + WHERE ItemResourceId = ' . $object->GetDBField('ResourceId') . ' AND PrimaryCat = 1'; + $primary_category = $this->Conn->GetOne($sql); + + if ($primary_category == $recycle_bin) { + $event->CallSubEvent('OnAfterItemDelete'); + } + } } /**