From b8feed6efc8e8b1419711004035a9402b8d28903 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 22 Aug 2015 03:42:07 -0700 Subject: [PATCH] CRM-16373 - Config - Remove `userFrameworkVersion` This is only very rarely used -- seems silly to look it up on every page request and to cache it config object. --- CRM/Core/Config.php | 2 -- CRM/Core/Config/Variables.php | 1 - CRM/Dedupe/Merger.php | 2 +- CRM/Utils/VersionCheck.php | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 4fe4f2d0bc..72cb65e72e 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -304,8 +304,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { $this->cleanURL = 0; } - $this->userFrameworkVersion = $this->userSystem->getVersion(); - if ($userFramework == 'Joomla') { /** @var object|null $mainframe */ global $mainframe; diff --git a/CRM/Core/Config/Variables.php b/CRM/Core/Config/Variables.php index 69b3737161..3514c11965 100644 --- a/CRM/Core/Config/Variables.php +++ b/CRM/Core/Config/Variables.php @@ -225,7 +225,6 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults { * Default user framework. This basically makes Drupal 7 the default */ public $userFramework = 'Drupal'; - public $userFrameworkVersion = 'Unknown'; public $userFrameworkUsersTableName = 'users'; public $userFrameworkClass = 'CRM_Utils_System_Drupal'; public $userHookClass = 'CRM_Utils_Hook_Drupal'; diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index e7fb33915f..a138102bd3 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -49,7 +49,7 @@ class CRM_Dedupe_Merger { $title = ts('%1 User: %2; user id: %3', array(1 => $config->userFramework, 2 => '$ufname', 3 => '$ufid')); } elseif ($config->userFramework == 'Joomla') { - $userRecordUrl = $config->userFrameworkVersion > 1.5 ? $config->userFrameworkBaseURL . "index.php?option=com_users&view=user&task=user.edit&id=" . '%ufid' : $config->userFrameworkBaseURL . "index2.php?option=com_users&view=user&task=edit&id[]=" . '%ufid'; + $userRecordUrl = $config->userSystem->getVersion() > 1.5 ? $config->userFrameworkBaseURL . "index.php?option=com_users&view=user&task=user.edit&id=" . '%ufid' : $config->userFrameworkBaseURL . "index2.php?option=com_users&view=user&task=edit&id[]=" . '%ufid'; $title = ts('%1 User: %2; user id: %3', array(1 => $config->userFramework, 2 => '$ufname', 3 => '$ufid')); } diff --git a/CRM/Utils/VersionCheck.php b/CRM/Utils/VersionCheck.php index 1928ec2e3c..c04e6310a9 100644 --- a/CRM/Utils/VersionCheck.php +++ b/CRM/Utils/VersionCheck.php @@ -288,7 +288,7 @@ class CRM_Utils_VersionCheck { 'uf' => $config->userFramework, 'lang' => $config->lcMessages, 'co' => $config->defaultContactCountry, - 'ufv' => $config->userFrameworkVersion, + 'ufv' => $config->userSystem->getVersion(), 'PHP' => phpversion(), 'MySQL' => CRM_CORE_DAO::singleValueQuery('SELECT VERSION()'), 'communityMessagesUrl' => Civi::settings()->get('communityMessagesUrl'), -- 2.25.1