function transferDropdownLocation($locID)
{
global $DB;
if ($locID > 0) {
if (isset($this->already_transfer['locations_id'][$locID])) {
return $this->already_transfer['locations_id'][$locID];
}
// else // Not already transfer
// Search init item
$location = new Location();
if ($location->getFromDB($locID)) {
$data = Toolbox::addslashes_deep($location->fields);
$input['entities_id'] = $this->to;
$input['completename'] = $data['completename'];
$newID = $location->findID($input);
if ($newID < 0) {
$newID = $location->import($input);
}
$this->addToAlreadyTransfer('locations_id', $locID, $newID);
return $newID;
}
}
return 0;
}