Skip to content
Snippets Groups Projects
Commit 3c11beff authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #1982 from mgbdev/CRM-10225

Crm 10225 related fix 
parents d0cb7e8c fea8fefd
No related branches found
No related tags found
No related merge requests found
......@@ -153,7 +153,11 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
$defaults['options_per_line'] = 1;
$defaults['is_display_amounts'] = 1;
}
$eventComponentId = CRM_Core_Component::getComponentID('CiviEvent');
$enabledComponents = CRM_Core_Component::getEnabledComponents();
$eventComponentId = NULL;
if (array_key_exists('CiviEvent',$enabledComponents)) {
$eventComponentId = CRM_Core_Component::getComponentID('CiviEvent');
}
if (isset($this->_sid) && $this->_action == CRM_Core_Action::ADD) {
$financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_sid, 'financial_type_id');
......@@ -197,9 +201,15 @@ class CRM_Price_Form_Field extends CRM_Core_Form {
if (count($financialType)) {
$this->assign('financialType', $financialType);
}
$enabledComponents = CRM_Core_Component::getEnabledComponents();
$eventComponentId = $memberComponentId = NULL;
if (array_key_exists('CiviEvent',$enabledComponents)) {
$eventComponentId = CRM_Core_Component::getComponentID('CiviEvent');
}
if (array_key_exists('CiviMember',$enabledComponents)) {
$memberComponentId = CRM_Core_Component::getComponentID('CiviMember');
}
$eventComponentId = CRM_Core_Component::getComponentID('CiviEvent');
$memberComponentId = CRM_Core_Component::getComponentID('CiviMember');
$attributes = CRM_Core_DAO::getAttribute('CRM_Price_DAO_PriceFieldValue');
$this->add('select', 'financial_type_id',
......
......@@ -276,8 +276,13 @@ class CRM_Price_Page_Set extends CRM_Core_Page {
CRM_Utils_Array::value('extends', $priceSet[$dao->id])
);
$extends = array();
foreach ($compIds as $compId) $extends[] = $comps[CRM_Core_Component::getComponentName($compId)];
$priceSet[$dao->id]['extends'] = implode(', ', $extends);
//CRM-10225
foreach ($compIds as $compId) {
if (!empty($comps[CRM_Core_Component::getComponentName($compId)])) {
$extends[] = $comps[CRM_Core_Component::getComponentName($compId)];
}
}
$priceSet[$dao->id]['extends'] = implode(', ', $extends);
// form all action links
$action = array_sum(array_keys($this->actionLinks()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment