From bf25fd083404a84f90512e3f7a2342876f8dc96b Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Mon, 10 May 2021 16:04:13 +0200 Subject: [PATCH] confattendee merge OK to replace thirdparty --- .../class/conferenceorboothattendee.class.php | 17 +++++++++++++++++ htdocs/societe/card.php | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 6418d73580b..58bd38c35d8 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -1070,6 +1070,23 @@ class ConferenceOrBoothAttendee extends CommonObject return $error; } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( + 'conferenceorboothattendee' + ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 104f45de979..20e8c06833d 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -270,7 +270,8 @@ if (empty($reshook)) { 'Product' => '/product/class/product.class.php', 'Project' => '/projet/class/project.class.php', 'Ticket' => '/ticket/class/ticket.class.php', - 'User' => '/user/class/user.class.php' + 'User' => '/user/class/user.class.php', + 'ConfOrBoothAttendee' => '/eventorganization/class/conferenceorboothattendee.class.php' ); //First, all core objects must update their tables