Index: branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php =================================================================== diff -u -r5620 -r5644 --- branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5620) +++ branches/unlabeled/unlabeled-1.64.2/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 5644) @@ -55,17 +55,19 @@ */ function OnCopy(&$event) { + $this->Application->RemoveVar('clipboard'); $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); $clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event)); } - + /** * Add selected items to clipboard with mode = CUT * * @param kEvent $event */ function OnCut(&$event) { + $this->Application->RemoveVar('clipboard'); $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); $clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event)); } @@ -80,9 +82,9 @@ if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { return; } - + $clipboard_data = $event->getEventParam('clipboard_data'); - + if (!$clipboard_data['cut'] && !$clipboard_data['copy']) { return false; } @@ -91,7 +93,7 @@ $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); $temp->CloneItems($event->Prefix, $event->Special, $clipboard_data['copy']); } - + if ($clipboard_data['cut']) { $object =& $this->Application->recallObject($event->getPrefixSpecial().'.item', $event->Prefix, Array('skip_autoload' => true)); @@ -476,7 +478,7 @@ return; } $click_field = $property_map['ClickField']; - + $object =& $event->getObject(); if( $this->Application->IsAdmin() && ($this->Application->GetVar($click_field.'_original') !== false) && floor($this->Application->GetVar($click_field.'_original')) != $object->GetDBField($click_field) ) @@ -1674,16 +1676,16 @@ function cacheItemOwner(&$event, $id_field, $cached_field) { $object =& $event->getObject(); - + $user_id = $object->GetDBField($id_field); $options = $object->GetFieldOptions($id_field); if (isset($options['options'][$user_id])) { $object->SetDBField($cached_field, $options['options'][$user_id]); } else { $id_field = $this->Application->getUnitOption('u', 'IDField'); - $table_name = $this->Application->getUnitOption('u', 'TableName'); - + $table_name = $this->Application->getUnitOption('u', 'TableName'); + $sql = 'SELECT Login FROM '.$table_name.' WHERE '.$id_field.' = '.$user_id;