CRM-13555, remove description column from default list atleast for upgrade.
authorDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Thu, 10 Oct 2013 13:26:52 +0000 (18:56 +0530)
committerDeepak Srivastava <deepak.srivastava@webaccess.co.in>
Thu, 10 Oct 2013 13:26:52 +0000 (18:56 +0530)
CRM/Core/BAO/UFGroup.php

index 6b2d42950540d6a2d4e653e16154df658b78e081..b449f454e04b61dff2e1e55b7d4644e199d9a7c5 100644 (file)
@@ -1586,7 +1586,12 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
    * @static
    */
   public static function getModuleUFGroup($moduleName = NULL, $count = 0, $skipPermission = TRUE, $op = CRM_Core_Permission::VIEW, $returnFields = NULL) {
-    $selectFields = array('id', 'title', 'created_id', 'description', 'is_active', 'is_reserved', 'group_type');
+    $selectFields = array('id', 'title', 'created_id', 'is_active', 'is_reserved', 'group_type');
+
+    if (!CRM_Core_Config::isUpgradeMode()) {
+      // CRM-13555, since description field was added later (4.4), and to avoid any problems with upgrade
+      $selectFields[] = 'description';
+    }
 
     if (!empty($returnFields)) {
       $selectFields = array_merge($returnFields, array_diff($selectFields, $returnFields));