From 5578cd6ca1e71432de3f22bd2b9a41ed69dc9570 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 23 Jun 2023 15:47:19 -0700 Subject: [PATCH] Standalone - Rerun 'civix upgrade'. Drop backports. --- .../mixin/entity-types-php@1.0.0.mixin.php | 36 ------------- .../mixin/smarty-v2@1.0.1.mixin.php | 51 ------------------- 2 files changed, 87 deletions(-) delete mode 100644 ext/standaloneusers/mixin/entity-types-php@1.0.0.mixin.php delete mode 100644 ext/standaloneusers/mixin/smarty-v2@1.0.1.mixin.php diff --git a/ext/standaloneusers/mixin/entity-types-php@1.0.0.mixin.php b/ext/standaloneusers/mixin/entity-types-php@1.0.0.mixin.php deleted file mode 100644 index 8ec4203dfe..0000000000 --- a/ext/standaloneusers/mixin/entity-types-php@1.0.0.mixin.php +++ /dev/null @@ -1,36 +0,0 @@ -addListener('hook_civicrm_entityTypes', function ($e) use ($mixInfo) { - // When deactivating on a polyfill/pre-mixin system, listeners may not cleanup automatically. - if (!$mixInfo->isActive() || !is_dir($mixInfo->getPath('xml/schema/CRM'))) { - return; - } - - $files = (array) glob($mixInfo->getPath('xml/schema/CRM/*/*.entityType.php')); - foreach ($files as $file) { - $entities = include $file; - foreach ($entities as $entity) { - $e->entityTypes[$entity['class']] = $entity; - } - } - }); - -}; diff --git a/ext/standaloneusers/mixin/smarty-v2@1.0.1.mixin.php b/ext/standaloneusers/mixin/smarty-v2@1.0.1.mixin.php deleted file mode 100644 index 5972dbdc57..0000000000 --- a/ext/standaloneusers/mixin/smarty-v2@1.0.1.mixin.php +++ /dev/null @@ -1,51 +0,0 @@ -getPath('templates'); - if (!file_exists($dir)) { - return; - } - - $register = function() use ($dir) { - // This implementation has a theoretical edge-case bug on older versions of CiviCRM where a template could - // be registered more than once. - CRM_Core_Smarty::singleton()->addTemplateDir($dir); - }; - - // Let's figure out what environment we're in -- so that we know the best way to call $register(). - - if (!empty($GLOBALS['_CIVIX_MIXIN_POLYFILL'])) { - // Polyfill Loader (v<=5.45): We're already in the middle of firing `hook_config`. - if ($mixInfo->isActive()) { - $register(); - } - return; - } - - if (CRM_Extension_System::singleton()->getManager()->extensionIsBeingInstalledOrEnabled($mixInfo->longName)) { - // New Install, Standard Loader: The extension has just been enabled, and we're now setting it up. - // System has already booted. New templates may be needed for upcoming installation steps. - $register(); - return; - } - - // Typical Pageview, Standard Loader: Defer the actual registration for a moment -- to ensure that Smarty is online. - \Civi::dispatcher()->addListener('hook_civicrm_config', function() use ($mixInfo, $register) { - if ($mixInfo->isActive()) { - $register(); - } - }); - -}; -- 2.25.1