From: jitendrapurohit Date: Mon, 25 May 2015 12:49:09 +0000 (+0530) Subject: CRM-16551 Notice on demo site re custom fields X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=13cf686d2b7a944414d08d44e094b57e0ae89213;p=civicrm-core.git CRM-16551 Notice on demo site re custom fields --- diff --git a/CRM/Custom/Page/Group.php b/CRM/Custom/Page/Group.php index 88787d75fa..6c13b7ebf0 100644 --- a/CRM/Custom/Page/Group.php +++ b/CRM/Custom/Page/Group.php @@ -206,9 +206,12 @@ class CRM_Custom_Page_Group extends CRM_Core_Page { $dao->orderBy('weight, title'); $dao->find(); + $customGroupExtends = CRM_Core_SelectValues::customGroupExtends(); + $customGroupStyle = CRM_Core_SelectValues::customGroupStyle(); while ($dao->fetch()) { - $customGroup[$dao->id] = array(); - CRM_Core_DAO::storeValues($dao, $customGroup[$dao->id]); + $id = $dao->id; + $customGroup[$id] = array(); + CRM_Core_DAO::storeValues($dao, $customGroup[$id]); // form all action links $action = array_sum(array_keys($this->actionLinks())); @@ -219,22 +222,19 @@ class CRM_Custom_Page_Group extends CRM_Core_Page { else { $action -= CRM_Core_Action::DISABLE; } - $customGroup[$dao->id]['order'] = $customGroup[$dao->id]['weight']; - $customGroup[$dao->id]['action'] = CRM_Core_Action::formLink(self::actionLinks(), $action, - array('id' => $dao->id), + $customGroup[$id]['order'] = $customGroup[$id]['weight']; + $customGroup[$id]['action'] = CRM_Core_Action::formLink(self::actionLinks(), $action, + array('id' => $id), ts('more'), FALSE, 'customGroup.row.actions', 'CustomGroup', - $dao->id + $id ); - } - - $customGroupExtends = CRM_Core_SelectValues::customGroupExtends(); - $customGroupStyle = CRM_Core_SelectValues::customGroupStyle(); - foreach ($customGroup as $key => $array) { - $customGroup[$key]['style_display'] = $customGroupStyle[$customGroup[$key]['style']]; - $customGroup[$key]['extends_display'] = $customGroupExtends[$customGroup[$key]['extends']]; + if (!empty($customGroup[$id]['style'])) { + $customGroup[$id]['style_display'] = $customGroupStyle[$customGroup[$id]['style']]; + } + $customGroup[$id]['extends_display'] = $customGroupExtends[$customGroup[$id]['extends']]; } //fix for Displaying subTypes