static function postClone(NotificationTemplate $clone, $oldid) { global $DB; $trad = new NotificationTemplateTranslation(); $fkey = getForeignKeyFieldForTable($clone->getTable()); $crit = array($fkey => $oldid); foreach ($DB->request($trad->getTable(), $crit) as $data) { unset($data['id']); $data[$fkey] = $clone->getID(); $trad->add(Toolbox::addslashes_deep($data)); } }