From 6aee600cec3e3df624feba408bfa96f13960bacf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 18 Feb 2022 13:52:06 -0500 Subject: [PATCH] Remove old require_once statements made obsolete by autoloader --- CRM/Core/Component.php | 1 - CRM/Core/DAO.php | 1 - CRM/Core/Page/Basic.php | 2 -- CRM/Export/BAO/Export.php | 1 - 4 files changed, 5 deletions(-) diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index 9413e23387..10d4e9c9bc 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -414,7 +414,6 @@ class CRM_Core_Component { $infoFile = $crmFolderDir . "/{$subDir}/" . self::COMPONENT_INFO_CLASS . '.php'; if (file_exists($infoFile)) { $infoClass = 'CRM_' . $subDir . '_' . self::COMPONENT_INFO_CLASS; - require_once str_replace('_', DIRECTORY_SEPARATOR, $infoClass) . '.php'; $infoObject = new $infoClass(NULL, NULL, NULL); $components[$infoObject->info['name']] = $infoObject; unset($infoObject); diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index c5f2d7ffb5..6cb84d25e2 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -2129,7 +2129,6 @@ SELECT contact_id * an object of type referenced by daoName */ public static function commonRetrieveAll($daoName, $fieldIdName, $fieldId, &$details, $returnProperities = NULL) { - require_once str_replace('_', DIRECTORY_SEPARATOR, $daoName) . ".php"; $object = new $daoName(); $object->$fieldIdName = $fieldId; diff --git a/CRM/Core/Page/Basic.php b/CRM/Core/Page/Basic.php index d87be66ddb..32f912c964 100644 --- a/CRM/Core/Page/Basic.php +++ b/CRM/Core/Page/Basic.php @@ -166,8 +166,6 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { // get 'id' if present $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); - require_once str_replace('_', DIRECTORY_SEPARATOR, $this->getBAOName()) . ".php"; - if ($id) { if (!$this->checkPermission($id, NULL)) { CRM_Core_Error::statusBounce(ts('You do not have permission to make changes to the record')); diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 3f0f57a3fc..c713eb8ade 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -247,7 +247,6 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c if ($parserClass[0] == 'CRM' && count($parserClass) >= 3 ) { - require_once str_replace('_', DIRECTORY_SEPARATOR, $parserName) . ".php"; // ensure the functions exists if (method_exists($parserName, 'errorFileName') && method_exists($parserName, 'saveFileName') -- 2.25.1