Skip to content

Commit

Permalink
Merge branch 'hotfix-7.8.x' into 7.8.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	suitecrm_version.php
  • Loading branch information
Dillon-Brown committed Feb 9, 2018
2 parents ae7bd79 + f661632 commit cfcf2ad
Show file tree
Hide file tree
Showing 25 changed files with 258 additions and 163 deletions.
8 changes: 6 additions & 2 deletions include/SugarEmailAddress/SugarEmailAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ public function SugarEmailAddress(){
*/
public function handleLegacySave($bean)
{
if (!isset($_REQUEST) || !isset($_REQUEST[$bean->module_dir . '_email_widget_id'])) {
if (empty($this->addresses) || !isset($_REQUEST['massupdate'])) {
if (
!isset($_REQUEST)
|| !isset($_REQUEST[$bean->module_dir . '_email_widget_id'])
|| !isset($_REQUEST['massupdate'])
) {
if (empty($this->addresses)) {
$this->addresses = array();
$optOut = (isset($bean->email_opt_out) && $bean->email_opt_out == '1');
$invalid = (isset($bean->invalid_email) && $bean->invalid_email == '1');
Expand Down
10 changes: 9 additions & 1 deletion include/SugarFields/Fields/Multienum/SugarFieldMultienum.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabind
}
}

function displayFromFunc( $displayType, $parentFieldArray, $vardef, $displayParams, $tabindex ) {
/**
* @param $displayType
* @param $parentFieldArray
* @param $vardef
* @param $displayParams
* @param int $tabindex
* @return string
*/
function displayFromFunc( $displayType, $parentFieldArray, $vardef, $displayParams, $tabindex = 0) {
if ( isset($vardef['function']['returns']) && $vardef['function']['returns'] == 'html' ) {
return parent::displayFromFunc($displayType, $parentFieldArray, $vardef, $displayParams, $tabindex);
}
Expand Down
16 changes: 8 additions & 8 deletions include/language/en_us.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -2035,9 +2035,9 @@
'LBL_SUBSCRIBE' => 'Subscribe',
'LBL_UNSUBSCRIBE' => 'Unsubscribe',
// Ajax status strings
'LBL_LOADING' => 'Loading ...',
'LBL_LOADING' => 'Loading...',
'LBL_SEARCHING' => 'Searching...',
'LBL_SAVING_LAYOUT' => 'Saving Layout ...',
'LBL_SAVING_LAYOUT' => 'Saving Layout...',
'LBL_SAVED_LAYOUT' => 'Layout has been saved.',
'LBL_SAVED' => 'Saved',
'LBL_SAVING' => 'Saving',
Expand All @@ -2046,7 +2046,7 @@
'LBL_HIDE_COLUMNS' => 'Hide Columns',
'LBL_SEARCH_CRITERIA' => 'Search Criteria',
'LBL_SAVED_VIEWS' => 'Saved Views',
'LBL_PROCESSING_REQUEST' => 'Processing..',
'LBL_PROCESSING_REQUEST' => 'Processing...',
'LBL_REQUEST_PROCESSED' => 'Done',
'LBL_AJAX_FAILURE' => 'Ajax failure',
'LBL_MERGE_DUPLICATES' => 'Merge',
Expand Down Expand Up @@ -2136,16 +2136,16 @@
'LBL_DASHLET_CONFIGURE_DISPLAY_ROWS' => 'Display Rows',

// MySugar status strings
'LBL_CREATING_NEW_PAGE' => 'Creating New Page ...',
'LBL_CREATING_NEW_PAGE' => 'Creating New Page...',
'LBL_NEW_PAGE_FEEDBACK' => 'You have created a new page. You may add new content with the Add Dashlets menu option.',
'LBL_DELETE_PAGE_CONFIRM' => 'Are you sure you want to delete this page?',
'LBL_SAVING_PAGE_TITLE' => 'Saving Page Title ...',
'LBL_RETRIEVING_PAGE' => 'Retrieving Page ...',
'LBL_SAVING_PAGE_TITLE' => 'Saving Page Title...',
'LBL_RETRIEVING_PAGE' => 'Retrieving Page...',
'LBL_MAX_DASHLETS_REACHED' => 'You have reached the maximum number of SuiteCRM Dashlets your adminstrator has set. Please remove a SuiteCRM Dashlet to add more.',
'LBL_ADDING_DASHLET' => 'Adding SuiteCRM Dashlet ...',
'LBL_ADDING_DASHLET' => 'Adding SuiteCRM Dashlet...',
'LBL_ADDED_DASHLET' => 'SuiteCRM Dashlet Added',
'LBL_REMOVE_DASHLET_CONFIRM' => 'Are you sure you want to remove this SuiteCRM Dashlet?',
'LBL_REMOVING_DASHLET' => 'Removing SuiteCRM Dashlet ...',
'LBL_REMOVING_DASHLET' => 'Removing SuiteCRM Dashlet...',
'LBL_REMOVED_DASHLET' => 'SuiteCRM Dashlet Removed',

// MySugar Menu Options
Expand Down
2 changes: 1 addition & 1 deletion install/dbConfig_a.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<span id='connection_user_div' style="display:none">
<span class="required">*</span>
<label><b>{$mod_strings['LBL_DBCONF_SUGAR_DB_USER']}</b></label>
<input type="text" name="setup_db_sugarsales_user" maxlength="16" value="{$_SESSION['setup_db_sugarsales_user']}" />
<input type="text" name="setup_db_sugarsales_user" value="{$_SESSION['setup_db_sugarsales_user']}" />
<label><b>{$mod_strings['LBL_DBCONF_DB_PASSWORD']}</b></label>
<input type="password" name="setup_db_sugarsales_password_entry" value="{$setup_db_sugarsales_password}" />
<input type="hidden" name="setup_db_sugarsales_password" value="{$setup_db_sugarsales_password}" />
Expand Down
4 changes: 2 additions & 2 deletions install/language/en_us.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ',
'LBL_PERFORM_OUTRO_6' => ' bytes.',
'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.',
'LBL_PERFORM_REL_META' => 'relationship meta ... ',
'LBL_PERFORM_REL_META' => 'relationship meta... ',
'LBL_PERFORM_SUCCESS' => 'Success!',
'LBL_PERFORM_TABLES' => 'Creating SuiteCRM application tables, audit tables and relationship metadata',
'LBL_PERFORM_TITLE' => 'Perform Setup',
Expand Down Expand Up @@ -652,7 +652,7 @@
'LBL_NUMBER_GROUPING_SEP' => '1000s separator:',
'LBL_DECIMAL_SEP' => 'Decimal symbol:',
'LBL_NAME_FORMAT' => 'Name Format:',
'UPLOAD_LOGO' => 'Please wait, logo uploading..',
'UPLOAD_LOGO' => 'Please wait, logo uploading...',
'ERR_UPLOAD_FILETYPE' => 'File type not allowed, please upload a jpeg or png.',
'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.',
'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function AORReportsDashlet($id, $def = array())

public function display()
{
global $current_language;
global $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'AOR_Reports');
$dashletSmarty = new Sugar_Smarty();
$dashletTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashlet.tpl');
Expand Down Expand Up @@ -98,7 +98,7 @@ function process()
public function displayOptions()
{
ob_start();
global $current_language, $app_list_strings, $datetime;
global $current_language, $app_list_strings, $datetime, $mod_strings;
$mod_strings = return_module_language($current_language, 'AOR_Reports');
$optionsSmarty = new Sugar_Smarty();
$optionsSmarty->assign('MOD', $mod_strings);
Expand Down
20 changes: 18 additions & 2 deletions modules/AOS_Products_Quotes/AOS_Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,26 @@ function perform_aos_save($focus){
if(!number_empty($focus->field_defs[$field['name']])){
$currency = new Currency();
$currency->retrieve($focus->currency_id);
$focus->$fieldNameDollar = $currency->convertToDollar(unformat_number($focus->$fieldName));

$amountToConvert = $focus->$fieldName;
if (!amountToConvertIsDatabaseValue($focus, $fieldName)) {
$amountToConvert = unformat_number($focus->$fieldName);
}

$focus->$fieldNameDollar = $currency->convertToDollar($amountToConvert);
}

}

}
}
}

function amountToConvertIsDatabaseValue($focus, $fieldName)
{
if (isset($focus->fetched_row)
&& isset($focus->fetched_row[$fieldName])
&& $focus->fetched_row[$fieldName] == $focus->$fieldName) {
return true;
}
return false;
}
35 changes: 22 additions & 13 deletions modules/AOW_WorkFlow/aow_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
*
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd.
* Copyright (C) 2011 - 2017 SalesAgility Ltd.
* Copyright (C) 2011 - 2018 SalesAgility Ltd.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
Expand Down Expand Up @@ -141,23 +141,32 @@ function getRelModuleFields($module, $rel_field, $view='EditView',$value = ''){

}

function getRelatedModule($module, $rel_field){
global $beanList;

if($module == $rel_field){
return $module;
}
/**
* @param string $module
* @param string $linkFields
* @return string
*/
function getRelatedModule($module, $linkFields)
{
$linkField = explode(':', $linkFields, 2);

$mod = new $beanList[$module]();
$link = $linkField[0];
$relatedModule = $module;

if(isset($arr['module']) && $arr['module'] != '') {
return $arr['module'];
} else if($mod->load_relationship($rel_field)){
return $mod->$rel_field->getRelatedModuleName();
if ($module === $link) {
$relatedModule = $module;
} else {
$bean = BeanFactory::newBean($module);
if ($bean && $bean->load_relationship($link)) {
$relatedModule = $bean->$link->getRelatedModuleName();
}
}

return $module;
if (!empty($linkField[1])) {
return getRelatedModule($relatedModule, $linkField[1]);
}

return $relatedModule;
}

function getModuleTreeData($module){
Expand Down

0 comments on commit cfcf2ad

Please sign in to comment.