From bbe46bbaf79e99d2894ec280db9a6687ec63ee83 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 1 Jan 2023 15:49:53 +1300 Subject: [PATCH] Re-run Civix - Greenwich extension --- ext/greenwich/greenwich.civix.php | 94 ++----------------------------- ext/greenwich/info.xml | 2 +- 2 files changed, 6 insertions(+), 90 deletions(-) diff --git a/ext/greenwich/greenwich.civix.php b/ext/greenwich/greenwich.civix.php index 782bb0f998..3e018c743b 100644 --- a/ext/greenwich/greenwich.civix.php +++ b/ext/greenwich/greenwich.civix.php @@ -84,27 +84,20 @@ use CRM_Greenwich_ExtensionUtil as E; * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _greenwich_civix_civicrm_config(&$config = NULL) { +function _greenwich_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]; - } + CRM_Core_Smarty::singleton()->addTemplateDir($extDir); $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 +107,7 @@ function _greenwich_civix_civicrm_config(&$config = NULL) { */ function _greenwich_civix_civicrm_install() { _greenwich_civix_civicrm_config(); - if ($upgrader = _greenwich_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _greenwich_civix_civicrm_postInstall() { - _greenwich_civix_civicrm_config(); - if ($upgrader = _greenwich_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 _greenwich_civix_civicrm_uninstall(): void { - _greenwich_civix_civicrm_config(); - if ($upgrader = _greenwich_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +117,7 @@ function _greenwich_civix_civicrm_uninstall(): void { */ function _greenwich_civix_civicrm_enable(): void { _greenwich_civix_civicrm_config(); - if ($upgrader = _greenwich_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 _greenwich_civix_civicrm_disable(): void { - _greenwich_civix_civicrm_config(); - if ($upgrader = _greenwich_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 _greenwich_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _greenwich_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Greenwich_Upgrader - */ -function _greenwich_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Greenwich/Upgrader.php')) { - return NULL; - } - else { - return CRM_Greenwich_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** diff --git a/ext/greenwich/info.xml b/ext/greenwich/info.xml index 48d68344a5..2a92ec6e10 100644 --- a/ext/greenwich/info.xml +++ b/ext/greenwich/info.xml @@ -29,6 +29,6 @@ CRM/Greenwich - 22.10.0 + 22.12.1 -- 2.25.1