Index: trunk/core/units/general/cat_event_handler.php =================================================================== diff -u -r2004 -r2041 --- trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 2004) +++ trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 2041) @@ -13,7 +13,7 @@ $this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids)); $this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'copy'); - $this->Application->StoreVar('clipboard', 'COPY-0.'.$object->TableName.'.ResourceId=0'); + $this->Application->StoreVar('ClipBoard', 'COPY-0.'.$object->TableName.'.ResourceId=0'); $event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY } @@ -25,7 +25,7 @@ $this->Application->StoreVar($event->getPrefixSpecial().'_clipboard', implode(',', $ids)); $this->Application->StoreVar($event->getPrefixSpecial().'_clipboard_mode', 'cut'); - $this->Application->StoreVar('clipboard', 'CUT-0.'.$object->TableName.'.ResourceId=0'); + $this->Application->StoreVar('ClipBoard', 'CUT-0.'.$object->TableName.'.ResourceId=0'); $event->redirect_params = Array('opener' => 's', 'pass_events'=>true); //do not go up - STAY } @@ -39,7 +39,7 @@ //recalling by different name, because we may get kDBList, if we recall just by prefix $object =& $this->Application->recallObject($event->getPrefixSpecial().'.item', $event->Prefix); - $this->prepareObject($object,$event); + $this->prepareObject($object, $event); if ($this->Application->RecallVar($event->getPrefixSpecial().'_clipboard_mode') == 'copy') { $ids_arr = explode(',', $ids); @@ -68,7 +68,7 @@ */ function OnCatPaste(&$event) { - $inp_clipboard = $this->Application->RecallVar('clipboard'); + $inp_clipboard = $this->Application->RecallVar('ClipBoard'); $inp_clipboard = explode('-', $inp_clipboard, 2); if($inp_clipboard[0] == 'COPY') @@ -79,7 +79,7 @@ $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); $table = $this->Application->getUnitOption($event->Prefix, 'TableName'); $ids_sql = 'SELECT '.$id_field.' FROM '.$table.' WHERE ResourceId IN (%s)'; - $resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s'; + $resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1'; $this->Application->setUnitOption($event->Prefix,'AutoLoad', false);