CRM-16373 - Config - Remove `userFrameworkVersion`
authorTim Otten <totten@civicrm.org>
Sat, 22 Aug 2015 10:42:07 +0000 (03:42 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:01 +0000 (15:45 -0700)
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
CRM/Core/Config/Variables.php
CRM/Dedupe/Merger.php
CRM/Utils/VersionCheck.php

index 4fe4f2d0bc0d58dac58cc6c529c9ea15876bd13e..72cb65e72e585495bb95a6ae1a8be348de0846cd 100644 (file)
@@ -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;
index 69b3737161be01ce50089b20239db7d7361c841a..3514c11965d297b099c2a63a923094cf72518684 100644 (file)
@@ -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';
index e7fb33915f560884df4c159d370dd49abc0e6934..a138102bd387ca29ed0b4603e7b9e9bf48ed952d 100644 (file)
@@ -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'));
     }
 
index 1928ec2e3c47884f06fa1935ea019cc0bc6190f3..c04e6310a966d2de6e2a921b48e7a940bb16a2ab 100644 (file)
@@ -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'),