From e1e2bfc16a7978cee55607b4bdd7ba301ceb9fd0 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 23 Feb 2023 16:40:50 -0800 Subject: [PATCH] ext/authx - Update to civix v23.02.0 --- ext/authx/authx.civix.php | 106 ++------------------------------------ ext/authx/authx.php | 47 ----------------- ext/authx/info.xml | 2 +- 3 files changed, 5 insertions(+), 150 deletions(-) diff --git a/ext/authx/authx.civix.php b/ext/authx/authx.civix.php index 98e7ecc984..4e1b32a58e 100644 --- a/ext/authx/authx.civix.php +++ b/ext/authx/authx.civix.php @@ -84,27 +84,17 @@ use CRM_Authx_ExtensionUtil as E; * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _authx_civix_civicrm_config(&$config = NULL) { +function _authx_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 _authx_civix_civicrm_config(&$config = NULL) { */ function _authx_civix_civicrm_install() { _authx_civix_civicrm_config(); - if ($upgrader = _authx_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _authx_civix_civicrm_postInstall() { - _authx_civix_civicrm_config(); - if ($upgrader = _authx_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 _authx_civix_civicrm_uninstall(): void { - _authx_civix_civicrm_config(); - if ($upgrader = _authx_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _authx_civix_civicrm_uninstall(): void { */ function _authx_civix_civicrm_enable(): void { _authx_civix_civicrm_config(); - if ($upgrader = _authx_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 _authx_civix_civicrm_disable(): void { - _authx_civix_civicrm_config(); - if ($upgrader = _authx_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 _authx_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _authx_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Authx_Upgrader - */ -function _authx_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Authx/Upgrader.php')) { - return NULL; - } - else { - return CRM_Authx_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _authx_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 _authx_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/authx/authx.php b/ext/authx/authx.php index f6c50359a9..432afe1d89 100644 --- a/ext/authx/authx.php +++ b/ext/authx/authx.php @@ -100,24 +100,6 @@ function authx_civicrm_install() { } -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function authx_civicrm_postInstall() { - _authx_civix_civicrm_postInstall(); -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function authx_civicrm_uninstall() { - _authx_civix_civicrm_uninstall(); -} - /** * Implements hook_civicrm_enable(). * @@ -134,35 +116,6 @@ function authx_civicrm_enable() { } } -/** - * Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - */ -function authx_civicrm_disable() { - _authx_civix_civicrm_disable(); -} - -/** - * Implements hook_civicrm_upgrade(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function authx_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - return _authx_civix_civicrm_upgrade($op, $queue); -} - -/** - * Implements hook_civicrm_entityTypes(). - * - * Declare entity types provided by this module. - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes - */ -function authx_civicrm_entityTypes(&$entityTypes) { - _authx_civix_civicrm_entityTypes($entityTypes); -} - /** * Implements hook_civicrm_permission(). * diff --git a/ext/authx/info.xml b/ext/authx/info.xml index c052fb99b6..5407bf1584 100644 --- a/ext/authx/info.xml +++ b/ext/authx/info.xml @@ -32,6 +32,6 @@ CRM/Authx - 22.10.0 + 23.02.0 -- 2.25.1