mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-03-15 05:44:49 +00:00
Replace explicit bean instantiations in files 381 - 390
- File: '... /modules/Opportunities/views/view.detail.php' - Replaced 1 occurrence(s) of 'new Currency()' - File: '... /modules/Opportunities/OpportunityFormBase.php' - Replaced 1 occurrence(s) of 'new Lead()' - Replaced 5 occurrence(s) of 'new Opportunity()' - File: '... /modules/AOK_Knowledge_Base_Categories/Dashlets/AOK_Knowledge_Base_CategoriesDashlet/AOK_Knowledge_Base_CategoriesDashlet.php' - Replaced 1 occurrence(s) of 'new AOK_Knowledge_Base_Categories()' - File: '... /modules/AOS_Line_Item_Groups/AOS_Line_Item_Groups.php' - Replaced 1 occurrence(s) of 'new AOS_Products_Quotes()' - Replaced 1 occurrence(s) of 'new AOS_Line_Item_Groups()' - File: '... /modules/Bugs/Dashlets/MyBugsDashlet/MyBugsDashlet.php' - Replaced 1 occurrence(s) of 'new Bug()' - Replaced 1 occurrence(s) of 'new Release()' - File: '... /modules/Bugs/BugsQuickCreate.php' - Replaced 1 occurrence(s) of 'new Bug()' - File: '... /modules/Bugs/views/view.edit.php' - Replaced 1 occurrence(s) of 'new Administration()' - File: '... /modules/Bugs/views/view.detail.php' - Replaced 1 occurrence(s) of 'new Administration()' - File: '... /modules/Bugs/Bug.php' - Replaced 1 occurrence(s) of 'new Release()' - File: '... /modules/EmailMarketing/Delete.php' - Replaced 1 occurrence(s) of 'new EmailMarketing()'
This commit is contained in:
parent
11199be657
commit
a3009b0fe1
10 changed files with 17 additions and 17 deletions
modules
AOK_Knowledge_Base_Categories/Dashlets/AOK_Knowledge_Base_CategoriesDashlet
AOS_Line_Item_Groups
Bugs
EmailMarketing
Opportunities
|
@ -68,7 +68,7 @@ class AOK_Knowledge_Base_CategoriesDashlet extends DashletGeneric
|
|||
$this->searchFields = $dashletData['AOK_Knowledge_Base_CategoriesDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['AOK_Knowledge_Base_CategoriesDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new AOK_Knowledge_Base_Categories();
|
||||
$this->seedBean = BeanFactory::newBean('AOK_Knowledge_Base_Categories');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -78,7 +78,7 @@ class AOS_Line_Item_Groups extends AOS_Line_Item_Groups_sugar
|
|||
if ($postData == 1) {
|
||||
$this->mark_deleted($post_data[$key . 'id'][$i]);
|
||||
} else {
|
||||
$product_quote_group = new AOS_Line_Item_Groups();
|
||||
$product_quote_group = BeanFactory::newBean('AOS_Line_Item_Groups');
|
||||
foreach ($this->field_defs as $field_def) {
|
||||
$field_name = $field_def['name'];
|
||||
if (isset($post_data[$key . $field_name][$i])) {
|
||||
|
@ -108,7 +108,7 @@ class AOS_Line_Item_Groups extends AOS_Line_Item_Groups_sugar
|
|||
}
|
||||
|
||||
require_once('modules/AOS_Products_Quotes/AOS_Products_Quotes.php');
|
||||
$productQuote = new AOS_Products_Quotes();
|
||||
$productQuote = BeanFactory::newBean('AOS_Products_Quotes');
|
||||
$productQuote->save_lines($post_data, $parent, $groups, 'product_');
|
||||
$productQuote->save_lines($post_data, $parent, $groups, 'service_');
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@ function getReleaseDropDown()
|
|||
{
|
||||
static $releases = null;
|
||||
if (!$releases) {
|
||||
$seedRelease = new Release();
|
||||
$seedRelease = BeanFactory::newBean('Releases');
|
||||
$releases = $seedRelease->get_releases(true, "Active");
|
||||
}
|
||||
return $releases;
|
||||
|
|
|
@ -71,7 +71,7 @@ class BugsQuickCreate extends QuickCreate
|
|||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('bugsQuickCreate');
|
||||
|
||||
$focus = new Bug();
|
||||
$focus = BeanFactory::newBean('Bugs');
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class MyBugsDashlet extends DashletGeneric
|
|||
if (empty($def['title'])) {
|
||||
$this->title = translate('LBL_LIST_MY_BUGS', 'Bugs');
|
||||
}
|
||||
$this->seedBean = new Bug();
|
||||
$this->seedBean = BeanFactory::newBean('Bugs');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@ class MyBugsDashlet extends DashletGeneric
|
|||
{
|
||||
$this->processDisplayOptions();
|
||||
|
||||
$seedRelease = new Release();
|
||||
$seedRelease = BeanFactory::newBean('Releases');
|
||||
|
||||
if (!empty($this->searchFields['fixed_in_release'])) {
|
||||
$this->currentSearchFields['fixed_in_release']['input'] = '<select multiple="true" size="3" name="fixed_in_release[]">'
|
||||
|
|
|
@ -68,7 +68,7 @@ class BugsViewDetail extends ViewDetail
|
|||
|
||||
public function display()
|
||||
{
|
||||
$admin = new Administration();
|
||||
$admin = BeanFactory::newBean('Administration');
|
||||
$admin->retrieveSettings();
|
||||
if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
|
||||
$this->ss->assign("PORTAL_ENABLED", true);
|
||||
|
|
|
@ -67,7 +67,7 @@ class BugsViewEdit extends ViewEdit
|
|||
|
||||
public function display()
|
||||
{
|
||||
$admin = new Administration();
|
||||
$admin = BeanFactory::newBean('Administration');
|
||||
$admin->retrieveSettings();
|
||||
if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
|
||||
$this->ev->ss->assign("PORTAL_ENABLED", true);
|
||||
|
|
|
@ -47,7 +47,7 @@ if (!defined('sugarEntry') || !sugarEntry) {
|
|||
|
||||
|
||||
|
||||
$focus = new EmailMarketing();
|
||||
$focus = BeanFactory::newBean('EmailMarketing');
|
||||
|
||||
if (!isset($_REQUEST['record'])) {
|
||||
sugar_die("A record number must be specified to delete the marketing campaign.");
|
||||
|
|
|
@ -50,7 +50,7 @@ class OpportunityFormBase
|
|||
{
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Opportunity();
|
||||
$focus = BeanFactory::newBean('Opportunities');
|
||||
$query = '';
|
||||
$baseQuery = 'select id, name, sales_stage,amount, date_closed from opportunities where deleted!=1 and (';
|
||||
|
||||
|
@ -179,7 +179,7 @@ EOQ;
|
|||
return '';
|
||||
}
|
||||
if (empty($lead)) {
|
||||
$lead = new Lead();
|
||||
$lead = BeanFactory::newBean('Leads');
|
||||
}
|
||||
global $mod_strings, $sugar_config;
|
||||
$showaccount = $showaccount && $sugar_config['require_accounts'];
|
||||
|
@ -294,7 +294,7 @@ EOQ;
|
|||
</tr>
|
||||
EOQ;
|
||||
//carry forward custom lead fields to opportunities during Lead Conversion
|
||||
$tempOpp = new Opportunity();
|
||||
$tempOpp = BeanFactory::newBean('Opportunities');
|
||||
if (method_exists($lead, 'convertCustomFieldsForm')) {
|
||||
$lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ EOQ;
|
|||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Opportunity());
|
||||
$javascript->setSugarBean(BeanFactory::newBean('Opportunities'));
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$the_form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
|
@ -427,7 +427,7 @@ EOQ;
|
|||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Opportunity());
|
||||
$javascript->setSugarBean(BeanFactory::newBean('Opportunities'));
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$the_form .=$javascript->getScript();
|
||||
|
||||
|
@ -443,7 +443,7 @@ EOQ;
|
|||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Opportunity();
|
||||
$focus = BeanFactory::newBean('Opportunities');
|
||||
if ($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class OpportunitiesViewDetail extends ViewDetail
|
|||
|
||||
public function display()
|
||||
{
|
||||
$currency = new Currency();
|
||||
$currency = BeanFactory::newBean('Currencies');
|
||||
if (isset($this->bean->currency_id) && !empty($this->bean->currency_id)) {
|
||||
$currency->retrieve($this->bean->currency_id);
|
||||
if ($currency->deleted != 1) {
|
||||
|
|
Loading…
Reference in a new issue