From 92cb3b207bd23ac01729fb65f36bd2ede6f705fd Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 23 Feb 2023 16:44:58 -0800 Subject: [PATCH] ext/civiimport - Update to civix v23.02.0 --- ext/civiimport/civiimport.civix.php | 106 ++-------------------------- ext/civiimport/civiimport.php | 36 ---------- ext/civiimport/info.xml | 3 +- 3 files changed, 6 insertions(+), 139 deletions(-) diff --git a/ext/civiimport/civiimport.civix.php b/ext/civiimport/civiimport.civix.php index d7f10c0883..c912ca5bcf 100644 --- a/ext/civiimport/civiimport.civix.php +++ b/ext/civiimport/civiimport.civix.php @@ -84,27 +84,17 @@ use CRM_Civiimport_ExtensionUtil as E; * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _civiimport_civix_civicrm_config(&$config = NULL) { +function _civiimport_civix_civicrm_config($config = NULL) { static $configured = FALSE; if ($configured) { return; } $configured = TRUE; - $template = CRM_Core_Smarty::singleton(); - $extRoot = __DIR__ . DIRECTORY_SEPARATOR; - $extDir = $extRoot . 'templates'; - - if (is_array($template->template_dir)) { - array_unshift($template->template_dir, $extDir); - } - else { - $template->template_dir = [$extDir, $template->template_dir]; - } - $include_path = $extRoot . PATH_SEPARATOR . get_include_path(); set_include_path($include_path); + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -114,35 +104,7 @@ function _civiimport_civix_civicrm_config(&$config = NULL) { */ function _civiimport_civix_civicrm_install() { _civiimport_civix_civicrm_config(); - if ($upgrader = _civiimport_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _civiimport_civix_civicrm_postInstall() { - _civiimport_civix_civicrm_config(); - if ($upgrader = _civiimport_civix_upgrader()) { - if (is_callable([$upgrader, 'onPostInstall'])) { - $upgrader->onPostInstall(); - } - } -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function _civiimport_civix_civicrm_uninstall(): void { - _civiimport_civix_civicrm_config(); - if ($upgrader = _civiimport_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _civiimport_civix_civicrm_uninstall(): void { */ function _civiimport_civix_civicrm_enable(): void { _civiimport_civix_civicrm_config(); - if ($upgrader = _civiimport_civix_upgrader()) { - if (is_callable([$upgrader, 'onEnable'])) { - $upgrader->onEnable(); - } - } -} - -/** - * (Delegated) Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - * @return mixed - */ -function _civiimport_civix_civicrm_disable(): void { - _civiimport_civix_civicrm_config(); - if ($upgrader = _civiimport_civix_upgrader()) { - if (is_callable([$upgrader, 'onDisable'])) { - $upgrader->onDisable(); - } - } -} - -/** - * (Delegated) Implements hook_civicrm_upgrade(). - * - * @param $op string, the type of operation being performed; 'check' or 'enqueue' - * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks - * - * @return mixed - * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) - * for 'enqueue', returns void - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function _civiimport_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _civiimport_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Civiimport_Upgrader - */ -function _civiimport_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Civiimport/Upgrader.php')) { - return NULL; - } - else { - return CRM_Civiimport_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _civiimport_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $parentID } } } - -/** - * (Delegated) Implements hook_civicrm_entityTypes(). - * - * Find any *.entityType.php files, merge their content, and return. - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes - */ -function _civiimport_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/civiimport/civiimport.php b/ext/civiimport/civiimport.php index ded5220c2c..eef2432d68 100644 --- a/ext/civiimport/civiimport.php +++ b/ext/civiimport/civiimport.php @@ -31,24 +31,6 @@ function civiimport_civicrm_install() { _civiimport_civix_civicrm_install(); } -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function civiimport_civicrm_postInstall() { - _civiimport_civix_civicrm_postInstall(); -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function civiimport_civicrm_uninstall() { - _civiimport_civix_civicrm_uninstall(); -} - /** * Implements hook_civicrm_enable(). * @@ -58,24 +40,6 @@ function civiimport_civicrm_enable() { _civiimport_civix_civicrm_enable(); } -/** - * Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - */ -function civiimport_civicrm_disable() { - _civiimport_civix_civicrm_disable(); -} - -/** - * Implements hook_civicrm_upgrade(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function civiimport_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - return _civiimport_civix_civicrm_upgrade($op, $queue); -} - /** * Implements hook_civicrm_entityTypes(). * diff --git a/ext/civiimport/info.xml b/ext/civiimport/info.xml index e758359306..16292b4d17 100644 --- a/ext/civiimport/info.xml +++ b/ext/civiimport/info.xml @@ -31,7 +31,7 @@ CRM/Civiimport - 22.10.0 + 23.02.0 crmCiviimport @@ -39,5 +39,6 @@ scan-classes@1.0.0 setting-php@1.0.0 ang-php@1.0.0 + smarty-v2@1.0.0 -- 2.25.1