Index: branches/unlabeled/unlabeled-1.2.2/kernel/units/general/helpers/recursive_helper.php =================================================================== diff -u -N -r5594 -r5620 --- branches/unlabeled/unlabeled-1.2.2/kernel/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 5594) +++ branches/unlabeled/unlabeled-1.2.2/kernel/units/general/helpers/recursive_helper.php (.../recursive_helper.php) (revision 5620) @@ -73,6 +73,27 @@ WHERE ResourceId IN ('.implode(',', $resource_ids).')'; return $this->Conn->GetCol($sql); } + + // moves selected categories to destination category + function MoveCategory($category_ids, $dest_category_id) + { + if (!$category_ids) return ; + + $id_field = $this->Application->getUnitOption('c', 'IDField'); + $table_name = $this->Application->getUnitOption('c', 'TableName'); + + $sql = 'UPDATE '.$table_name.' + SET ParentId = '.$dest_category_id.' + WHERE '.$id_field.' IN ('.$category_ids.')'; + $this->Conn->Query($sql); + + $this->Application->StoreVar('PermCache_UpdateRequired', 1); + } + + function PasteCategory($category_id) + { + // mode == cut -> just update ParentId of category, items aren't changed, because category_id stays the same + } } ?> \ No newline at end of file