diff --git a/modules/ModuleBuilder/parsers/StandardField.php b/modules/ModuleBuilder/parsers/StandardField.php index 3a1988a0d74..996df2a22bf 100755 --- a/modules/ModuleBuilder/parsers/StandardField.php +++ b/modules/ModuleBuilder/parsers/StandardField.php @@ -49,14 +49,14 @@ class StandardField extends DynamicField public $custom_def = array(); public $base_def = array(); public $baseField; - + protected function loadCustomDef($field) { global $beanList; - if (!empty($beanList[$this->module]) && is_file("custom/Extension/modules/{$this->module}/Ext/Vardefs/sugarfield_$field.php")) { + if (!empty($beanList[$this->module]) && is_file("custom/Extension/modules/{$this->module}/Ext/Vardefs/_override_sugarfield_$field.php")) { $bean_name = get_valid_bean_name($this->module); $dictionary = array($bean_name => array("fields" => array($field => array()))); - include("$this->base_path/sugarfield_$field.php"); + include("$this->base_path/_override_sugarfield_$field.php"); if (!empty($dictionary[$bean_name]) && isset($dictionary[$bean_name]["fields"][$field])) { $this->custom_def = $dictionary[$bean_name]["fields"][$field]; } @@ -74,7 +74,7 @@ protected function loadBaseDef($field) } } } - + /** * Adds a custom field using a field object * @@ -84,8 +84,8 @@ protected function loadBaseDef($field) public function addFieldObject(&$field) { global $dictionary, $beanList; - - + + if (empty($beanList[$this->module])) { return false; } @@ -113,7 +113,7 @@ public function addFieldObject(&$field) $this->loadCustomDef($field->name); $this->loadBaseDef($field->name); $newDef = $field->get_field_def(); - + require_once('modules/DynamicFields/FieldCases.php') ; $this->baseField = get_widget($field->type) ; foreach ($field->vardef_map as $property => $fmd_col) { @@ -122,7 +122,7 @@ public function addFieldObject(&$field) ) { continue; } - + // Bug 37043 - Avoid writing out vardef defintions that are the default value. if (isset($newDef[$property]) && ( @@ -133,7 +133,7 @@ public function addFieldObject(&$field) $this->custom_def[$property] = is_string($newDef[$property]) ? htmlspecialchars_decode($newDef[$property], ENT_QUOTES) : $newDef[$property]; } - + //Remove any orphaned entries if (isset($this->custom_def[$property]) && !isset($newDef[$property])) { unset($this->custom_def[$property]); @@ -157,11 +157,11 @@ public function addFieldObject(&$field) } } } - + if (isset($this->custom_def["duplicate_merge_dom_value"]) && !isset($this->custom_def["duplicate_merge"])) { unset($this->custom_def["duplicate_merge_dom_value"]); } - + $this->writeVardefExtension($bean_name, $field, $this->custom_def); } }