/** * changeParentFolderId * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function changeParentFolderId($strFileIds, $intParentFolderId) { $this->core->logger->debug('core->models->Model_Files->changeParentFolderId(' . $strFileIds . ',' . $intParentFolderId . ')'); try { $this->getFileTable(); $strTmpFileIds = trim($strFileIds, '[]'); $arrFileIds = array(); $arrFileIds = split('\\]\\[', $strTmpFileIds); $strWhere = ''; $intCounter = 0; if (count($arrFileIds) > 0) { foreach ($arrFileIds as $intFileId) { $intCounter++; if ($intCounter == 1) { $strWhere .= $this->objFileTable->getAdapter()->quoteInto('id = ?', $intFileId); } else { $strWhere .= $this->objFileTable->getAdapter()->quoteInto(' OR id = ?', $intFileId); } } $this->objFileTable->update(array('idParent' => $intParentFolderId), $strWhere); } } catch (Exception $exc) { $this->core->logger->err($exc); } }