Index: branches/RC/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r9854 -r9866 --- branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 9854) +++ branches/RC/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 9866) @@ -144,6 +144,19 @@ // hide categories with status = 4 (system categories) $object->addFilter('system_categories', '%1$s.Status <> 4'); + if ($event->Special == 'showall') { + // if using recycle bin don't show categories from there + $recycle_bin = $this->Application->ConfigValue('RecycleBinFolder'); + if ($recycle_bin) { + $sql = 'SELECT TreeLeft, TreeRight + FROM '.TABLE_PREFIX.'Category + WHERE CategoryId = '.$recycle_bin; + $tree_indexes = $this->Conn->GetRow($sql); + + $object->addFilter('recyclebin_filter', '%1$s.TreeLeft < '.$tree_indexes['TreeLeft'].' OR %1$s.TreeLeft > '.$tree_indexes['TreeRight']); + } + } + if ($event->getEventParam('parent_cat_id') !== false) { $parent_cat_id = $event->getEventParam('parent_cat_id'); @@ -560,9 +573,9 @@ $ids = $this->StoreSelectedIDs($event); $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); - $cat = $event->getObject(array('skip_autoload'=>true)); + $cat =& $event->getObject(Array('skip_autoload' => true)); foreach ($ids as $id) { $cat->Load($id); if (preg_match('/^'.preg_quote($rb->GetDBField('ParentPath'),'/').'/', $cat->GetDBField('ParentPath'))) {