';
}
return $button;
diff --git a/include/javascript/EmailsComposeViewModal.js b/include/javascript/EmailsComposeViewModal.js
index 986289fdd..ba769c0c9 100755
--- a/include/javascript/EmailsComposeViewModal.js
+++ b/include/javascript/EmailsComposeViewModal.js
@@ -36,7 +36,7 @@
* reasonably feasible for technical reasons, the Appropriate Legal Notices must
* display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM".
*/(function($){$.fn.EmailsComposeViewModal=function(options){"use strict";var self=this;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults,options);self.handleClick=function(e){"use strict";var self=this;self.emailComposeView=null;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults);var composeBox=$('
').appendTo(opts.contentSelector);composeBox.messageBox({"showHeader":false,"showFooter":false,"size":'lg'});composeBox.setBody('

');composeBox.show();$.ajax({type:"GET",cache:false,url:'index.php?module=Emails&action=ComposeView&in_popup=1'}).done(function(data){if(data.length===0){console.error("Unable to display ComposeView");composeBox.setBody(SUGAR.language.translate('','ERR_AJAX_LOAD'));return;}
-composeBox.setBody(data);self.emailComposeView=composeBox.controls.modal.body.find('.compose-view').EmailsComposeView();$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(){composeBox.remove();});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};self.construct=function(){"use strict";$(opts.buttonSelector).click(self.handleClick)};self.destruct=function(){};self.construct();return $(self);};$.fn.openComposeViewModal=function(source){"use strict";window.event.preventDefault();window.event.stopImmediatePropagation();var self=this;self.emailComposeView=null;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults);var composeBox=$('
').appendTo(opts.contentSelector);composeBox.messageBox({"showHeader":false,"showFooter":false,"size":'lg'});composeBox.setBody('

');composeBox.show();var relatedId=$('[name="record"]').val();var ids='&ids=';if($(source).attr('data-record-id')!==''){ids=ids+$(source).attr('data-record-id');relatedId=$(source).attr('data-record-id');}
+composeBox.setBody(data);self.emailComposeView=composeBox.controls.modal.body.find('.compose-view').EmailsComposeView();$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(){composeBox.remove();});$("#emails_email_templates_name").change(function(){$.fn.EmailsComposeView.onTemplateChange()});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};self.construct=function(){"use strict";$(opts.buttonSelector).click(self.handleClick)};self.destruct=function(){};self.construct();return $(self);};$.fn.openComposeViewModal=function(source){"use strict";window.event.preventDefault();window.event.stopImmediatePropagation();var self=this;self.emailComposeView=null;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults);var composeBox=$('
').appendTo(opts.contentSelector);composeBox.messageBox({"showHeader":false,"showFooter":false,"size":'lg'});composeBox.setBody('
');composeBox.show();var relatedId=$('[name="record"]').val();var ids='&ids=';if($(source).attr('data-record-id')!==''){ids=ids+$(source).attr('data-record-id');relatedId=$(source).attr('data-record-id');}
else{var inputs=document.MassUpdate.elements;for(var i=0;i
0){targetList=targetList+',';}
targetList=targetList+dataEmailName+' <'+populateEmailAddress+'>';targetCount++;}});if(targetCount>0){$(self.emailComposeView).find('#to_addrs_names').val(targetList);}
if(targetCount<2){$(self.emailComposeView).find('#parent_type').val(populateModule);$(self.emailComposeView).find('#parent_name').val(populateModuleName);$(self.emailComposeView).find('#parent_id').val(populateModuleRecord);}
-$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(e){e.preventDefault();var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_EMAIL_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_EMAIL_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};$.fn.EmailsComposeViewModal.defaults={'selected':'INBOX','buttonSelector':'[data-action=emails-show-compose-modal]','contentSelector':'#content'};}(jQuery));
\ No newline at end of file
+$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(e){e.preventDefault();var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_EMAIL_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_EMAIL_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();});$("#emails_email_templates_name").change(function(){$.fn.EmailsComposeView.onTemplateChange()});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};$.fn.EmailsComposeViewModal.defaults={'selected':'INBOX','buttonSelector':'[data-action=emails-show-compose-modal]','contentSelector':'#content'};}(jQuery));
\ No newline at end of file
diff --git a/include/javascript/sugar_3.js b/include/javascript/sugar_3.js
index 9e5b5ed4e..114167bee 100755
--- a/include/javascript/sugar_3.js
+++ b/include/javascript/sugar_3.js
@@ -573,8 +573,9 @@ URL+='&create='+create;if(metadata!=''&&metadata!=undefined){URL+='&metadata='+m
if(popup_request_data.jsonObject){var request_data=popup_request_data.jsonObject;}else{var request_data=popup_request_data;}
var field_to_name_array_url='';if(request_data&&request_data.field_to_name_array!=undefined){for(var key in request_data.field_to_name_array){if(key.toLowerCase()!='id'){field_to_name_array_url+='&field_to_name[]='+encodeURIComponent(key.toLowerCase());}}}
if(field_to_name_array_url){URL+=field_to_name_array_url;}
-win=SUGAR.util.openWindow(URL,windowName,windowFeatures);if(window.focus){win.focus();}
+win=SUGAR.util.openWindow(URL,windowName,windowFeatures);if(win){if(win.focus){win.focus();}
win.popupCount=popupCount;return win;}
+return;}
var from_popup_return=false;function replaceHTMLChars(value){return value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');}
function set_return_basic(popup_reply_data,filter){var form_name=popup_reply_data.form_name;var name_to_value_array=popup_reply_data.name_to_value_array;for(var the_key in name_to_value_array){if(the_key=='toJSON'){}
else if(the_key.match(filter)){var displayValue=replaceHTMLChars(name_to_value_array[the_key]);if(window.document.forms[form_name]&&window.document.forms[form_name].elements[the_key]){if(window.document.forms[form_name].elements[the_key].tagName=='SELECT'){var selectField=window.document.forms[form_name].elements[the_key];for(var i=0;i 30000000,
- 'allowed_preview' => [
- 'pdf',
- 'gif',
- 'png',
- 'jpeg',
- 'jpg'
- ],
'import_max_execution_time' => 3600,
// 'use_php_code_json' => returnPhpJsonStatus(),
'verify_client_ip' => true,
diff --git a/jssource/src_files/include/javascript/EmailsComposeViewModal.js b/jssource/src_files/include/javascript/EmailsComposeViewModal.js
index 5f7d99eeb..45114418b 100644
--- a/jssource/src_files/include/javascript/EmailsComposeViewModal.js
+++ b/jssource/src_files/include/javascript/EmailsComposeViewModal.js
@@ -97,6 +97,9 @@
composeBox.on('hide.bs.modal', function () {
composeBox.remove();
});
+ $( "#emails_email_templates_name" ).change(function() {
+ $.fn.EmailsComposeView.onTemplateChange()
+ });
}).fail(function (data) {
composeBox.controls.modal.content.html(SUGAR.language.translate('', 'LBL_EMAIL_ERROR_GENERAL_TITLE'));
});
@@ -252,6 +255,9 @@
});
mb.show();
});
+ $( "#emails_email_templates_name" ).change(function() {
+ $.fn.EmailsComposeView.onTemplateChange()
+ });
}).fail(function (data) {
composeBox.controls.modal.content.html(SUGAR.language.translate('', 'LBL_EMAIL_ERROR_GENERAL_TITLE'));
});
diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js
index 31d7a678c..aaac9ed8d 100755
--- a/jssource/src_files/include/javascript/sugar_3.js
+++ b/jssource/src_files/include/javascript/sugar_3.js
@@ -4510,17 +4510,15 @@ function open_popup(module_name, width, height, initial_filter, close_popup, hid
if (field_to_name_array_url) {
URL += field_to_name_array_url;
}
-
win = SUGAR.util.openWindow(URL, windowName, windowFeatures);
-
- if (window.focus) {
- // put the focus on the popup if the browser supports the focus() method
- win.focus();
+ if(win) {
+ $(win).focus(function(){
+ win.focus();
+ });
+ win.popupCount = popupCount;
+ return win;
}
-
- win.popupCount = popupCount;
-
- return win;
+ return '';
}
/**
diff --git a/jssource/src_files/modules/Calendar/Cal.js b/jssource/src_files/modules/Calendar/Cal.js
index f04808a39..6aa65382f 100755
--- a/jssource/src_files/modules/Calendar/Cal.js
+++ b/jssource/src_files/modules/Calendar/Cal.js
@@ -288,6 +288,8 @@ CAL.repeat_type_selected = function () {
}
CAL.load_form = function (module_name, record, edit_all_recurrences, cal_event) {
CAL.disable_creating = true;
+ CAL.reset_edit_dialog();
+ CAL.disable_buttons();
var e;
var to_open = true;
diff --git a/lib/API/OAuth2/Entities/ClientEntity.php b/lib/API/OAuth2/Entities/ClientEntity.php
index d4081e4c3..c2fc6d2ff 100644
--- a/lib/API/OAuth2/Entities/ClientEntity.php
+++ b/lib/API/OAuth2/Entities/ClientEntity.php
@@ -63,4 +63,9 @@ class ClientEntity implements ClientEntityInterface
{
$this->redirectUri = $uri;
}
+
+ public function setIsConfidential($confidential)
+ {
+ $this->isConfidential = $confidential;
+ }
}
diff --git a/lib/API/OAuth2/Repositories/ClientRepository.php b/lib/API/OAuth2/Repositories/ClientRepository.php
index 200a0d250..8f4a099c1 100644
--- a/lib/API/OAuth2/Repositories/ClientRepository.php
+++ b/lib/API/OAuth2/Repositories/ClientRepository.php
@@ -42,7 +42,6 @@ namespace SuiteCRM\API\OAuth2\Repositories;
use League\OAuth2\Server\Repositories\ClientRepositoryInterface;
use SuiteCRM\API\OAuth2\Entities\ClientEntity;
-use SuiteCRM\API\OAuth2\Exception\GrantTypeNotAllowedForClient;
class ClientRepository implements ClientRepositoryInterface
{
@@ -50,7 +49,7 @@ class ClientRepository implements ClientRepositoryInterface
* {@inheritdoc}
* @return null|ClientEntity
*/
- public function getClientEntity($clientIdentifier, $grantType, $clientSecret = null, $mustValidateSecret = true)
+ public function getClientEntity($clientIdentifier)
{
$client = new \OAuth2Clients();
$client->retrieve($clientIdentifier);
@@ -58,25 +57,23 @@ class ClientRepository implements ClientRepositoryInterface
return null;
}
- if ($client->allowed_grant_type !== $grantType) {
- throw new GrantTypeNotAllowedForClient();
- }
-
- if (
- $mustValidateSecret === true
- && (bool)$client->is_confidential === true
- && hash('sha256', $clientSecret) !== $client->secret
- ) {
- return null;
- }
-
$clientEntity = new ClientEntity();
$clientEntity->setIdentifier($clientIdentifier);
$clientEntity->setName($client->name);
-
- $redirect_url = isset($client->redirect_uri) ? $client->redirect_uri : '';
- $clientEntity->setRedirectUri($redirect_url);
+ $clientEntity->setRedirectUri($client->redirect_uri ?? '');
+ $clientEntity->setIsConfidential($client->is_confidential ?? false);
return $clientEntity;
}
+
+ public function validateClient($clientIdentifier, $clientSecret, $grantType)
+ {
+ $client = new \OAuth2Clients();
+ $client->retrieve($clientIdentifier);
+ if (empty($client->id)) {
+ return null;
+ }
+
+ return hash('sha256', $clientSecret) === $client->secret && $grantType === $client->allowed_grant_type;
+ }
}
diff --git a/modules/AOW_Actions/FormulaCalculator.php b/modules/AOW_Actions/FormulaCalculator.php
index 8b3973158..aae500b52 100644
--- a/modules/AOW_Actions/FormulaCalculator.php
+++ b/modules/AOW_Actions/FormulaCalculator.php
@@ -403,9 +403,9 @@ class FormulaCalculator
return date($params[0], strtotime($params[1]));
}
- if (($params = $this->evaluateFunctionParams("datediff", $text, $childItems)) != null) {
- $d1 = new DateTime($params[0]);
- $d2 = new DateTime($params[1]);
+ if (($params = $this->evaluateFunctionParams("datediff", $text, $childItems)) != null) {
+ $d1 = new DateTime($this->getDBFormat($params[0]));
+ $d2 = new DateTime($this->getDBFormat($params[1]));
$diff = $d1->diff($d2);
switch ($params[2]) {
@@ -660,7 +660,7 @@ class FormulaCalculator
{
$prefix = $isTime ? 'PT' : 'P';
- $datetime = new DateTime($datestring);
+ $datetime = new DateTime($this->getDBFormat($datestring));
if ($isAdd) {
$datetime->add(new DateInterval($prefix . $ammount . $type));
@@ -849,4 +849,43 @@ class FormulaCalculator
{
return sprintf("%0" . $digits . "d", $value);
}
+
+ /**
+ * Outputs date and datetime values in DB format
+ *
+ * @param String $date
+ * @return String
+ */
+ private function getDBFormat($date) {
+ // 1) If WF is thrown by the after_save LH, the bean is already loaded and the date/datetime value
+ // is properly formatted, so will only change the timezone value from UTC to user's one.
+ // 2) If WF is run by the scheduler task, will change date/datetime value to DB format.
+ $formatDate = 'Y-m-d';
+ $validDate = DateTime::createFromFormat($formatDate, $date);
+ $formatDateTime = 'Y-m-d H:i:s';
+ $validDateTime = DateTime::createFromFormat($formatDateTime, $date);
+ if ($validDate && $validDate->format($formatDate) === $date) {
+ // Nothing to do
+ return $date;
+ } else if ($validDateTime && $validDateTime->format($formatDateTime) === $date) {
+ // Set TZ to user's TZ
+ global $timedate, $current_user;
+ $date = $timedate->fromDb($date);
+ $date = $timedate->tzUser($date, $current_user);
+ return $date->format('Y-m-d H:i:s');
+ } else { // In this case the WF is run by the cron
+ global $current_user, $timedate;
+ if(strpos($date, " ") !== false){
+ $type = 'datetime';
+ } else{
+ $type = 'date';
+ }
+ $date = $timedate->fromUserType($date, $type, $current_user);
+ if ($date) {
+ return $date->asDb(false);
+ }
+ return null;
+ }
+ }
+
}
diff --git a/modules/AOW_Actions/actions/actionComputeField.php b/modules/AOW_Actions/actions/actionComputeField.php
index c8e818782..47c426c5e 100644
--- a/modules/AOW_Actions/actions/actionComputeField.php
+++ b/modules/AOW_Actions/actions/actionComputeField.php
@@ -103,12 +103,13 @@ class actionComputeField extends actionBase
$relateFields = $this->getAllRelatedFields($bean);
- for ($i = 0; $i < count($formulas); $i++) {
+ for ($i = 0; $i < count($formulas); $i++) {
if (array_key_exists($formulas[$i], $relateFields) && isset($relateFields[$formulas[$i]]['id_name'])) {
- $bean->{$relateFields[$formulas[$i]]['id_name']} =
- $calculator->calculateFormula($formulaContents[$i]);
+ $calcValue = $calculator->calculateFormula($formulaContents[$i]);
+ $bean->{$relateFields[$formulas[$i]]['id_name']} = ( is_numeric($calcValue) ? (float)$calcValue : $calcValue );
} else {
- $bean->{$formulas[$i]} = $calculator->calculateFormula($formulaContents[$i]);
+ $calcValue = $calculator->calculateFormula($formulaContents[$i]);
+ $bean->{$formulas[$i]} = ( is_numeric($calcValue) ? (float)$calcValue : $calcValue );
}
}
@@ -152,7 +153,7 @@ class actionComputeField extends actionBase
if ($parameterTypes[$i] == actionComputeField::FORMATTED_VALUE) {
$dataType = $bean->field_name_map[$parameters[$i]]['type'];
- if ($dataType == 'enum') {
+ if ($dataType == 'enum' || $dataType == 'dynamicenum') {
$resolvedParameters[$i] =
$GLOBALS['app_list_strings'][$bean->field_defs[$parameters[$i]]['options']][$bean->{$parameters[$i]}];
} else {
diff --git a/modules/Calendar/Cal.js b/modules/Calendar/Cal.js
index 49a28244e..fe563ae07 100755
--- a/modules/Calendar/Cal.js
+++ b/modules/Calendar/Cal.js
@@ -75,7 +75,7 @@ field_name="contact_invitees";if(v.module=="Lead")
field_name="lead_invitees";var str=CAL.get(field_name).value;CAL.get(field_name).value=str+v.fields.id+",";});}
CAL.repeat_type_selected=function(){var rt;if(rt=CAL.get("repeat_type")){if(rt.value=='Weekly'){var nodes=CAL.query(".weeks_checks_div");CAL.each(nodes,function(i,v){nodes[i].style.display="block";});}else{var nodes=CAL.query(".weeks_checks_div");CAL.each(nodes,function(i,v){nodes[i].style.display="none";});}
if(rt.value==''){CAL.get("repeat_interval").setAttribute("disabled","disabled");CAL.get("repeat_end_date").setAttribute("disabled","disabled");}else{CAL.get("repeat_interval").removeAttribute("disabled");CAL.get("repeat_end_date").removeAttribute("disabled");}}}
-CAL.load_form=function(module_name,record,edit_all_recurrences,cal_event){CAL.disable_creating=true;var e;var to_open=true;if(module_name!="Meetings"&&module_name!="Calls"){to_open=false;}
+CAL.load_form=function(module_name,record,edit_all_recurrences,cal_event){CAL.disable_creating=true;CAL.reset_edit_dialog();CAL.disable_buttons();var e;var to_open=true;if(module_name!="Meetings"&&module_name!="Calls"){to_open=false;}
if(module_name=="Tasks"){var url='index.php?to_pdf=1&module=Home&action=AdditionalDetailsRetrieve&bean='+cal_event.module+'&id='+cal_event.record;var body=SUGAR.language.translate('app_strings','LBL_LOADING_PAGE');$.ajax(url).done(function(data){SUGAR.util.globalEval(data);$('.modal-cal-tasks-edit .modal-body .container-fluid').html(result.body);}).fail(function(){$('.modal-cal-tasks-edit .modal-body .container-fluid').html(SUGAR.language.translate('app_strings','LBL_EMAIL_ERROR_GENERAL_TITLE'));}).always(function(){});$('.modal-cal-tasks-edit .modal-body .container-fluid').html(body);$('.modal-cal-tasks-edit').modal('show');$('#btn-view-task').unbind().click(function(){window.location.assign('index.php?module='+cal_event.module+'&action=DetailView&record='+cal_event.record);});$('#btn-tasks-full-form').unbind().click(function(){window.location.assign('index.php?module='+cal_event.module+'&action=EditView&record='+cal_event.record);});}else if(module_name=="FP_events"){var url='index.php?to_pdf=1&module=Home&action=AdditionalDetailsRetrieve&bean='+cal_event.module+'&id='+cal_event.record;var body=SUGAR.language.translate('app_strings','LBL_LOADING_PAGE');$.ajax(url).done(function(data){SUGAR.util.globalEval(data);$('.modal-cal-events-edit .modal-body .container-fluid').html(result.body);}).fail(function(){$('.modal-cal-events-edit .modal-body .container-fluid').html(SUGAR.language.translate('app_strings','LBL_EMAIL_ERROR_GENERAL_TITLE'));}).always(function(){});$('.modal-cal-events-edit .modal-body .container-fluid').html(body);$('.modal-cal-events-edit').modal('show');$('#btn-view-events').unbind().click(function(){window.location.assign('index.php?module='+cal_event.module+'&action=DetailView&record='+cal_event.record);});$('#btn-events-full-form').unbind().click(function(){window.location.assign('index.php?module='+cal_event.module+'&action=EditView&record='+cal_event.record);});}
if(to_open&&CAL.records_openable){CAL.get("form_content").style.display="none";CAL.disable_buttons();CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;CAL.repeat_tab_handle(module_name);ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));params={};if(edit_all_recurrences){params={stay_on_tab:true};}
CAL.open_edit_dialog(params);CAL.get("record").value="";if(!edit_all_recurrences){edit_all_recurrences="";}
diff --git a/modules/CampaignTrackers/DetailView.html b/modules/CampaignTrackers/DetailView.html
index da654bf76..08db5a904 100755
--- a/modules/CampaignTrackers/DetailView.html
+++ b/modules/CampaignTrackers/DetailView.html
@@ -73,7 +73,7 @@
{MOD.LBL_EDIT_OPT_OUT} |
- |
+ |
{MOD.LBL_EDIT_TRACKER_URL} |
@@ -89,4 +89,4 @@
-
\ No newline at end of file
+
diff --git a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php
index b4d8a8c2b..f6d96a0e3 100755
--- a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php
+++ b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php
@@ -85,7 +85,7 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart
global $app_list_strings;
$selected_datax = array();
- if (count($this->mypbss_sales_stages) > 0) {
+ if (isset($this->mypbss_sales_stages) && count($this->mypbss_sales_stages) > 0) {
foreach ($this->mypbss_sales_stages as $key) {
$selected_datax[] = $key;
}
@@ -316,7 +316,7 @@ EOD;
$tempx = $user_sales_stage;
//set $datax using selected sales stage keys
- if (count($tempx) > 0) {
+ if (isset($tempx) && count($tempx) > 0) {
foreach ($tempx as $key) {
$datax[$key] = $app_list_strings['sales_stage_dom'][$key];
array_push($selected_datax, $key);
@@ -379,7 +379,7 @@ EOD;
" AND opportunities.date_closed >= ". DBManagerFactory::getInstance()->convert("'".$this->mypbss_date_start."'", 'date').
" AND opportunities.date_closed <= ". DBManagerFactory::getInstance()->convert("'".$this->mypbss_date_end."'", 'date') .
" AND opportunities.assigned_user_id = users.id AND opportunities.deleted=0 ";
- if (count($this->mypbss_sales_stages) > 0) {
+ if (isset($this->mypbss_sales_stages) && count($this->mypbss_sales_stages) > 0) {
$query .= " AND opportunities.sales_stage IN ('" . implode("','", $this->mypbss_sales_stages) . "') ";
}
$query .= " GROUP BY opportunities.sales_stage ,users.user_name,opportunities.assigned_user_id";
diff --git a/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php
index 8bcdb5d96..653cb01ff 100755
--- a/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php
+++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.php
@@ -136,7 +136,7 @@ class OpportunitiesByLeadSourceByOutcomeDashlet extends DashletGenericChart
$url_params = array();
- if (count($this->lsbo_ids) > 0) {
+ if (isset($this->lsbo_ids) && count($this->lsbo_ids) > 0) {
$url_params['assigned_user_id'] = array_values($this->lsbo_ids);
}
@@ -255,10 +255,10 @@ EOD;
$query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total, ".
"count(*) as opp_count FROM opportunities ";
$query .= " WHERE opportunities.deleted=0 ";
- if (count($this->lsbo_ids) > 0) {
+ if (isset($this->lsbo_ids) && count($this->lsbo_ids) > 0) {
$query .= "AND opportunities.assigned_user_id IN ('".implode("','", $this->lsbo_ids)."') ";
}
- if (count($this->lsbo_lead_sources) > 0) {
+ if (isset($this->lsbo_lead_sources) && count($this->lsbo_lead_sources) > 0) {
$query .= "AND opportunities.lead_source IN ('".implode("','", $this->lsbo_lead_sources)."') ";
} else {
$query .= "AND opportunities.lead_source IN ('".implode("','", array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
diff --git a/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php
index 055c8775c..f3627ecc8 100755
--- a/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php
+++ b/modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php
@@ -251,10 +251,10 @@ EOD;
$query = "SELECT lead_source,sum(amount_usdollar/1000) as total,count(*) as opp_count ".
"FROM opportunities ";
$query .= "WHERE opportunities.deleted=0 ";
- if (count($this->pbls_ids) > 0) {
+ if (isset($this->pbls_ids) && count($this->pbls_ids) > 0) {
$query .= "AND opportunities.assigned_user_id IN ('".implode("','", $this->pbls_ids)."') ";
}
- if (count($this->pbls_lead_sources) > 0) {
+ if (isset($this->pbls_lead_sources) && count($this->pbls_lead_sources) > 0) {
$query .= "AND opportunities.lead_source IN ('".implode("','", $this->pbls_lead_sources)."') ";
} else {
$query .= "AND opportunities.lead_source IN ('".implode("','", array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
diff --git a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php
index 7dfcd67ed..6c12b2606 100755
--- a/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php
+++ b/modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php
@@ -249,7 +249,7 @@ EOD;
$query .= " WHERE opportunities.date_closed >= ".DBManagerFactory::getInstance()->convert("'".$this->obm_date_start."'", 'date') .
" AND opportunities.date_closed <= ".DBManagerFactory::getInstance()->convert("'".$this->obm_date_end."'", 'date') .
" AND opportunities.deleted=0";
- if (count($this->obm_ids) > 0) {
+ if (isset($this->obm_ids) && count($this->obm_ids) > 0) {
$query .= " AND opportunities.assigned_user_id IN ('" . implode("','", $this->obm_ids) . "')";
}
$query .= " GROUP BY sales_stage,".
diff --git a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php
index 6af098c52..dbb173ae0 100755
--- a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php
+++ b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php
@@ -269,7 +269,7 @@ EOD;
$tempx = $user_sales_stage;
//set $datax using selected sales stage keys
- if (count($tempx) > 0) {
+ if (isset($tempx) && count($tempx) > 0) {
foreach ($tempx as $key) {
$datax[$key] = $app_list_strings['sales_stage_dom'][$key];
$selected_datax[] = $key;
diff --git a/modules/Emails/EmailsController.php b/modules/Emails/EmailsController.php
index 4ef5353ff..58b77c9a7 100644
--- a/modules/Emails/EmailsController.php
+++ b/modules/Emails/EmailsController.php
@@ -814,6 +814,21 @@ class EmailsController extends SugarController
$this->bean->parent_name = $parent_name;
}
+ $arrayOfToNames = explode(", ", $this->bean->to_addrs_names);
+ $mailbox = BeanFactory::getBean('InboundEmail', $this->bean->mailbox_id);
+
+ if(count($arrayOfToNames) > 1){
+ foreach($arrayOfToNames as $name){
+ if($name !== $mailbox->email_user){
+ if(!empty($this->bean->cc_addrs_names)){
+ $this->bean->cc_addrs_names .= ', ' .$name;
+ } else {
+ $this->bean->cc_addrs_names = $name;
+ }
+ }
+ }
+ }
+
if ($mode === self::COMPOSE_BEAN_MODE_REPLY_TO || $mode === self::COMPOSE_BEAN_MODE_REPLY_TO_ALL) {
// Move email addresses from the "from" field to the "to" field
$this->bean->to_addrs = $this->bean->from_addr;
diff --git a/modules/Emails/include/ComposeView/ComposeView.tpl b/modules/Emails/include/ComposeView/ComposeView.tpl
index c95b0c8ba..0820d8474 100644
--- a/modules/Emails/include/ComposeView/ComposeView.tpl
+++ b/modules/Emails/include/ComposeView/ComposeView.tpl
@@ -261,6 +261,9 @@
{rdelim}
{rdelim}{/if});
{rdelim});
+ $( "#emails_email_templates_name" ).change(function() {ldelim}
+ $.fn.EmailsComposeView.onTemplateChange()
+ {rdelim});
{/if}
diff --git a/modules/Emails/include/ComposeView/EmailsComposeView.js b/modules/Emails/include/ComposeView/EmailsComposeView.js
index 0f6197b53..549afbe90 100644
--- a/modules/Emails/include/ComposeView/EmailsComposeView.js
+++ b/modules/Emails/include/ComposeView/EmailsComposeView.js
@@ -1553,6 +1553,41 @@
});
};
+ $.fn.EmailsComposeView.onTemplateChange = function (args) {
+ var confirmed = function (args) {
+ var args = JSON.parse(args);
+ var form = $('[name="' + args.form_name + '"]');
+ $.post('index.php?entryPoint=emailTemplateData', {
+ emailTemplateId: args.name_to_value_array.emails_email_templates_idb
+ }, function (jsonResponse) {
+ var response = JSON.parse(jsonResponse);
+ $.fn.EmailsComposeView.loadAttachmentDataFromAjaxResponse(response);
+ $(form).find('[name="name"]').val(response.data.subject);
+ tinymce.activeEditor.setContent(response.data.body_from_html, {format: 'html'});
+ $.fn.EmailsComposeView.updateSignature();
+ });
+ set_return(args);
+ };
+ var mb = messageBox();
+ mb.setTitle(SUGAR.language.translate('Emails', 'LBL_CONFIRM_APPLY_EMAIL_TEMPLATE_TITLE'));
+ mb.setBody(SUGAR.language.translate('Emails', 'LBL_CONFIRM_APPLY_EMAIL_TEMPLATE_BODY'));
+ mb.show();
+
+ mb.on('ok', function () {
+ "use strict";
+ var id=$('#emails_email_templates_idb').val();
+ var name=$('#emails_email_templates_name').val();
+ args = JSON.stringify({"form_name":"ComposeView","name_to_value_array":{"emails_email_templates_idb": id,"emails_email_templates_name": name}})
+ confirmed(args);
+ mb.remove();
+ });
+
+ mb.on('cancel', function () {
+ "use strict";
+ mb.remove();
+ });
+ }
+
$.fn.EmailsComposeView.onParentSelect = function (args) {
set_return(args);
if (isValidEmail(args.name_to_value_array.email1)) {
@@ -1574,13 +1609,14 @@
$.fn.EmailsComposeView.defaults = {
"tinyMceOptions": {
menubar: false,
- toolbar: ['fontselect | fontsizeselect | bold italic underline | forecolor backcolor | styleselect | outdent indent'],
+ plugins: ['link'],
+ toolbar: ['fontselect | fontsizeselect | bold italic underline | forecolor backcolor | styleselect | outdent indent | link'],
formats: {
bold: {inline: 'b'},
italic: {inline: 'i'},
underline: {inline: 'u'}
},
- convert_urls: true,
+ convert_urls: false,
relative_urls: false,
remove_script_host: false,
}
diff --git a/modules/ExternalOAuthConnection/controller.php b/modules/ExternalOAuthConnection/controller.php
index bd645bd5a..942a875d7 100644
--- a/modules/ExternalOAuthConnection/controller.php
+++ b/modules/ExternalOAuthConnection/controller.php
@@ -45,11 +45,16 @@ class ExternalOAuthConnectionController extends SugarController
{
public function action_EditView() {
$this->view = 'edit';
- if (!empty($this->bean) && !empty($_REQUEST['type'])) {
+
+ if (empty($_REQUEST['type'])){
+ $_REQUEST['type'] = 'personal';
+ }
+
+ if (!empty($this->bean)) {
$this->bean->type = $_REQUEST['type'];
}
- if (empty($_REQUEST['record']) && !empty($_REQUEST['type']) && $_REQUEST['type'] === 'personal') {
+ if (empty($_REQUEST['record']) && $_REQUEST['type'] === 'personal') {
$this->hasAccess = true;
return;
}
diff --git a/modules/ExternalOAuthProvider/controller.php b/modules/ExternalOAuthProvider/controller.php
index 1e0937c51..b93f6e135 100644
--- a/modules/ExternalOAuthProvider/controller.php
+++ b/modules/ExternalOAuthProvider/controller.php
@@ -45,11 +45,17 @@ class ExternalOAuthProviderController extends SugarController
{
public function action_EditView() {
$this->view = 'edit';
- if (!empty($this->bean) && !empty($_REQUEST['type'])) {
+
+ if (empty($_REQUEST['type'])){
+ $_REQUEST['type'] = 'personal';
+ }
+
+
+ if (!empty($this->bean)) {
$this->bean->type = $_REQUEST['type'];
}
- if (empty($_REQUEST['record']) && !empty($_REQUEST['type']) && $_REQUEST['type'] === 'personal') {
+ if (empty($_REQUEST['record']) && $_REQUEST['type'] === 'personal') {
$this->hasAccess = true;
return;
}
diff --git a/modules/OAuth2Clients/OAuth2Clients.php b/modules/OAuth2Clients/OAuth2Clients.php
index f57724635..a2b0677ef 100644
--- a/modules/OAuth2Clients/OAuth2Clients.php
+++ b/modules/OAuth2Clients/OAuth2Clients.php
@@ -57,6 +57,11 @@ class OAuth2Clients extends SugarBean
*/
public $redirect_uri;
+ /**
+ * @var string
+ */
+ public $allowed_grant_type;
+
/**
* @var string
*/
diff --git a/modules/ProspectLists/Save.php b/modules/ProspectLists/Save.php
index ceebd4a0c..9f746e8a3 100755
--- a/modules/ProspectLists/Save.php
+++ b/modules/ProspectLists/Save.php
@@ -76,7 +76,6 @@ if (!empty($_REQUEST['duplicateId'])) {
$focus->set_relationship('prospect_lists_prospects', $rel, true);
}
}
- $focus->save();
}
diff --git a/modules/SecurityGroups/AssignGroups.php b/modules/SecurityGroups/AssignGroups.php
index 430a8ec0c..cfff7a64f 100755
--- a/modules/SecurityGroups/AssignGroups.php
+++ b/modules/SecurityGroups/AssignGroups.php
@@ -12,8 +12,8 @@ class AssignGroups
//only process if action is Save (meaning a user has triggered this event and not the portal or automated process)
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'Save'
- && isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true
- && empty($bean->fetched_row['id']) && $bean->module_dir != "Users" && $bean->module_dir != "SugarFeed") {
+ && isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true
+ && empty($bean->fetched_row['id']) && $bean->module_dir != "Users" && $bean->module_dir != "SugarFeed") {
//Upload an attachment to an Email Template and save. If user with multi groups - popup select option
//it will redirect to notes instead of EmailTemplate and relationship will fail...check below to avoid
if (!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) {
@@ -26,7 +26,7 @@ class AssignGroups
//sanity check
if (in_array($bean->module_dir, array_keys($security_modules))) {
//add each group in securitygroup_list to new record
- $rel_name = SecurityGroup::getLinkName($bean->module_dir,"SecurityGroups");
+ $rel_name = SecurityGroup::getLinkName($bean->module_dir, "SecurityGroups");
$bean->load_relationship($rel_name);
foreach ($_REQUEST['securitygroup_list'] as $group_id) {
@@ -42,8 +42,8 @@ class AssignGroups
$_SESSION['securitysuite_error'] = $ss_mod_strings['LBL_ERROR_DUPLICATE'];
}
} elseif (isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true
- && empty($bean->fetched_row['id']) && $bean->module_dir == "Users"
- && isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature') { //Bug: 589
+ && empty($bean->fetched_row['id']) && $bean->module_dir == "Users"
+ && isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature') { //Bug: 589
//$_REQUEST['return_module'] = $bean->module_dir;
//$_REQUEST['return_action'] = "DetailView";
@@ -55,9 +55,9 @@ class AssignGroups
$_SESSION['securitygroups_popup'] = array();
}
$_SESSION['securitygroups_popup'][] = array(
- 'module' => $bean->module_dir,
- 'id' => $bean->id
- );
+ 'module' => $bean->module_dir,
+ 'id' => $bean->id
+ );
}
}
@@ -69,9 +69,9 @@ class AssignGroups
}
/** //test user popup
- //always have this loaded
- echo '';
- */
+ * //always have this loaded
+ * echo '';
+ */
global $sugar_config;
$action = null;
@@ -94,14 +94,14 @@ class AssignGroups
}
if ((
- //(isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true)
- //||
+ //(isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true)
+ //||
($module == "Users" && isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true)
- )
+ )
- //&& isset($_SESSION['securitygroups_popup_'.$module]) && !empty($_SESSION['securitygroups_popup_'.$module])
- && !empty($_SESSION['securitygroups_popup'])
- ) {
+ //&& isset($_SESSION['securitygroups_popup_'.$module]) && !empty($_SESSION['securitygroups_popup_'.$module])
+ && !empty($_SESSION['securitygroups_popup'])
+ ) {
foreach ($_SESSION['securitygroups_popup'] as $popup_index => $popup) {
$record_id = $popup['id'];
$module = $popup['module'];
@@ -111,7 +111,7 @@ class AssignGroups
if ($module == 'Users') {
$rel_name = "SecurityGroups";
} else {
- $rel_name = SecurityGroup::getLinkName($module,"SecurityGroups");
+ $rel_name = SecurityGroup::getLinkName($module, "SecurityGroups");
}
//this only works if on the detail view of the record actually saved...
@@ -144,13 +144,13 @@ EOQ;
LoggerManager::getLogger()->warn('Not defined module in request');
}
-
- $no_mass_assign_list = array("Emails"=>"Emails","ACLRoles"=>"ACLRoles"); //,"Users"=>"Users");
+
+ $no_mass_assign_list = array("Emails" => "Emails", "ACLRoles" => "ACLRoles"); //,"Users"=>"Users");
//check if security suite enabled
$action = strtolower($action);
if (isset($module) && ($action == "list" || $action == "index" || $action == "listview")
- && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != true)
- && !array_key_exists($module, $no_mass_assign_list)
+ && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != true)
+ && !array_key_exists($module, $no_mass_assign_list)
) {
global $current_user;
if (is_admin($current_user) || ACLAction::getUserAccessLevel($current_user->id, "SecurityGroups", 'access') == ACL_ALLOW_ENABLED) {
@@ -167,14 +167,14 @@ EOQ;
$form_header = get_form_header($current_module_strings['LBL_MASS_ASSIGN'], '', false);
$groups = $groupFocus->get_list("name", "", 0, -99, -99);
- $options = array(""=>"");
+ $options = array("" => "");
foreach ($groups['list'] as $group) {
$options[$group->id] = $group->name;
}
- $group_options = get_select_options_with_id($options, "");
+ $group_options = get_select_options_with_id($options, "");
- $export_where = !empty($_SESSION['export_where']) ? $_SESSION['export_where'] : '';
- $export_where_md5 = md5($export_where);
+ $export_where = !empty($_SESSION['export_where']) ? $_SESSION['export_where'] : '';
+ $export_where_md5 = md5($export_where);
$mass_assign = <<saveTabGroups($_POST);
ob_clean();
if (!empty($_POST['grouptab_lang'])) {
header('Location: index.php?module=Studio&action=TabGroups&lang='.$_POST['grouptab_lang']);
diff --git a/modules/SugarFeed/SugarFeed.php b/modules/SugarFeed/SugarFeed.php
old mode 100755
new mode 100644
index a81a8a29b..18fa3c84e
--- a/modules/SugarFeed/SugarFeed.php
+++ b/modules/SugarFeed/SugarFeed.php
@@ -476,9 +476,26 @@ class SugarFeed extends Basic
$timedate->getInstance()->userTimezone();
$currentTime = $timedate->now();
-
- $first = strtotime($currentTime);
- $second = strtotime($startDate);
+ //Fix #9875 SugarFeed shows 0 seconds ago and negative interval for certain datetime formats
+ //Use proper user datetime format to convert datetime string to timestamp
+ $user_format=$timedate->get_date_time_format();
+ $first=date_create_from_format($user_format,$currentTime);
+ if(empty($first)){
+ LoggerManager::getLogger()->warn('SugarFeed getTimeLapse: Could not fetch currentTime ');
+ $first=0;
+ }
+ else{
+ $first=$first->getTimestamp();
+ }
+
+ $second=date_create_from_format($user_format,$startDate);
+ if(empty($second)){
+ LoggerManager::getLogger()->warn('SugarFeed getTimeLapse: Could not fetch startDate ');
+ $second=0;
+ }
+ else{
+ $second=$second->getTimestamp();
+ }
$seconds = $first - $second;
$minutes = $seconds / 60;
diff --git a/modules/SurveyResponses/vardefs.php b/modules/SurveyResponses/vardefs.php
index 58e550909..3be481ec7 100644
--- a/modules/SurveyResponses/vardefs.php
+++ b/modules/SurveyResponses/vardefs.php
@@ -217,6 +217,25 @@ $dictionary['SurveyResponses'] = array(
'lhs_key' => 'id',
'relationship_type' => 'one-to-many',
),
+ // Fix Issue 8897 - Adding missing relationships to SurveyResponses and Contacts/Accounts
+ 'surveyresponses_contacts' => array(
+ 'rhs_module' => 'SurveyResponses',
+ 'rhs_table' => 'surveyresponses',
+ 'rhs_key' => 'contact_id',
+ 'lhs_module' => 'Contacts',
+ 'lhs_table' => 'contacts',
+ 'lhs_key' => 'id',
+ 'relationship_type' => 'one-to-many',
+ ),
+ 'surveyresponses_accounts' => array (
+ 'rhs_module' => 'SurveyResponses',
+ 'rhs_table' => 'surveyresponses',
+ 'rhs_key' => 'account_id',
+ 'lhs_module' => 'Accounts',
+ 'lhs_table' => 'accounts',
+ 'lhs_key' => 'id',
+ 'relationship_type' => 'one-to-many',
+ ),
),
'optimistic_locking' => true,
'unified_search' => true,
diff --git a/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php b/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php
index 50170e164..087a2f11e 100755
--- a/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php
+++ b/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php
@@ -363,7 +363,7 @@ class SugarAuthenticate
*/
public function validateIP()
{
- global $sugar_config;
+ global $sugar_config, $mod_strings;
// grab client ip address
$clientIP = query_client_ip();
$classCheck = 0;
diff --git a/suitecrm_version.php b/suitecrm_version.php
index b97e71b40..87ccf62e7 100755
--- a/suitecrm_version.php
+++ b/suitecrm_version.php
@@ -3,5 +3,5 @@ if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
-$suitecrm_version = '7.13.2';
-$suitecrm_timestamp = '2023-03-02 12:00:00';
+$suitecrm_version = '7.13.3';
+$suitecrm_timestamp = '2023-04-24 12:00:00';