/** * Move all selected records */ public function copyAll() { // GID tells about paste into a group if ($this->Input->get('gid') != '') { $arrClipboard = $this->Session->get('CLIPBOARD'); if (isset($arrClipboard[$this->strTable]) && is_array($arrClipboard[$this->strTable]['id'])) { $arrIds = array(); foreach ($arrClipboard[$this->strTable]['id'] as $id) { $this->intId = $id; $arrIds[] = $this->copy(true); } $this->Database->query("UPDATE {$this->strTable} SET gid=" . (int) $this->Input->get('gid') . " WHERE id IN (" . implode(',', $arrIds) . ")"); } $this->redirect($this->getReferer()); } return parent::copyAll(); }