From fed382d7ac42e9c589f5fac83dc877b4fc772ee2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 24 Feb 2023 17:33:14 +1300 Subject: [PATCH 1/3] Civix update on Recaptcha --- ext/recaptcha/info.xml | 3 +- ext/recaptcha/recaptcha.civix.php | 106 ++---------------------------- ext/recaptcha/recaptcha.php | 47 ------------- 3 files changed, 6 insertions(+), 150 deletions(-) diff --git a/ext/recaptcha/info.xml b/ext/recaptcha/info.xml index b6dd91f56eed..0399d41a54da 100644 --- a/ext/recaptcha/info.xml +++ b/ext/recaptcha/info.xml @@ -30,9 +30,10 @@ setting-php@1.0.0 ang-php@1.0.0 scan-classes@1.0.0 + smarty-v2@1.0.0 CRM/Recaptcha - 22.10.0 + 23.02.0 diff --git a/ext/recaptcha/recaptcha.civix.php b/ext/recaptcha/recaptcha.civix.php index 67c3221da5e7..13f0af1218f2 100644 --- a/ext/recaptcha/recaptcha.civix.php +++ b/ext/recaptcha/recaptcha.civix.php @@ -84,27 +84,17 @@ public static function findClass($suffix) { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _recaptcha_civix_civicrm_config(&$config = NULL) { +function _recaptcha_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 _recaptcha_civix_civicrm_config(&$config = NULL) { */ function _recaptcha_civix_civicrm_install() { _recaptcha_civix_civicrm_config(); - if ($upgrader = _recaptcha_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _recaptcha_civix_civicrm_postInstall() { - _recaptcha_civix_civicrm_config(); - if ($upgrader = _recaptcha_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 _recaptcha_civix_civicrm_uninstall(): void { - _recaptcha_civix_civicrm_config(); - if ($upgrader = _recaptcha_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _recaptcha_civix_civicrm_uninstall(): void { */ function _recaptcha_civix_civicrm_enable(): void { _recaptcha_civix_civicrm_config(); - if ($upgrader = _recaptcha_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 _recaptcha_civix_civicrm_disable(): void { - _recaptcha_civix_civicrm_config(); - if ($upgrader = _recaptcha_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 _recaptcha_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _recaptcha_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Recaptcha_Upgrader - */ -function _recaptcha_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Recaptcha/Upgrader.php')) { - return NULL; - } - else { - return CRM_Recaptcha_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _recaptcha_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 _recaptcha_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/recaptcha/recaptcha.php b/ext/recaptcha/recaptcha.php index 64c46c522563..e959cfb329c9 100644 --- a/ext/recaptcha/recaptcha.php +++ b/ext/recaptcha/recaptcha.php @@ -23,24 +23,6 @@ function recaptcha_civicrm_install() { _recaptcha_civix_civicrm_install(); } -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function recaptcha_civicrm_postInstall() { - _recaptcha_civix_civicrm_postInstall(); -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function recaptcha_civicrm_uninstall() { - _recaptcha_civix_civicrm_uninstall(); -} - /** * Implements hook_civicrm_enable(). * @@ -50,35 +32,6 @@ function recaptcha_civicrm_enable() { _recaptcha_civix_civicrm_enable(); } -/** - * Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - */ -function recaptcha_civicrm_disable() { - _recaptcha_civix_civicrm_disable(); -} - -/** - * Implements hook_civicrm_upgrade(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function recaptcha_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - return _recaptcha_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 recaptcha_civicrm_entityTypes(&$entityTypes) { - _recaptcha_civix_civicrm_entityTypes($entityTypes); -} - /** * Implements hook_civicrm_navigationMenu(). */ From 5dac303038f6376c8c1be6e9a4bf77a23ec733ea Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 24 Feb 2023 17:34:55 +1300 Subject: [PATCH 2/3] Civix update on legacyCustomSearches --- ext/legacycustomsearches/info.xml | 3 +- .../legacycustomsearches.civix.php | 106 +----------------- .../legacycustomsearches.php | 47 -------- 3 files changed, 6 insertions(+), 150 deletions(-) diff --git a/ext/legacycustomsearches/info.xml b/ext/legacycustomsearches/info.xml index fda07e973e6d..9cde07957d3c 100644 --- a/ext/legacycustomsearches/info.xml +++ b/ext/legacycustomsearches/info.xml @@ -31,9 +31,10 @@ menu-xml@1.0.0 mgd-php@1.0.0 + smarty-v2@1.0.0 CRM/Legacycustomsearches - 22.10.0 + 23.02.0 diff --git a/ext/legacycustomsearches/legacycustomsearches.civix.php b/ext/legacycustomsearches/legacycustomsearches.civix.php index b769c8311fc1..ffcb4eeb94c1 100644 --- a/ext/legacycustomsearches/legacycustomsearches.civix.php +++ b/ext/legacycustomsearches/legacycustomsearches.civix.php @@ -84,27 +84,17 @@ public static function findClass($suffix) { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _legacycustomsearches_civix_civicrm_config(&$config = NULL) { +function _legacycustomsearches_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 _legacycustomsearches_civix_civicrm_config(&$config = NULL) { */ function _legacycustomsearches_civix_civicrm_install() { _legacycustomsearches_civix_civicrm_config(); - if ($upgrader = _legacycustomsearches_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _legacycustomsearches_civix_civicrm_postInstall() { - _legacycustomsearches_civix_civicrm_config(); - if ($upgrader = _legacycustomsearches_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 _legacycustomsearches_civix_civicrm_uninstall(): void { - _legacycustomsearches_civix_civicrm_config(); - if ($upgrader = _legacycustomsearches_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _legacycustomsearches_civix_civicrm_uninstall(): void { */ function _legacycustomsearches_civix_civicrm_enable(): void { _legacycustomsearches_civix_civicrm_config(); - if ($upgrader = _legacycustomsearches_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 _legacycustomsearches_civix_civicrm_disable(): void { - _legacycustomsearches_civix_civicrm_config(); - if ($upgrader = _legacycustomsearches_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 _legacycustomsearches_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _legacycustomsearches_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Legacycustomsearches_Upgrader - */ -function _legacycustomsearches_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Legacycustomsearches/Upgrader.php')) { - return NULL; - } - else { - return CRM_Legacycustomsearches_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _legacycustomsearches_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, } } } - -/** - * (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 _legacycustomsearches_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/legacycustomsearches/legacycustomsearches.php b/ext/legacycustomsearches/legacycustomsearches.php index 92c9aa328adf..9d16959ce51f 100644 --- a/ext/legacycustomsearches/legacycustomsearches.php +++ b/ext/legacycustomsearches/legacycustomsearches.php @@ -23,24 +23,6 @@ function legacycustomsearches_civicrm_install() { _legacycustomsearches_civix_civicrm_install(); } -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function legacycustomsearches_civicrm_postInstall() { - _legacycustomsearches_civix_civicrm_postInstall(); -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function legacycustomsearches_civicrm_uninstall() { - _legacycustomsearches_civix_civicrm_uninstall(); -} - /** * Implements hook_civicrm_enable(). * @@ -49,32 +31,3 @@ function legacycustomsearches_civicrm_uninstall() { function legacycustomsearches_civicrm_enable() { _legacycustomsearches_civix_civicrm_enable(); } - -/** - * Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - */ -function legacycustomsearches_civicrm_disable() { - _legacycustomsearches_civix_civicrm_disable(); -} - -/** - * Implements hook_civicrm_upgrade(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function legacycustomsearches_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - return _legacycustomsearches_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 legacycustomsearches_civicrm_entityTypes(&$entityTypes) { - _legacycustomsearches_civix_civicrm_entityTypes($entityTypes); -} From fb447c2faceb1170df446bd84286099c37a36981 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 24 Feb 2023 17:40:44 +1300 Subject: [PATCH 3/3] Civix upgrade on financialAcls --- ext/financialacls/financialacls.civix.php | 106 +--------------------- ext/financialacls/financialacls.php | 47 ---------- ext/financialacls/info.xml | 2 +- 3 files changed, 5 insertions(+), 150 deletions(-) diff --git a/ext/financialacls/financialacls.civix.php b/ext/financialacls/financialacls.civix.php index 62bdbe3f8bce..d7b20fa37aca 100644 --- a/ext/financialacls/financialacls.civix.php +++ b/ext/financialacls/financialacls.civix.php @@ -84,27 +84,17 @@ public static function findClass($suffix) { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _financialacls_civix_civicrm_config(&$config = NULL) { +function _financialacls_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 _financialacls_civix_civicrm_config(&$config = NULL) { */ function _financialacls_civix_civicrm_install() { _financialacls_civix_civicrm_config(); - if ($upgrader = _financialacls_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _financialacls_civix_civicrm_postInstall() { - _financialacls_civix_civicrm_config(); - if ($upgrader = _financialacls_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 _financialacls_civix_civicrm_uninstall(): void { - _financialacls_civix_civicrm_config(); - if ($upgrader = _financialacls_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _financialacls_civix_civicrm_uninstall(): void { */ function _financialacls_civix_civicrm_enable(): void { _financialacls_civix_civicrm_config(); - if ($upgrader = _financialacls_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 _financialacls_civix_civicrm_disable(): void { - _financialacls_civix_civicrm_config(); - if ($upgrader = _financialacls_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 _financialacls_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _financialacls_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_Financialacls_Upgrader - */ -function _financialacls_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/Financialacls/Upgrader.php')) { - return NULL; - } - else { - return CRM_Financialacls_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _financialacls_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $paren } } } - -/** - * (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 _financialacls_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/financialacls/financialacls.php b/ext/financialacls/financialacls.php index af3378eb49ab..8dea84fe6fe9 100644 --- a/ext/financialacls/financialacls.php +++ b/ext/financialacls/financialacls.php @@ -34,24 +34,6 @@ function financialacls_civicrm_install() { _financialacls_civix_civicrm_install(); } -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function financialacls_civicrm_postInstall() { - _financialacls_civix_civicrm_postInstall(); -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function financialacls_civicrm_uninstall() { - _financialacls_civix_civicrm_uninstall(); -} - /** * Implements hook_civicrm_enable(). * @@ -61,35 +43,6 @@ function financialacls_civicrm_enable() { _financialacls_civix_civicrm_enable(); } -/** - * Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - */ -function financialacls_civicrm_disable() { - _financialacls_civix_civicrm_disable(); -} - -/** - * Implements hook_civicrm_upgrade(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function financialacls_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - return _financialacls_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 financialacls_civicrm_entityTypes(&$entityTypes) { - _financialacls_civix_civicrm_entityTypes($entityTypes); -} - /** * Intervene to prevent deletion, where permissions block it. * diff --git a/ext/financialacls/info.xml b/ext/financialacls/info.xml index 7ac6a78df139..54a4d3a7abc6 100644 --- a/ext/financialacls/info.xml +++ b/ext/financialacls/info.xml @@ -33,6 +33,6 @@ CRM/Financialacls - 22.10.0 + 23.02.0