getObject(); $clipboard = $this->Application->RecallVar('clipboard'); $clipboard = $clipboard ? unserialize($clipboard) : Array(); $prefix = $event->getPrefixSpecial(); // 1. add $ids to mode key for prefix (make sure the unique) $this_mode_ids =& $clipboard[$prefix][$mode]; if (!is_array($this_mode_ids)) { $this_mode_ids = $ids; } else { $this_mode_ids = array_unique( array_merge($this_mode_ids, $ids) ); } // 2. remove that ids from all other modes $other_mode_ids =& $clipboard[$prefix][$mode == 'cut' ? 'copy' : 'cut']; if (!is_array($other_mode_ids)) { $other_mode_ids = Array(); } else { $other_mode_ids = array_diff($other_mode_ids, $this_mode_ids); } $this->Application->StoreVar('clipboard', serialize($clipboard)); /*// do not go up - STAY $event->SetRedirectParam('opener', 's'); $event->SetRedirectParam('pass_events', true);*/ } }