Index: branches/RC/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r9839 -r9866 --- branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 9839) +++ branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 9866) @@ -192,9 +192,9 @@ $to_delete = array(); if ($recycle_bin = $this->Application->ConfigValue('RecycleBinFolder')) { - $rb = $this->Application->recallObject('c.recycle', null, array('skip_autoload' => true)); + $rb =& $this->Application->recallObject('c.recycle', null, array('skip_autoload' => true)); $rb->Load($recycle_bin); - $object = $this->Application->recallObject($event->Prefix.'.recycleitem', null, array('skip_autoload'=>true)); + $object =& $this->Application->recallObject($event->Prefix.'.recycleitem', null, Array ('skip_autoload' => true)); foreach ($ids as $id) { $object->Load($id); if (preg_match('/^'.preg_quote($rb->GetDBField('ParentPath'),'/').'/', $object->GetDBField('ParentPath'))) { @@ -412,6 +412,7 @@ parent::SetCustomQuery($event); $object =& $event->getObject(); + /* @var $object kDBList */ // add category filter if needed if ($event->Special != 'showall') { @@ -444,6 +445,12 @@ } else { $object->addFilter('primary_filter', 'PrimaryCat = 1'); + + // if using recycle bin don't show items from there + $recycle_bin = $this->Application->ConfigValue('RecycleBinFolder'); + if ($recycle_bin) { + $object->addFilter('recyclebin_filter', TABLE_PREFIX.'CategoryItems.CategoryId <> '.$recycle_bin); + } } // add permission filter