// now we check to see if the parent ID of the current record has already been duplicated somewhere.
 $newCID = $db->GetOne('select cID from QueuePageDuplicationRelations where originalCID = ? and queue_name = ?', array($page['cParentID'], 'copy_page'));
 if ($newCID > 0) {
     $dc = Page::getByID($newCID);
 } else {
     $dc = Page::getByID($page['destination']);
 }
 if ($_POST['multilingual']) {
     // Find multilingual section of the destination
     if (Section::isMultilingualSection($dc)) {
         $ms = Section::getByID($dc->getCollectionID());
     } else {
         $ms = Section::getBySectionOfSite($dc);
     }
     // Is page already copied?
     $existingCID = Section::getRelatedCollectionIDForLocale($page['cID'], $ms->getLocale());
     if ($existingCID) {
         $nc = Page::getById($existingCID);
         if ($dc->getCollectionID() != $nc->getCollectionParentID()) {
             $nc->move($dc);
         }
     } else {
         $nc = $oc->duplicate($dc);
     }
 } else {
     $nc = $oc->duplicate($dc);
 }
 $ocID = $oc->getCollectionID();
 $ncID = $nc->getCollectionID();
 if ($oc->getCollectionPointerOriginalID() > 0) {
     $ocID = $oc->getCollectionPointerOriginalID();