Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run civix update on recaptcha, legacyCustomSearches, financialacls #25663

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 4 additions & 102 deletions ext/financialacls/financialacls.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand Down Expand Up @@ -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, []);
}
47 changes: 0 additions & 47 deletions ext/financialacls/financialacls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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().
*
Expand All @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion ext/financialacls/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
</mixins>
<civix>
<namespace>CRM/Financialacls</namespace>
<format>22.10.0</format>
<format>23.02.0</format>
</civix>
</extension>
3 changes: 2 additions & 1 deletion ext/legacycustomsearches/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
<mixins>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
<mixin>[email protected]</mixin>
</mixins>
<civix>
<namespace>CRM/Legacycustomsearches</namespace>
<format>22.10.0</format>
<format>23.02.0</format>
</civix>
</extension>
106 changes: 4 additions & 102 deletions ext/legacycustomsearches/legacycustomsearches.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand All @@ -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 <compatibility>, this does not currently require mixin/polyfill.php.
}

/**
Expand Down Expand Up @@ -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, []);
}
Loading