grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026deprecated($deprecatedMessage); } else { trigger_error($deprecatedMessage, E_USER_DEPRECATED); } self::__construct(); } public function pre_editview() { //IF we have a prospect id leads convert it to a lead if (empty($this->bean->id) && !empty($_REQUEST['return_module']) &&$_REQUEST['return_module'] == 'Prospects') { $prospect=new Prospect(); $prospect->retrieve($_REQUEST['return_id']); foreach ($prospect->field_defs as $key=>$value) { if ($key == 'id' or $key=='deleted') { continue; } if (isset($this->bean->field_defs[$key])) { $this->bean->$key = $prospect->$key; } } $_POST['is_converted']=true; } return true; } public function action_editview() { $this->view = 'edit'; return true; } protected function callLegacyCode() { if (strtolower($this->do_action) == 'convertlead') { if (file_exists('modules/Leads/ConvertLead.php') && !file_exists('custom/modules/Leads/metadata/convertdefs.php')) { if (!empty($_REQUEST['emailAddressWidget'])) { foreach ($_REQUEST as $key=>$value) { if (preg_match('/^Leads.*?emailAddress[\d]+$/', $key)) { $_REQUEST['Leads_email_widget_id'] = 0; break; } } } $this->action_default(); $this->_processed = true; } else { $this->view = 'convertlead'; $this->_processed = true; } } else { parent::callLegacyCode(); } } }