From cca259d76b3433668e7d90f70cff6e6705b0cf08 Mon Sep 17 00:00:00 2001 From: Paul Huang Date: Fri, 1 Mar 2013 14:32:10 -0800 Subject: [PATCH] Release 6.5.11 --- cache/include/javascript/sugar_grp1.js | 5 +- cache/include/javascript/sugar_grp1_yui.js | 2 +- cache/include/javascript/sugar_grp_emails.js | 11 +- cache/include/javascript/sugar_grp_jsolait.js | 2 +- .../include/javascript/sugar_grp_quickcomp.js | 11 +- files.md5 | 142 +++--- include/Dashlets/DashletGenericChart.php | 16 +- include/ListView/ListView.php | 2 +- include/ListView/ListViewData.php | 2 +- include/MVC/View/tpls/Importvcard.tpl | 2 +- include/MVC/View/views/view.importvcard.php | 4 + .../MVC/View/views/view.importvcardsave.php | 23 +- include/Popups/PopupSmarty.php | 21 +- include/SearchForm/SearchForm2.php | 3 +- include/SubPanel/SubPanelTiles.js | 2 +- include/SugarDateTime.php | 6 + .../templates/company/Company.php | 9 +- include/Sugarpdf/Sugarpdf.php | 1 + include/database/DBManager.php | 2 +- include/database/MssqlManager.php | 32 +- include/export_utils.php | 2 +- .../SugarWidgets/SugarWidgetReportField.php | 2 +- ...SugarWidgetSubPanelTopCreateTaskButton.php | 2 +- include/javascript/jsclass_async.js | 2 +- include/javascript/quicksearch.js | 2 +- include/javascript/report_additionals.js | 8 +- include/javascript/sugar_3.js | 5 +- include/language/en_us.lang.php | 1 + include/utils.php | 1 + include/vCard.php | 436 ++++++++++-------- install/confirmSettings.php | 5 +- .../include/SubPanel/SubPanelTiles.js | 2 +- .../include/javascript/jsclass_async.js | 2 +- .../include/javascript/quicksearch.js | 2 +- .../include/javascript/report_additionals.js | 10 +- .../src_files/include/javascript/sugar_3.js | 28 +- modules/Activities/EmailReminder.php | 2 +- modules/Calendar/Calendar.php | 30 +- modules/Calendar/CalendarActivity.php | 26 +- modules/Calendar/CalendarDisplay.php | 1 + modules/Calendar/index.php | 10 +- modules/Calendar/language/en_us.lang.php | 3 +- modules/Calendar/tpls/settings.tpl | 11 + modules/Calendar/views/view.savesettings.php | 1 + modules/Calls/metadata/additionalDetails.php | 11 +- modules/Campaigns/TrackDetailView.php | 4 + modules/Contacts/language/en_us.lang.php | 1 - modules/EmailMan/EmailMan.php | 13 +- modules/EmailMan/EmailManDelivery.php | 7 +- modules/Emails/Check.php | 49 +- modules/Emails/Email.php | 123 ++--- modules/Emails/javascript/EmailUICompose.js | 22 + modules/Emails/javascript/ajax.js | 7 +- .../Emails/javascript/composeEmailTemplate.js | 3 +- modules/Emails/language/en_us.lang.php | 1 + modules/Emails/views/view.quickcreate.php | 3 +- modules/InboundEmail/InboundEmail.php | 78 ++++ modules/Leads/tpls/ConvertLeadHeader.tpl | 4 + .../Meetings/metadata/additionalDetails.php | 14 +- modules/Schedulers/_AddJobsHere.php | 24 +- modules/SchedulersJobs/SchedulersJob.php | 11 +- modules/Studio/wizards/RenameModules.php | 22 +- modules/Tasks/language/en_us.lang.php | 2 +- modules/Tasks/metadata/additionalDetails.php | 14 +- modules/Users/User.php | 16 + modules/Users/reassignUserRecords.php | 4 +- modules/vCals/HTTP_WebDAV_Server_vCal.php | 5 +- service/core/REST/SugarRestJSON.php | 1 + service/v4_1/SugarWebServiceImplv4_1.php | 6 +- soap/SoapTypes.php | 3 +- sugar_version.php | 8 +- tests/include/ListView/Bug58890Test.php | 4 + tests/include/SearchForm/Bug54929Test.php | 112 ----- tests/include/database/MssqlManagerTest.php | 344 ++++++++++++++ tests/include/database/MysqlManagerTest.php | 36 ++ tests/include/database/bug_60870_text.txt | 14 + tests/include/vCard/Bug60613Test.php | 131 ++++++ tests/include/vCard/vCardBug40629Test.php | 7 +- tests/modules/Calendar/Bug58702Test.php | 129 ++++++ ...etNamePlusEmailAddressesForComposeTest.php | 7 +- tests/service/Bug38858Test.php | 112 +++++ tests/service/Bug43368Test.php | 91 ++++ tests/soap/Bug51182Test.php | 102 ++++ 83 files changed, 1793 insertions(+), 644 deletions(-) delete mode 100755 tests/include/SearchForm/Bug54929Test.php create mode 100755 tests/include/database/bug_60870_text.txt create mode 100755 tests/include/vCard/Bug60613Test.php create mode 100755 tests/modules/Calendar/Bug58702Test.php create mode 100755 tests/service/Bug38858Test.php create mode 100755 tests/service/Bug43368Test.php create mode 100755 tests/soap/Bug51182Test.php diff --git a/cache/include/javascript/sugar_grp1.js b/cache/include/javascript/sugar_grp1.js index d3bc467c..7da02e01 100644 --- a/cache/include/javascript/sugar_grp1.js +++ b/cache/include/javascript/sugar_grp1.js @@ -527,8 +527,11 @@ elemType=elem.type.toLowerCase();if(elemType=='text'||elemType=='textarea'||elem else if(elemType=='select'||elemType=='select-one'||elemType=='select-multiple'){var optionList=elem.options;if(optionList.length>0){optionList[0].selected="selected";} for(var ii=0;ii3&&elem.name.substring(elem.name.length-3)=='_id')||((elem.name.length>9)&&(elem.name.substring(elem.name.length-9)=='_id_basic'))||(elem.name.length>12&&elem.name.substring(elem.name.length-12)=='_id_advanced')||(elem.name.length>2&&elem.name.substring(elem.name.length-2)=='_c')||((elem.name.length>8)&&(elem.name.substring(elem.name.length-8)=='_c_basic'))||(elem.name.length>11&&elem.name.substring(elem.name.length-11)=='_c_advanced')) +else if(elemType=='hidden'){if(elem.name.indexOf("_id")!=-1||elem.name.indexOf("_c")!=-1||elem.name.indexOf("_advanced")!=-1) {elem.value='';}}} +if(typeof(collection)!=='undefined') +{for(key in collection) +{collection[key].clean_up();}} SUGAR.savedViews.clearColumns=true;}};}();SUGAR.tabChooser=function(){var object_refs=new Array();return{frozenOptions:[],movementCallback:function(left_side,right_side){},orderCallback:function(left_side,right_side){},freezeOptions:function(left_name,right_name,target){if(!SUGAR.tabChooser.frozenOptions){SUGAR.tabChooser.frozenOptions=[];} if(!SUGAR.tabChooser.frozenOptions[left_name]){SUGAR.tabChooser.frozenOptions[left_name]=[];} if(!SUGAR.tabChooser.frozenOptions[left_name][right_name]){SUGAR.tabChooser.frozenOptions[left_name][right_name]=[];} diff --git a/cache/include/javascript/sugar_grp1_yui.js b/cache/include/javascript/sugar_grp1_yui.js index 4c3043fd..0c286559 100644 --- a/cache/include/javascript/sugar_grp1_yui.js +++ b/cache/include/javascript/sugar_grp1_yui.js @@ -276,7 +276,7 @@ if(label_str!=current_label_data_str&¤t_label_data_str!=label_data_str){mo {if(this.inputElement.id=='shipping_account_name') {filter=Dom.get('shipping_checkbox').checked?/(account_id|office_phone)/:filter;}else if(this.inputElement.id=='billing_account_name'){filter=Dom.get('shipping_checkbox').checked?filter:/(account_id|office_phone|billing)/;}}else if(Dom.get('alt_checkbox')){filter=Dom.get('alt_checkbox').checked?filter:/^(?!alt)/;} this.updateFields(data,filter);}}else{this.updateFields(data,filter);}};} -if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=SUGAR.config.quicksearch_querydelay;} +if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=Number(SUGAR.config.quicksearch_querydelay);} search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=this.fields;this.setFields(data,/\S/);if(typeof(this.qs_obj['post_onblur_function'])!='undefined'){collection_extended=new Array();for(var i in fields){for(var key in this.qs_obj.field_list){if(fields[i]==this.qs_obj.field_list[key]){collection_extended[this.qs_obj.field_list[key]]=data[i];}}} eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} diff --git a/cache/include/javascript/sugar_grp_emails.js b/cache/include/javascript/sugar_grp_emails.js index 161c7728..ec362a88 100644 --- a/cache/include/javascript/sugar_grp_emails.js +++ b/cache/include/javascript/sugar_grp_emails.js @@ -833,7 +833,9 @@ var et=document.getElementById('email_template'+idx);SE.util.emptySelectOptions( var sigs=document.getElementById('signatures'+idx);SE.util.emptySelectOptions(sigs);for(var key in this.signatures){var display=this.signatures[key];var opt=new Option(display,key);if(key==SE.userPrefs.signatures.signature_default){opt.selected=true;} sigs.options.add(opt);} var htmlEmail=document.getElementById('setEditor'+idx);if(SE.userPrefs.emailSettings.sendPlainText==1){htmlEmail.checked=true;}else{htmlEmail.checked=false;} -SE.tinyInstances[SE.tinyInstances.currentHtmleditor].ready=true;},replyForwardEmailStage2:function(){SE.util.clearHiddenFieldValues('emailUIForm');SUGAR.showMessageBox(app_strings.LBL_EMAIL_RETRIEVING_MESSAGE,app_strings.LBL_EMAIL_ONE_MOMENT);var ieId=SE.composeLayout.replyForwardObj.ieId;var uid=SE.composeLayout.replyForwardObj.uid;var mbox=SE.composeLayout.replyForwardObj.mbox;var type=SE.composeLayout.replyForwardObj.type;var idx=SE.composeLayout.currentInstanceId;var sugarEmail=(SE.composeLayout.replyForwardObj.sugarEmail)?'&sugarEmail=true':"";document.getElementById('emailSubject'+idx).value=type;document.getElementById('emailUIAction').value='composeEmail';document.getElementById('composeType').value=type;document.getElementById('ieId').value=ieId;document.getElementById('uid').value=uid;document.getElementById('mbox').value=mbox;document.getElementById('setEditor'+idx).checked=SE.userPrefs.emailSettings.sendPlainText==1?true:false;var formObject=document.getElementById('emailUIForm');YAHOO.util.Connect.setForm(formObject);var sendType=type;AjaxObject.startRequest(callbackReplyForward,urlStandard+"&composeType="+type+sugarEmail);},showHiddenAddress:function(addrType,idx){Dom.removeClass(addrType+"_tr"+idx,"yui-hidden");Dom.addClass(addrType+"_span"+idx,"yui-hidden");Dom.addClass("bcc_cc_sep"+idx,"yui-hidden");this[addrType+'Hidden'+idx]=false;Dom.insertAfter("add_addr_options_tr"+idx,'bcc_tr'+idx);if((typeof(this['ccHidden'+idx])!='undefined'&&typeof(this['bccHidden'+idx])!='undefined')&&(this['ccHidden'+idx]==false&&this['bccHidden'+idx]==false)) +SE.tinyInstances[SE.tinyInstances.currentHtmleditor].ready=true;},replyForwardEmailStage2:function(){SE.util.clearHiddenFieldValues('emailUIForm');SUGAR.showMessageBox(app_strings.LBL_EMAIL_RETRIEVING_MESSAGE,app_strings.LBL_EMAIL_ONE_MOMENT);var ieId=SE.composeLayout.replyForwardObj.ieId;var uid=SE.composeLayout.replyForwardObj.uid;var mbox=SE.composeLayout.replyForwardObj.mbox;var type=SE.composeLayout.replyForwardObj.type;var idx=SE.composeLayout.currentInstanceId;var sugarEmail=(SE.composeLayout.replyForwardObj.sugarEmail)?'&sugarEmail=true':"";document.getElementById('emailSubject'+idx).value=type;document.getElementById('emailUIAction').value='composeEmail';document.getElementById('composeType').value=type;document.getElementById('ieId').value=ieId;document.getElementById('uid').value=uid;document.getElementById('mbox').value=mbox;document.getElementById('setEditor'+idx).checked=SE.userPrefs.emailSettings.sendPlainText==1?true:false;var formObject=document.getElementById('emailUIForm');YAHOO.util.Connect.setForm(formObject);var sendType=type;AjaxObject.startRequest(callbackReplyForward,urlStandard+"&composeType="+type+sugarEmail);},moveToBCC:function(addrType,idx){var toVal=$.trim($("#addressTO"+idx).val());var BCCVal=$.trim($("#addressBCC"+idx).val());if(toVal.length!=0) +{BCCVal=BCCVal.replace(/^,/,'');toVal=toVal.replace(/\,$/,'');$("#addressBCC"+idx).val(toVal+","+BCCVal);$("#addressTO"+idx).val("");} +SE.composeLayout.showHiddenAddress('bcc',SE.composeLayout.currentInstanceId);},showHiddenAddress:function(addrType,idx){Dom.removeClass(addrType+"_tr"+idx,"yui-hidden");Dom.addClass(addrType+"_span"+idx,"yui-hidden");Dom.addClass("bcc_cc_sep"+idx,"yui-hidden");this[addrType+'Hidden'+idx]=false;Dom.insertAfter("add_addr_options_tr"+idx,'bcc_tr'+idx);if((typeof(this['ccHidden'+idx])!='undefined'&&typeof(this['bccHidden'+idx])!='undefined')&&(this['ccHidden'+idx]==false&&this['bccHidden'+idx]==false)) Dom.addClass("add_addr_options_tr"+idx,"yui-hidden");SE.composeLayout.resizeEditor(idx);},hideHiddenAddresses:function(idx){var addrTypes=['cc','bcc'];for(var i=0;icontH?(contH+10):(viewH-75))+"px";this.body.style.overflow="auto";},SED.quickCreateDialog);SED.quickCreateDialog.hideEvent.subscribe(function(){var qsFields=YAHOO.util.Dom.getElementsByClassName('.sqsEnabled',null,this.body);});SED.quickCreateDialog.setHeader(app_strings.LBL_EMAIL_QUICK_CREATE);} if(ret.html){ret.html=ret.html.replace('',"");} -SED.quickCreateDialog.setBody(ret.html?ret.html:" ");SED.quickCreateDialog.render();SUGAR.util.evalScript(ret.html+'');SED.quickCreateDialog.ieId=ret.ieId;SED.quickCreateDialog.uid=ret.uid;SED.quickCreateDialog.mbox=ret.mbox;SED.quickCreateDialog.qcmodule=ret.module;SED.quickCreateDialog.show();var editForm=document.getElementById('form_EmailQCView_'+ret.module);if(editForm){editForm.module.value='Emails';var count=SUGAR.EmailAddressWidget.count[ret.module]?SUGAR.EmailAddressWidget.count[ret.module]:0;var tableId=YAHOO.util.Dom.getElementsByClassName('emailaddresses','table',editForm)[0];tableId=tableId?tableId.id:tableId;var instId=ret.module+count;SED.quickCreateEmailsToAdd=ret.emailAddress;SED.quickCreateEmailCallback=function(instId,tableId){if(tableId){var eaw=new SUGAR.EmailAddressWidget.instances[instId];if(eaw){eaw.prefillEmailAddresses(tableId,SUGAR.email2.detailView.quickCreateEmailsToAdd);}else{window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}}} +SED.quickCreateDialog.setBody(ret.html?ret.html:" ");SED.quickCreateDialog.render();SUGAR.util.evalScript(ret.html+'');SED.quickCreateDialog.ieId=ret.ieId;SED.quickCreateDialog.uid=ret.uid;SED.quickCreateDialog.mbox=ret.mbox;SED.quickCreateDialog.qcmodule=ret.module;SED.quickCreateDialog.show();var editForm=document.getElementById('form_EmailQCView_'+ret.module);if(editForm){editForm.module.value='Emails';var count=0;if(SUGAR.EmailAddressWidget.count[ret.module]){count=SUGAR.EmailAddressWidget.count[ret.module]-1;} +var tableId=YAHOO.util.Dom.getElementsByClassName('emailaddresses','table',editForm)[0];tableId=tableId?tableId.id:tableId;var instId=ret.module+count;SED.quickCreateEmailsToAdd=ret.emailAddress;SED.quickCreateEmailCallback=function(instId,tableId){if(tableId){var eaw=SUGAR.EmailAddressWidget.instances[instId];if(eaw){eaw.prefillEmailAddresses(tableId,SUGAR.email2.detailView.quickCreateEmailsToAdd);}else{window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}}} window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}},saveQuickCreateForm:function(o){SUGAR.hideMessageBox();SUGAR.email2.detailView.quickCreateDialog.hide();validate['EditView']=[];},saveQuickCreateFormAndReply:function(o){SUGAR.hideMessageBox();var ret=YAHOO.lang.JSON.parse(o.responseText);SUGAR.email2.detailView.quickCreateDialog.hide();var qcd=SUGAR.email2.detailView.quickCreateDialog;var type=(qcd.qcmodule=='Cases')?'replyCase':'reply';if(ret){var emailID=ret.id;SUGAR.email2.composeLayout.c0_replyForwardEmail(null,ret.id,'sugar::Emails',type);}else{SUGAR.email2.composeLayout.c0_replyForwardEmail(qcd.ieId,qcd.uid,qcd.mbox,type);} validate['EditView']=[];},saveQuickCreateFormAndAddToAddressBook:function(o){SUGAR.hideMessageBox();SUGAR.email2.detailView.quickCreateDialog.hide();SUGAR.email2.complexLayout.findPanel('contactsTab').show();validate['EditView']=[];},handleAssignmentDialogAssignAction:function(){var assign_user_id=window.document.forms['Distribute'].elements['assigned_user_id'].value;var dist='direct';var users=false;var rules=false;var get="";var found_teams=false;var warning_message=mod_strings.LBL_WARN_NO_USERS;if(!found_teams&&assign_user_id=='') {alert(warning_message);return;} @@ -1022,7 +1025,7 @@ QSProcessedFieldsArray[fullFieldName]=false;if(Dom.get(resultName)) var myBufferedListenerObject=new Object();myBufferedListenerObject.refit=function(){if(SUGAR.email2.grid){SUGAR.email2.grid.autoSize();}}/* End of File modules/Emails/javascript/complexLayout.js */ -SUGAR.email2.templates['compose']='
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+' '+' '+'  {mod_strings.LBL_EMAIL_RELATE}:  '+' '+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+'
'+'   '+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
   {mod_strings.LBL_ADD_CC} {mod_strings.LBL_ADD_CC_BCC_SEP} {mod_strings.LBL_ADD_BCC}
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS2}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' '+'
'+'  '+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_TEMPLATES}:'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_SIGNATURES}:'+'
'+' '+'
'+' '+' '+' '+' '+'
'+'  '+' {mod_strings.LBL_SEND_IN_PLAIN_TEXT}'+'
'+'
'+'
'+'
'+'';/* End of File modules/Emails/javascript/composeEmailTemplate.js */ +SUGAR.email2.templates['compose']='
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+' '+' '+'  {mod_strings.LBL_EMAIL_RELATE}:  '+' '+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+'
'+' {mod_strings.LBL_MOVE_TO_BCC}
'+'   '+' '+'
'+'
'+'
   {mod_strings.LBL_ADD_CC} {mod_strings.LBL_ADD_CC_BCC_SEP} {mod_strings.LBL_ADD_BCC}
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS2}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' '+'
'+'  '+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_TEMPLATES}:'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_SIGNATURES}:'+'
'+' '+'
'+' '+' '+' '+' '+'
'+'  '+' {mod_strings.LBL_SEND_IN_PLAIN_TEXT}'+'
'+'
'+'
'+'
'+'';/* End of File modules/Emails/javascript/composeEmailTemplate.js */ SUGAR.email2.templates['displayOneEmail']='
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' {meta.cc}'+' {email.attachments}'+'
'+' {app_strings.LBL_EMAIL_FROM}:'+' '+' {email.from_addr}'+'
'+' {app_strings.LBL_EMAIL_SUBJECT}:'+' '+' {email.name}'+'
'+' {app_strings.LBL_EMAIL_DATE_SENT_BY_SENDER}:'+' '+' {email.date_start} {email.time_start}'+'
'+' {app_strings.LBL_EMAIL_TO}:'+' '+' {email.toaddrs}'+'
'+'
'+'
';/* End of File modules/Emails/javascript/displayOneEmailTemplate.js */ @@ -1051,7 +1054,7 @@ if(label_str!=current_label_data_str&¤t_label_data_str!=label_data_str){mo {if(this.inputElement.id=='shipping_account_name') {filter=Dom.get('shipping_checkbox').checked?/(account_id|office_phone)/:filter;}else if(this.inputElement.id=='billing_account_name'){filter=Dom.get('shipping_checkbox').checked?filter:/(account_id|office_phone|billing)/;}}else if(Dom.get('alt_checkbox')){filter=Dom.get('alt_checkbox').checked?filter:/^(?!alt)/;} this.updateFields(data,filter);}}else{this.updateFields(data,filter);}};} -if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=SUGAR.config.quicksearch_querydelay;} +if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=Number(SUGAR.config.quicksearch_querydelay);} search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=this.fields;this.setFields(data,/\S/);if(typeof(this.qs_obj['post_onblur_function'])!='undefined'){collection_extended=new Array();for(var i in fields){for(var key in this.qs_obj.field_list){if(fields[i]==this.qs_obj.field_list[key]){collection_extended[this.qs_obj.field_list[key]]=data[i];}}} eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} diff --git a/cache/include/javascript/sugar_grp_jsolait.js b/cache/include/javascript/sugar_grp_jsolait.js index 2fe8f0b1..378111c9 100644 --- a/cache/include/javascript/sugar_grp_jsolait.js +++ b/cache/include/javascript/sugar_grp_jsolait.js @@ -33,7 +33,7 @@ function method_callback(o){var resp=YAHOO.lang.JSON.parse(o.responseText),reque reqid=global_request_registry[request_id];if(typeof(reqid)!='undefined'){widget=global_request_registry[request_id][0];method_name=global_request_registry[request_id][1];widget[method_name](result);}} SugarClass.inherit("SugarVCalClient","SugarClass");function SugarVCalClient(){this.init();} SugarVCalClient.prototype.init=function(){} -SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} +SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&noAuth=noAuth&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} SugarVCalClient.prototype.parseResults=function(textResult,adjusted){var match=/FREEBUSY.*?\:([\w]+)\/([\w]+)/g;var result;var timehash=new Object();var dst_start;var dst_end;if(GLOBAL_REGISTRY.current_user.fields.dst_start==null) diff --git a/cache/include/javascript/sugar_grp_quickcomp.js b/cache/include/javascript/sugar_grp_quickcomp.js index 9ddc2205..4ee8365e 100644 --- a/cache/include/javascript/sugar_grp_quickcomp.js +++ b/cache/include/javascript/sugar_grp_quickcomp.js @@ -33,7 +33,7 @@ function method_callback(o){var resp=YAHOO.lang.JSON.parse(o.responseText),reque reqid=global_request_registry[request_id];if(typeof(reqid)!='undefined'){widget=global_request_registry[request_id][0];method_name=global_request_registry[request_id][1];widget[method_name](result);}} SugarClass.inherit("SugarVCalClient","SugarClass");function SugarVCalClient(){this.init();} SugarVCalClient.prototype.init=function(){} -SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} +SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&noAuth=noAuth&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} SugarVCalClient.prototype.parseResults=function(textResult,adjusted){var match=/FREEBUSY.*?\:([\w]+)\/([\w]+)/g;var result;var timehash=new Object();var dst_start;var dst_end;if(GLOBAL_REGISTRY.current_user.fields.dst_start==null) @@ -150,7 +150,8 @@ var out=displayTemplate.exec({'app_strings':app_strings,'theme':theme,'idx':'Pre SED.viewDialog.setHeader(ret.title);SED.viewDialog.setBody(ret.html);SED.viewDialog.render();SED.viewDialog.show();},showQuickCreateForm:function(o){var SED=SUGAR.email2.detailView;var ret=YAHOO.lang.JSON.parse(o.responseText);if(!SED.quickCreateDialog){SED.quickCreateDialog=new YAHOO.widget.Dialog("quickCreateForEmail",{modal:true,visible:true,fixedcenter:true,constraintoviewport:true,shadow:true});SED.quickCreateDialog.renderEvent.subscribe(function(){var viewH=YAHOO.util.Dom.getViewportHeight();var contH=0;for(var i in this.body.childNodes){if(this.body.childNodes[i].clientHeight){contH+=this.body.childNodes[i].clientHeight;}else if(this.body.childNodes[i].offsetHeight){contH+=this.body.childNodes[i].offsetHeight;}} this.body.style.width="800px";this.body.style.height=(viewH-75>contH?(contH+10):(viewH-75))+"px";this.body.style.overflow="auto";},SED.quickCreateDialog);SED.quickCreateDialog.hideEvent.subscribe(function(){var qsFields=YAHOO.util.Dom.getElementsByClassName('.sqsEnabled',null,this.body);});SED.quickCreateDialog.setHeader(app_strings.LBL_EMAIL_QUICK_CREATE);} if(ret.html){ret.html=ret.html.replace('',"");} -SED.quickCreateDialog.setBody(ret.html?ret.html:" ");SED.quickCreateDialog.render();SUGAR.util.evalScript(ret.html+'');SED.quickCreateDialog.ieId=ret.ieId;SED.quickCreateDialog.uid=ret.uid;SED.quickCreateDialog.mbox=ret.mbox;SED.quickCreateDialog.qcmodule=ret.module;SED.quickCreateDialog.show();var editForm=document.getElementById('form_EmailQCView_'+ret.module);if(editForm){editForm.module.value='Emails';var count=SUGAR.EmailAddressWidget.count[ret.module]?SUGAR.EmailAddressWidget.count[ret.module]:0;var tableId=YAHOO.util.Dom.getElementsByClassName('emailaddresses','table',editForm)[0];tableId=tableId?tableId.id:tableId;var instId=ret.module+count;SED.quickCreateEmailsToAdd=ret.emailAddress;SED.quickCreateEmailCallback=function(instId,tableId){if(tableId){var eaw=new SUGAR.EmailAddressWidget.instances[instId];if(eaw){eaw.prefillEmailAddresses(tableId,SUGAR.email2.detailView.quickCreateEmailsToAdd);}else{window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}}} +SED.quickCreateDialog.setBody(ret.html?ret.html:" ");SED.quickCreateDialog.render();SUGAR.util.evalScript(ret.html+'');SED.quickCreateDialog.ieId=ret.ieId;SED.quickCreateDialog.uid=ret.uid;SED.quickCreateDialog.mbox=ret.mbox;SED.quickCreateDialog.qcmodule=ret.module;SED.quickCreateDialog.show();var editForm=document.getElementById('form_EmailQCView_'+ret.module);if(editForm){editForm.module.value='Emails';var count=0;if(SUGAR.EmailAddressWidget.count[ret.module]){count=SUGAR.EmailAddressWidget.count[ret.module]-1;} +var tableId=YAHOO.util.Dom.getElementsByClassName('emailaddresses','table',editForm)[0];tableId=tableId?tableId.id:tableId;var instId=ret.module+count;SED.quickCreateEmailsToAdd=ret.emailAddress;SED.quickCreateEmailCallback=function(instId,tableId){if(tableId){var eaw=SUGAR.EmailAddressWidget.instances[instId];if(eaw){eaw.prefillEmailAddresses(tableId,SUGAR.email2.detailView.quickCreateEmailsToAdd);}else{window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}}} window.setTimeout(function(){SUGAR.email2.detailView.quickCreateEmailCallback(instId,tableId);},100);}},saveQuickCreateForm:function(o){SUGAR.hideMessageBox();SUGAR.email2.detailView.quickCreateDialog.hide();validate['EditView']=[];},saveQuickCreateFormAndReply:function(o){SUGAR.hideMessageBox();var ret=YAHOO.lang.JSON.parse(o.responseText);SUGAR.email2.detailView.quickCreateDialog.hide();var qcd=SUGAR.email2.detailView.quickCreateDialog;var type=(qcd.qcmodule=='Cases')?'replyCase':'reply';if(ret){var emailID=ret.id;SUGAR.email2.composeLayout.c0_replyForwardEmail(null,ret.id,'sugar::Emails',type);}else{SUGAR.email2.composeLayout.c0_replyForwardEmail(qcd.ieId,qcd.uid,qcd.mbox,type);} validate['EditView']=[];},saveQuickCreateFormAndAddToAddressBook:function(o){SUGAR.hideMessageBox();SUGAR.email2.detailView.quickCreateDialog.hide();SUGAR.email2.complexLayout.findPanel('contactsTab').show();validate['EditView']=[];},handleAssignmentDialogAssignAction:function(){var assign_user_id=window.document.forms['Distribute'].elements['assigned_user_id'].value;var dist='direct';var users=false;var rules=false;var get="";var found_teams=false;var warning_message=mod_strings.LBL_WARN_NO_USERS;if(!found_teams&&assign_user_id=='') {alert(warning_message);return;} @@ -468,7 +469,9 @@ var et=document.getElementById('email_template'+idx);SE.util.emptySelectOptions( var sigs=document.getElementById('signatures'+idx);SE.util.emptySelectOptions(sigs);for(var key in this.signatures){var display=this.signatures[key];var opt=new Option(display,key);if(key==SE.userPrefs.signatures.signature_default){opt.selected=true;} sigs.options.add(opt);} var htmlEmail=document.getElementById('setEditor'+idx);if(SE.userPrefs.emailSettings.sendPlainText==1){htmlEmail.checked=true;}else{htmlEmail.checked=false;} -SE.tinyInstances[SE.tinyInstances.currentHtmleditor].ready=true;},replyForwardEmailStage2:function(){SE.util.clearHiddenFieldValues('emailUIForm');SUGAR.showMessageBox(app_strings.LBL_EMAIL_RETRIEVING_MESSAGE,app_strings.LBL_EMAIL_ONE_MOMENT);var ieId=SE.composeLayout.replyForwardObj.ieId;var uid=SE.composeLayout.replyForwardObj.uid;var mbox=SE.composeLayout.replyForwardObj.mbox;var type=SE.composeLayout.replyForwardObj.type;var idx=SE.composeLayout.currentInstanceId;var sugarEmail=(SE.composeLayout.replyForwardObj.sugarEmail)?'&sugarEmail=true':"";document.getElementById('emailSubject'+idx).value=type;document.getElementById('emailUIAction').value='composeEmail';document.getElementById('composeType').value=type;document.getElementById('ieId').value=ieId;document.getElementById('uid').value=uid;document.getElementById('mbox').value=mbox;document.getElementById('setEditor'+idx).checked=SE.userPrefs.emailSettings.sendPlainText==1?true:false;var formObject=document.getElementById('emailUIForm');YAHOO.util.Connect.setForm(formObject);var sendType=type;AjaxObject.startRequest(callbackReplyForward,urlStandard+"&composeType="+type+sugarEmail);},showHiddenAddress:function(addrType,idx){Dom.removeClass(addrType+"_tr"+idx,"yui-hidden");Dom.addClass(addrType+"_span"+idx,"yui-hidden");Dom.addClass("bcc_cc_sep"+idx,"yui-hidden");this[addrType+'Hidden'+idx]=false;Dom.insertAfter("add_addr_options_tr"+idx,'bcc_tr'+idx);if((typeof(this['ccHidden'+idx])!='undefined'&&typeof(this['bccHidden'+idx])!='undefined')&&(this['ccHidden'+idx]==false&&this['bccHidden'+idx]==false)) +SE.tinyInstances[SE.tinyInstances.currentHtmleditor].ready=true;},replyForwardEmailStage2:function(){SE.util.clearHiddenFieldValues('emailUIForm');SUGAR.showMessageBox(app_strings.LBL_EMAIL_RETRIEVING_MESSAGE,app_strings.LBL_EMAIL_ONE_MOMENT);var ieId=SE.composeLayout.replyForwardObj.ieId;var uid=SE.composeLayout.replyForwardObj.uid;var mbox=SE.composeLayout.replyForwardObj.mbox;var type=SE.composeLayout.replyForwardObj.type;var idx=SE.composeLayout.currentInstanceId;var sugarEmail=(SE.composeLayout.replyForwardObj.sugarEmail)?'&sugarEmail=true':"";document.getElementById('emailSubject'+idx).value=type;document.getElementById('emailUIAction').value='composeEmail';document.getElementById('composeType').value=type;document.getElementById('ieId').value=ieId;document.getElementById('uid').value=uid;document.getElementById('mbox').value=mbox;document.getElementById('setEditor'+idx).checked=SE.userPrefs.emailSettings.sendPlainText==1?true:false;var formObject=document.getElementById('emailUIForm');YAHOO.util.Connect.setForm(formObject);var sendType=type;AjaxObject.startRequest(callbackReplyForward,urlStandard+"&composeType="+type+sugarEmail);},moveToBCC:function(addrType,idx){var toVal=$.trim($("#addressTO"+idx).val());var BCCVal=$.trim($("#addressBCC"+idx).val());if(toVal.length!=0) +{BCCVal=BCCVal.replace(/^,/,'');toVal=toVal.replace(/\,$/,'');$("#addressBCC"+idx).val(toVal+","+BCCVal);$("#addressTO"+idx).val("");} +SE.composeLayout.showHiddenAddress('bcc',SE.composeLayout.currentInstanceId);},showHiddenAddress:function(addrType,idx){Dom.removeClass(addrType+"_tr"+idx,"yui-hidden");Dom.addClass(addrType+"_span"+idx,"yui-hidden");Dom.addClass("bcc_cc_sep"+idx,"yui-hidden");this[addrType+'Hidden'+idx]=false;Dom.insertAfter("add_addr_options_tr"+idx,'bcc_tr'+idx);if((typeof(this['ccHidden'+idx])!='undefined'&&typeof(this['bccHidden'+idx])!='undefined')&&(this['ccHidden'+idx]==false&&this['bccHidden'+idx]==false)) Dom.addClass("add_addr_options_tr"+idx,"yui-hidden");SE.composeLayout.resizeEditor(idx);},hideHiddenAddresses:function(idx){var addrTypes=['cc','bcc'];for(var i=0;i'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+' '+' '+'  {mod_strings.LBL_EMAIL_RELATE}:  '+' '+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+'
'+'   '+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
   {mod_strings.LBL_ADD_CC} {mod_strings.LBL_ADD_CC_BCC_SEP} {mod_strings.LBL_ADD_BCC}
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS2}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' '+'
'+'  '+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_TEMPLATES}:'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_SIGNATURES}:'+'
'+' '+'
'+' '+' '+' '+' '+'
'+'  '+' {mod_strings.LBL_SEND_IN_PLAIN_TEXT}'+'
'+'
'+'
'+' '+'';/* End of File modules/Emails/javascript/composeEmailTemplate.js */ +SUGAR.email2.templates['compose']='
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+' '+' '+'  {mod_strings.LBL_EMAIL_RELATE}:  '+' '+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+'
'+' {mod_strings.LBL_MOVE_TO_BCC}
'+'   '+' '+'
'+'
'+'
   {mod_strings.LBL_ADD_CC} {mod_strings.LBL_ADD_CC_BCC_SEP} {mod_strings.LBL_ADD_BCC}
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+' '+'
'+'
'+'
'+' '+' '+'
'+'   '+'
'+'
'+'
'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' {app_strings.LBL_EMAIL_ATTACHMENTS2}'+'
'+'  '+'
'+' '+'
'+'
'+'  '+'
'+'  '+'
'+' '+'
'+'  '+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_TEMPLATES}:'+'
'+' '+'
'+'
'+' '+' '+' '+' '+' '+' '+' '+'
'+' {app_strings.LBL_EMAIL_SIGNATURES}:'+'
'+' '+'
'+' '+' '+' '+' '+'
'+'  '+' {mod_strings.LBL_SEND_IN_PLAIN_TEXT}'+'
'+'
'+'
'+'
'+'';/* End of File modules/Emails/javascript/composeEmailTemplate.js */ function complexLayoutInit(){var se=SUGAR.email2;var Dom=YAHOO.util.Dom;se.e2Layout={getInnerLayout:function(rows){se.listViewLayout=new YAHOO.widget.Layout('listViewDiv',{parent:se.complexLayout,border:true,hideOnLayout:true,height:400,units:[{position:"center",scroll:false,split:true,body:"
"},{position:"bottom",scroll:true,collapse:false,resize:true,useShim:true,height:'250',body:"
"},{position:"right",scroll:true,collapse:false,resize:true,useShim:true,width:'250',body:"
",titlebar:false}]});se.complexLayout.on("render",function(){var height=SUGAR.email2.innerLayout.get("element").clientHeight-30;SUGAR.email2.innerLayout.get("activeTab").get("contentEl").parentNode.style.height=height+"px";SUGAR.email2.listViewLayout.set("height",height);SUGAR.email2.listViewLayout.render();});se.listViewLayout.render();se.listViewLayout.get("element").parentNode.parentNode.style.padding="0px" diff --git a/files.md5 b/files.md5 index 5c656a26..32af4fe1 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -53,7 +53,7 @@ $md5_string = array ( './include/SugarObjects/templates/company/icons/company_32.gif' => 'eb850fc1863a46987cdafca12693c789', './include/SugarObjects/templates/company/icons/company.gif' => '7890367dfe0e337a2f5f2839b3e6dac7', './include/SugarObjects/templates/company/icons/Createcompany.gif' => '3978b32e01cbeb974d86b1da0617dae9', - './include/SugarObjects/templates/company/Company.php' => 'f0f9be07665de4890384fc340c89f585', + './include/SugarObjects/templates/company/Company.php' => 'b5c0b6507f3401ff013d84ec173ef1b3', './include/SugarObjects/templates/company/metadata/searchdefs.php' => '653b4ad4d0271118ed731efc2d06e46b', './include/SugarObjects/templates/company/metadata/metafiles.php' => '2df20612d32ba42d04f035a5f44df31c', './include/SugarObjects/templates/company/metadata/quickcreatedefs.php' => 'bec05436178a6ee815cb0a038bb222dd', @@ -272,7 +272,7 @@ $md5_string = array ( './include/HTMLPurifier/LICENSE' => 'a1b3d3e45e8422eed104489842a6f546', './include/HTMLPurifier/CREDITS' => 'a5f9ddecea015543001404c0a9bfd181', './include/SugarHtml/SugarHtml.php' => 'ac86d214d3f6b4d0a9dd72e0aa647b6f', - './include/SubPanel/SubPanelTiles.js' => '204f9f5a51612dd769e5881420cd361d', + './include/SubPanel/SubPanelTiles.js' => 'e66d2c2c1a42608646fbdbf90ec99f91', './include/SubPanel/SugarTab.php' => '43d978b88d82d1257057924ed2a316ea', './include/SubPanel/SubPanelDynamic.html' => '719a36409ba810b2d8ee75ff261b5253', './include/SubPanel/tpls/singletabmenu.tpl' => '7a1c4c8d47e31cb40c99bcdd8eece6e2', @@ -295,7 +295,7 @@ $md5_string = array ( './include/Sugarpdf/SugarpdfHelper.php' => '35599a65bb962f0c4cc4301a1a331f20', './include/Sugarpdf/SugarpdfFactory.php' => '8167ec6ab68f9f9750d42ceffec76bec', './include/Sugarpdf/sugarpdf/sugarpdf.smarty.php' => '9a26252b2e52978c4c0dc119ce7109bc', - './include/Sugarpdf/Sugarpdf.php' => '710d1d2e6e61beda3bd6e9d44ed59f55', + './include/Sugarpdf/Sugarpdf.php' => '150a845134ec7b60d1e77a4db3529582', './include/Sugarpdf/sugarpdf_default.php' => 'ff9bbdfd9b541e43af9f4ee1cfeecba4', './include/Sugarpdf/sugarpdf_config.php' => '4d11694a169ef65afb1c6812499c9333', './include/clean.php' => '60e45d68744c50b6c3878b26fc6223ec', @@ -318,7 +318,7 @@ $md5_string = array ( './include/HTTP_WebDAV_Server/README' => 'e6f0ca3d7e4fa2b20310995f269c3ef2', './include/HTTP_WebDAV_Server/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/HTTP_WebDAV_Server/dav.txt' => 'c5235ed64efa685da638c6dcdb6a9708', - './include/SugarDateTime.php' => 'd421f167d58acde0596ca60401d5ab6d', + './include/SugarDateTime.php' => 'f7a9d56cbf75dbec4aa111fa52db2d3e', './include/contextMenus/contextMenu.php' => '518c5bc91d5dac6f6741387e31daadeb', './include/contextMenus/menuDefs/sugarAccount.php' => '5f9a81d9c4a96a2f948226217b9038a2', './include/contextMenus/menuDefs/sugarObject.php' => 'c21835c60c63bbe6f917878df688c1b7', @@ -582,7 +582,7 @@ $md5_string = array ( './include/nusoap/license.txt' => '25823f4a2e463ab2c6b5873f07e428e1', './include/nusoap/class.wsdl.php' => 'cd7f1a43ca08891ac1ce04d4d1282c49', './include/nusoap/class.soap_val.php' => '084a898ecf261c201427fd41d4ee40e0', - './include/utils.php' => '726ff2e8a33189daf92f6fd104be53cc', + './include/utils.php' => '605813274c807d0b9b805587dba6e2fc', './include/SugarHttpClient.php' => '44857baa23778fb3b8346aca15e15491', './include/Sugar_Smarty.php' => '2df55eb0c0e85f5c757680cb4c022d74', './include/phpmailer/extras/htmlfilter.php' => '4d5143899340a690d41a4959428ea674', @@ -616,7 +616,7 @@ $md5_string = array ( './include/phpmailer/language/phpmailer.lang-br.php' => 'a1364ab381ebdf3f05999b31bada24bd', './include/phpmailer/class.phpmailer.php' => 'f5db91a4a2a3889d87bf62f05723cb6b', './include/php-sql-parser.php' => '4fd316e1251bd1134a46134ad7ddaf57', - './include/database/DBManager.php' => '6fc5607912177c8f96399b152d8f9b53', + './include/database/DBManager.php' => 'f4325e203f70e6deb751aea31c4624ef', './include/database/MysqlHelper.php' => '35eefb1723b8c6d45a2363db21bd1cc6', './include/database/DBHelper.php' => '3417b96005ef6bdc856281e27a946055', './include/database/MysqlManager.php' => '7be00c681e69e7a0593d198ed3c2fb58', @@ -626,7 +626,7 @@ $md5_string = array ( './include/database/MssqlHelper.php' => '7c8aa2aef60b4c4942c2a5c6036458d2', './include/database/DBManagerFactory.php' => '2f289ec46c05233945edf3ca315795fc', './include/database/SqlsrvManager.php' => '55e10495f062f596ab7e78ccb89ff100', - './include/database/MssqlManager.php' => 'ececbde1f0e7c8e1d908bc7ded5923a2', + './include/database/MssqlManager.php' => '9f027e9e48ac752444f22b5913359f7b', './include/timezone/timezones.php' => '49790b86a0d55cf04f5629e08b30291b', './include/SugarSQLValidate.php' => '9d2e48001ac24297fb8cf3dc84b78612', './include/connectors/ConnectorFactory.php' => '89807b6eeb2d2dc1f75f53231b90e0dc', @@ -651,7 +651,7 @@ $md5_string = array ( './include/Popups/tpls/footer.tpl' => '9384eec4814b86a9a646c69bb2f6b814', './include/Popups/tpls/header.tpl' => '132ca519775a21b7817837c2a2e4f199', './include/Popups/tpls/PopupGeneric.tpl' => '83b2f701ddda9f4573d9add0f5e33474', - './include/Popups/PopupSmarty.php' => 'c0fd4d39e86eafc4d4a99e855c3e366c', + './include/Popups/PopupSmarty.php' => 'f0fd6de41564c27a848ed2561d44559e', './include/Popups/Popup_picker.php' => '92cc9c3a84d4ebbe76e7487605dd5da8', './include/templates/TemplateDragDropChooser.php' => '7ea8b4e854412716a49842e0ec20925b', './include/templates/Template.php' => 'e66cbf4c2a382db7a578224a398bbd8b', @@ -664,7 +664,7 @@ $md5_string = array ( './include/SugarDependentDropdown/metadata/dependentDropdown.php' => '7b2c31612cc942f102a887d8fe86e0e8', './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '22d131cc495cdfe65729520392bbc69c', './include/SugarDependentDropdown/SugarDependentDropdown.php' => 'a55f720c8073e67e64281d752a76815d', - './include/export_utils.php' => 'eab64ed31af51ac22cb961ac9f818ff2', + './include/export_utils.php' => 'a8a1cdfb8cddeec1b7dd900774c4c7df', './include/globalControlLinks.php' => 'bf7590760099fc3a1bc92b39a0e2e784', './include/SugarTinyMCE.php' => '0ba088a42b65615d6ba9a1372456cc56', './include/tabs.php' => '45b4cecd7fcd0eed024d748c1caad884', @@ -799,15 +799,15 @@ $md5_string = array ( './include/javascript/include.js' => 'f3ef613992bd21dcb9a6033c03675b90', './include/javascript/dashlets.js' => 'f3154b0f2bff9641df358ed967e9eb5d', './include/javascript/popup_helper.js' => '96c9afa646fed96bd44c158b65b123ab', - './include/javascript/report_additionals.js' => '7a4f3b0229c4877e78b25254df45375e', - './include/javascript/quicksearch.js' => 'cb7bd59a033dc277ad9849a06ca8598f', + './include/javascript/report_additionals.js' => '6d891005bb43fbbfd42da839db7b9986', + './include/javascript/quicksearch.js' => 'a4fe01d74dec1b175f3f1f30cf7f2f9e', './include/javascript/sugar_yui_overrides.js' => '8f58b85d735143b06883b06246e39170', './include/javascript/cookie.js' => 'fca904047ebf36d4eee53df902debb4f', './include/javascript/popup_parent_helper.js' => '2589c529444f256450a92957e38c3785', - './include/javascript/sugar_3.js' => '86b3f576a07cefb511bf66b404eb60c6', + './include/javascript/sugar_3.js' => '30eb1d422a9a240e61e8eeca09934186', './include/javascript/jquery.js' => '819fb9d29c24f79d34343e9f182aaf24', './include/javascript/sugar_connection_event_listener.js' => '382b26c2895d7921378688996c93d090', - './include/javascript/jsclass_async.js' => '01ec5b7228d4c1e93ca6dc651731db7d', + './include/javascript/jsclass_async.js' => 'c09187c0aeaee9f7771b8d9dbde402c4', './include/javascript/quickCompose.js' => '43694b8ad631b58dd9030925a99f5a15', './include/javascript/menu.js' => 'ae03a8baff44fcd4810058275f2844aa', './include/javascript/tour.js' => '782ed9e3bd73c09eecf32a0893f9374c', @@ -2554,11 +2554,11 @@ $md5_string = array ( './include/javascript/tiny_mce/tiny_mce_jquery_src.js' => 'a175f3acbdf3b9b54c22894fe77ff1f8', './include/javascript/tiny_mce/tiny_mce_jquery.js' => '5321add170943547a016932eaba0bc1b', './include/MVC/View/tpls/favorites.tpl' => '2a27801b74483df774a6bd5c7596a2ba', - './include/MVC/View/tpls/Importvcard.tpl' => '46760066cbfc515bbce2d1b2f751cd9f', + './include/MVC/View/tpls/Importvcard.tpl' => 'f4f3d8f80fb742df4601b7286bb51c46', './include/MVC/View/tpls/xsrf.tpl' => 'c06370bbd4656ead04ba51cf24911aea', './include/MVC/View/tpls/modulelistmenu.tpl' => 'af5d80705e8127c8ddcb0e8d037717a1', './include/MVC/View/views/view.metadata.php' => '75c0bbeac4b5915a53e6dbc734e52029', - './include/MVC/View/views/view.importvcardsave.php' => 'af0f380941e93e71adf181ed9a304355', + './include/MVC/View/views/view.importvcardsave.php' => 'ee6badf8d45e9afb8871b9b6770ece56', './include/MVC/View/views/view.quickedit.php' => 'a218bd7d4c8c187315bfb909427846f0', './include/MVC/View/views/view.quickcreate.php' => '08811f45747b722a7fb072fbcfd33ae3', './include/MVC/View/views/view.detail.config.php' => 'ee9addeedb32ffc6494a407cfeabda0d', @@ -2571,7 +2571,7 @@ $md5_string = array ( './include/MVC/View/views/view.xml.php' => '915fb80385c6357b3368891dfdd4dcb6', './include/MVC/View/views/view.sugarpdf.config.php' => 'a8b5a369c54618e94065de2527866cd8', './include/MVC/View/views/view.favorites.php' => 'a0e4f7dd78887363d1f910e039c8a938', - './include/MVC/View/views/view.importvcard.php' => '1cd110c144b872cd80781c53c67b1fc6', + './include/MVC/View/views/view.importvcard.php' => 'b77cd0b4a32c3beb744ce2c8103f5390', './include/MVC/View/views/view.ajaxui.php' => '0b12dc4e3031158f84e238e2d7c3ca0c', './include/MVC/View/views/view.classic.config.php' => '0a5adb6fee3ff66150840e235d5896c6', './include/MVC/View/views/view.edit.php' => '5b27a8bd7b2fc3f82d1b0ad79689e3a0', @@ -2602,14 +2602,14 @@ $md5_string = array ( './include/SearchForm/tpls/SearchFormGeneric.tpl' => '1c8f265316debc2716ae820fe3d606fe', './include/SearchForm/SugarSpot.php' => 'd8449360de3e2907dae694c8c984f40b', './include/SearchForm/SearchForm.php' => 'bb489966e170ef2b9782cdeffaf8f2eb', - './include/SearchForm/SearchForm2.php' => '53471bc9144627c037183b74b411dd15', + './include/SearchForm/SearchForm2.php' => '8e83bd871576fccc41b1f688f3bea16a', './include/Dashlets/DashletRssFeedTitle.php' => 'a47b01bb0712af9ed5c9cf86de254252', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => '2dafbe3aeb4faac8dda04fdc7153ac45', './include/Dashlets/DashletCacheBuilder.php' => '0c919c1e633ce4d3c8782f36c7a23642', './include/Dashlets/DashletGenericConfigure.tpl' => 'ceba10c6938ee0374075dd502918e872', './include/Dashlets/DashletGeneric.php' => 'b006dd6cd41e780fb3c873dc521194c0', './include/Dashlets/DashletGenericDisplay.tpl' => 'ce701e32b929bd46239d1c8476f6d6be', - './include/Dashlets/DashletGenericChart.php' => '64e6faa7146dff8a30af41b4c1df69da', + './include/Dashlets/DashletGenericChart.php' => 'a9bc81aecd3095b4d084fbeaf6391168', './include/Dashlets/Dashlet.php' => '550b9c8a853aae6ac1f60e7244a179b5', './include/Dashlets/DashletGenericAutoRefresh.tpl' => '076b5009caaa5cd0efd8b79fa04d1d06', './include/Dashlets/DashletGenericChartConfigure.tpl' => '0c368b877a526abe873484da26f2383f', @@ -2622,16 +2622,16 @@ $md5_string = array ( './include/Pear/XML_HTMLSax3/LICENSE' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/XML_HTMLSax3/HTMLSax3.php' => '11107d97b19feb13feb394cd858603f0', './include/ListView/ListViewSmarty.php' => '03c7294fc4d2339083e4b229cfd3c868', - './include/ListView/ListViewData.php' => '865a145a6210cdd26766a53cc915c151', + './include/ListView/ListViewData.php' => 'fa26469a4d9e5a2c51f2bd94afade8ec', './include/ListView/ListViewGeneric.tpl' => '53f9d79cd21bc746afe2bf11224bc3c9', - './include/ListView/ListView.php' => 'c4705c72d3c19eb4ab412b83d18300ff', + './include/ListView/ListView.php' => 'eb416b36c60ebdbf2b141329551e92d5', './include/ListView/ListViewFacade.php' => '564aa280b419dde1a8133570ab091a4d', './include/ListView/ListViewDCMenu.tpl' => 'b8fc691b5015320ea9ff8d56c26da377', './include/ListView/ListViewXTPL.php' => '13b61371300ea84868bfecd1625d5be1', './include/ListView/ListViewPagination.tpl' => '8192c397efea1a40b0be1e3eec43d281', './include/ListView/ListViewDisplay.php' => '80ecf9f1e96267d2c2367289ced4e434', './include/ListView/ListViewNoMassUpdate.tpl' => '64ccd25b685c8e0de7219711c8308ec1', - './include/vCard.php' => '9a3ed1a64e90431fdbd2b3e01149d235', + './include/vCard.php' => '34e8f0e9f927efbcbf6c133bf55bbf15', './include/upload_file.php' => '815ab6552e85b01dbde662c362528e13', './include/controller/Controller.php' => 'a8eeb941b5d10c61040811d9a20903ec', './include/formbase.php' => 'c1c3fe1836d99e6e4b88b6cacd1fa740', @@ -2641,7 +2641,7 @@ $md5_string = array ( './include/resource/Observers/ResourceObserver.php' => '77d273ea39b8e2abe026f1f8c515408b', './include/resource/Observers/SoapResourceObserver.php' => '8966a226d081e396d109d1e13dd6e6e0', './include/language/jsLanguage.php' => 'c5d5b59aa6c5c5a52e96c8758fc5a14e', - './include/language/en_us.lang.php' => 'f0ee571faf1f2a5e7e189255b94299bf', + './include/language/en_us.lang.php' => '4a8cc81471aba0b7a57baf2f3b8a1315', './include/language/en_us.notify_template.html' => 'b885a3d87060bee2226369fa918e77f3', './include/pclzip/readme.txt' => '2265cad9ccb84cfcd4093ce26b22dc97', './include/pclzip/gnu-lgpl.txt' => '7fbc338309ac38fefcd64b04bb903e34', @@ -2814,7 +2814,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldfile.php' => '4dffa8be0094fc500a1cba226eb1ac4a', './include/generic/SugarWidgets/SugarWidgetSubPanelRelFieldEditButton.php' => 'a86c528fc99093298266222fabc2a579', './include/generic/SugarWidgets/SugarWidgetFieldtime.php' => '5468aa8956e2996220a1a6d4b6d32657', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php' => '91a92db8a60d316c060a8273547cc574', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php' => '4cb67ae163eda2bdb1b7115faf5eff4b', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonAccount.php' => '4856eea780df5f43f579e35bf0e562ac', './include/generic/SugarWidgets/SugarWidgetSubPanelTopScheduleCallButton.php' => '7837e4cdd5c69eeebfc4fb1231177207', './include/generic/SugarWidgets/SugarWidgetSubPanelTopArchiveEmailButton.php' => 'cec38e102a1768b26b07a92c35aee57f', @@ -2833,7 +2833,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '24f2871da5dc8c415e485a405b79a75a', './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => '299d88cdeed157ffb93a88e2a4708c0c', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'ad4f6ef8810e8d0aae49d30d2151c5a0', - './include/generic/SugarWidgets/SugarWidgetReportField.php' => '6768c5ead5faf571da6c1bf2949e6d0a', + './include/generic/SugarWidgets/SugarWidgetReportField.php' => '11f8e781b0b2dcc11912a70153fe5089', './include/generic/SugarWidgets/SugarWidgetSubPanelCloseButton.php' => 'dc4aeab45c4536d847d098096e606519', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => '737000e60b4f1d2089311ce1a49f7a50', './include/generic/SugarWidgets/SugarWidgetFieldnum.php' => 'a38a9d4090dd5e904dfaf450a89951ac', @@ -3334,7 +3334,7 @@ $md5_string = array ( './service/core/REST/SugarRest.php' => 'f30d4e6bbf7c33d5724a5f82a1d06cec', './service/core/REST/SugarRestRSS.php' => '8ef16c19a990f3c8bd661539df98f205', './service/core/REST/SugarRestSerialize.php' => '40fc04e21841b2f23391fdf0674c6d74', - './service/core/REST/SugarRestJSON.php' => '909d9d6e1e45dbaf42daa95c982f9258', + './service/core/REST/SugarRestJSON.php' => '2bd1493ad24e52a436d0ac0ec372b7be', './service/core/NusoapSoap.php' => '66114438dc16707172db83cf7f85221a', './service/example/test.html' => 'd3d1792fe786a1a4093a19407ac8c55a', './service/example/example.html' => '47998fde7c73c94b39e0a3352647a59f', @@ -3357,7 +3357,7 @@ $md5_string = array ( './service/v4_1/soap.php' => '4bdfe995fe0cb9878f81009fa3e2a02c', './service/v4_1/registry.php' => '5b69e5f31c92a70bcc24ee93da7b2d45', './service/v4_1/rest.php' => '718ba44f6039aae0bbde137b8e1580f8', - './service/v4_1/SugarWebServiceImplv4_1.php' => '04497bb24d4d8f04bb83e9945896da9d', + './service/v4_1/SugarWebServiceImplv4_1.php' => '5e4c43e81ad82934c129baa199d1bfaf', './service/v4_1/SugarWebServiceUtilv4_1.php' => 'dd585ae84d5991c7fa20b734bef21bb9', './service/v2/SugarSoapService2.php' => '446c89b6a272bb155451bf76e9bf045c', './service/v2/soap.php' => '9de91b81df5111d1c62dff221060c300', @@ -3395,7 +3395,7 @@ $md5_string = array ( './modules/Leads/Capture.php' => 'ad778eabcc8573d2b006801e84d34407', './modules/Leads/Save.php' => '2ae4cbd8993177069562c7166b068be2', './modules/Leads/tpls/ConvertLead.tpl' => 'f4a84d67d4eefaeec41dc0fd4b2b98fb', - './modules/Leads/tpls/ConvertLeadHeader.tpl' => '8147064f7383454bd2c7a73104a3b051', + './modules/Leads/tpls/ConvertLeadHeader.tpl' => 'e1d0d08b119c7bdc4453faaa9065408b', './modules/Leads/tpls/EditConvertLead.tpl' => 'e0a86a970c16f6d0c35add1c9a35303c', './modules/Leads/tpls/QuickCreate.tpl' => '97d773909ddbc5bc35a3e4dc640998e2', './modules/Leads/tpls/ShowDuplicates.tpl' => '8c87be94a50d3e47377542fb6a1cbf06', @@ -3665,7 +3665,7 @@ $md5_string = array ( './modules/Calendar/tpls/footer.tpl' => '1796c56cc9d34cb6b18a46b18ba1aea5', './modules/Calendar/tpls/repeat.tpl' => '4deebb66bcce2d5711e9ee36fadef778', './modules/Calendar/tpls/shared_users.tpl' => '60345b943d788ad14d2d596ffd886aae', - './modules/Calendar/tpls/settings.tpl' => 'f4b6dad145c8d0ede9427e02bb3019bd', + './modules/Calendar/tpls/settings.tpl' => 'e0932666573eed20cb7c7e1969494b16', './modules/Calendar/tpls/main.tpl' => 'aec304ba36ac0c4694c399474ec2faf0', './modules/Calendar/tpls/header.tpl' => '3ec9c52bfea23df61e3089310512642e', './modules/Calendar/tpls/editHeader.tpl' => 'a933d05a5b4e01578ba4637b49e61762', @@ -3674,22 +3674,22 @@ $md5_string = array ( './modules/Calendar/CalendarUtils.php' => '5c699a23a9f339a78b9b619244b4ca4e', './modules/Calendar/Menu.php' => 'b80953392876c73052bfaf9aaa3ff281', './modules/Calendar/views/view.getgr.php' => 'd2d0125f4002b4c63b0c6a55929a755e', - './modules/Calendar/views/view.savesettings.php' => '56c88415694a42332f181b0c645e252a', + './modules/Calendar/views/view.savesettings.php' => '56d657a97483bb90abe09594e4f42c49', './modules/Calendar/views/view.getgrusers.php' => 'd944c60521f19cd83c69116811650c46', './modules/Calendar/views/view.quickedit.php' => '268f862ddb69ee0f1ebe4a0324937f3f', './modules/Calendar/views/view.json.php' => 'ab258d319e99bbc04e46f1fbbaedd464', './modules/Calendar/views/view.createinvitee.php' => '23d3de8c274a611d24060543b3e5a3ec', './modules/Calendar/controller.php' => '9012bbec7f34948388ed10d2c298c547', - './modules/Calendar/Calendar.php' => '27fd30476baabb21543f74d64ae1adaa', - './modules/Calendar/CalendarActivity.php' => '486c5da6ba47aa445a6502ec341fe2f3', + './modules/Calendar/Calendar.php' => '3769d617bd399fd709ccba95e1d507e8', + './modules/Calendar/CalendarActivity.php' => '0615ccbb2551809a789dbd207d8dceab', './modules/Calendar/action_view_map.php' => '569fe57460745baccc0ae58918cfeb7c', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl' => 'e443d1e2748d0b960559e0c15eb89495', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.meta.php' => 'f6c295275bd81d5e45a42631ad491e32', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.en_us.lang.php' => '2fd143e1022dfedc6c0560bc5324af24', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php' => '0e0cd3b17c749d61be445386c719bcda', - './modules/Calendar/index.php' => '9748bdcfb88db0892cbde36a16f1a13a', - './modules/Calendar/language/en_us.lang.php' => 'b829ca63e22e75456883a1d8add1b81f', - './modules/Calendar/CalendarDisplay.php' => '1095857d93cc3e0013da82196f562a1c', + './modules/Calendar/index.php' => 'c0b96130738ebc209a63c7c090cf33a1', + './modules/Calendar/language/en_us.lang.php' => '848ac6e0972cc2e26a18e7e1a57add6d', + './modules/Calendar/CalendarDisplay.php' => '941880eb4790c8e37f0d5bd2aa0aef2a', './modules/ACLRoles/ACLRoles.js' => '73e3540bf65b30c1a8ddef8b3dbddaaa', './modules/ACLRoles/DetailViewBody.tpl' => '731d86fbff18b1d912c2d7033f6dbc70', './modules/ACLRoles/EditAllBody.tpl' => '1316d787cae4056c35d3b88195a4cd05', @@ -3746,7 +3746,7 @@ $md5_string = array ( './modules/Emails/GenerateQuickComposeFrame.php' => '2819b266b279c9f7d69acf680baad080', './modules/Emails/SearchForm.html' => 'd8b6b9658c81fc05a37a5492eb932bfb', './modules/Emails/Status.html' => 'e8a4faa9b088eb94c863e1743a92643a', - './modules/Emails/views/view.quickcreate.php' => 'ba6bd042b9c1c30ec34b7cab615b216d', + './modules/Emails/views/view.quickcreate.php' => 'fadb1e4974df428b81f310beafe6d077', './modules/Emails/views/view.classic.config.php' => '44d16cdd5978dfc0760d37914d7656e0', './modules/Emails/views/view.modulelistmenu.php' => '235595b96d95a97e1a6191bd57da06ae', './modules/Emails/Compose.php' => 'a247ef7d91e2eb9b1bb35c30caf0825a', @@ -3797,15 +3797,15 @@ $md5_string = array ( './modules/Emails/metadata/subpanels/ForContacts.php' => '9350fb0ef9ef4db5e7b4a1011d9e849f', './modules/Emails/metadata/subpanels/ForUsers.php' => 'd7fddf2644b0aef16a5957fec9be180a', './modules/Emails/metadata/additionalDetails.php' => '6feb68f3dd761c02e449949c2e5b0b9f', - './modules/Emails/Check.php' => '490f4eff111e7d84a7349fc79f0ccb0c', + './modules/Emails/Check.php' => '649dda04729fa30660a8713ac0750037', './modules/Emails/SugarRoutingAsync.php' => '8afc9e2ee985d0126cfde68a511aaa60', - './modules/Emails/javascript/composeEmailTemplate.js' => 'c834a202e78e7cc4ee8288c380ead375', + './modules/Emails/javascript/composeEmailTemplate.js' => 'dea7f6fcaec5c4d99dd172dd59f1b380', './modules/Emails/javascript/Email.js' => '9139de2d66c322c563ebd636067c985b', './modules/Emails/javascript/email_popup_helper.js' => '29852336f7a6cfb99ba83cd91dd511b0', './modules/Emails/javascript/init.js' => '589b656506d7e061c74f1b304fd2f997', './modules/Emails/javascript/displayOneEmailTemplate.js' => '1c08074715773e437d3645fcc26cfc37', - './modules/Emails/javascript/ajax.js' => '30fac11fe0cafe81146b33a4f1a27071', - './modules/Emails/javascript/EmailUICompose.js' => 'ad9777cd3ac11c40b0d27fadb0b0d217', + './modules/Emails/javascript/ajax.js' => '34cd3a8d8d7c4adc0148ee9e4659ccd0', + './modules/Emails/javascript/EmailUICompose.js' => '943b2bac2f5e9a1cb815bbc411e06898', './modules/Emails/javascript/EmailUI.js' => 'e5eb7eab927b9a9f6209dec74c938ed9', './modules/Emails/javascript/grid.js' => 'e9322c6364864d7d4a5ab18640e3f0aa', './modules/Emails/javascript/viewPrintable.js' => 'f6607dbb693a458a99b4291eb8deb203', @@ -3823,9 +3823,9 @@ $md5_string = array ( './modules/Emails/ListViewDrafts.html' => '416d155c941b0333605a87ebb613e7fe', './modules/Emails/Popup_picker.php' => '0ab2d8ce1ae4d25286cb06a4451b7695', './modules/Emails/PessimisticLock.php' => 'a326fa1c6da260363192d48bafae6dc4', - './modules/Emails/language/en_us.lang.php' => '75e15153b04fa3ae734f10f2463e5669', + './modules/Emails/language/en_us.lang.php' => 'cd00d97f18781f3f741d7b020c08ecb6', './modules/Emails/ListViewMyInbox.html' => 'd0b0365b728f121473848d2eb58295a7', - './modules/Emails/Email.php' => 'bbd772ea07c7530c1f34ae3c2b159a83', + './modules/Emails/Email.php' => '3e1f32e3deb4e739530bd36a9fd10951', './modules/Emails/subpanels/ForQueues.php' => '0224aeefd4537b381511dcf8422f7d57', './modules/Emails/subpanels/ForHistory.php' => 'a67add6c1090ddad1c1fa0386b15a640', './modules/Emails/subpanels/ForContacts.php' => '9350fb0ef9ef4db5e7b4a1011d9e849f', @@ -3859,7 +3859,7 @@ $md5_string = array ( './modules/Configurator/language/en_us.lang.php' => 'f26a8943801cede71244d670f25b7b4f', './modules/Configurator/Forms.php' => 'd27aef3247f02668b0cddd955656962a', './modules/Schedulers/Schedulers.js' => '68e26e48cdcb723c290ab1e4e4e8dec1', - './modules/Schedulers/_AddJobsHere.php' => '3d8437d045b58d50b9ba4dea303afad9', + './modules/Schedulers/_AddJobsHere.php' => '0e99c085690a9114b4d18b0afcbca7ee', './modules/Schedulers/Save.php' => '30b80e2bf9364ff3a3ae62e364f0f7ca', './modules/Schedulers/Menu.php' => '52b7b71414e031f6b75fb9dadc70a105', './modules/Schedulers/vardefs.php' => '925ee14481ee4a5eb3cdbd804a6d319d', @@ -3925,7 +3925,7 @@ $md5_string = array ( './modules/InboundEmail/DetailView.php' => '72ae5bf17bed26d97aa9df7ac0e25416', './modules/InboundEmail/Delete.php' => '208c424262be980d2f4f3ae5db1b5516', './modules/InboundEmail/Popup.php' => '4fb3ff4b79aa040392b7d796eb6a4999', - './modules/InboundEmail/InboundEmail.php' => 'b200462038f1299ad88dbcbfa1972c13', + './modules/InboundEmail/InboundEmail.php' => '3daa313feaee3b37ec95869cfff22f8c', './modules/InboundEmail/ListView.html' => 'b7b06c6dbe6d7dc4e48b3eb1edb63535', './modules/InboundEmail/index.php' => '464b33bf25e4b937637c915647939755', './modules/InboundEmail/language/en_us.lang.php' => 'df406781a9409bcf003ff03e9024b2ff', @@ -4164,13 +4164,13 @@ $md5_string = array ( './modules/Tasks/metadata/subpanels/default.php' => '48a39e744794c23522e4ff1787f0ce13', './modules/Tasks/metadata/subpanels/ForEmails.php' => '69f291df3c5b37a19057dfeb312c2ccc', './modules/Tasks/metadata/listviewdefs.php' => '9d0c9c74766e78b02a226603e9d6b47f', - './modules/Tasks/metadata/additionalDetails.php' => '47550fd84530c4fd554df73d115daba4', + './modules/Tasks/metadata/additionalDetails.php' => 'b79e2556d316effca9c55d106f4fc703', './modules/Tasks/metadata/studio.php' => 'afbf20719f96d7b3f279a161435d14b0', './modules/Tasks/metadata/detailviewdefs.php' => '6a76e300d7bb18f443e161e4b9c7110c', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php' => '0c86e4990164404024abc59f6cad0e20', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.meta.php' => '33cd12c7a20f18eeff7d3097928d0d7b', './modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.php' => 'd6af64345fe999000fbe59d532617cc2', - './modules/Tasks/language/en_us.lang.php' => '28ead9dd2a40e349c8f798d23356e84b', + './modules/Tasks/language/en_us.lang.php' => '5b1efe4574e19fc442155aa99f995930', './modules/Tasks/Task.php' => 'cc166e6140b5972852fbbd3325dcee10', './modules/Opportunities/SubPanelViewProjects.html' => 'da3f4f3b08f0c8732f2ae4e05b10bb51', './modules/Opportunities/Save.php' => '7263848f9596b29a36f8e13b79a58088', @@ -4248,10 +4248,10 @@ $md5_string = array ( './modules/Versions/language/en_us.lang.php' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/Versions/index.html' => '688140bad753b22c15c42bf343d0f39f', './modules/Versions/ExpectedVersions.php' => 'a930bc1b1952454c6f97eac8c6cf19e0', - './modules/EmailMan/EmailManDelivery.php' => 'e6d4d923e59ca196471aae71ccb2ff06', + './modules/EmailMan/EmailManDelivery.php' => 'dc5f470646a07fab014257b71085d1e1', './modules/EmailMan/tpls/config.tpl' => 'e56ef47eae7c4a111a2fd5fd153ca0b0', './modules/EmailMan/tpls/campaignconfig.tpl' => '7480ca4f1b481496f77d70ba348da27b', - './modules/EmailMan/EmailMan.php' => '5d5c2aa9c69c6b9430a971393b944363', + './modules/EmailMan/EmailMan.php' => '3d2a83cd084227601a2b03581e719f17', './modules/EmailMan/Menu.php' => '0f61581cebd90cd06095a9cf0ee047b7', './modules/EmailMan/vardefs.php' => 'be13b5c833013ca35385f0c6a5fa0ff7', './modules/EmailMan/views/view.campaignconfig.php' => '80e5f128173d2f933a89d120c255c1c9', @@ -4309,7 +4309,7 @@ $md5_string = array ( './modules/Users/authentication/LDAPAuthenticate/LDAPConfigs/default.php' => '35b840464b0f18d1b3353184d3c02f0c', './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticate.php' => '6c1ed6d78d1f828d841f51c6328bfa80', './modules/Users/login.css' => '16bbc155311f2cc183677a5cf2805301', - './modules/Users/reassignUserRecords.php' => '91dd33fa8f05e6224d055452b45b9952', + './modules/Users/reassignUserRecords.php' => '0c393338ca58f80d10c9772ed8974ae9', './modules/Users/views/view.quickedit.php' => 'c7a0cc5f9e269df6ba2aa8a1f81de971', './modules/Users/views/view.wizard.php' => 'be0f6e472dfeea5ef9c23e03631efab6', './modules/Users/views/view.list.php' => 'dc89714c25d94be09a62f13f0580bec6', @@ -4317,7 +4317,7 @@ $md5_string = array ( './modules/Users/views/view.detail.php' => '5a79a0bed6a7e1066b8dd2d0c183c7ff', './modules/Users/controller.php' => '0feea87ffe98d3254d02c15346518a2a', './modules/Users/SaveSignature.php' => '0dc93f44171b3a7ff29d363820f4ead7', - './modules/Users/User.php' => '1f336872c447f114cfc2ed7e5266df29', + './modules/Users/User.php' => 'b48bc5033d087673ddf3c86d60dce820', './modules/Users/login.tpl' => '04ab214e72811e566efb5fddb3f7dc20', './modules/Users/LoggedOut.tpl' => '61fb28e18a396a2b4e7f7b73edf610d2', './modules/Users/SaveTimezone.php' => 'da6ea699f04af08645fb90561985da4f', @@ -4426,7 +4426,7 @@ $md5_string = array ( './modules/Studio/wizards/RenameModules.tpl' => '478a48907c033285f9954539c9310399', './modules/Studio/wizards/StudioWizard.php' => '03dbcf41408c8e5dc73eb9f83e0826f2', './modules/Studio/wizards/EditDropDownWizard.php' => '11e9f49a21603f55dbe126aa237bdb55', - './modules/Studio/wizards/RenameModules.php' => '123230a49a58998436b5bdc877b09a8f', + './modules/Studio/wizards/RenameModules.php' => 'bc26bd9450e558ecd60114c203f6f289', './modules/Studio/Forms.php' => '12d0ef30d33694309c8923be5e114e8a', './modules/UpgradeWizard/upgradeWizard.js' => 'c948078cf3cdba14f349066ec7bfa8cd', './modules/UpgradeWizard/deleteCache.php' => '0e333fed04c28d8952fd71d173049bf4', @@ -4505,7 +4505,7 @@ $md5_string = array ( './modules/Calls/metadata/subpanels/ForActivities.php' => '84633128fa1b960cd8945586e32b8aad', './modules/Calls/metadata/subpanels/default.php' => 'f90e40908d5fbb089dd1e0f1ff88510a', './modules/Calls/metadata/listviewdefs.php' => '60487244b5437bf4dcc5af9d3b8dfd24', - './modules/Calls/metadata/additionalDetails.php' => 'caf547aa2caf10e5b526858852198563', + './modules/Calls/metadata/additionalDetails.php' => 'd44807161a1b1aed4761e64b5749b1af', './modules/Calls/metadata/studio.php' => 'bf4a030b7bd99e13e29588555e15eed4', './modules/Calls/metadata/detailviewdefs.php' => 'db5e1591e0bc80040a7427acc44a8415', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => 'f315deab8db5c49c9b8d86ab6d706710', @@ -4640,7 +4640,7 @@ $md5_string = array ( './modules/Campaigns/Charts1.php' => 'f143efbbe6fb37bf22a2bb69870b7b79', './modules/Campaigns/GenerateWebToLeadForm.php' => 'd5cafa7db25c447636e15ce120e725bf', './modules/Campaigns/WizardNewsletter.html' => '547321326eaf962629a059cf4a9bfce2', - './modules/Campaigns/TrackDetailView.php' => '230ece8b2d73b678359359d39507a1b1', + './modules/Campaigns/TrackDetailView.php' => 'f233d679f11da964979af3a55e55def7', './modules/Campaigns/WizardNewsletter.php' => 'a3d919f4c35fb51d885d5f738983f54e', './modules/Campaigns/WebToLeadForm.html' => '046f71352ec5309ceeb8e9f03f1f5cfb', './modules/Campaigns/WizardMarketingSave.php' => '7f0775e7acdb930a406859077670d9eb', @@ -4755,7 +4755,7 @@ $md5_string = array ( './modules/Activities/views/view.modulelistmenu.php' => '5f83383226e0cff4f6c0feb594c93fa9', './modules/Activities/SubPanelView.php' => 'ecc7c56a39dcc9216140a0cb5a970fb5', './modules/Activities/OpenListView.php' => 'fda8638446bc6abec5e8a8f3f7b5045b', - './modules/Activities/EmailReminder.php' => '5bd0e784bbf3c7073fdad73321e7c8df', + './modules/Activities/EmailReminder.php' => '5a3e969af54d79890e09ba86672de4b2', './modules/Activities/metadata/subpaneldefs.php' => 'e624875c0277178a9f18edaa32ed3467', './modules/Activities/Popup_picker.html' => '8844035c5e6e94a3dd751a3db16dee82', './modules/Activities/SubPanelViewContacts.html' => '90cc37537bd84dd2aa93b9100985a82f', @@ -4782,7 +4782,7 @@ $md5_string = array ( './modules/Trackers/store/DatabaseStore.php' => 'b60b5b86de181c5586038c1904c51f6e', './modules/vCals/Server.php' => 'e08709145be7c1aa154333066e7945e8', './modules/vCals/vardefs.php' => '936e73ff2b48562edfe8e01adc9f0944', - './modules/vCals/HTTP_WebDAV_Server_vCal.php' => '97a66e91bc953be77d44e9339ae50b25', + './modules/vCals/HTTP_WebDAV_Server_vCal.php' => '485b8f7a5e4aea71afb187045f02236c', './modules/vCals/field_arrays.php' => 'f170f58856c0c7446a5a02bf3fb35d0c', './modules/vCals/vCal.php' => '8836181481bb9daa48bf938eadbcef4b', './modules/Bugs/Bug.php' => '48d9cab31e800047e3f3c8dce0c508a5', @@ -4814,7 +4814,7 @@ $md5_string = array ( './modules/SchedulersJobs/field_arrays.php' => 'dc4fa2992e0c563aa87ed621d9ecefc9', './modules/SchedulersJobs/metadata/subpanels/default.php' => '780b17c1bbd4dce3a43940664301ce7b', './modules/SchedulersJobs/language/en_us.lang.php' => '581db5a8c90199d835ac444ba6531cae', - './modules/SchedulersJobs/SchedulersJob.php' => 'f64df9c3b6aef1bd10bddf38fa5aa951', + './modules/SchedulersJobs/SchedulersJob.php' => '44d3766b9a210d7c37c9485a84d7124b', './modules/Contacts/Contact.js' => 'f125e5a6071d60189361cf17775eadc9', './modules/Contacts/ContactOpportunityRelationshipEdit.php' => '776ec16eda07dd77fd544840e6a3efc3', './modules/Contacts/Email_picker.html' => '3c206ca73549c4af83a85b9ba4809016', @@ -4869,7 +4869,7 @@ $md5_string = array ( './modules/Contacts/ContactOpportunityRelationship.php' => 'ae0942a4b03c53ede1c41e602f968436', './modules/Contacts/ContactsQuickCreate.php' => 'dd950df77515292a0a62b28b233322fe', './modules/Contacts/Popup_picker.php' => 'a6ec9fa1c0019d0b88ab7d8dace8c6d2', - './modules/Contacts/language/en_us.lang.php' => 'a66b5c7c048d1713cbabf8b964a0f698', + './modules/Contacts/language/en_us.lang.php' => '2dafad4a9b19c67aff82539da64d0772', './modules/Contacts/BusinessCard.html' => '34eb47a0faac4027b094caf7635109f4', './modules/Contacts/SugarFeeds/ContactFeed.php' => '080fb8dde36a1d0cb01601e5c5ab726b', './modules/Contacts/SaveContactOpportunityRelationship.php' => '35fb62b9e1b36d13936069431bb0dfcf', @@ -5019,7 +5019,7 @@ $md5_string = array ( './modules/Meetings/metadata/subpanels/ForActivities.php' => '1faf71c64c9ebba1bf96a24c07231800', './modules/Meetings/metadata/subpanels/default.php' => '580fb0e9bc609d5c94872822a0b508ae', './modules/Meetings/metadata/listviewdefs.php' => 'ba1ecfd1e96f99c127796183c6217216', - './modules/Meetings/metadata/additionalDetails.php' => '98f76a9c68491ba7aa5522da74796a98', + './modules/Meetings/metadata/additionalDetails.php' => '5b5e0148b1a245b8ae03e0ed83da61ea', './modules/Meetings/metadata/studio.php' => 'ecf5a226f1eb9d2136490ae6934f1310', './modules/Meetings/metadata/detailviewdefs.php' => 'e82519974abf188be746dc229e314708', './modules/Meetings/action_view_map.php' => '4ad952baded0f22d5b9f98ffa916fe7e', @@ -5274,16 +5274,16 @@ $md5_string = array ( './modules/Home/LastViewed.php' => 'c560b62a3343fe67a86925ecc5f3cfd9', './modules/Home/AddToFavorites.php' => 'dcce47a643221281508edb0f5bbeae94', './modules/Home/TrainingPortal.php' => '8f0c1226166a7a5d6935d09e874812a1', - './cache/include/javascript/sugar_grp_jsolait.js' => '9aced6d7d2669515690f61e506834ed9', - './cache/include/javascript/sugar_grp_quickcomp.js' => '79d2681c7e2e3d44dacd9a0ccd08883e', - './cache/include/javascript/sugar_grp_emails.js' => 'fe93f2677b7c58e21799423de5c44e6b', + './cache/include/javascript/sugar_grp_jsolait.js' => 'bf76c7f2a747c29058fdd36ffc8bf69e', + './cache/include/javascript/sugar_grp_quickcomp.js' => 'f44849492cb1684a8769f4050e496fa0', + './cache/include/javascript/sugar_grp_emails.js' => 'b2fe210ba147dab53267c88d4dbc8a76', './cache/include/javascript/sugar_grp_yui2.js' => '53c8d4d026a0adc7ea775e6488245de5', './cache/include/javascript/sugar_grp_yui_widgets.css' => '17f5b268fda1a8a3e27b41ebefe4d408', './cache/include/javascript/sugar_grp_yui_widgets.js' => '35fe43cba48260f75b169dd1af5c64fe', - './cache/include/javascript/sugar_grp1_yui.js' => '7eb3d83891ec7b8d2217d3b6e82fa1fa', + './cache/include/javascript/sugar_grp1_yui.js' => 'c334f9e1ce11855d3e6298be9d7a4b84', './cache/include/javascript/sugar_field_grp.js' => '339b3b1d92f554dbac7fad410360c8f1', './cache/include/javascript/sugar_grp1_jquery.js' => '9c164fdc669d8af0c3e11559154a214c', - './cache/include/javascript/sugar_grp1.js' => 'a7adbadc759c995559edd9eee0ed3cfc', + './cache/include/javascript/sugar_grp1.js' => '4e44e19382ca8cbeaefbc83910bc0c7f', './cache/layout/index.html' => '9cd784063d39b18d308932c28c385853', './cache/images/index.html' => '9cd784063d39b18d308932c28c385853', './cache/xml/index.html' => '9cd784063d39b18d308932c28c385853', @@ -5354,7 +5354,7 @@ $md5_string = array ( './metadata/prospect_lists_prospectsMetaData.php' => '7e3faa998b4fab3e2235775744413cc9', './metadata/inboundEmail_autoreplyMetaData.php' => 'a48873b7d72942a2ce8c75519e210ebd', './metadata/acl_roles_actionsMetaData.php' => '4d6ecdbf5b06104a468ec955616121e3', - './sugar_version.php' => '5954c8360415de5a685a78fbedbc0f95', + './sugar_version.php' => '61da0cc567ce37ced40e4c9e9b38803f', './cron.php' => '06bf0cf2c00fb23553772c1db40c1a73', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './TreeData.php' => '261ed723f457b1fabd1c33ae230120e4', @@ -7427,15 +7427,15 @@ $md5_string = array ( './jssource/src_files/include/javascript/phpjs/html_entity_decode.js' => '022ed687a9c7c55a21b4a2aaa848921d', './jssource/src_files/include/javascript/phpjs/license.js' => '8d1e879645acd34b64c2270879203213', './jssource/src_files/include/javascript/phpjs/htmlentities.js' => 'a4369a51c1d8d1670f78b68c28330424', - './jssource/src_files/include/javascript/report_additionals.js' => 'e5a9c44b736537d880cf40b98dffd582', - './jssource/src_files/include/javascript/quicksearch.js' => '6b876cd27c24e7fb8ccf32b3b0f827f8', + './jssource/src_files/include/javascript/report_additionals.js' => '136e21a3dc65730f16be39e49e04284c', + './jssource/src_files/include/javascript/quicksearch.js' => '42fae39d97ad0de74d532e850bbb0cf1', './jssource/src_files/include/javascript/sugar_yui_overrides.js' => '0de3b58c8897f035f1f577234f9f8c57', './jssource/src_files/include/javascript/cookie.js' => '98c35f5fdf24e9af504b83f99560f610', './jssource/src_files/include/javascript/popup_parent_helper.js' => '9ab9a2b26a22cdd4ead193b54e223063', - './jssource/src_files/include/javascript/sugar_3.js' => 'e05f4324b9e1c15a3b18b028b79f88da', + './jssource/src_files/include/javascript/sugar_3.js' => 'fbcc4f90b9637e45ef076a8ba9eb95b3', './jssource/src_files/include/javascript/jquery.js' => '219073097031d9c1a95a1291d66f3a10', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => 'a4b04fb7d5aabfd45de233ce4ba7459d', - './jssource/src_files/include/javascript/jsclass_async.js' => '9460a4b6f22a1efd3f7abe906f07b0d5', + './jssource/src_files/include/javascript/jsclass_async.js' => 'da4b79bcd6fcc9eb3bb1c694707d9e09', './jssource/src_files/include/javascript/quickCompose.js' => '11a2d042c773ecec8afd0a26137265c7', './jssource/src_files/include/javascript/menu.js' => '94bc61fcc798a480b5334b1d937cc1f0', './jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => 'a3fc1aef484a47059455c02ddc29024d', @@ -7467,7 +7467,7 @@ $md5_string = array ( './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '0193eba94d4fbf43f9f8f94c37f4c517', './jssource/src_files/include/SugarFields/Fields/Time/Time.js' => '76e0238ad91ad30b402a242dfdbdf254', './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'e71ad9b60c4ee5ec2cbfe6d6202306e8', - './jssource/src_files/include/SubPanel/SubPanelTiles.js' => '2a3b029cff2af54efd7853dc8a5da73b', + './jssource/src_files/include/SubPanel/SubPanelTiles.js' => '49192a260ef46586cd198a2e82026a82', './jssource/src_files/include/HTMLPurifier/standalone/HTMLPurifier/Printer/ConfigForm.js' => 'ee5990d6bb62017463a7a8d72c8288b5', './jssource/minify.php' => '0af28efb7b3fb17907385d14b30672a3', './jssource/minify_utils.php' => 'd227d8019884682e1a7c7d628bff4ff3', @@ -7503,7 +7503,7 @@ $md5_string = array ( './install/download_patches.php' => 'a7481ced8b10f552744149b5a8106cb9', './install/installHelp.php' => 'f0e5963ab3fe8f571287c7d84569dbe6', './install/dbConfig_a.php' => 'b24d52b48eb7cec8f390fcd1adf99560', - './install/confirmSettings.php' => '462af503b7655c3c5983fd78681dc376', + './install/confirmSettings.php' => '175abac3086d4fa68e9853fd74af34ea', './install/checkDBSettings.php' => '704eef09120d4bf8f46418270e2b4039', './install/installSystemCheck.php' => '236bc69ca153ce7aba1a872d26326c4a', './install/register.php' => '52f73d3313d3bb3e8108f43ed2d3d44d', @@ -7526,7 +7526,7 @@ $md5_string = array ( './soap/SoapStudio.php' => 'a526d5ff3a9c0f32b1c37a909c4c52e1', './soap/SoapRelationshipHelper.php' => 'beaed29f3137e134a0529dbfd813f391', './soap/SoapErrorDefinitions.php' => 'd51e20c60a042417cf16547915a3ee68', - './soap/SoapTypes.php' => '0b16e886b55077912db06f4b1372357a', + './soap/SoapTypes.php' => 'e184c93f2403a0d8833d7eb5154deea5', './soap/SoapPortalUsers.php' => 'fd9ab0b852a6ebf9a58612f725a691a0', './soap/SoapData.php' => '0622cd88dae6abf8fac42fcdc72f06d4', ); diff --git a/include/Dashlets/DashletGenericChart.php b/include/Dashlets/DashletGenericChart.php index c1d21d8a..dd645214 100644 --- a/include/Dashlets/DashletGenericChart.php +++ b/include/Dashlets/DashletGenericChart.php @@ -137,10 +137,18 @@ abstract class DashletGenericChart extends Dashlet $additionalTitle = ''; if($this->isRefreshable) - $additionalTitle .= '' . translate('LBL_DASHLET_REFRESH', 'Home') . ''; - + $additionalTitle .= '' + . SugarThemeRegistry::current()->getImage( + 'dashlet-header-refresh', + 'border="0" align="absmiddle" title="'. translate('LBL_DASHLET_REFRESH', 'Home') . '"', + null, + null, + '.gif', + translate('LBL_DASHLET_REFRESH', 'Home') + ) + . ''; return $additionalTitle; } diff --git a/include/ListView/ListView.php b/include/ListView/ListView.php index 7446c1bf..f95c18d6 100644 --- a/include/ListView/ListView.php +++ b/include/ListView/ListView.php @@ -458,7 +458,7 @@ function process_dynamic_listview($source_module, $sugarbean,$subpanel_def) $this->xTemplate->assign('CELL', $widget_contents); $this->xTemplate->parse($xtemplateSection.".row.cell"); } elseif (preg_match("/button/i", $list_field['name'])) { - if ( '' != $_content = $layout_manager->widgetDisplay($list_field) ) + if ((($list_field['name'] === 'edit_button' && $field_acl['EditView']) || ($list_field['name'] === 'close_button' && $field_acl['EditView']) || ($list_field['name'] === 'remove_button' && $field_acl['Delete'])) && '' != ($_content = $layout_manager->widgetDisplay($list_field)) ) { $button_contents[] = $_content; unset($_content); diff --git a/include/ListView/ListViewData.php b/include/ListView/ListViewData.php index 3b457732..d8a49173 100644 --- a/include/ListView/ListViewData.php +++ b/include/ListView/ListViewData.php @@ -142,7 +142,7 @@ class ListViewData { { global $beanList; - $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount',$this->var_order_by, $this->var_offset, 'lvso', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page', 'entryPoint'); + $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount',$this->var_order_by, $this->var_offset, 'lvso', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page'); foreach($beanList as $bean) { $blockVariables[] = 'Home2_'.strtoupper($bean).'_ORDER_BY'; diff --git a/include/MVC/View/tpls/Importvcard.tpl b/include/MVC/View/tpls/Importvcard.tpl index cda8c417..9ce30ad3 100644 --- a/include/MVC/View/tpls/Importvcard.tpl +++ b/include/MVC/View/tpls/Importvcard.tpl @@ -66,4 +66,4 @@ function validate_vcard() - +
{$ERROR_REQUIRED}
diff --git a/include/MVC/View/views/view.importvcard.php b/include/MVC/View/views/view.importvcard.php index 710eeeed..8fe33ed9 100644 --- a/include/MVC/View/views/view.importvcard.php +++ b/include/MVC/View/views/view.importvcard.php @@ -62,6 +62,10 @@ class ViewImportvcard extends SugarView global $mod_strings, $app_strings, $app_list_strings; $this->ss->assign("ERROR_TEXT", $app_strings['LBL_EMPTY_VCARD']); + if (isset($_REQUEST['error'])) + { + $this->ss->assign("ERROR_REQUIRED", $app_strings['LBL_EMPTY_REQUIRED_VCARD']); + } $this->ss->assign("HEADER", $app_strings['LBL_IMPORT_VCARD']); $this->ss->assign("MODULE", $_REQUEST['module']); $params = array(); diff --git a/include/MVC/View/views/view.importvcardsave.php b/include/MVC/View/views/view.importvcardsave.php index 22086e6f..195fc5bb 100644 --- a/include/MVC/View/views/view.importvcardsave.php +++ b/include/MVC/View/views/view.importvcardsave.php @@ -46,25 +46,32 @@ require_once('include/vCard.php'); class ViewImportvcardsave extends SugarView { - var $type = 'save'; + var $type = 'save'; public function __construct() { - parent::SugarView(); - } - + parent::SugarView(); + } + /** * @see SugarView::display() */ - public function display() + public function display() { - if ( isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0 ) { + if (isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0) + { $vcard = new vCard(); - $record = $vcard->importVCard($_FILES['vcard']['tmp_name'],$_REQUEST['module']); + $record = $vcard->importVCard($_FILES['vcard']['tmp_name'], $_REQUEST['module']); + if (empty($record)) + { + SugarApplication::redirect("index.php?action=Importvcard&module={$_REQUEST['module']}&error"); + } SugarApplication::redirect("index.php?action=DetailView&module={$_REQUEST['module']}&record=$record"); } else + { SugarApplication::redirect("index.php?action=Importvcard&module={$_REQUEST['module']}"); - } + } + } } ?> diff --git a/include/Popups/PopupSmarty.php b/include/Popups/PopupSmarty.php index 3abd5fd0..74e86cd9 100644 --- a/include/Popups/PopupSmarty.php +++ b/include/Popups/PopupSmarty.php @@ -289,6 +289,7 @@ class PopupSmarty extends ListViewSmarty{ $params = array(); if(!empty($this->_popupMeta['orderBy'])){ $params['orderBy'] = $this->_popupMeta['orderBy']; + $params['overrideOrder'] = true; } if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){ @@ -403,18 +404,22 @@ class PopupSmarty extends ListViewSmarty{ } } - else if ( isset($_REQUEST['request_data']) ) + else if (!empty($_REQUEST['request_data'])) { - $request_data = get_object_vars( json_decode( htmlspecialchars_decode( $_REQUEST['request_data'] ))); - $request_data['field_to_name'] = get_object_vars( $request_data['field_to_name_array'] ); - if (isset($request_data['field_to_name']) && is_array($request_data['field_to_name'])) + $request_data = get_object_vars(json_decode(htmlspecialchars_decode($_REQUEST['request_data']))); + + if (!empty($request_data['field_to_name_array'])) { - foreach ( $request_data['field_to_name'] as $add_field ) + $request_data['field_to_name'] = get_object_vars($request_data['field_to_name_array']); + if (is_array($request_data['field_to_name'])) { - $add_field = strtolower($add_field); - if ( $add_field != 'id' && !isset($this->filter_fields[$add_field]) && isset($this->seed->field_defs[$add_field]) ) + foreach ($request_data['field_to_name'] as $add_field) { - $this->filter_fields[$add_field] = true; + $add_field = strtolower($add_field); + if ($add_field != 'id' && !isset($this->filter_fields[$add_field]) && isset($this->seed->field_defs[$add_field])) + { + $this->filter_fields[$add_field] = true; + } } } } diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index 1ae2f2da..e22e34f1 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -405,8 +405,7 @@ require_once('include/EditView/EditView2.php'); //53131 - add blank option for SearchField options with def 'options_add_blank' set to true if ($this->fieldDefs[$fvName]['type'] == "parent_type" || $this->fieldDefs[$fvName]['type'] == "parent" || (isset($this->searchFields[$name]['options_add_blank']) && $this->searchFields[$name]['options_add_blank']) ) { - //Bug 54929: Do not use array_merge() as it changes integer keys in the array. - $this->fieldDefs[$fvName]['options'][''] = ''; + $this->fieldDefs[$fvName]['options'] = array_merge(array(""=>""), $this->fieldDefs[$fvName]['options']); } } diff --git a/include/SubPanel/SubPanelTiles.js b/include/SubPanel/SubPanelTiles.js index fa96599c..a9847924 100644 --- a/include/SubPanel/SubPanelTiles.js +++ b/include/SubPanel/SubPanelTiles.js @@ -107,7 +107,7 @@ var cObj=YAHOO.util.Connect.asyncRequest('GET',url,{success:success,failure:succ if(typeof(result)!='undefined'&&result!=null&&result['status']=='dupe'){document.location.href="index.php?"+result['get'].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"').replace(/\r\n/gi,'\n');return;}else{SUGAR.subpanelUtils.cancelCreate(buttonName);showSubPanel(subpanel,null,true);ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVED'));window.setTimeout('ajaxStatus.hideStatus()',1000);if(reloadpage)window.location.reload(false);}}} var reloadpage=false;reloadpage=reloadpage||((buttonName=='Meetings_subpanel_save_button'||buttonName=='Calls_subpanel_save_button')&&typeof(theForm)!='undefined'&&typeof(document.getElementById(theForm))!='undefined'&&typeof(document.getElementById(theForm).status)!='undefined'&&document.getElementById(theForm).status[document.getElementById(theForm).status.selectedIndex].value=='Held');reloadpage=reloadpage||(buttonName=='Tasks_subpanel_save_button'&&typeof(theForm)!='undefined'&&typeof(document.getElementById(theForm))!='undefined'&&typeof(document.getElementById(theForm).status)!='undefined'&&document.getElementById(theForm).status[document.getElementById(theForm).status.selectedIndex].value=='Completed');YAHOO.util.Connect.setForm(theForm,true,true);var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php',{success:success,failure:success,upload:success});return false;},sendAndRetrieve:function(theForm,theDiv,loadingStr){var quickCreateDiv=YAHOO.util.Selector.query("div.quickcreate",null,true);if(quickCreateDiv) {var form=YAHOO.util.Selector.query("form",quickCreateDiv,true);if(form) -{var moduleName=form.id.replace(/.*?_([^_]+)$/,"$1");var buttonName=moduleName+"_subpanel_cancel_button";var cancelled=false;SUGAR.subpanelUtils.cancelCreate(buttonName,function() +{var moduleName=YAHOO.util.Selector.query('input[name=module]',form,true).value;var buttonName=moduleName+"_subpanel_cancel_button";var cancelled=false;SUGAR.subpanelUtils.cancelCreate(buttonName,function() {cancelled=true;});if(cancelled) {return false;}}} function success(data){var theDivObj=document.getElementById(theDiv),divName=theDiv+'_newDiv',form_el;SUGAR.subpanelUtils.dataToDOMAvail=false;if(typeof currentPanelDiv!='undefined'&¤tPanelDiv!=null){var button_elements=YAHOO.util.Selector.query('td.buttons',currentPanelDiv,false);YAHOO.util.Dom.setStyle(button_elements,'display','');} diff --git a/include/SugarDateTime.php b/include/SugarDateTime.php index 45095c4f..dd593842 100644 --- a/include/SugarDateTime.php +++ b/include/SugarDateTime.php @@ -659,6 +659,12 @@ class SugarDateTime extends DateTime */ public function modify($modify) { + // We can't user PHP_VERSION_ID here because problem with yesterday and tomorrow appears in defferent versions + // In that case we just set time to midnight for yesterday & tomorrow + // To leave time as it is we can use -+1 day instead of yesterday & tomorrow + if (strpos($modify, 'yesterday') !== false || strpos($modify, 'tomorrow') !== false) { + $this->setTime(0, 0); + } if(PHP_VERSION_ID >= 50300 || $modify != 'first day of next month') { parent::modify($modify); } else { diff --git a/include/SugarObjects/templates/company/Company.php b/include/SugarObjects/templates/company/Company.php index 2d94876f..1ff8a1da 100644 --- a/include/SugarObjects/templates/company/Company.php +++ b/include/SugarObjects/templates/company/Company.php @@ -54,14 +54,13 @@ class Company extends Basic { if(!empty($GLOBALS['resavingRelatedBeans'])) { - parent::save($check_notify); - return $this; + return parent::save($check_notify); } $this->add_address_streets('billing_address_street'); $this->add_address_streets('shipping_address_street'); - $ori_in_workflow = empty($this->in_workflow) ? false : true; + $ori_in_workflow = empty($this->in_workflow) ? false : true; $this->emailAddress->handleLegacySave($this, $this->module_dir); - parent::save($check_notify); + $record_id = parent::save($check_notify); $override_email = array(); if(!empty($this->email1_set_in_workflow)) { $override_email['emailAddress0'] = $this->email1_set_in_workflow; @@ -75,7 +74,7 @@ class Company extends Basic if($ori_in_workflow === false || !empty($override_email)){ $this->emailAddress->save($this->id, $this->module_dir, $override_email,'','','','',$this->in_workflow); } - return $this; + return $record_id; } /** diff --git a/include/Sugarpdf/Sugarpdf.php b/include/Sugarpdf/Sugarpdf.php index fd0f5baf..26402c7b 100644 --- a/include/Sugarpdf/Sugarpdf.php +++ b/include/Sugarpdf/Sugarpdf.php @@ -453,6 +453,7 @@ class Sugarpdf extends TCPDF foreach ($item as $k=>$v){ $even = !$even; $line=""; + if($even){ if (isset($options['evencolor'])) { diff --git a/include/database/DBManager.php b/include/database/DBManager.php index 2e68d93c..66173ae2 100644 --- a/include/database/DBManager.php +++ b/include/database/DBManager.php @@ -2827,7 +2827,7 @@ protected function checkQuery($sql, $object_name = false) $changed_values=array(); $fetched_row = array(); - if (is_array($bean->fetched_row)) + if (is_array($bean->fetched_row)) { $fetched_row = array_merge($bean->fetched_row, $bean->fetched_rel_row); } diff --git a/include/database/MssqlManager.php b/include/database/MssqlManager.php index db459704..084b636a 100644 --- a/include/database/MssqlManager.php +++ b/include/database/MssqlManager.php @@ -407,7 +407,7 @@ class MssqlManager extends DBManager //to create limit query when paging is needed. Otherwise, //it shows duplicates when paging on activities subpanel. //If not for paging, no need to use rownumber() function - if ($count == 1) + if ($count == 1 && $start == 0) { $limitUnionSQL = "SELECT TOP $count * FROM (" .$unionsql .") as top_count ".$unionOrderBy; } @@ -441,16 +441,16 @@ class MssqlManager extends DBManager $GLOBALS['log']->debug(print_r(func_get_args(),true)); $this->lastsql = $sql; $matches = array(); - preg_match('/^(.*SELECT )(.*?FROM.*WHERE)(.*)$/isU',$sql, $matches); + preg_match('/^(.*SELECT\b)(.*?\bFROM\b.*\bWHERE\b)(.*)$/isU',$sql, $matches); if (!empty($matches[3])) { if ($start == 0) { $match_two = strtolower($matches[2]); if (!strpos($match_two, "distinct")> 0 && strpos($match_two, "distinct") !==0) { $orderByMatch = array(); - preg_match('/^(.*)(ORDER BY)(.*)$/is',$matches[3], $orderByMatch); + preg_match('/^(.*)(\bORDER BY\b)(.*)$/is',$matches[3], $orderByMatch); if (!empty($orderByMatch[3])) { $selectPart = array(); - preg_match('/^(.*)(\bFROM .*)$/isU', $matches[2], $selectPart); + preg_match('/^(.*)(\bFROM\b.*)$/isU', $matches[2], $selectPart); $newSQL = "SELECT TOP $count * FROM ( " . $matches[1] . $selectPart[1] . ", ROW_NUMBER() @@ -491,7 +491,7 @@ class MssqlManager extends DBManager } } else { $orderByMatch = array(); - preg_match('/^(.*)(ORDER BY)(.*)$/is',$matches[3], $orderByMatch); + preg_match('/^(.*)(\bORDER BY\b)(.*)$/is',$matches[3], $orderByMatch); //if there is a distinct clause, parse sql string as we will have to insert the rownumber //for paging, AFTER the distinct clause @@ -563,7 +563,7 @@ class MssqlManager extends DBManager $newSQL = "SELECT TOP $count * FROM ( SELECT ROW_NUMBER() - OVER (ORDER BY ".$this->returnOrderBy($sql, $orderByMatch[3]).") AS row_number, + OVER (ORDER BY " . preg_replace('/^' . ltrim($dist_str) . '/', '', $this->returnOrderBy($sql, $orderByMatch[3])) . ") AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " " . $distinctSQLARRAY[1] . " group by " . $grpByStr . " @@ -592,11 +592,16 @@ class MssqlManager extends DBManager // needs to be removed $tablename = $this->getTableNameFromModuleName($_REQUEST['module'],$sql); } + $orderBy = $tablename; + if (preg_match("/from\s+".$tablename."\s+([^\s]+)\s+(where|inner|left|join|outer|right)\s+/i", $sql, $table_alias)) + { + $orderBy = $table_alias[1]; + } //if there is a distinct clause, form query with rownumber after distinct if ($hasDistinct) { $newSQL = "SELECT TOP $count * FROM ( - SELECT ROW_NUMBER() OVER (ORDER BY ".$tablename.".id) AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " + SELECT ROW_NUMBER() OVER (ORDER BY ".$orderBy.".id) AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " " . $distinctSQLARRAY[1] . " group by " . $grpByStr . " ) @@ -606,7 +611,7 @@ class MssqlManager extends DBManager else { $newSQL = "SELECT TOP $count * FROM ( - " . $matches[1] . " ROW_NUMBER() OVER (ORDER BY ".$tablename.".id) AS row_number, " . $matches[2] . $matches[3]. " + " . $matches[1] . " ROW_NUMBER() OVER (ORDER BY ".$orderBy.".id) AS row_number, " . $matches[2] . $matches[3]. " ) AS a WHERE row_number > $start"; @@ -696,7 +701,7 @@ class MssqlManager extends DBManager $pattern_array = array_reverse($pattern_array); foreach ($pattern_array as $key => $replace) { - $token = str_replace( "##".$key."##", $replace,$token); + $token = str_replace( " ##".$key."## ", $replace,$token); } return $token; @@ -813,13 +818,13 @@ class MssqlManager extends DBManager if (strpos($orig_order_match, " ") === false) { $orig_order_match .= " ASC"; } - + //grab first space in order by $firstSpace = strpos($orig_order_match, " "); //split order by into column name and ascending/descending $orderMatch = " " . strtolower(substr($orig_order_match, 0, $firstSpace)); - $asc_desc = substr($orig_order_match,$firstSpace); + $asc_desc = trim(substr($orig_order_match,$firstSpace)); //look for column name as an alias in sql string $found_in_sql = $this->findColumnByAlias($sql, $orderMatch); @@ -860,7 +865,8 @@ class MssqlManager extends DBManager $psql = trim(substr($sql, 0, $found_in_sql)); //grab the last comma before the alias - $comma_pos = strrpos($psql, " "); + preg_match('/\s+' . trim($orderMatch). '/', $psql, $match, PREG_OFFSET_CAPTURE); + $comma_pos = $match[0][1]; //substring between the comma and the alias to find the joined_table alias and column name $col_name = substr($psql,0, $comma_pos); @@ -1956,7 +1962,7 @@ EOQ; protected function quoteTerm($term) { $term = str_replace("%", "*", $term); // Mssql wildcard is * - return '"'.$term.'"'; + return '"'.str_replace('"', '', $term).'"'; } /** diff --git a/include/export_utils.php b/include/export_utils.php index fb4ab44c..1e4f5e3a 100644 --- a/include/export_utils.php +++ b/include/export_utils.php @@ -228,7 +228,7 @@ function export($type, $records = null, $members = false, $sample=false) { $field_labels[$key] = translateForExport($dbname,$focus); } - $user_agent = $_SERVER['HTTP_USER_AGENT']; + $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; if ($locale->getExportCharset() == 'UTF-8' && ! preg_match('/macintosh|mac os x|mac_powerpc/i', $user_agent)) // Bug 60377 - Mac Excel doesn't support UTF-8 { diff --git a/include/generic/SugarWidgets/SugarWidgetReportField.php b/include/generic/SugarWidgets/SugarWidgetReportField.php index 5b9cee52..7cf00c23 100644 --- a/include/generic/SugarWidgets/SugarWidgetReportField.php +++ b/include/generic/SugarWidgets/SugarWidgetReportField.php @@ -213,7 +213,7 @@ class SugarWidgetReportField extends SugarWidgetField $sort_by =''; if ( ! empty($layout_def['table_key']) && ! empty($layout_def['name']) ) { if (! empty($layout_def['group_function']) && $layout_def['group_function'] == 'count') { - $sort_by = 'count'; + $sort_by = $layout_def['table_key'].":".'count'; } else { $sort_by = $layout_def['table_key'].":".$layout_def['name']; if ( ! empty($layout_def['column_function'])) { diff --git a/include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php b/include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php index 834524c7..8a40296f 100644 --- a/include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php +++ b/include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateTaskButton.php @@ -75,7 +75,7 @@ class SugarWidgetSubPanelTopCreateTaskButton extends SugarWidgetSubPanelTopButto $defines['child_module_name'] = $defines['module']; } - if(!empty($this->subpanelDiv)) + if(empty($defines['subpanelDiv'])) { $defines['subpanelDiv'] = $this->subpanelDiv; } diff --git a/include/javascript/jsclass_async.js b/include/javascript/jsclass_async.js index 602e8d89..0b9f7c3a 100644 --- a/include/javascript/jsclass_async.js +++ b/include/javascript/jsclass_async.js @@ -36,7 +36,7 @@ function method_callback(o){var resp=YAHOO.lang.JSON.parse(o.responseText),reque reqid=global_request_registry[request_id];if(typeof(reqid)!='undefined'){widget=global_request_registry[request_id][0];method_name=global_request_registry[request_id][1];widget[method_name](result);}} SugarClass.inherit("SugarVCalClient","SugarClass");function SugarVCalClient(){this.init();} SugarVCalClient.prototype.init=function(){} -SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} +SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&noAuth=noAuth&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} SugarVCalClient.prototype.parseResults=function(textResult,adjusted){var match=/FREEBUSY.*?\:([\w]+)\/([\w]+)/g;var result;var timehash=new Object();var dst_start;var dst_end;if(GLOBAL_REGISTRY.current_user.fields.dst_start==null) diff --git a/include/javascript/quicksearch.js b/include/javascript/quicksearch.js index 727b4ffa..cf1e219d 100644 --- a/include/javascript/quicksearch.js +++ b/include/javascript/quicksearch.js @@ -52,7 +52,7 @@ if(label_str!=current_label_data_str&¤t_label_data_str!=label_data_str){mo {if(this.inputElement.id=='shipping_account_name') {filter=Dom.get('shipping_checkbox').checked?/(account_id|office_phone)/:filter;}else if(this.inputElement.id=='billing_account_name'){filter=Dom.get('shipping_checkbox').checked?filter:/(account_id|office_phone|billing)/;}}else if(Dom.get('alt_checkbox')){filter=Dom.get('alt_checkbox').checked?filter:/^(?!alt)/;} this.updateFields(data,filter);}}else{this.updateFields(data,filter);}};} -if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=SUGAR.config.quicksearch_querydelay;} +if(typeof(SUGAR.config.quicksearch_querydelay)!='undefined'){search.queryDelay=Number(SUGAR.config.quicksearch_querydelay);} search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=this.fields;this.setFields(data,/\S/);if(typeof(this.qs_obj['post_onblur_function'])!='undefined'){collection_extended=new Array();for(var i in fields){for(var key in this.qs_obj.field_list){if(fields[i]==this.qs_obj.field_list[key]){collection_extended[this.qs_obj.field_list[key]]=data[i];}}} eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} diff --git a/include/javascript/report_additionals.js b/include/javascript/report_additionals.js index c0f3131b..cdbcab6f 100644 --- a/include/javascript/report_additionals.js +++ b/include/javascript/report_additionals.js @@ -133,8 +133,8 @@ function addFilterInputText(row,filter){var cell=document.createElement("td");va new_input.value=filter.input_name0;new_input.name="text_input";new_input.size="30";new_input.maxsize="255";new_input.visible="true";cell.appendChild(new_input);row.appendChild(cell);var filter_row=filters_arr[filters_count_map[current_filter_id]];filter_row.input_field0=new_input;filter_row.input_field1=null;} function to_display_date(date_str){var date_arr=date_str.match(/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/);if(date_arr!=null){var new_date=new String(cal_date_format);new_date=new_date.replace("%Y",date_arr[1]);new_date=new_date.replace("%m",date_arr[2]);new_date=new_date.replace("%d",date_arr[3]);return new_date;} else{return date_str;}} -function addFilterInputDate(row,filter){var cell=document.createElement("td");cell.setAttribute('valign','middle');var new_input=document.createElement("input");new_input.type="text";if(typeof(filter.input_name0)!='undefined'&&filter.input_name0.length>0){filter.input_name0=to_display_date(filter.input_name0);} -new_input.value=filter.input_name0;new_input.name="text_input";new_input.size="30";new_input.maxsize="255";new_input.visible="true";new_input.setAttribute('id','jscal_field');cell.appendChild(new_input);row.appendChild(cell);var cell=document.createElement("td");cell.setAttribute('valign','middle');var img_element=document.createElement("img");img_element.setAttribute('src','index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=jscalendar.gif');img_element.setAttribute('id','jscal_trigger');cell.appendChild(img_element);row.appendChild(cell);Calendar.setup({inputFieldObj:new_input,buttonObj:img_element,ifFormat:cal_date_format,showsTime:false,singleClick:true,step:1,weekNumbers:false});var filter_row=filters_arr[filters_count_map[current_filter_id]];filter_row.input_field0=new_input;filter_row.input_field1=null;} +function addFilterInputDate(row,filter){var cell=document.createElement("td");cell.setAttribute('valign','middle');var new_input=document.createElement("input");new_input.type="text";if(typeof(filter.input_name0)!='undefined'&&filter.input_name0.length>0){new_input.value=to_display_date(filter.input_name0);} +new_input.name="text_input";new_input.size="30";new_input.maxsize="255";new_input.visible="true";new_input.setAttribute('id','jscal_field');cell.appendChild(new_input);row.appendChild(cell);var cell=document.createElement("td");cell.setAttribute('valign','middle');var img_element=document.createElement("img");img_element.setAttribute('src','index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=jscalendar.gif');img_element.setAttribute('id','jscal_trigger');cell.appendChild(img_element);row.appendChild(cell);Calendar.setup({inputFieldObj:new_input,buttonObj:img_element,ifFormat:cal_date_format,showsTime:false,singleClick:true,step:1,weekNumbers:false});var filter_row=filters_arr[filters_count_map[current_filter_id]];filter_row.input_field0=new_input;filter_row.input_field1=null;} function addFilterNoInput(row,filter){var cell=document.createElement("td");cell.setAttribute('valign','middle');var new_input=document.createElement("input");new_input.type="hidden";new_input.value=filter.qualifier_name;new_input.name="text_input";cell.appendChild(new_input);row.appendChild(cell);} function addFilterInputEmpty(row,filter){var cell=document.createElement("td");cell.setAttribute('valign','middle');var new_input=document.createElement("input");new_input.type="hidden";new_input.value=filter.qualifier_name;new_input.name="text_input";cell.appendChild(new_input);row.appendChild(cell);var cell=document.createElement("td");row.appendChild(cell);var filter_row=filters_arr[filters_count_map[current_filter_id]];filter_row.input_field0=new_input;filter_row.input_field1=null;} function addFilterInputSelectMultiple(row,options,filter){var cell=document.createElement('td');row.appendChild(cell);var select_html_info=new Object();var options_arr=new Array();var select_info=new Object();select_info['size']='5';select_info['multiple']=true;select_html_info['select']=select_info;var selected_map=new Object();for(i=0;i0){optionList[0].selected="selected";} for(var ii=0;ii3&&elem.name.substring(elem.name.length-3)=='_id')||((elem.name.length>9)&&(elem.name.substring(elem.name.length-9)=='_id_basic'))||(elem.name.length>12&&elem.name.substring(elem.name.length-12)=='_id_advanced')||(elem.name.length>2&&elem.name.substring(elem.name.length-2)=='_c')||((elem.name.length>8)&&(elem.name.substring(elem.name.length-8)=='_c_basic'))||(elem.name.length>11&&elem.name.substring(elem.name.length-11)=='_c_advanced')) +else if(elemType=='hidden'){if(elem.name.indexOf("_id")!=-1||elem.name.indexOf("_c")!=-1||elem.name.indexOf("_advanced")!=-1) {elem.value='';}}} +if(typeof(collection)!=='undefined') +{for(key in collection) +{collection[key].clean_up();}} SUGAR.savedViews.clearColumns=true;}};}();SUGAR.tabChooser=function(){var object_refs=new Array();return{frozenOptions:[],movementCallback:function(left_side,right_side){},orderCallback:function(left_side,right_side){},freezeOptions:function(left_name,right_name,target){if(!SUGAR.tabChooser.frozenOptions){SUGAR.tabChooser.frozenOptions=[];} if(!SUGAR.tabChooser.frozenOptions[left_name]){SUGAR.tabChooser.frozenOptions[left_name]=[];} if(!SUGAR.tabChooser.frozenOptions[left_name][right_name]){SUGAR.tabChooser.frozenOptions[left_name][right_name]=[];} diff --git a/include/language/en_us.lang.php b/include/language/en_us.lang.php index 15cf9fc5..08bbb0b7 100644 --- a/include/language/en_us.lang.php +++ b/include/language/en_us.lang.php @@ -1760,6 +1760,7 @@ $app_strings = array ( 'LBL_FILTER_MENU_BY' => 'Filter Menu By', 'LBL_VCARD' => 'vCard', 'LBL_EMPTY_VCARD' => 'Please select a vCard file', + 'LBL_EMPTY_REQUIRED_VCARD' => 'vCard does not have all the required fields for this module. Please refer to sugarcrm.log for details.', 'LBL_IMPORT_VCARD' => 'Import vCard:', 'LBL_IMPORT_VCARD_BUTTON_KEY' => 'I', 'LBL_IMPORT_VCARD_BUTTON_LABEL' => 'Import vCard', diff --git a/include/utils.php b/include/utils.php index 250ba11b..ad01de86 100644 --- a/include/utils.php +++ b/include/utils.php @@ -354,6 +354,7 @@ function get_sugar_config_defaults() { 'default_view' => 'week', 'show_calls_by_default' => true, 'show_tasks_by_default' => true, + 'show_completed_by_default' => true, 'editview_width' => 990, 'editview_height' => 485, 'day_timestep' => 15, diff --git a/include/vCard.php b/include/vCard.php index 1ed47fd7..5d46b45a 100644 --- a/include/vCard.php +++ b/include/vCard.php @@ -161,227 +161,275 @@ class vCard print $locale->translateCharset($content, 'UTF-8', $locale->getExportCharset()); } - function importVCard($filename, $module='Contacts'){ - global $current_user; - $lines = file($filename); - $start = false; - $contact = loadBean($module); - - $contact->title = 'imported'; - $contact->assigned_user_id = $current_user->id; - $fullname = ''; + function importVCard($filename, $module = 'Contacts') + { + global $current_user; + $lines = file($filename); + $start = false; + + $bean = BeanFactory::getBean($module); + $bean->title = 'imported'; + $bean->assigned_user_id = $current_user->id; $email_suffix = 1; - for($index = 0; $index < sizeof($lines); $index++){ - $line = $lines[$index]; + for ($index = 0; $index < sizeof($lines); $index++) + { + $line = $lines[$index]; // check the encoding and change it if needed $locale = new Localization(); $encoding = $locale->detectCharset($line); - if ( $encoding != $GLOBALS['sugar_config']['default_charset'] ) { - $line = $locale->translateCharset($line,$encoding); + if ( $encoding != $GLOBALS['sugar_config']['default_charset'] ) + { + $line = $locale->translateCharset($line, $encoding); } - $line = trim($line); - if($start){ - //VCARD is done - if(substr_count(strtoupper($line), 'END:VCARD')){ - if(!isset($contact->last_name)){ - $contact->last_name = $fullname; - } - break; - } - $keyvalue = explode(':',$line); - if(sizeof($keyvalue)==2){ - $value = $keyvalue[1]; - for($newindex= $index + 1; $newindex < sizeof($lines), substr_count($lines[$newindex], ':') == 0; $newindex++){ - $value .= $lines[$newindex]; - $index = $newindex; - } - $values = explode(';',$value ); - $key = strtoupper($keyvalue[0]); - $key = strtr($key, '=', ''); - $key = strtr($key, ',',';'); - $keys = explode(';' ,$key); - - if($keys[0] == 'TEL'){ - if(substr_count($key, 'WORK') > 0){ - if(substr_count($key, 'FAX') > 0){ - if(!isset($contact->phone_fax)){ - $contact->phone_fax = $value; - } - }else{ - if(!isset($contact->phone_work)){ - $contact->phone_work = $value; - } - } - } - if(substr_count($key, 'HOME') > 0){ - if(substr_count($key, 'FAX') > 0){ - if(!isset($contact->phone_fax)){ - $contact->phone_fax = $value; - } - }else{ - if(!isset($contact->phone_home)){ - $contact->phone_home = $value; - } - } - } - if(substr_count($key, 'CELL') > 0){ - if(!isset($contact->phone_mobile)){ - $contact->phone_mobile = $value; - } - - } - if(substr_count($key, 'FAX') > 0){ - if(!isset($contact->phone_fax)){ - $contact->phone_fax = $value; - } - - } - - } - if($keys[0] == 'N'){ - if(sizeof($values) > 0) - $contact->last_name = $values[0]; - if(sizeof($values) > 1) - $contact->first_name = $values[1]; - if(sizeof($values) > 2) - $contact->salutation = $values[2]; - - - - } - if($keys[0] == 'FN'){ - $fullname = $value; - - - } + $line = trim($line); + if ($start) + { + //VCARD is done + if (substr_count(strtoupper($line), 'END:VCARD')) + { + if (!isset($bean->last_name) && !empty($fullname)) + { + $bean->last_name = $fullname; + } + break; } - if($keys[0] == 'ADR'){ - if(substr_count($key, 'WORK') > 0 && (substr_count($key, 'POSTAL') > 0|| substr_count($key, 'PARCEL') == 0)){ - - if(!isset($contact->primary_address_street) && sizeof($values) > 2){ - $textBreaks = array("\n", "\r"); - $vcardBreaks = array("=0A", "=0D"); - $contact->primary_address_street = str_replace($vcardBreaks, $textBreaks, $values[2]); - } - if(!isset($contact->primary_address_city) && sizeof($values) > 3){ - $contact->primary_address_city = $values[3]; - } - if(!isset($contact->primary_address_state) && sizeof($values) > 4){ - $contact->primary_address_state = $values[4]; - } - if(!isset($contact->primary_address_postalcode) && sizeof($values) > 5){ - $contact->primary_address_postalcode = $values[5]; - } - if(!isset($contact->primary_address_country) && sizeof($values) > 6){ - $contact->primary_address_country = $values[6]; - } - } - } - - if($keys[0] == 'TITLE'){ - $contact->title = $value; - - } - if($keys[0] == 'EMAIL'){ - $field = 'email' . $email_suffix; - if(!isset($contact->$field)) { - $contact->$field = $value; - } - - if($email_suffix == 1) { - $_REQUEST['email1'] = $value; - } - - $email_suffix++; - } - - if($keys[0] == 'ORG'){ - $GLOBALS['log']->debug('I found a company name'); - if(!empty($value)){ - $GLOBALS['log']->debug('I found a company name (fer real)'); - if ( is_a($contact,"Contact") || is_a($contact,"Lead") ) { - $GLOBALS['log']->debug('And Im dealing with a person!'); - $accountBean = loadBean('Accounts'); - // It's a contact, we better try and match up an account - $full_company_name = trim($values[0]); - // Do we have a full company name match? - $result = $accountBean->retrieve_by_string_fields(array('name' => $full_company_name, 'deleted' => 0)); - if ( ! isset($result->id) ) { - // Try to trim the full company name down, see if we get some other matches - $vCardTrimStrings = array('/ltd\.*/i'=>'', - '/llc\.*/i'=>'', - '/gmbh\.*/i'=>'', - '/inc\.*/i'=>'', - '/\.com/i'=>'', - ); - // Allow users to override the trimming strings - if ( file_exists('custom/include/vCardTrimStrings.php') ) { - require_once('custom/include/vCardTrimStrings.php'); - } - $short_company_name = trim(preg_replace(array_keys($vCardTrimStrings),$vCardTrimStrings,$full_company_name)," ,."); - - $GLOBALS['log']->debug('Trying an extended search for: '.$short_company_name); - $result = $accountBean->retrieve_by_string_fields(array('name' => $short_company_name, 'deleted' => 0)); - } - if ( is_a($contact,"Lead") || ! isset($result->id) ) { - // We could not find a parent account, or this is a lead so only copy the name, no linking - $GLOBALS['log']->debug("Did not find a matching company ($full_company_name)"); - $contact->account_id = ''; - $contact->account_name = $full_company_name; - } else { - $GLOBALS['log']->debug("Found a matching company: ".$result->name); - $contact->account_id = $result->id; - $contact->account_name = $result->name; + $keyvalue = explode(':', $line); + if (sizeof($keyvalue) == 2) + { + $value = $keyvalue[1]; + for ($newindex = $index + 1; $newindex < sizeof($lines), substr_count($lines[$newindex], ':') == 0; $newindex++) + { + $value .= $lines[$newindex]; + $index = $newindex; + } + $values = explode(';', $value); + $key = strtoupper($keyvalue[0]); + $key = strtr($key, '=', ''); + $key = strtr($key, ',', ';'); + $keys = explode(';', $key); + + if($keys[0] == 'TEL') + { + if(substr_count($key, 'WORK') > 0) + { + if(substr_count($key, 'FAX') > 0) + { + if(!isset($bean->phone_fax)) + { + $bean->phone_fax = $value; + } + } + else + { + if(!isset($bean->phone_work)) + { + $bean->phone_work = $value; + } + } + } + + if (substr_count($key, 'HOME') > 0) + { + if (substr_count($key, 'FAX') > 0) + { + if (!isset($bean->phone_fax)) + { + $bean->phone_fax = $value; + } + } + else + { + if (!isset($bean->phone_home)) + { + $bean->phone_home = $value; } - $contact->department = $values[1]; - } else{ - $contact->department = $value; } - } + } + if (substr_count($key, 'CELL') > 0) + { + if (!isset($bean->phone_mobile)) + { + $bean->phone_mobile = $value; + } + } + if (substr_count($key, 'FAX') > 0) + { + if (!isset($bean->phone_fax)) + { + $bean->phone_fax = $value; + } + } + } + + if ($keys[0] == 'N') + { + if (sizeof($values) > 0) + { + $bean->last_name = $values[0]; + } + if (sizeof($values) > 1) + { + $bean->first_name = $values[1]; + } + if (sizeof($values) > 2) + { + $bean->salutation = $values[2]; + } + } + + if ($keys[0] == 'FN') + { + $fullname = $value; + } + } + + if ($keys[0] == 'ADR') + { + if (substr_count($key, 'WORK') > 0 && (substr_count($key, 'POSTAL') > 0|| substr_count($key, 'PARCEL') == 0)) + { + if (!isset($bean->primary_address_street) && sizeof($values) > 2) + { + $textBreaks = array("\n", "\r"); + $vcardBreaks = array("=0A", "=0D"); + $bean->primary_address_street = str_replace($vcardBreaks, $textBreaks, $values[2]); + } + if (!isset($bean->primary_address_city) && sizeof($values) > 3) + { + $bean->primary_address_city = $values[3]; + } + if (!isset($bean->primary_address_state) && sizeof($values) > 4) + { + $bean->primary_address_state = $values[4]; + } + if (!isset($bean->primary_address_postalcode) && sizeof($values) > 5) + { + $bean->primary_address_postalcode = $values[5]; + } + if (!isset($bean->primary_address_country) && sizeof($values) > 6) + { + $bean->primary_address_country = $values[6]; + } + } + } - } + if ($keys[0] == 'TITLE') + { + $bean->title = $value; + } + if ($keys[0] == 'EMAIL') + { + $field = 'email' . $email_suffix; + if (!isset($bean->$field)) + { + $bean->$field = $value; + } + if ($email_suffix == 1) + { + $_REQUEST['email1'] = $value; + } + $email_suffix++; + } + + if ($keys[0] == 'ORG') + { + $GLOBALS['log']->debug('I found a company name'); + if (!empty($value)) + { + $GLOBALS['log']->debug('I found a company name (fer real)'); + if ( is_a($bean,"Contact") || is_a($bean,"Lead") ) + { + $GLOBALS['log']->debug('And Im dealing with a person!'); + $accountBean = BeanFactory::getBean('Accounts'); + // It's a contact, we better try and match up an account + $full_company_name = trim($values[0]); + // Do we have a full company name match? + $result = $accountBean->retrieve_by_string_fields(array('name' => $full_company_name, 'deleted' => 0)); + if ( ! isset($result->id) ) + { + // Try to trim the full company name down, see if we get some other matches + $vCardTrimStrings = array('/ltd\.*/i'=>'', + '/llc\.*/i'=>'', + '/gmbh\.*/i'=>'', + '/inc\.*/i'=>'', + '/\.com/i'=>'', + ); + // Allow users to override the trimming strings + if ( file_exists('custom/include/vCardTrimStrings.php') ) + { + require_once('custom/include/vCardTrimStrings.php'); + } + $short_company_name = trim(preg_replace(array_keys($vCardTrimStrings), $vCardTrimStrings,$full_company_name), " ,."); - } + $GLOBALS['log']->debug('Trying an extended search for: ' . $short_company_name); + $result = $accountBean->retrieve_by_string_fields(array('name' => $short_company_name, 'deleted' => 0)); + } + if ( is_a($bean, "Lead") || ! isset($result->id) ) + { + // We could not find a parent account, or this is a lead so only copy the name, no linking + $GLOBALS['log']->debug("Did not find a matching company ($full_company_name)"); + $bean->account_id = ''; + $bean->account_name = $full_company_name; + } + else + { + $GLOBALS['log']->debug("Found a matching company: " . $result->name); + $bean->account_id = $result->id; + $bean->account_name = $result->name; + } + $bean->department = $values[1]; + } + else + { + $bean->department = $value; + } + } + } + } - //FOUND THE BEGINING OF THE VCARD - if(!$start && substr_count(strtoupper($line), 'BEGIN:VCARD')){ - $start = true; - } + //FOUND THE BEGINING OF THE VCARD + if (!$start && substr_count(strtoupper($line), 'BEGIN:VCARD')) + { + $start = true; + } + } - } + foreach ($bean->get_import_required_fields() as $key => $value) + { + $GLOBALS['log']->error("Cannot import vCard, required field is not set: $key"); + if (empty($bean->$key)) + { + return; + } + } - if ( is_a($contact, "Contact") && empty($contact->account_id) && !empty($contact->account_name) ) { - $GLOBALS['log']->debug("Look ma! I'm creating a new account: ".$contact->account_name); + if ( is_a($bean, "Contact") && empty($bean->account_id) && !empty($bean->account_name) ) + { + $GLOBALS['log']->debug("Look ma! I'm creating a new account: " . $bean->account_name); // We need to create a new account - $accountBean = loadBean('Accounts'); + $accountBean = BeanFactory::getBean('Accounts'); // Populate the newly created account with all of the contact information - foreach ( $contact->field_defs as $field_name => $field_def ) { - if ( !empty($contact->$field_name) ) { - $accountBean->$field_name = $contact->$field_name; + foreach ( $bean->field_defs as $field_name => $field_def ) + { + if ( !empty($bean->$field_name) ) + { + $accountBean->$field_name = $bean->$field_name; } } - $accountBean->name = $contact->account_name; + $accountBean->name = $bean->account_name; $accountBean->save(); - $contact->account_id = $accountBean->id; + $bean->account_id = $accountBean->id; } - $contactId = $contact->save(); - return $contactId; - } + $beanId = $bean->save(); + return $beanId; } - - - - - - - +} ?> diff --git a/install/confirmSettings.php b/install/confirmSettings.php index 4b77c473..7355526d 100644 --- a/install/confirmSettings.php +++ b/install/confirmSettings.php @@ -353,7 +353,10 @@ if( $memory_limit == "" ){ // memory_limit disabled at compile time, no $memory_limit_int = intval($num); $SUGARCRM_MIN_MEM = (int) constant('SUGARCRM_MIN_MEM'); if( $memory_limit_int < constant('SUGARCRM_MIN_MEM') ){ - $memory_msg = "$memory_limit{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_1']}" . constant('SUGARCRM_MIN_MEM') . "{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_2']}"; + // Bug59667: The string ERR_CHECKSYS_MEM_LIMIT_2 already has 'M' in it, + // so we divide the constant by 1024*1024. + $min_mem_in_megs = constant('SUGARCRM_MIN_MEM')/(1024*1024); + $memory_msg = "$memory_limit{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_1']}" . $min_mem_in_megs . "{$mod_strings['ERR_CHECKSYS_MEM_LIMIT_2']}"; $memory_msg = str_replace('$memory_limit', $mem_display, $memory_msg); } else { $memory_msg = "{$mod_strings['LBL_CHECKSYS_OK']} ({$memory_limit})"; diff --git a/jssource/src_files/include/SubPanel/SubPanelTiles.js b/jssource/src_files/include/SubPanel/SubPanelTiles.js index a8a01258..56e48cfb 100644 --- a/jssource/src_files/include/SubPanel/SubPanelTiles.js +++ b/jssource/src_files/include/SubPanel/SubPanelTiles.js @@ -482,7 +482,7 @@ SUGAR.subpanelUtils = function() { if (form) { // discover cancelCreate function parameters needed - var moduleName = form.id.replace(/.*?_([^_]+)$/, "$1"); + var moduleName = YAHOO.util.Selector.query('input[name=module]', form, true).value; var buttonName = moduleName + "_subpanel_cancel_button"; var cancelled = false; diff --git a/jssource/src_files/include/javascript/jsclass_async.js b/jssource/src_files/include/javascript/jsclass_async.js index a3b99ed4..7776a012 100644 --- a/jssource/src_files/include/javascript/jsclass_async.js +++ b/jssource/src_files/include/javascript/jsclass_async.js @@ -83,7 +83,7 @@ SugarVCalClient.prototype.load = function(user_id, request_id) { this.user_id = user_id; // Bug 44239: Removed reliance on jsolait - YAHOO.util.Connect.asyncRequest('GET', './vcal_server.php?type=vfb&source=outlook&user_id=' + user_id, { + YAHOO.util.Connect.asyncRequest('GET', './vcal_server.php?type=vfb&source=outlook&noAuth=noAuth&user_id=' + user_id, { success: function (result) { if (typeof GLOBAL_REGISTRY.freebusy == 'undefined') { GLOBAL_REGISTRY.freebusy = new Object(); diff --git a/jssource/src_files/include/javascript/quicksearch.js b/jssource/src_files/include/javascript/quicksearch.js index 2ff99a09..7aafa191 100644 --- a/jssource/src_files/include/javascript/quicksearch.js +++ b/jssource/src_files/include/javascript/quicksearch.js @@ -284,7 +284,7 @@ function enableQS(noReload){ if ( typeof(SUGAR.config.quicksearch_querydelay) != 'undefined' ) { - search.queryDelay = SUGAR.config.quicksearch_querydelay; + search.queryDelay = Number(SUGAR.config.quicksearch_querydelay); } //fill in the data fields on selection diff --git a/jssource/src_files/include/javascript/report_additionals.js b/jssource/src_files/include/javascript/report_additionals.js index 3a9ac3d7..9a6658d8 100644 --- a/jssource/src_files/include/javascript/report_additionals.js +++ b/jssource/src_files/include/javascript/report_additionals.js @@ -742,10 +742,8 @@ function addFilterInputDate(row,filter) { new_input.type="text"; if ( typeof (filter.input_name0) != 'undefined' && filter.input_name0.length > 0) { - filter.input_name0 = to_display_date(filter.input_name0); + new_input.value = to_display_date(filter.input_name0); } - - new_input.value=filter.input_name0; new_input.name="text_input"; new_input.size="30"; new_input.maxsize="255"; @@ -941,8 +939,7 @@ function addFilterInputDateBetween(row,filter) { filter.input_name0 = ''; } - filter.input_name0 = to_display_date(filter.input_name0); - new_input.value=filter.input_name0; + new_input.value = to_display_date(filter.input_name0); new_input.name="text_input"; new_input.size="12"; new_input.maxsize="255"; @@ -982,8 +979,7 @@ function addFilterInputDateBetween(row,filter) { if (typeof(filter.input_name1) == 'undefined') { filter.input_name1 = ''; } - filter.input_name1 = to_display_date(filter.input_name1); - new_input.value=filter.input_name1; + new_input.value = to_display_date(filter.input_name1); new_input.name="text_input"; new_input.size="12"; new_input.maxsize="255"; diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js index 6945a053..9cf1f822 100644 --- a/jssource/src_files/include/javascript/sugar_3.js +++ b/jssource/src_files/include/javascript/sugar_3.js @@ -3835,19 +3835,31 @@ SUGAR.searchForm = function() { elem.selected = false; } else if ( elemType == 'hidden' ) { - // We only want to reset the hidden values that link to the select boxes. - // _c custom field kludge added to fix Bug 41384 - if ( ( elem.name.length > 3 && elem.name.substring(elem.name.length-3) == '_id' ) - || ((elem.name.length > 9) && (elem.name.substring(elem.name.length - 9) == '_id_basic')) - || ( elem.name.length > 12 && elem.name.substring(elem.name.length-12) == '_id_advanced' ) - || ( elem.name.length > 2 && elem.name.substring(elem.name.length-2) == '_c' ) - || ((elem.name.length > 8) && (elem.name.substring(elem.name.length - 8) == '_c_basic')) - || ( elem.name.length > 11 && elem.name.substring(elem.name.length-11) == '_c_advanced' ) ) + if ( + // For bean selection + elem.name.indexOf("_id") != -1 + // For custom fields + || elem.name.indexOf("_c") != -1 + // For advanced fields, like team collection, or datetime fields + || elem.name.indexOf("_advanced") != -1 + ) { elem.value = ''; } } } + + // If there are any collections + if (typeof(collection) !== 'undefined') + { + // Loop through all the collections on the page and run clean_up() + for (key in collection) + { + // Clean up only removes blank fields, if any + collection[key].clean_up(); + } + } + SUGAR.savedViews.clearColumns = true; } }; diff --git a/modules/Activities/EmailReminder.php b/modules/Activities/EmailReminder.php index f21692a8..52295bb9 100644 --- a/modules/Activities/EmailReminder.php +++ b/modules/Activities/EmailReminder.php @@ -134,7 +134,7 @@ class EmailReminder }else if ( !empty($bean->assigned_user_id) ) { $user_id = $bean->assigned_user_id; }else { - $user_id = $GLOBLAS['current_user']->id; + $user_id = $GLOBALS['current_user']->id; } $user = new User(); $user->retrieve($bean->created_by); diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index 3e313644..ab38ef84 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -53,6 +53,7 @@ class Calendar { public $show_tasks = true; public $show_calls = true; + public $show_completed = true; public $enable_repeat = true; public $time_step = 60; // time step of each slot in minutes @@ -131,14 +132,22 @@ class Calendar { $current_date_db = $date_arr['year']."-".str_pad($date_arr['month'],2,"0",STR_PAD_LEFT)."-".str_pad($date_arr['day'],2,"0",STR_PAD_LEFT); $this->date_time = $GLOBALS['timedate']->fromString($current_date_db); - + $this->show_tasks = $current_user->getPreference('show_tasks'); if(is_null($this->show_tasks)) - $this->show_tasks = SugarConfig::getInstance()->get('calendar.show_tasks_by_default',true); + $this->show_tasks = SugarConfig::getInstance()->get('calendar.show_tasks_by_default',true); + $this->show_calls = $current_user->getPreference('show_calls'); if(is_null($this->show_calls)) $this->show_calls = SugarConfig::getInstance()->get('calendar.show_calls_by_default',true); - + + // Show completed Meetings, Calls, Tasks + $this->show_completed = $current_user->getPreference('show_completed'); + if(is_null($this->show_completed)) + { + $this->show_completed = SugarConfig::getInstance()->get('calendar.show_completed_by_default', true); + } + $this->enable_repeat = SugarConfig::getInstance()->get('calendar.enable_repeat',true); if(in_array($this->view,array('month','year'))){ @@ -228,7 +237,11 @@ class Calendar { if (!empty($act->sugar_bean->parent_type) && !empty($act->sugar_bean->parent_id)) { $focus = BeanFactory::getBean($act->sugar_bean->parent_type, $act->sugar_bean->parent_id); - $item['related_to'] = $focus->name; + // If the bean wasn't loaded, e.g. insufficient permissions + if (!empty($focus)) + { + $item['related_to'] = $focus->name; + } } if(!isset($item['duration_hours']) || empty($item['duration_hours'])) @@ -312,10 +325,13 @@ class Calendar { $start_date_time = $start_date_time->get("-5 days"); // 5 days step back to fetch multi-day activities that $acts_arr = array(); - if($type == 'vfb'){ + if($type == 'vfb') + { $acts_arr = CalendarActivity::get_freebusy_activities($user, $start_date_time, $end_date_time); - }else{ - $acts_arr = CalendarActivity::get_activities($user->id, $this->show_tasks, $start_date_time, $end_date_time, $this->view,$this->show_calls); + } + else + { + $acts_arr = CalendarActivity::get_activities($user->id, $this->show_tasks, $start_date_time, $end_date_time, $this->view, $this->show_calls, $this->show_completed); } $this->acts_arr[$user->id] = $acts_arr; diff --git a/modules/Calendar/CalendarActivity.php b/modules/Calendar/CalendarActivity.php index 4cbe1ea7..357bf01b 100644 --- a/modules/Calendar/CalendarActivity.php +++ b/modules/Calendar/CalendarActivity.php @@ -151,14 +151,25 @@ class CalendarActivity { * @param SugarDateTime $view_end_time end date * @param string $view view; not used for now, left for compatibility * @param boolean $show_calls + * @param boolean $show_completed use to allow filtering completed events * @return array */ - function get_activities($user_id, $show_tasks, $view_start_time, $view_end_time, $view, $show_calls = true){ + function get_activities($user_id, $show_tasks, $view_start_time, $view_end_time, $view, $show_calls = true, $show_completed = true) + { global $current_user; $act_list = array(); $seen_ids = array(); - - + + $completedCalls = ''; + $completedMeetings = ''; + $completedTasks = ''; + if (!$show_completed) + { + $completedCalls = " AND calls.status = 'Planned' "; + $completedMeetings = " AND meetings.status = 'Planned' "; + $completedTasks = " AND tasks.status != 'Completed' "; + } + // get all upcoming meetings, tasks due, and calls for a user if(ACLController::checkAccess('Meetings', 'list', $current_user->id == $user_id)) { $meeting = new Meeting(); @@ -168,7 +179,8 @@ class CalendarActivity { } $where = CalendarActivity::get_occurs_within_where_clause($meeting->table_name, $meeting->rel_users_table, $view_start_time, $view_end_time, 'date_start', $view); - $focus_meetings_list = build_related_list_by_user_id($meeting,$user_id,$where); + $where .= $completedMeetings; + $focus_meetings_list = build_related_list_by_user_id($meeting, $user_id, $where); foreach($focus_meetings_list as $meeting) { if(isset($seen_ids[$meeting->id])) { continue; @@ -192,7 +204,8 @@ class CalendarActivity { } $where = CalendarActivity::get_occurs_within_where_clause($call->table_name, $call->rel_users_table, $view_start_time, $view_end_time, 'date_start', $view); - $focus_calls_list = build_related_list_by_user_id($call,$user_id,$where); + $where .= $completedCalls; + $focus_calls_list = build_related_list_by_user_id($call, $user_id, $where); foreach($focus_calls_list as $call) { if(isset($seen_ids[$call->id])) { @@ -215,8 +228,9 @@ class CalendarActivity { $where = CalendarActivity::get_occurs_within_where_clause('tasks', '', $view_start_time, $view_end_time, 'date_due', $view); $where .= " AND tasks.assigned_user_id='$user_id' "; + $where .= $completedTasks; - $focus_tasks_list = $task->get_full_list("", $where,true); + $focus_tasks_list = $task->get_full_list("", $where, true); if(!isset($focus_tasks_list)) { $focus_tasks_list = array(); diff --git a/modules/Calendar/CalendarDisplay.php b/modules/Calendar/CalendarDisplay.php index 566fec74..5ccd8e36 100644 --- a/modules/Calendar/CalendarDisplay.php +++ b/modules/Calendar/CalendarDisplay.php @@ -286,6 +286,7 @@ class CalendarDisplay { $ss->assign('display_timeslots', $displayTimeslots); $ss->assign('show_calls',$this->cal->show_calls); $ss->assign('show_tasks',$this->cal->show_tasks); + $ss->assign('show_completed', $this->cal->show_completed); $ss->assign('TIME_START_HOUR_OPTIONS',$TIME_START_HOUR_OPTIONS); $ss->assign('TIME_START_MINUTES_OPTIONS',$TIME_START_MINUTES_OPTIONS); $ss->assign('TIME_START_MERIDIEM',$TIME_START_MERIDIEM); diff --git a/modules/Calendar/index.php b/modules/Calendar/index.php index 7d038241..452147ef 100644 --- a/modules/Calendar/index.php +++ b/modules/Calendar/index.php @@ -49,8 +49,16 @@ global $cal_strings, $current_language; $cal_strings = return_module_language($current_language, 'Calendar'); if(empty($_REQUEST['view'])){ - $_REQUEST['view'] = SugarConfig::getInstance()->get('calendar.default_view','week'); + if (isset($_SESSION['CALENDAR_VIEW']) && in_array($_SESSION['CALENDAR_VIEW'], array("day","week","month","year","shared"))) + { + $_REQUEST['view'] = $_SESSION['CALENDAR_VIEW']; + } + else + { + $_REQUEST['view'] = SugarConfig::getInstance()->get('calendar.default_view','week'); + } } +$_SESSION['CALENDAR_VIEW'] = $_REQUEST['view']; $cal = new Calendar($_REQUEST['view']); diff --git a/modules/Calendar/language/en_us.lang.php b/modules/Calendar/language/en_us.lang.php index 977bd8c7..afd02089 100644 --- a/modules/Calendar/language/en_us.lang.php +++ b/modules/Calendar/language/en_us.lang.php @@ -123,7 +123,8 @@ $mod_strings = array ( 'LBL_SETTINGS_TIME_STARTS'=>'Start time:', 'LBL_SETTINGS_TIME_ENDS'=>'End time:', 'LBL_SETTINGS_CALLS_SHOW' => 'Show Calls:', - 'LBL_SETTINGS_TASKS_SHOW' => 'Show Tasks:', + 'LBL_SETTINGS_TASKS_SHOW' => 'Show Tasks:', + 'LBL_SETTINGS_COMPLETED_SHOW' => 'Show Completed Meetings, Calls and Tasks:', 'LBL_SAVE_BUTTON' => 'Save', 'LBL_DELETE_BUTTON' => 'Delete', diff --git a/modules/Calendar/tpls/settings.tpl b/modules/Calendar/tpls/settings.tpl index 47aa79a5..d30054ee 100644 --- a/modules/Calendar/tpls/settings.tpl +++ b/modules/Calendar/tpls/settings.tpl @@ -130,6 +130,17 @@ $(function() { + + + {$MOD.LBL_SETTINGS_COMPLETED_SHOW} + + + + + diff --git a/modules/Calendar/views/view.savesettings.php b/modules/Calendar/views/view.savesettings.php index 13ee8730..52b4311f 100644 --- a/modules/Calendar/views/view.savesettings.php +++ b/modules/Calendar/views/view.savesettings.php @@ -58,6 +58,7 @@ class CalendarViewSaveSettings extends SugarView { $current_user->setPreference('calendar_display_timeslots', $_REQUEST['display_timeslots'], 0, 'global', $current_user); $current_user->setPreference('show_tasks', $_REQUEST['show_tasks'], 0, 'global', $current_user); $current_user->setPreference('show_calls', $_REQUEST['show_calls'], 0, 'global', $current_user); + $current_user->setPreference('show_completed', $_REQUEST['show_completed'], 0, 'global', $current_user); if(isset($_REQUEST['day']) && !empty($_REQUEST['day'])) header("Location: index.php?module=Calendar&action=index&view=".$_REQUEST['view']."&hour=0&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']); diff --git a/modules/Calls/metadata/additionalDetails.php b/modules/Calls/metadata/additionalDetails.php index da6ec797..295b2640 100644 --- a/modules/Calls/metadata/additionalDetails.php +++ b/modules/Calls/metadata/additionalDetails.php @@ -44,8 +44,10 @@ function additionalDetailsCall($fields) { } $overlib_string = ''; - - //Modify by jchi 6/27/2008 1515pm china time , bug 20626. + if(!empty($fields['NAME'])) { + $overlib_string .= ''. $mod_strings['LBL_SUBJECT'] . ' ' . $fields['NAME']; + $overlib_string .= '
'; + } if(!empty($fields['DATE_START'])) $overlib_string .= ''. $mod_strings['LBL_DATE_TIME'] . ' ' . $fields['DATE_START'] . '
'; if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) { @@ -65,7 +67,10 @@ function additionalDetailsCall($fields) { $fields['PARENT_NAME'] . ""; $overlib_string .= '
'; } - + if(!empty($fields['STATUS'])) { + $overlib_string .= ''. $mod_strings['LBL_STATUS'] . ' ' . $fields['STATUS']; + $overlib_string .= '
'; + } if(!empty($fields['DESCRIPTION'])) { $overlib_string .= ''. $mod_strings['LBL_DESCRIPTION'] . ' ' . substr($fields['DESCRIPTION'], 0, 300); if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; diff --git a/modules/Campaigns/TrackDetailView.php b/modules/Campaigns/TrackDetailView.php index c984442d..1d6eb2a1 100644 --- a/modules/Campaigns/TrackDetailView.php +++ b/modules/Campaigns/TrackDetailView.php @@ -229,6 +229,10 @@ $subpanel = new SubPanelTiles($focus, 'Campaigns'); if(empty($latest_marketing_id) || $latest_marketing_id === 'all'){ //do nothing, no filtering is needed }else{ + + // assign selected marketing ID back to request in order to let ListView use it as a part of subpanel base URL + $_GET['mkt_id'] = $latest_marketing_id; + //get array of layout defs $layoutDefsArr= $subpanel->subpanel_definitions->layout_defs; diff --git a/modules/Contacts/language/en_us.lang.php b/modules/Contacts/language/en_us.lang.php index bd7e2d83..780db56c 100644 --- a/modules/Contacts/language/en_us.lang.php +++ b/modules/Contacts/language/en_us.lang.php @@ -100,7 +100,6 @@ $mod_strings = array ( 'LBL_DUPLICATE' => 'Possible Duplicate Contacts', 'LBL_EMAIL_ADDRESS' => 'Email Address:', 'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:', - 'LBL_EMPTY_VCARD' => 'Please select a vCard file', 'LBL_EXISTING_ACCOUNT' => 'Used an existing account', 'LBL_EXISTING_CONTACT' => 'Used an existing contact', 'LBL_EXISTING_OPPORTUNITY'=> 'Used an existing opportunity', diff --git a/modules/EmailMan/EmailMan.php b/modules/EmailMan/EmailMan.php index 5bf8ba19..7d4bc741 100644 --- a/modules/EmailMan/EmailMan.php +++ b/modules/EmailMan/EmailMan.php @@ -354,8 +354,10 @@ class EmailMan extends SugarBean{ $this->ref_email->parent_type = ''; $this->ref_email->parent_id = ''; } - $this->ref_email->date_start = $timedate->nowDate(); - $this->ref_email->time_start = $timedate->asUserTime($timedate->getNow(true)); + + // Bug 59726 - Campaigns' Emails are sometime freezed + $this->ref_email->date_start = $timedate->nowDbDate(); + $this->ref_email->time_start = $timedate->asDbTime($timedate->getNow()); $this->ref_email->status='sent'; $retId = $this->ref_email->save(); @@ -422,8 +424,11 @@ class EmailMan extends SugarBean{ break; } + //serialize data to be passed into Link2->add() function + $campaignData = serialize($macro_nv); + //required for one email per campaign per marketing message. - $this->ref_email->$rel_name->add($this->related_id,array('campaign_data'=>serialize($macro_nv))); + $this->ref_email->$rel_name->add($this->related_id,array('campaign_data'=>$this->db->quote($campaignData))); } return $this->ref_email->id; } @@ -637,7 +642,7 @@ class EmailMan extends SugarBean{ } //test for duplicate email address by marketing id. - $dup_query="select id from campaign_log where more_information='".$module->email1."' and marketing_id='".$this->marketing_id."'"; + $dup_query="select id from campaign_log where more_information='".$this->db->quote($module->email1)."' and marketing_id='".$this->marketing_id."'"; $dup=$this->db->query($dup_query); $dup_row=$this->db->fetchByAssoc($dup); if (!empty($dup_row)) { diff --git a/modules/EmailMan/EmailManDelivery.php b/modules/EmailMan/EmailManDelivery.php index a5ecf8bf..829fe5a4 100644 --- a/modules/EmailMan/EmailManDelivery.php +++ b/modules/EmailMan/EmailManDelivery.php @@ -48,7 +48,12 @@ if (isset($_REQUEST['send_all']) && $_REQUEST['send_all']== true) { else { $send_all=false; //if set to true email delivery will continue..to run until all email have been delivered. } -$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM'); + +if(!isset($GLOBALS['log'])) +{ + $GLOBALS['log'] = LoggerManager::getLogger('SugarCRM'); +} + $mail = new SugarPHPMailer(); $admin = new Administration(); $admin->retrieveSettings(); diff --git a/modules/Emails/Check.php b/modules/Emails/Check.php index 9a416eca..e0b2586f 100644 --- a/modules/Emails/Check.php +++ b/modules/Emails/Check.php @@ -44,28 +44,9 @@ if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'personal') { $ie = new InboundEmail(); $beans = $ie->retrieveByGroupId($current_user->id); if(!empty($beans)) { + /** @var InboundEmail $bean */ foreach($beans as $bean) { - $bean->connectMailserver(); - $newMsgs = array(); - if ($bean->isPop3Protocol()) { - $newMsgs = $bean->getPop3NewMessagesToDownload(); - } else { - $newMsgs = $bean->getNewMessageIds(); - } - //$newMsgs = $bean->getNewMessageIds(); - if(is_array($newMsgs)) { - foreach($newMsgs as $k => $msgNo) { - $uid = $msgNo; - if ($bean->isPop3Protocol()) { - $uid = $bean->getUIDLForMessage($msgNo); - } else { - $uid = imap_uid($bean->conn, $msgNo); - } // else - $bean->importOneEmail($msgNo, $uid); - } - } - imap_expunge($bean->conn); - imap_close($bean->conn); + $bean->importMessages(); } } } @@ -78,34 +59,10 @@ if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'personal') { while($a = $ie->db->fetchByAssoc($r)) { $ieX = new InboundEmail(); $ieX->retrieve($a['id']); - $ieX->connectMailserver(); - //$newMsgs = $ieX->getNewMessageIds(); - $newMsgs = array(); - if ($ieX->isPop3Protocol()) { - $newMsgs = $ieX->getPop3NewMessagesToDownload(); - } else { - $newMsgs = $ieX->getNewMessageIds(); - } - - if(is_array($newMsgs)) { - foreach($newMsgs as $k => $msgNo) { - $uid = $msgNo; - if ($ieX->isPop3Protocol()) { - $uid = $ieX->getUIDLForMessage($msgNo); - } else { - $uid = imap_uid($ieX->conn, $msgNo); - } // else - $ieX->importOneEmail($msgNo, $uid); - } - } - imap_expunge($ieX->conn); - imap_close($ieX->conn); + $ieX->importMessages(); } header('Location: index.php?module=Emails&action=ListViewGroup'); } else { // fail gracefully header('Location: index.php?module=Emails&action=index'); } - - -?> \ No newline at end of file diff --git a/modules/Emails/Email.php b/modules/Emails/Email.php index 2956f69a..d8d2d050 100644 --- a/modules/Emails/Email.php +++ b/modules/Emails/Email.php @@ -932,64 +932,70 @@ class Email extends SugarBean { return true; } // end email2send - /** - * Generates a config-specified separated name and addresses to be used in compose email screen for - * contacts or leads from listview - * By default, use comma, but allow for non-standard delimeters as specified in email_address_separator - * - * @param $module string module name - * @param $idsArray array of record ids to get the email address for - * @return string (config-specified) delimited list of email addresses - */ - public function getNamePlusEmailAddressesForCompose($module, $idsArray) - { - global $locale; - global $db; - $table = SugarModule::get($module)->loadBean()->table_name; - $returndata = array(); - $idsString = ""; - foreach($idsArray as $id) { - if ($idsString != "") { - $idsString = $idsString . ","; - } // if - $idsString = $idsString . "'" . $id . "'"; - } // foreach - $where = "({$table}.deleted = 0 AND {$table}.id in ({$idsString}))"; + /** + * Generates a config-specified separated name and addresses to be used in compose email screen for + * contacts or leads from listview + * By default, use comma, but allow for non-standard delimiters as specified in email_address_separator + * + * @param $module string module name + * @param $idsArray array of record ids to get the email address for + * @return string (config-specified) delimited list of email addresses + */ + public function getNamePlusEmailAddressesForCompose($module, $idsArray) + { + global $locale; + $result = array(); - if ($module == 'Users' || $module == 'Employees') { - $selectColumn = "{$table}.first_name, {$table}.last_name, {$table}.title"; - } - elseif (SugarModule::get($module)->moduleImplements('Person')) { - $selectColumn = "{$table}.first_name, {$table}.last_name, {$table}.salutation, {$table}.title"; - } - else { - $selectColumn = "{$table}.name"; - } - $query = "SELECT {$table}.id, {$selectColumn}, eabr.primary_address, ea.email_address"; - $query .= " FROM {$table} "; - $query .= "JOIN email_addr_bean_rel eabr ON ({$table}.id = eabr.bean_id and eabr.deleted=0) "; - $query .= "JOIN email_addresses ea ON (eabr.email_address_id = ea.id) "; - $query .= " WHERE ({$where}) ORDER BY eabr.primary_address DESC"; - $r = $this->db->query($query); + foreach ($idsArray as $id) + { + // Load bean + $bean = BeanFactory::getBean($module, $id); - while($a = $this->db->fetchByAssoc($r)) { - if (!isset($returndata[$a['id']])) { - if ($module == 'Users' || $module == 'Employees') { - $full_name = from_html($locale->getLocaleFormattedName($a['first_name'], $a['last_name'], '', $a['title'])); - $returndata[$a['id']] = "{$full_name} <".from_html($a['email_address']).">"; - } - elseif (SugarModule::get($module)->moduleImplements('Person')) { - $full_name = from_html($locale->getLocaleFormattedName($a['first_name'], $a['last_name'], $a['salutation'], $a['title'])); - $returndata[$a['id']] = "{$full_name} <".from_html($a['email_address']).">"; - } - else { - $returndata[$a['id']] = from_html($a['name']) . " <".from_html($a['email_address']).">"; - } // else - } - } + // Got a bean + if (!empty($bean)) + { + // For CE, just get primary e-mail address + $emailAddress = $bean->email1; + + + // If we have an e-mail address loaded + if (!empty($emailAddress)) + { + // Use bean name by default + $fullName = $bean->name; + + // Depending on module, format the name + if (in_array($module, array('Users', 'Employees'))) + { + $fullName = from_html( + $locale->getLocaleFormattedName( + $bean->first_name, + $bean->last_name, + '', + $bean->title + ) + ); + } + else if (SugarModule::get($module)->moduleImplements('Person')) + { + $fullName = from_html( + $locale->getLocaleFormattedName( + $bean->first_name, + $bean->last_name, + $bean->salutation, + $bean->title + ) + ); + } + + // Make e-mail address in format "Name <@email>" + $result[$bean->id] = $fullName . " <" . from_html($emailAddress) . ">"; + } + } + } - // broken out of method to facilitate unit testing - return $this->_arrayToDelimitedString($returndata); + // Broken out of method to facilitate unit testing + return $this->_arrayToDelimitedString($result); } /** @@ -1045,6 +1051,13 @@ class Email extends SugarBean { if (!empty($date_sent_obj) && ($date_sent_obj instanceof SugarDateTime)) { $this->date_sent = $date_sent_obj->asDb(); } + } else { + //set date_entered to date_sent if this is a new email being archived + //that way emails archived to sugar by plugins like opacus mail will + //have the correct ordering according to email incoming date. + if ($this->new_with_id) { + $this->date_entered = $this->date_sent; + } } parent::save($check_notify); diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index 9414210c..0cb2c609 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -2353,6 +2353,28 @@ SE.composeLayout = { AjaxObject.startRequest(callbackReplyForward, urlStandard + "&composeType=" + type + sugarEmail); }, + /** + * Move email addresses from To field to BCC field + */ + moveToBCC : function (addrType,idx) { + + var toVal = $.trim($("#addressTO"+idx).val()); + var BCCVal =$.trim($("#addressBCC"+idx).val()); + + if (toVal.length != 0) + { + // get rid of first comma in BCC field and last comma in TO field + // so we don't end up with double commas in BCC field + BCCVal = BCCVal.replace(/^,/, ''); + toVal = toVal.replace(/\,$/, ''); + + $("#addressBCC"+idx).val(toVal +","+BCCVal); + $("#addressTO"+idx).val(""); // empty out the to field + } + // show the BCC field + SE.composeLayout.showHiddenAddress('bcc', SE.composeLayout.currentInstanceId); + }, + /** * Show the hidden cc or bcc fields */ diff --git a/modules/Emails/javascript/ajax.js b/modules/Emails/javascript/ajax.js index 86740c6c..fbe5c27b 100644 --- a/modules/Emails/javascript/ajax.js +++ b/modules/Emails/javascript/ajax.js @@ -726,7 +726,10 @@ AjaxObject.detailView = { var editForm = document.getElementById('form_EmailQCView_' + ret.module); if (editForm) { editForm.module.value = 'Emails'; - var count = SUGAR.EmailAddressWidget.count[ret.module] ? SUGAR.EmailAddressWidget.count[ret.module] : 0; + var count = 0; + if (SUGAR.EmailAddressWidget.count[ret.module]) { + count = SUGAR.EmailAddressWidget.count[ret.module] - 1; + } var tableId = YAHOO.util.Dom.getElementsByClassName('emailaddresses', 'table', editForm)[0]; tableId = tableId ? tableId.id : tableId; var instId = ret.module + count; @@ -734,7 +737,7 @@ AjaxObject.detailView = { SED.quickCreateEmailCallback = function(instId, tableId) { //try to fill up the email address if and only if emailwidget is existed in the form if(tableId) { - var eaw = new SUGAR.EmailAddressWidget.instances[instId]; + var eaw = SUGAR.EmailAddressWidget.instances[instId]; if (eaw) { eaw.prefillEmailAddresses(tableId, SUGAR.email2.detailView.quickCreateEmailsToAdd); } else { diff --git a/modules/Emails/javascript/composeEmailTemplate.js b/modules/Emails/javascript/composeEmailTemplate.js index 977476b5..fd96578c 100644 --- a/modules/Emails/javascript/composeEmailTemplate.js +++ b/modules/Emails/javascript/composeEmailTemplate.js @@ -86,12 +86,13 @@ SUGAR.email2.templates['compose'] = '
' + -' ' + ' ' + ' ' + '
' + +' {mod_strings.LBL_MOVE_TO_BCC}
'+ '   ' + ' ' + '
' + diff --git a/modules/Emails/language/en_us.lang.php b/modules/Emails/language/en_us.lang.php index ba2d746d..4faab847 100644 --- a/modules/Emails/language/en_us.lang.php +++ b/modules/Emails/language/en_us.lang.php @@ -327,6 +327,7 @@ $mod_strings = array ( 'LBL_EMAIL_SETTINGS_OUTBOUND' => 'Outgoing Email', 'LBL_ADD_CC' => 'Add Cc', 'LBL_ADD_BCC' => 'Add Bcc', + 'LBL_MOVE_TO_BCC' => 'Move To Bcc', 'LBL_ADD_TO_ADDR' => 'Add To', 'LBL_SELECTED_ADDR' => 'Selected', 'LBL_ADD_CC_BCC_SEP' => '|', diff --git a/modules/Emails/views/view.quickcreate.php b/modules/Emails/views/view.quickcreate.php index a5bdd8fa..3b024a6a 100644 --- a/modules/Emails/views/view.quickcreate.php +++ b/modules/Emails/views/view.quickcreate.php @@ -74,7 +74,8 @@ class EmailsViewQuickcreate extends ViewQuickcreate } else { $emailAddress = ''; - if(!empty($this->bean->id) && !in_array($this->bean->object_name,array('EmailMan')) ) { + if(!empty($this->bean->id) && !in_array($this->bean->object_name,array('EmailMan')) + && !is_null($this->bean->emailAddress) ) { $emailAddress = $this->bean->emailAddress->getPrimaryAddress($this->bean); } echo ""; diff --git a/modules/InboundEmail/InboundEmail.php b/modules/InboundEmail/InboundEmail.php index 62fe7496..f79605a9 100644 --- a/modules/InboundEmail/InboundEmail.php +++ b/modules/InboundEmail/InboundEmail.php @@ -4707,8 +4707,10 @@ eoq; imap_close($this->conn); return $msg; } elseif(!is_resource($this->conn)) { + $GLOBALS['log']->info('Couldn\'t connect to mail server id: ' . $this->id); return "false"; } else { + $GLOBALS['log']->info('Connected to mail server id: ' . $this->id); return "true"; } } @@ -6322,6 +6324,82 @@ eoq; return $result; } + /** + * Import new messages from given account. + */ + public function importMessages() + { + $protocol = $this->isPop3Protocol() ? 'pop3' : 'imap'; + switch ($protocol) { + case 'pop3': + $this->importMailboxMessages($protocol); + break; + case 'imap': + $mailboxes = $this->getMailboxes(true); + foreach ($mailboxes as $mailbox) { + $this->importMailboxMessages($protocol, $mailbox); + } + imap_expunge($this->conn); + imap_close($this->conn); + break; + } + } + + /** + * Import messages from specified mailbox + * + * @param string $protocol Mailing protocol + * @param string|null $mailbox Mailbox (if applied to protocol) + */ + protected function importMailboxMessages($protocol, $mailbox = null) + { + switch ($protocol) { + case 'pop3': + $msgNumbers = $this->getPop3NewMessagesToDownload(); + break; + case 'imap': + $this->mailbox = $mailbox; + $this->connectMailserver(); + $msgNumbers = $this->getNewMessageIds(); + if (!$msgNumbers) { + $msgNumbers = array(); + } + break; + default: + $msgNumbers = array(); + break; + } + + foreach ($msgNumbers as $msgNumber) { + $uid = $this->getMessageUID($msgNumber, $protocol); + $GLOBALS['log']->info('Importing message no: ' . $msgNumber); + $this->importOneEmail($msgNumber, $uid, false, false); + } + } + + /** + * Retrieves message UID by it's number + * + * @param int $msgNumber Number of the message in current sequence + * @param string $protocol Mailing protocol + * @return string + */ + protected function getMessageUID($msgNumber, $protocol) + { + switch ($protocol) { + case 'pop3': + $uid = $this->getUIDLForMessage($msgNumber); + break; + case 'imap': + $uid = imap_uid($this->conn, $msgNumber); + break; + default: + $uid = null; + break; + } + + return $uid; + } } // end class definition diff --git a/modules/Leads/tpls/ConvertLeadHeader.tpl b/modules/Leads/tpls/ConvertLeadHeader.tpl index 9e232ba9..5760160f 100644 --- a/modules/Leads/tpls/ConvertLeadHeader.tpl +++ b/modules/Leads/tpls/ConvertLeadHeader.tpl @@ -51,6 +51,10 @@ for(i=0; i<=mod_array.length-1; i++){ if(mod_array[i] != 'Contacts'){ var dropdown = document.getElementById('lead_conv_ac_op_sel'); + //if dropdown does not exist, then return and exit function + if (!dropdown) { + return; + } var opt = document.createElement("option"); opt.text = SUGAR.language.get('app_list_strings', "moduleListSingular")[mod_array[i]]; opt.value = mod_array[i]; diff --git a/modules/Meetings/metadata/additionalDetails.php b/modules/Meetings/metadata/additionalDetails.php index 7e26c5e1..bfaeb7cf 100644 --- a/modules/Meetings/metadata/additionalDetails.php +++ b/modules/Meetings/metadata/additionalDetails.php @@ -45,7 +45,10 @@ function additionalDetailsMeeting($fields) { $overlib_string = ''; - //Modify by jchi 6/27/2008 1515pm china time , bug 20626. + if(!empty($fields['NAME'])) { + $overlib_string .= ''. $mod_strings['LBL_SUBJECT'] . ' ' . $fields['NAME']; + $overlib_string .= '
'; + } if(!empty($fields['DATE_START'])) $overlib_string .= ''. $mod_strings['LBL_DATE_TIME'] . ' ' . $fields['DATE_START'] . '
'; if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) { @@ -65,11 +68,18 @@ function additionalDetailsMeeting($fields) { $fields['PARENT_NAME'] . ""; $overlib_string .= '
'; } - if(!empty($fields['DESCRIPTION'])) { + + if(!empty($fields['STATUS'])) { + $overlib_string .= ''. $mod_strings['LBL_STATUS'] . ' ' . $fields['STATUS']; + $overlib_string .= '
'; + } + + if(!empty($fields['DESCRIPTION'])) { $overlib_string .= ''. $mod_strings['LBL_DESCRIPTION'] . ' ' . substr($fields['DESCRIPTION'], 0, 300); if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; $overlib_string .= '
'; } + $editLink = "index.php?action=EditView&module=Meetings&record={$fields['ID']}"; $viewLink = "index.php?action=DetailView&module=Meetings&record={$fields['ID']}"; diff --git a/modules/Schedulers/_AddJobsHere.php b/modules/Schedulers/_AddJobsHere.php index d620133f..2a9e21f9 100644 --- a/modules/Schedulers/_AddJobsHere.php +++ b/modules/Schedulers/_AddJobsHere.php @@ -396,29 +396,7 @@ function pollMonitoredInboxesForBouncedCampaignEmails() { $ieX = new InboundEmail(); $ieX->retrieve($a['id']); $ieX->connectMailserver(); - $GLOBALS['log']->info("Bounced campaign scheduler connected to mail server id: {$a['id']} "); - $newMsgs = array(); - if ($ieX->isPop3Protocol()) { - $newMsgs = $ieX->getPop3NewMessagesToDownload(); - } else { - $newMsgs = $ieX->getNewMessageIds(); - } - - //$newMsgs = $ieX->getNewMessageIds(); - if(is_array($newMsgs)) { - foreach($newMsgs as $k => $msgNo) { - $uid = $msgNo; - if ($ieX->isPop3Protocol()) { - $uid = $ieX->getUIDLForMessage($msgNo); - } else { - $uid = imap_uid($ieX->conn, $msgNo); - } // else - $GLOBALS['log']->info("Bounced campaign scheduler will import message no: $msgNo"); - $ieX->importOneEmail($msgNo, $uid, false,false); - } - } - imap_expunge($ieX->conn); - imap_close($ieX->conn); + $ieX->importMessages(); } return true; diff --git a/modules/SchedulersJobs/SchedulersJob.php b/modules/SchedulersJobs/SchedulersJob.php index 16c09715..45ad1c46 100644 --- a/modules/SchedulersJobs/SchedulersJob.php +++ b/modules/SchedulersJobs/SchedulersJob.php @@ -462,7 +462,6 @@ class SchedulersJob extends Basic */ public function runJob() { - require_once('modules/Schedulers/_AddJobsHere.php'); $this->errors = ""; $exJob = explode('::', $this->target, 2); if($exJob[0] == 'function') { @@ -480,6 +479,7 @@ class SchedulersJob extends Basic $this->resolveJob(self::JOB_FAILURE, translate('ERR_NOUSER', 'SchedulersJobs')); return; } + require_once('modules/Schedulers/_AddJobsHere.php'); $func = $exJob[1]; $GLOBALS['log']->debug("----->SchedulersJob calling function: $func"); set_error_handler(array($this, "errorHandler"), E_ALL & ~E_NOTICE & ~E_STRICT); @@ -533,14 +533,7 @@ class SchedulersJob extends Basic if($tmpJob instanceof RunnableSchedulerJob) { $tmpJob->setJob($this); - $return_status = $tmpJob->run($this->data); - if($return_status) { - $this->resolveJob(self::JOB_SUCCESS); - return true; - } else { - $this->resolveJob(self::JOB_FAILURE); - return false; - } + return $tmpJob->run($this->data); } else { $this->resolveJob(self::JOB_FAILURE, sprintf(translate('ERR_JOBTYPE', 'SchedulersJobs'), strip_tags($this->target))); diff --git a/modules/Studio/wizards/RenameModules.php b/modules/Studio/wizards/RenameModules.php index 3420a687..6d5596fa 100644 --- a/modules/Studio/wizards/RenameModules.php +++ b/modules/Studio/wizards/RenameModules.php @@ -73,6 +73,7 @@ class RenameModules array('name' => 'LBL_CAMPAIGN_ID', 'type' => 'singular', 'source' => 'Campaigns'), array('name' => 'LBL_PARENT_ACCOUNT_ID', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_PROSPECT_LIST', 'type' => 'singular', 'source' => 'Prospects'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Accounts'), ), 'Bugs' => array( array('name' => 'LBL_LIST_FORM_TITLE', 'type' => 'singular', 'source' => 'Bugs'), @@ -82,9 +83,11 @@ class RenameModules array('name' => 'LNK_BUG_REPORTS', 'type' => 'singular', 'source' => 'Bugs'), array('name' => 'LNK_IMPORT_BUGS', 'type' => 'plural', 'source' => 'Bugs'), array('name' => 'LNK_NEW_BUG', 'type' => 'singular', 'source' => 'Bugs'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Bugs'), ), 'Calls' => array( array('name' => 'LBL_LIST_CONTACT', 'type' => 'singular', 'source' => 'Contacts'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Calls'), ), 'Campaigns' => array( array('name' => 'LBL_ACCOUNTS', 'type' => 'plural', 'source' => 'Accounts'), @@ -94,10 +97,12 @@ class RenameModules array('name' => 'LBL_LOG_ENTRIES_LEAD_TITLE', 'type' => 'plural', 'source' => 'Leads'), array('name' => 'LBL_OPPORTUNITIES', 'type' => 'plural', 'source' => 'Opportunities'), array('name' => 'LBL_PROSPECT_LIST_SUBPANEL_TITLE', 'type' => 'singular', 'source' => 'Targets'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Campaigns'), ), 'Cases' => array( array('name' => 'LBL_BUGS_SUBPANEL_TITLE', 'type' => 'plural', 'source' => 'Bugs'), array('name' => 'LBL_LIST_ACCOUNT_NAME', 'type' => 'singular', 'source' => 'Accounts'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Cases'), ), 'Contacts' => array( array('name' => 'LBL_BUGS_SUBPANEL_TITLE', 'type' => 'plural', 'source' => 'Bugs'), @@ -110,6 +115,7 @@ class RenameModules array('name' => 'LBL_OPPORTUNITY_ROLE_ID', 'type' => 'singular', 'source' => 'Opportunities'), array('name' => 'LBL_PRODUCTS_TITLE', 'type' => 'plural', 'source' => 'Products'), array('name' => 'LBL_PROSPECT_LIST', 'type' => 'singular', 'source' => 'Prospects'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Contacts'), ), 'Contracts' => array( array('name' => 'LBL_CONTRACT_NAME', 'type' => 'singular', 'source' => 'Contracts'), @@ -118,10 +124,12 @@ class RenameModules array('name' => 'LBL_LIST_ACCOUNT_NAME', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_LIST_CONTRACT_NAME', 'type' => 'singular', 'source' => 'Contracts'), array('name' => 'LBL_OPPORTUNITY', 'type' => 'singular', 'source' => 'Opportunities'), + array('name' => 'LBL_OPPORTUNITY_NAME', 'type' => 'singular', 'source' => 'Opportunities'), array('name' => 'LBL_SEARCH_FORM_TITLE', 'type' => 'singular', 'source' => 'Contracts'), array('name' => 'LBL_TOTAL_CONTRACT_VALUE', 'type' => 'singular', 'source' => 'Contracts'), array('name' => 'LBL_TOTAL_CONTRACT_VALUE_USDOLLAR', 'type' => 'singular', 'source' => 'Contracts'), array('name' => 'LNK_NEW_CONTRACT', 'type' => 'singular', 'source' => 'Contracts'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Contracts'), ), 'Documents' => array( array('name' => 'LBL_BUGS_SUBPANEL_TITLE', 'type' => 'plural', 'source' => 'Bugs'), @@ -136,11 +144,13 @@ class RenameModules array('name' => 'LBL_DOC_URL', 'type' => 'singular', 'source' => 'Documents'), array('name' => 'LBL_NAME', 'type' => 'singular', 'source' => 'Documents'), array('name' => 'LBL_TEMPLATE_TYPE', 'type' => 'singular', 'source' => 'Documents'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Documents'), ), 'KBDocuments' => array( array('name' => 'LBL_CASES', 'type' => 'plural', 'source' => 'Cases'), array('name' => 'LBL_CONTRACTS', 'type' => 'plural', 'source' => 'Contracts'), array('name' => 'LBL_CONTRACT_NAME', 'type' => 'plural', 'source' => 'Contracts'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'KBDocuments'), ), 'Leads' => array( array('name' => 'LNK_SELECT_###MODULE_PLURAL###', 'type' => 'singular', 'source' => 'Leads'), @@ -163,7 +173,7 @@ class RenameModules array('name' => 'LNK_NEW_ACCOUNT', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_CONVERTED_CONTACT', 'type' => 'singular', 'source' => 'Contacts'), array('name' => 'LBL_CONVERTED_OPP', 'type' => 'singular', 'source' => 'Opportunities'), - + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Leads'), ), 'Meetings' => array( array('name' => 'LBL_LIST_CONTACT', 'type' => 'singular', 'source' => 'Contacts'), @@ -171,6 +181,7 @@ class RenameModules array('name' => 'LBL_PASSWORD', 'type' => 'singular', 'source' => 'Meetings'), array('name' => 'LBL_TYPE', 'type' => 'singular', 'source' => 'Meetings'), array('name' => 'LBL_URL', 'type' => 'singular', 'source' => 'Meetings'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Meetings'), ), 'Notes' => array( array('name' => 'LBL_ACCOUNT_ID', 'type' => 'singular', 'source' => 'Accounts'), @@ -182,6 +193,7 @@ class RenameModules array('name' => 'LBL_OPPORTUNITY_ID', 'type' => 'singular', 'source' => 'Opportunities'), array('name' => 'LBL_PRODUCT_ID', 'type' => 'singular', 'source' => 'Products'), array('name' => 'LBL_QUOTE_ID', 'type' => 'singular', 'source' => 'Quotes'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Notes'), ), 'Opportunities' => array( array('name' => 'LBL_ACCOUNT_ID', 'type' => 'singular', 'source' => 'Accounts'), @@ -191,9 +203,11 @@ class RenameModules array('name' => 'LBL_LEAD_SOURCE', 'type' => 'singular', 'source' => 'Leads'), array('name' => 'LBL_LIST_ACCOUNT_NAME', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_OPPORTUNITY_NAME', 'type' => 'singular', 'source' => 'Opportunities'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Opportunities'), ), 'ProductTemplates' => array( array('name' => 'LBL_PRODUCT_ID', 'type' => 'singular', 'source' => 'Products'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'ProductTemplates'), ), 'Products' => array( array('name' => 'LBL_ACCOUNT_ID', 'type' => 'singular', 'source' => 'Accounts'), @@ -206,12 +220,14 @@ class RenameModules array('name' => 'LBL_QUOTE_ID', 'type' => 'singular', 'source' => 'Quotes'), array('name' => 'LBL_RELATED_PRODUCTS', 'type' => 'plural', 'source' => 'Products'), array('name' => 'LBL_URL', 'type' => 'singular', 'source' => 'Products'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Products'), ), 'ProjectTask' => array( array('name' => 'LBL_PARENT_NAME', 'type' => 'singular', 'source' => 'Projects'), array('name' => 'LBL_PROJECT_ID', 'type' => 'singular', 'source' => 'Projects'), array('name' => 'LBL_PROJECT_NAME', 'type' => 'singular', 'source' => 'Projects'), array('name' => 'LBL_PROJECT_TASK_ID', 'type' => 'singular', 'source' => 'Projects'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'ProjectTask'), ), 'Project' => array( array('name' => 'LBL_BUGS_SUBPANEL_TITLE', 'type' => 'plural', 'source' => 'Bugs'), @@ -223,23 +239,27 @@ class RenameModules array('name' => 'LBL_SEARCH_FORM_TITLE', 'type' => 'singular', 'source' => 'Projects'), array('name' => 'LNK_NEW_PROJECT', 'type' => 'singular', 'source' => 'Projects'), array('name' => 'LNK_PROJECT_LIST', 'type' => 'singular', 'source' => 'Projects'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Projects'), ), 'Quotes' => array( array('name' => 'LBL_ACCOUNT_ID', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_CONTRACTS', 'type' => 'plural', 'source' => 'Contracts'), array('name' => 'LBL_LIST_ACCOUNT_NAME', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_QUOTE_NUM', 'type' => 'singular', 'source' => 'Quotes'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Quotes'), ), 'Targets' => array( array('name' => 'LBL_ACCOUNT_NAME', 'type' => 'singular', 'source' => 'Accounts'), array('name' => 'LBL_CAMPAIGN_ID', 'type' => 'plural', 'source' => 'Campaigns'), array('name' => 'LBL_CAMPAIGN_LIST_SUBPANEL_TITLE', 'type' => 'singular', 'source' => 'Campaigns'), array('name' => 'LBL_PROSPECT_LIST', 'type' => 'singular', 'source' => 'Prospects'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Targets'), ), 'Tasks' => array( array('name' => 'LBL_CONTACT', 'type' => 'singular', 'source' => 'Contacts'), array('name' => 'LBL_CONTACT_ID', 'type' => 'singular', 'source' => 'Contacts'), array('name' => 'LBL_CONTACT_PHONE', 'type' => 'singular', 'source' => 'Contacts'), + array('name' => 'LBL_MODULE_NAME', 'type' => 'plural', 'source' => 'Tasks'), ), ); diff --git a/modules/Tasks/language/en_us.lang.php b/modules/Tasks/language/en_us.lang.php index 918a4a31..fd2a760b 100644 --- a/modules/Tasks/language/en_us.lang.php +++ b/modules/Tasks/language/en_us.lang.php @@ -116,7 +116,7 @@ $mod_strings = array ( 'LBL_EXPORT_CREATED_BY' => 'Created By ID', 'LBL_EXPORT_PARENT_TYPE' => 'Related To Module', 'LBL_EXPORT_PARENT_ID' => 'Related To ID', - + 'LBL_RELATED_TO' => 'Related to:', ); diff --git a/modules/Tasks/metadata/additionalDetails.php b/modules/Tasks/metadata/additionalDetails.php index 4504c415..0eec36dd 100644 --- a/modules/Tasks/metadata/additionalDetails.php +++ b/modules/Tasks/metadata/additionalDetails.php @@ -45,11 +45,23 @@ function additionalDetailsTask($fields) { } $overlib_string = ''; + if(!empty($fields['NAME'])) { + $overlib_string .= ''. $mod_strings['LBL_SUBJECT'] . ' ' . $fields['NAME']; + $overlib_string .= '
'; + } + if(!empty($fields['DATE_START'])) $overlib_string .= ''. $mod_strings['LBL_START_DATE_AND_TIME'] . ' ' . $fields['DATE_START'] . '
'; if(!empty($fields['DATE_DUE'])) $overlib_string .= ''. $mod_strings['LBL_DUE_DATE_AND_TIME'] . ' ' . $fields['DATE_DUE'] . '
'; if(!empty($fields['PRIORITY'])) $overlib_string .= ''. $mod_strings['LBL_PRIORITY'] . ' ' . $app_list_strings['task_priority_dom'][$fields['PRIORITY']] . '
'; - if(!empty($fields['STATUS'])) $overlib_string .= ''. $mod_strings['LBL_STATUS'] . ' ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '
'; + if (!empty($fields['PARENT_ID'])) + { + $overlib_string .= "". $mod_strings['LBL_RELATED_TO'] . " ". + "". + $fields['PARENT_NAME'] . ""; + $overlib_string .= '
'; + } + if(!empty($fields['STATUS'])) $overlib_string .= ''. $mod_strings['LBL_STATUS'] . ' ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '
'; if(!empty($fields['DESCRIPTION'])) { $overlib_string .= ''. $mod_strings['LBL_DESCRIPTION'] . ' ' . substr($fields['DESCRIPTION'], 0, 300); diff --git a/modules/Users/User.php b/modules/Users/User.php index 56202c8e..f829c453 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -983,6 +983,22 @@ EOQ; return $result; } + /** + * getActiveUsers + * + * Returns all active users + * @return Array of active users in the system + */ + + public static function getActiveUsers() + { + $active_users = get_user_array(FALSE); + asort($active_users); + return $active_users; + } + + + function create_export_query($order_by, $where) { include('modules/Users/field_arrays.php'); diff --git a/modules/Users/reassignUserRecords.php b/modules/Users/reassignUserRecords.php index 691a1c2a..4574da9c 100644 --- a/modules/Users/reassignUserRecords.php +++ b/modules/Users/reassignUserRecords.php @@ -107,6 +107,8 @@ if(!isset($_POST['fromuser']) && !isset($_GET['execute'])){ @@ -121,7 +123,7 @@ if(isset($_SESSION['reassignRecords']['fromuser']) && isset($all_users[$_SESSION unset($all_users[$_SESSION['reassignRecords']['fromuser']]); } -echo get_select_options_with_id($all_users, isset($_SESSION['reassignRecords']['touser']) ? $_SESSION['reassignRecords']['touser'] : ''); +echo get_select_options_with_id($active_users, isset($_SESSION['reassignRecords']['touser']) ? $_SESSION['reassignRecords']['touser'] : ''); ?> user_focus->id) || $this->user_focus->id == -1) { - $this->http_status("404 Not Found"); + $this->http_status('401 Unauthorized'); + if (!isset($query_arr['noAuth'])) { + header('WWW-Authenticate: Basic realm="'.($this->http_auth_realm).'"'); + } return; } diff --git a/service/core/REST/SugarRestJSON.php b/service/core/REST/SugarRestJSON.php index aec1e7e9..964cc3e5 100644 --- a/service/core/REST/SugarRestJSON.php +++ b/service/core/REST/SugarRestJSON.php @@ -53,6 +53,7 @@ class SugarRestJSON extends SugarRestSerialize{ function generateResponse($input){ $json = getJSONObj(); ob_clean(); + header('Content-Type: application/json; charset=UTF-8'); if (isset($this->faultObject)) { $this->generateFaultResponse($this->faultObject); } else { diff --git a/service/v4_1/SugarWebServiceImplv4_1.php b/service/v4_1/SugarWebServiceImplv4_1.php index e7480441..8b5f557b 100644 --- a/service/v4_1/SugarWebServiceImplv4_1.php +++ b/service/v4_1/SugarWebServiceImplv4_1.php @@ -170,7 +170,7 @@ class SugarWebServiceImplv4_1 extends SugarWebServiceImplv4 * @return Array records that match search criteria */ function get_modified_relationships($session, $module_name, $related_module, $from_date, $to_date, $offset, $max_results, $deleted=0, $module_user_id = '', $select_fields = array(), $relationship_name = '', $deletion_date = ''){ - global $beanList, $beanFiles; + global $beanList, $beanFiles, $current_user; $error = new SoapError(); $output_list = array(); @@ -217,9 +217,9 @@ class SugarWebServiceImplv4_1 extends SugarWebServiceImplv4 $query .= " OR ({0}.date_modified > " . db_convert("'".$GLOBALS['db']->quote($deletion_date)."'", 'datetime'). " AND {0}.date_modified <= ". db_convert("'".$GLOBALS['db']->quote($to_date)."'", 'datetime')." AND {0}.deleted = 1)"; } - if(!empty($module_user_id)) + if(!empty($current_user->id)) { - $query .= " AND m2.id = '".$GLOBALS['db']->quote($module_user_id)."'"; + $query .= " AND m2.id = '".$GLOBALS['db']->quote($current_user->id)."'"; } //if($related_module == 'Meetings' || $related_module == 'Calls' || $related_module = 'Contacts'){ diff --git a/soap/SoapTypes.php b/soap/SoapTypes.php index b5845157..551c905c 100644 --- a/soap/SoapTypes.php +++ b/soap/SoapTypes.php @@ -280,7 +280,8 @@ $server->wsdl->addComplexType( array( 'id'=>array('name'=>'id', 'type'=>'xsd:string'), 'module_name'=>array('name'=>'module_name', 'type'=>'xsd:string'), - 'name_value_list'=>array('name'=>'name_value_list', 'type'=>'tns:name_value_list'), + 'name_value_list'=>array('name'=>'name_value_list', 'type'=>'tns:name_value_list'), + 'details'=>array('name'=>'details', 'type'=>'tns:name_value_list'), ) ); diff --git a/sugar_version.php b/sugar_version.php index acb0cfbe..72a48402 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.5.10'; -$sugar_db_version = '6.5.10'; +$sugar_version = '6.5.11'; +$sugar_db_version = '6.5.11'; $sugar_flavor = 'CE'; -$sugar_build = '8716'; -$sugar_timestamp = '2013-01-29 11:01pm'; +$sugar_build = '8754'; +$sugar_timestamp = '2013-02-27 02:07pm'; ?> diff --git a/tests/include/ListView/Bug58890Test.php b/tests/include/ListView/Bug58890Test.php index 05b6c717..1ff795ee 100755 --- a/tests/include/ListView/Bug58890Test.php +++ b/tests/include/ListView/Bug58890Test.php @@ -69,6 +69,10 @@ class Bug58890Test extends Sugar_PHPUnit_Framework_TestCase $bean = new SugarBean58890(); $listViewData = new ListViewData(); $listViewData->listviewName = $bean->module_name; + $listViewData->setVariableName($bean->object_name, '', $listViewData->listviewName); + if (!empty($listViewData->var_order_by) && !empty($_SESSION[$listViewData->var_order_by])) { + unset($_SESSION[$listViewData->var_order_by]); + } $listViewData->getListViewData($bean, '', -1, -1, array('name' => array())); $this->assertEquals('date_entered DESC', $bean->orderByString58890, 'Order by date_entered DESC should be used'); diff --git a/tests/include/SearchForm/Bug54929Test.php b/tests/include/SearchForm/Bug54929Test.php deleted file mode 100755 index 35bb363b..00000000 --- a/tests/include/SearchForm/Bug54929Test.php +++ /dev/null @@ -1,112 +0,0 @@ -seed = new Opportunity(); - $this->module = 'Opportunities'; - $this->action = 'index'; - - $this->normalAppListStringsOfSalesStageDom = $GLOBALS['app_list_strings']['sales_stage_dom']; - $GLOBALS['app_list_strings']['sales_stage_dom'] = array( - '' => '', - '00' => '0-zero', - '10' => '10-ten', - '100' => '100-hundred' - ); - } - - protected function tearDown() - { - $GLOBALS['app_list_strings']['sales_stage_dom'] = $this->normalAppListStringsOfSalesStageDom; - SugarTestHelper::tearDown(); - } - - /** - * Test that indexes of the sales stage field options has not been changed. - * @group bug54929 - */ - public function testIntegerIndexesOfMultiSelectFieldOptionsOnTheAdvancedSearch() - { - $searchMetaData = SearchForm::retrieveSearchDefs($this->module); - $this->searchForm = new SearchForm($this->seed, $this->module, $this->action); - $this->searchForm->setup( - $searchMetaData['searchdefs'], - $searchMetaData['searchFields'], - 'SearchFormGeneric.tpl', - 'advanced_search', - array() - ); - $result = $this->searchForm->fieldDefs['sales_stage_advanced']['options']; - - $this->assertArrayHasKey('', $result); - $this->assertArrayHasKey('00', $result); - $this->assertArrayHasKey(10, $result); - $this->assertArrayHasKey(100, $result); - $this->assertEquals(4, count($result)); - } - -} diff --git a/tests/include/database/MssqlManagerTest.php b/tests/include/database/MssqlManagerTest.php index 7f1602cf..03a86464 100755 --- a/tests/include/database/MssqlManagerTest.php +++ b/tests/include/database/MssqlManagerTest.php @@ -38,6 +38,11 @@ require_once 'include/database/MssqlManager.php'; class MssqlManagerTest extends Sugar_PHPUnit_Framework_TestCase { + /** + * @var MssqlManager + */ + private $_db = null; + static public function setupBeforeClass() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); @@ -227,4 +232,343 @@ class MssqlManagerTest extends Sugar_PHPUnit_Framework_TestCase $this->assertTrue($this->_db->connect($configOptions)); } + public function providerFullTextQuery() + { + return array( + array(array('word1'), array(), array(), + "CONTAINS(unittest, '(\"word1\")')"), + array(array("'word1'"), array(), array(), + "CONTAINS(unittest, '(\"''word1''\")')"), + array(array("\"word1\""), array(), array(), + "CONTAINS(unittest, '(\"word1\")')"), + array(array('word1', 'word2'), array(), array(), + "CONTAINS(unittest, '(\"word1\" | \"word2\")')"), + array(array('word1', 'word2'), array('mustword'), array(), + "CONTAINS(unittest, '\"mustword\" AND (\"word1\" | \"word2\")')"), + array(array('word1', 'word2'), array('mustword', 'mustword2'), array(), + "CONTAINS(unittest, '\"mustword\" AND \"mustword2\" AND (\"word1\" | \"word2\")')"), + array(array(), array('mustword', 'mustword2'), array(), + "CONTAINS(unittest, '\"mustword\" AND \"mustword2\"')"), + array(array('word1'), array(), array('notword'), + "CONTAINS(unittest, '(\"word1\") AND NOT \"notword\"')"), + array(array('word1'), array(), array('notword', 'notword2'), + "CONTAINS(unittest, '(\"word1\") AND NOT \"notword\" AND NOT \"notword2\"')"), + array(array('word1', 'word2'), array('mustword', 'mustword2'), array('notword', 'notword2'), + "CONTAINS(unittest, '\"mustword\" AND \"mustword2\" AND (\"word1\" | \"word2\") AND NOT \"notword\" AND NOT \"notword2\"')"), + ); + } + + /** + * @ticket 37435 + * @dataProvider providerFullTextQuery + * @param array $terms + * @param string $result + */ + public function testFullTextQuery($terms, $must_terms, $exclude_terms, $result) + { + $this->assertEquals($result, + $this->_db->getFulltextQuery('unittest', $terms, $must_terms, $exclude_terms)); + } + + /** + * Test checks order by string in different queries + * + * @group 54990 + * @dataProvider getQueriesForReturnOrderBy + */ + public function testReturnOrderBy($query, $start, $count, $expected) + { + $actual = $this->_db->limitQuery($query, $start, $count, false, '', false); + $this->assertContains($expected, $actual, 'Order By is incorrect'); + } + + /** + * Data provider for testReturnOrderBy + * Returns queries with different functions, offsets & aliases + * + * @return array + */ + static public function getQueriesForReturnOrderBy() + { + return array( + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 0, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 0, + 1, + "(ORDER BY t1.f2 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 0, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 0, + 1, + "(ORDER BY t1.f2 ASC)" + ), + + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 1, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 1, + 1, + "(ORDER BY t1.f2 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 1, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 1, + 1, + "(ORDER BY t1.f2 ASC)" + ), + + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 0, + 1, + "ORDER BY a1 ASC" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 0, + 1, + "ORDER BY a2 ASC" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 0, + 1, + "ORDER BY t1.f1 ASC" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 0, + 1, + "ORDER BY t1.f2 ASC" + ), + + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 1, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 1, + 1, + "(ORDER BY t1.f2 ASC)" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 1, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT DISTINCT t1.f1 a1, t1.f2 a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 1, + 1, + "(ORDER BY t1.f2 ASC)" + ), + + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 0, + 1, + "(ORDER BY isnull( t1.f1, '' ) ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 0, + 1, + "(ORDER BY isnull( t1.f2, '' ) ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 0, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 0, + 1, + "(ORDER BY t1.f2 ASC)" + ), + + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a1 ASC", + 1, + 1, + "(ORDER BY isnull( t1.f1, '' ) ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY a2 ASC", + 1, + 1, + "(ORDER BY isnull( t1.f2, '' ) ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f1 ASC", + 1, + 1, + "(ORDER BY t1.f1 ASC)" + ), + array( + "SELECT ISNULL( t1.f1, '' ) a1, ISNULL( t1.f2, '' ) a2 FROM table1 t1 WHERE 1 = 1 ORDER BY t1.f2 ASC", + 1, + 1, + "(ORDER BY t1.f2 ASC)" + ), + + array( + "SELECT + ISNULL(accounts.id,'') primaryid, + ISNULL(accounts.name,'') accounts_name, + ISNULL(l2.id,'') l2_id, + l2.email_address l2_email_address + FROM + accounts + INNER JOIN + accounts_contacts l1_1 + ON + accounts.id=l1_1.account_id + AND l1_1.deleted=0 + INNER JOIN + contacts l1 + ON + l1.id=l1_1.contact_id + AND l1.deleted=0 + AND l1.team_set_id IN ( + SELECT + tst.team_set_id + from + team_sets_teams tst + INNER JOIN + team_memberships team_memberships + ON + tst.team_id = team_memberships.team_id + AND team_memberships.user_id = '5a409dc7-1cdb-278b-2222-511e6952dac8' + AND team_memberships.deleted=0 + ) + INNER JOIN + email_addr_bean_rel l2_1 + ON + l1.id=l2_1.bean_id + AND l2_1.deleted=0 + AND l2_1.primary_address = '1' + INNER JOIN + email_addresses l2 + ON + l2.id=l2_1.email_address_id + AND l2.deleted=0 + WHERE + ((1=1) + AND accounts.team_set_id IN ( + SELECT + tst.team_set_id + FROM + team_sets_teams tst + INNER JOIN + team_memberships team_memberships + ON + tst.team_id = team_memberships.team_id + AND team_memberships.user_id = '5a409dc7-1cdb-278b-2222-511e6952dac8' + AND team_memberships.deleted=0 + )) + AND accounts.deleted=0 + ORDER BY + l2_email_address ASC + ", + 1, + 1, + "(ORDER BY l2.email_address ASC)" + ), + + array( + "SELECT + ISNULL(accounts.id,'') primaryid, + ISNULL(accounts.name,'') accounts_name, + ISNULL(l2.id,'') l2_id, + l2.email_address l2_email_address + FROM + accounts + INNER JOIN + accounts_contacts l1_1 + ON + accounts.id=l1_1.account_id + AND l1_1.deleted=0 + INNER JOIN + contacts l1 + ON + l1.id=l1_1.contact_id + AND l1.deleted=0 + AND l1.team_set_id IN ( + SELECT + tst.team_set_id + from + team_sets_teams tst + INNER JOIN + team_memberships team_memberships + ON + tst.team_id = team_memberships.team_id + AND team_memberships.user_id = 'c71f4b54-2058-5d8b-1d17-511e6b730b27' + AND team_memberships.deleted=0 + ) + INNER JOIN + email_addr_bean_rel l2_1 + ON + l1.id=l2_1.bean_id + AND l2_1.deleted=0 + AND l2_1.primary_address = '1' + INNER JOIN + email_addresses l2 + ON + l2.id=l2_1.email_address_id + AND l2.deleted=0 + WHERE + ((1=1) + AND accounts.team_set_id IN ( + SELECT + tst.team_set_id + FROM + team_sets_teams tst + INNER JOIN + team_memberships team_memberships + ON + tst.team_id = team_memberships.team_id + AND team_memberships.user_id = 'c71f4b54-2058-5d8b-1d17-511e6b730b27' + AND team_memberships.deleted=0 + )) + AND accounts.deleted=0 + ORDER BY + accounts_name ASC + ", + 1, + 1, + "(ORDER BY isnull(accounts.name,'') ASC)" + ), + + ); + } } diff --git a/tests/include/database/MysqlManagerTest.php b/tests/include/database/MysqlManagerTest.php index b50976c7..c78a196a 100755 --- a/tests/include/database/MysqlManagerTest.php +++ b/tests/include/database/MysqlManagerTest.php @@ -221,4 +221,40 @@ class MysqlManagerTest extends Sugar_PHPUnit_Framework_TestCase $this->_db->fromConvert($parameters[0],$parameters[1]), $result); } + + public function providerFullTextQuery() + { + return array( + array(array('word1'), array(), array(), + "MATCH(unittest) AGAINST('word1' IN BOOLEAN MODE)"), + array(array("'word1'"), array(), array(), + "MATCH(unittest) AGAINST('\'word1\'' IN BOOLEAN MODE)"), + array(array('word1', 'word2'), array(), array(), + "MATCH(unittest) AGAINST('word1 word2' IN BOOLEAN MODE)"), + array(array('word1', 'word2'), array('mustword'), array(), + "MATCH(unittest) AGAINST('word1 word2 +mustword' IN BOOLEAN MODE)"), + array(array('word1', 'word2'), array('mustword', 'mustword2'), array(), + "MATCH(unittest) AGAINST('word1 word2 +mustword +mustword2' IN BOOLEAN MODE)"), + array(array(), array('mustword', 'mustword2'), array(), + "MATCH(unittest) AGAINST('+mustword +mustword2' IN BOOLEAN MODE)"), + array(array('word1'), array(), array('notword'), + "MATCH(unittest) AGAINST('word1 -notword' IN BOOLEAN MODE)"), + array(array('word1'), array(), array('notword', 'notword2'), + "MATCH(unittest) AGAINST('word1 -notword -notword2' IN BOOLEAN MODE)"), + array(array('word1', 'word2'), array('mustword', 'mustword2'), array('notword', 'notword2'), + "MATCH(unittest) AGAINST('word1 word2 +mustword +mustword2 -notword -notword2' IN BOOLEAN MODE)"), + ); + } + + /** + * @ticket 37435 + * @dataProvider providerFullTextQuery + * @param array $terms + * @param string $result + */ + public function testFullTextQuery($terms, $must_terms, $exclude_terms, $result) + { + $this->assertEquals($result, + $this->_db->getFulltextQuery('unittest', $terms, $must_terms, $exclude_terms)); + } } diff --git a/tests/include/database/bug_60870_text.txt b/tests/include/database/bug_60870_text.txt new file mode 100755 index 00000000..5628ae28 --- /dev/null +++ b/tests/include/database/bug_60870_text.txt @@ -0,0 +1,14 @@ +Error exporting Accounts:
.SELECT + accounts.*,email_addresses.email_address email_address, + accounts.name as account_name, + users.user_name as assigned_user_name , teams.name AS team_name ,accounts_cstm.selected_c FROM accounts INNER JOIN (select tst.team_set_id from team_sets_teams tst INNER JOIN team_memberships team_memberships ON tst.team_id = team_memberships.team_id + AND team_memberships.user_id = '986ab3e3-8713-1677-bd67-510c34e929a1' + AND team_memberships.deleted=0 group by tst.team_set_id) accounts_tf on accounts_tf.team_set_id = accounts.team_set_id LEFT JOIN users + ON accounts.assigned_user_id=users.id LEFT JOIN team_sets ts ON accounts.team_set_id=ts.id AND ts.deleted=0 + LEFT JOIN teams teams ON teams.id=ts.id AND teams.deleted=0 AND teams.deleted=0 LEFT JOIN email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Accounts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c where ( accounts.deleted IS NULL OR accounts.deleted=0 ) ORDER BY accounts.id, email_addr_bean_rel.primary_address DESC Query Failed: SELECT DISTINCT accounts.*,email_addresses.email_address email_address, + accounts.name as account_name, + users.user_name as assigned_user_name , teams.name AS team_name ,accounts_cstm.select DISTINCT d_c FROM accounts INNER JOIN team_sets_teams tst ON tst.team_set_id = accounts.team_set_id INNER JOIN team_memberships team_memberships ON tst.team_id = team_memberships.team_id + AND team_memberships.user_id = '986ab3e3-8713-1677-bd67-510c34e929a1' + AND team_memberships.deleted=0 LEFT JOIN users + ON accounts.assigned_user_id=users.id LEFT JOIN team_sets ts ON accounts.team_set_id=ts.id AND ts.deleted=0 + LEFT JOIN teams teams ON teams.id=ts.id AND teams.deleted=0 AND teams.deleted=0 LEFT JOIN email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Accounts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c where ( accounts.deleted IS NULL OR accounts.deleted=0 ) ORDER BY accounts.id, email_addr_bean_rel.primary_address DESC: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT d_c FROM accounts INNER JOIN team_sets_teams tst ON tst.team_set_id =' at line 3 diff --git a/tests/include/vCard/Bug60613Test.php b/tests/include/vCard/Bug60613Test.php new file mode 100755 index 00000000..c48967b6 --- /dev/null +++ b/tests/include/vCard/Bug60613Test.php @@ -0,0 +1,131 @@ +filename = $GLOBALS['sugar_config']['upload_dir'] . 'test.vcf'; + } + + public function tearDown() + { + // Clean the Contacts created using vCard Import + foreach ($this->createdContacts as $contactId) + { + $GLOBALS['db']->query("DELETE FROM contacts WHERE id = '{$contactId}'"); + } + unlink($this->filename); + SugarTestHelper::tearDown(); + } + + /** + * @dataProvider dataProvider + * @group bug60613 + */ + public function testImportVCard($contents, $module, $allRequiredPresent) + { + file_put_contents($this->filename, $contents); + + $vcard = new vCard(); + $beanId = $vcard->importVCard($this->filename, $module); + + if ($allRequiredPresent) + { + $this->createdContacts[] = $beanId; + $this->assertNotEmpty($beanId); + } + else + { + $this->assertEmpty($beanId); + } + } + + public function dataProvider() + { + return array( + array( + 'BEGIN:VCARD + N:person;test; + FN: person lead + BDAY: + TEL;FAX: + TEL;HOME: + TEL;CELL: + TEL;WORK: + EMAIL;INTERNET: + ADR;WORK:;;;;;; + TITLE: + END:VCARD', // vCard with all required fields + 'Contacts', + true), + array( + 'BEGIN:VCARD + BDAY: + TEL;FAX: + TEL;HOME: + TEL;CELL: + TEL;WORK: + EMAIL;INTERNET: + ADR;WORK:;;;;;; + TITLE: + END:VCARD', // vCard without last_name + 'Contacts', + false), + array( + '', // Empty vCard + 'Contacts', + false), + ); + } +} diff --git a/tests/include/vCard/vCardBug40629Test.php b/tests/include/vCard/vCardBug40629Test.php index 594eb2a3..de283d09 100755 --- a/tests/include/vCard/vCardBug40629Test.php +++ b/tests/include/vCard/vCardBug40629Test.php @@ -43,7 +43,10 @@ class vCardBug40629Test extends Sugar_PHPUnit_Framework_TestCase public function setUp() { - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + SugarTestHelper::setUp('beanList'); + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('current_user', array(true, 1)); + $this->account = SugarTestAccountUtilities::createAccount(); $this->account->name = "SDizzle Inc"; $this->account->save(); @@ -51,7 +54,7 @@ class vCardBug40629Test extends Sugar_PHPUnit_Framework_TestCase public function tearDown() { - unset($GLOBALS['current_user']); + SugarTestHelper::tearDown(); SugarTestAccountUtilities::removeAllCreatedAccounts(); } diff --git a/tests/modules/Calendar/Bug58702Test.php b/tests/modules/Calendar/Bug58702Test.php new file mode 100755 index 00000000..6e8c59a7 --- /dev/null +++ b/tests/modules/Calendar/Bug58702Test.php @@ -0,0 +1,129 @@ + array(true), + 1 => array(false) + ); + } + + /** + * @group 58702 + * Test if Meetings/Calls/Tasks are shown properly when + * show completed flag is set + * + * @dataProvider dataProvider + */ + public function testShowCompleted($showCompleted) + { + // Create Held Meeting + $meeting = SugarTestMeetingUtilities::createMeeting(); + $meeting->date_start = $GLOBALS['timedate']->nowDb(); + $meeting->date_end = $GLOBALS['timedate']->nowDb(); + $meeting->status = 'Held'; + $meeting->save(); + $meeting->set_accept_status($GLOBALS['current_user'], 'accept'); + + // Create Held Call + $call = SugarTestCallUtilities::createCall(); + $call->date_start = $GLOBALS['timedate']->nowDb(); + $call->date_end = $GLOBALS['timedate']->nowDb(); + $call->status = 'Held'; + $call->save(); + $call->set_accept_status($GLOBALS['current_user'], 'accept'); + + // Create Completed Task + $task = SugarTestTaskUtilities::createTask(); + $task->date_due = $GLOBALS['timedate']->nowDb(); + $task->status = 'Completed'; + $task->assigned_user_id = $GLOBALS['current_user']->id; + $task->save(); + + // Set query dates + $start_date_time = $GLOBALS['timedate']->fromString(date("Y-m-d")); + $end_date_time = $start_date_time->get("+7 days"); + $start_date_time = $start_date_time->get("-7 days"); + + // Get all activities for the user + $result = CalendarActivity::get_activities($GLOBALS['current_user']->id, true, $start_date_time, $end_date_time, 'month', true, $showCompleted); + + // Depending on show completed, get_activities should return 3 entries, the ones we created above + if ($showCompleted) + { + $this->assertEquals(3, sizeof($result), 'get_activities did not return the Metting, Call and Task as it should have'); + $this->assertEquals($result[0]->sugar_bean->id, $meeting->id, 'Meeting not returned properly'); + $this->assertEquals($result[1]->sugar_bean->id, $call->id, 'Call not returned properly'); + $this->assertEquals($result[2]->sugar_bean->id, $task->id, 'Task not returned properly'); + } + // Or it shouldn't return anything since all the activities are completed + else + { + $this->assertEquals(0, sizeof($result), 'get_activities should be empty'); + } + } +} diff --git a/tests/modules/Emails/GetNamePlusEmailAddressesForComposeTest.php b/tests/modules/Emails/GetNamePlusEmailAddressesForComposeTest.php index 06765cd5..454c99a8 100755 --- a/tests/modules/Emails/GetNamePlusEmailAddressesForComposeTest.php +++ b/tests/modules/Emails/GetNamePlusEmailAddressesForComposeTest.php @@ -42,13 +42,14 @@ class GetNamePlusEmailAddressesForComposeTest extends Sugar_PHPUnit_Framework_Te { public function setUp() { - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + SugarTestHelper::setUp('current_user'); + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); } public function tearDown() { - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - unset($GLOBALS['current_user']); + SugarTestHelper::tearDown(); } public function testGetNamePlusEmailAddressesForCompose() diff --git a/tests/service/Bug38858Test.php b/tests/service/Bug38858Test.php new file mode 100755 index 00000000..115f03e6 --- /dev/null +++ b/tests/service/Bug38858Test.php @@ -0,0 +1,112 @@ +_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v4_1/soap.php'; + parent::_setupTestUser(); + parent::setUp(); + + $this->account = SugarTestAccountUtilities::createAccount(); + $this->contact = SugarTestContactUtilities::createContact(); + + $this->account->load_relationship('contacts'); + $this->account->contacts->add($this->contact->id); + } + + public function tearDown() + { + SugarTestAccountUtilities::removeAllCreatedAccounts(); + SugarTestContactUtilities::removeAllCreatedContacts(); + + parent::tearDown(); + parent::_tearDownTestUser(); + + SugarTestHelper::tearDown(); + } + + /** + * Test checks that relationship between account & contact can be removed by soap + * + * @group 38858 + * @return void + */ + public function testDeletionBySetRelationships() + { + $this->_login(); + + $result = $this->_soapClient->call('get_relationships', array( + 'session' => $this->_sessionId, + 'module_name' => 'Accounts', + 'module_id' => $this->account->id, + 'link_field_name' => 'contacts', + 'related_module_query' => "", + 'link_module_fields' => array('id'), + 'deleted' => '1', + )); + $this->assertEquals(1, count($result['entry_list']), 'Response is incorrect'); + + $contact = reset($result['entry_list']); + $this->assertEquals($this->contact->id, $contact['id'], 'Contact is incorrect'); + + $result = $this->_soapClient->call('set_relationship', array( + 'session' => $this->_sessionId, + 'module_name' => $this->account->module_dir, + 'module_id' => $this->account->id, + 'link_field_name' => 'contacts', + 'related_ids' => array($this->contact->id), + 'name_value_list' => array(), + 'delete' => 1 + )); + $this->assertEquals(1, $result['deleted'], 'Contact is not deleted'); + + $result = $this->_soapClient->call('get_relationships', array( + 'session' => $this->_sessionId, + 'module_name' => 'Accounts', + 'module_id' => $this->account->id, + 'link_field_name' => 'contacts', + 'related_module_query' => "", + 'link_module_fields' => array('id'), + 'deleted' => '1', + )); + + $this->assertEquals(0, count($result['entry_list']), 'Contact is present'); + } +} diff --git a/tests/service/Bug43368Test.php b/tests/service/Bug43368Test.php new file mode 100755 index 00000000..23a58559 --- /dev/null +++ b/tests/service/Bug43368Test.php @@ -0,0 +1,91 @@ +status = 'Active'; + $current_user->is_admin = 1; + $current_user->save(); + $GLOBALS['db']->commit(); // Making sure we commit any changes before continuing + } + + public function tearDown() + { + parent::tearDown(); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + } + + /** + * _makeRestCall + * + * This function helps wrap the REST call using the CURL libraries + * + * @param $method String name of the method to call + * @param $parameters Mixed array of arguments depending on the method call + * + * @return mixed JSON decoded response made from REST call + */ + protected function _makeRESTCall($method) + { + // specify the REST web service to interact with + $url = $GLOBALS['sugar_config']['site_url'].'/service/v4/rest.php'; + // Open a curl session for making the call + $curl = curl_init($url); + // set URL and other appropriate options + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_HEADER, 0); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0); + curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 ); + // build the request URL + $json = json_encode(array()); + $postArgs = "method=$method&input_type=JSON&response_type=JSON&rest_data=$json"; + curl_setopt($curl, CURLOPT_POSTFIELDS, $postArgs); + // Make the REST call, returning the result + $response = curl_exec($curl); + // Close the connection + $return = curl_getinfo($curl); + curl_close($curl); + + // Convert the result from JSON format to a PHP array + return $return; + } + + /** + * @group 41523 + */ + public function testRestReturnContentType() + { + $results = $this->_makeRESTCall('get_server_info'); + $this->assertEquals('application/json; charset=UTF-8', $results['content_type']); + + } +} diff --git a/tests/soap/Bug51182Test.php b/tests/soap/Bug51182Test.php new file mode 100755 index 00000000..115f301a --- /dev/null +++ b/tests/soap/Bug51182Test.php @@ -0,0 +1,102 @@ +_soapURL = $GLOBALS['sugar_config']['site_url'].'/soap.php'; + + parent::setUp(); + + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); + $this->user = SugarTestHelper::setUp('current_user', array(true, true)); + + // Create an opportunity for the report + $opportunity = SugarTestOpportunityUtilities::createOpportunity(); + // Create and save summary with details report on opportunities, filtered by id of the above created opportunity + $this->_report = new Report('{"display_columns":[{"name":"name","label":"Opportunity Name","table_key":"self"},{"name":"sales_stage","label":"Sales Stage","table_key":"self"}],"module":"Opportunities","group_defs":[{"name":"opportunity_type","label":"Type","table_key":"self","type":"enum","force_label":"Type"}],"summary_columns":[{"name":"opportunity_type","label":"Type","table_key":"self"}],"report_name":"Opp by type","chart_type":"none","do_round":1,"chart_description":"","numerical_chart_column":"","numerical_chart_column_type":"","assigned_user_id":"1","report_type":"summary","full_table_list":{"self":{"value":"Opportunities","module":"Opportunities","label":"Opportunities"}},"filters_def":{"Filter_1":{"0":{"name":"id","table_key":"self","qualifier_name":"is","input_name0":"' . $opportunity->id . '","input_name1":"' . $opportunity->name . '","column_name":"self:id","id":"rowid0"},"operator":"AND"}}}'); + $_REQUEST['assigned_user_id'] = $GLOBALS['current_user']->id; + $this->_report->save("testSummaryReportWithDetails"); + } + + public function tearDown() + { + $GLOBALS['db']->query("DELETE FROM saved_reports WHERE id = '{$this->_report->saved_report->id}'"); + SugarTestOpportunityUtilities::removeAllCreatedOpportunities(); + SugarTestHelper::tearDown(); + } + + // Test if the returned data is proper + public function testSummaryReportWithDetails() + { + $this->_login(); + + // Setup call + $client = array( + 'session' => $this->_sessionId, + 'module_name' => 'Reports', + 'id' => $this->_report->saved_report->id, + 'select_fields' => array(), + ); + + // Call get_entry on saved report + $result = $this->_soapClient->call('get_entry', $client); + + // Check if the soap call returned the details rows + $this->assertNotEmpty($result['entry_list'], "Report shouldn't be empty."); + $this->assertNotEmpty($result['entry_list'][0]['details'], "Summary Report Details shouldn't be empty."); + // Check if the returned headers for the details have the correct type + $this->assertEquals($result['field_list'][2]['type'], 'details', "Type of detail columns headers should be 'details'."); + } + +} + -- 2.42.0