From 381e163c4e6706f9be227dc1d1c1d63775ec34ff Mon Sep 17 00:00:00 2001 From: salmanahmad-rt Date: Thu, 21 Nov 2024 12:54:45 +0500 Subject: [PATCH] 14054 - INTERNE - Sugarcli - adaptation to the new php version --- src/System.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/System.php b/src/System.php index 0978619..e5b58f7 100644 --- a/src/System.php +++ b/src/System.php @@ -100,6 +100,22 @@ public function repairAll($executeSql = false, $userId = '1') return $this->getMessages(); } + /** + * Rebuild relationships for sugarcrm + * @param boolean $executeSql Launch the SQL queries + * @param string $user_id User id of the admin user + * @return array Messages + */ + public function rebuildRelationship($executeSql = false, $userId = '1') + { + $this->setUpQuickRepair($userId); + include 'modules/Administration/RebuildRelationship.php'; + $repair = new \RepairAndClear(); + $repair->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), $executeSql, true, ''); + \LanguageManager::removeJSLanguageFiles(); + return $this->getMessages(); + } + /** * Rebuild only Extensions. * @param array $modules Rebuild only the specified modules