From 53ac628febc914383d2a8437d517fe2bfe384fa2 Mon Sep 17 00:00:00 2001 From: John Mertic Date: Mon, 22 Oct 2012 11:34:32 -0400 Subject: [PATCH] Release 6.5.6 --- cache/include/javascript/sugar_grp1.js | 30 +- cache/include/javascript/sugar_grp_emails.js | 6 +- cache/include/javascript/sugar_grp_jsolait.js | 16 +- .../include/javascript/sugar_grp_quickcomp.js | 6 +- data/SugarBean.php | 5 +- files.md5 | 276 +++--- include/EditView/EditView2.php | 5 + include/EditView/SubpanelQuickEdit.php | 2 +- include/ListView/ListView.php | 7 +- include/MVC/SugarApplication.php | 4 +- include/MVC/View/SugarView.php | 23 +- include/MVC/View/tpls/gsdetail.tpl | 93 -- include/MVC/View/views/view.gs.php | 205 ---- include/MVC/View/views/view.importvcard.php | 2 +- .../MVC/View/views/view.importvcardsave.php | 2 +- .../tpls/SearchFormGenericAdvanced.tpl | 4 +- include/SubPanel/SubPanelTiles.php | 2 +- include/SugarCache/SugarCache.php | 12 + include/SugarCharts/Jit/js/Jit/jit.js | 58 +- include/SugarCharts/SugarChart.php | 6 +- .../SugarEmailAddress/SugarEmailAddress.php | 9 +- .../Fields/Base/SugarFieldBase.php | 3 - .../Fields/Datetimecombo/RangeSearchForm.tpl | 9 + .../Fields/Int/RangeSearchForm.tpl | 8 + .../templates/basic/language/en_us.lang.php | 2 + .../basic/metadata/subpanels/default.php | 2 + .../templates/company/language/en_us.lang.php | 4 + .../company/metadata/subpanels/default.php | 2 + .../templates/file/language/en_us.lang.php | 4 + .../file/metadata/subpanels/default.php | 2 + .../templates/issue/language/en_us.lang.php | 4 + .../issue/metadata/subpanels/default.php | 8 +- .../templates/person/language/en_us.lang.php | 4 + .../person/metadata/subpanels/default.php | 2 + .../SugarObjects/templates/person/vardefs.php | 2 +- .../templates/sale/language/en_us.lang.php | 3 + .../sale/metadata/subpanels/default.php | 2 + include/SugarQueue/SugarJobQueue.php | 3 +- include/SugarTheme/getImage.php | 9 + include/TemplateHandler/TemplateHandler.php | 8 + .../connectors/utils/ConnectorHtmlHelper.php | 1 + include/database/MssqlManager.php | 50 +- include/formbase.php | 129 +++ include/generic/Save2.php | 124 --- .../SugarWidgets/SugarWidgetFielddatetime.php | 46 + .../SugarWidgetFieldmultienum.php | 50 +- .../SugarWidgets/SugarWidgetReportField.php | 8 +- include/javascript/ajaxUI.js | 7 +- include/javascript/javascript.php | 22 +- include/javascript/jsAlerts.php | 4 +- include/javascript/popup_helper.js | 5 +- include/javascript/sugar_3.js | 23 +- include/language/en_us.lang.php | 8 +- include/phpmailer/class.smtp.php | 47 + include/upload_file.php | 6 +- include/utils.php | 38 +- install/install_utils.php | 4 +- json_server.php | 2 +- .../include/SugarCharts/Jit/js/Jit/jit.js | 240 ++++- .../src_files/include/javascript/ajaxUI.js | 13 +- .../include/javascript/popup_helper.js | 22 +- .../src_files/include/javascript/sugar_3.js | 99 +- jssource/src_files/modules/Calendar/Cal.js | 25 +- .../modules/Meetings/jsclass_scheduler.js | 64 ++ modules/Administration/DisplayWarnings.php | 19 - modules/Administration/SupportPortal.php | 1 - .../Administration/UpgradeWizard_commit.php | 1 + modules/Administration/action_view_map.php | 1 - modules/Administration/controller.php | 52 - .../templates/GlobalSearchSettings.tpl | 4 +- modules/Bugs/vardefs.php | 24 +- modules/Calendar/Cal.js | 5 +- modules/Calls/CallFormBase.php | 7 +- modules/Calls/language/en_us.lang.php | 1 + modules/Calls/metadata/editviewdefs.php | 8 +- modules/Calls/vardefs.php | 11 + modules/Campaigns/ProcessBouncedEmails.php | 4 +- .../ext/rest/insideview/tpls/InsideView.tpl | 4 +- modules/DocumentRevisions/vardefs.php | 2 +- modules/Documents/vardefs.php | 2 +- modules/Documents/views/view.extdoc.php | 2 +- modules/DynamicFields/UpgradeFields.php | 3 + .../Fields/TemplateDatetimecombo.php | 7 +- .../templates/Fields/TemplateField.php | 12 +- .../templates/Fields/TemplateInt.php | 20 +- modules/EAPM/language/en_us.lang.php | 8 +- modules/Emails/Email.php | 4 +- modules/Emails/javascript/EmailUICompose.js | 12 +- modules/Home/QuickSearch.php | 11 +- modules/Home/language/en_us.lang.php | 5 +- modules/Home/tour.tpl | 7 + modules/Home/views/view.tour.php | 31 +- modules/Import/views/view.last.php | 24 +- modules/InboundEmail/EditView.html | 20 +- modules/InboundEmail/EditView.php | 26 + modules/Meetings/MeetingFormBase.php | 6 - modules/Meetings/jsclass_scheduler.js | 16 +- modules/Meetings/language/en_us.lang.php | 1 + modules/Meetings/metadata/editviewdefs.php | 17 +- modules/Meetings/tpls/reminders.tpl | 4 +- modules/Meetings/vardefs.php | 11 + modules/Meetings/views/view.listbytype.php | 10 +- modules/ModuleBuilder/MB/MBPackage.php | 313 ++++-- modules/ModuleBuilder/MB/ModuleBuilder.php | 2 +- modules/ModuleBuilder/language/en_us.lang.php | 4 +- .../relationships/AbstractRelationship.php | 16 +- .../views/DeployedMetaDataImplementation.php | 3 +- .../views/GridLayoutMetaDataParser.php | 7 +- .../UndeployedSubpanelImplementation.php | 12 + .../ModuleBuilder/views/view.layoutview.php | 1 + modules/Opportunities/vardefs.php | 6 +- modules/Schedulers/Scheduler.php | 34 +- modules/Schedulers/views/view.edit.php | 14 +- modules/Studio/wizards/RenameModules.php | 13 +- modules/UpgradeWizard/uw_utils.php | 14 + modules/UserPreferences/UserPreference.php | 2 +- modules/Users/User.php | 10 +- modules/Users/UserViewHelper.php | 134 +-- modules/Users/language/en_us.lang.php | 1 + modules/Users/tpls/DetailViewFooter.tpl | 8 +- modules/Users/tpls/EditViewFooter.tpl | 28 +- modules/Users/tpls/EditViewHeader.tpl | 10 + modules/Users/vardefs.php | 21 +- modules/Users/views/view.edit.php | 5 + modules/Users/views/view.wizard.php | 6 +- modules/iCals/HTTP_WebDAV_Server_iCal.php | 2 +- modules/vCals/HTTP_WebDAV_Server_vCal.php | 47 +- modules/vCals/vCal.php | 24 +- service/core/SugarWebServiceImpl.php | 2 +- service/v3/SugarWebServiceImplv3.php | 3 - service/v3/SugarWebServiceUtilv3.php | 55 +- service/v3_1/SugarWebServiceImplv3_1.php | 15 - service/v3_1/SugarWebServiceUtilv3_1.php | 110 +-- service/v4/SugarWebServiceUtilv4.php | 127 --- soap/SoapError.php | 2 +- soap/SoapSugarUsers.php | 2 +- sugar_version.php | 8 +- .../MockObject/Matcher/InvokedAtLeastOnce.php | 2 +- tests/SugarTestCampaignUtilities.php | 11 + tests/SugarTestEmailUtilities.php | 11 + tests/SugarTestHelper.php | 2 +- tests/SugarTestMeetingUtilities.php | 3 +- tests/SugarTestProspectListsUtilities.php | 2 + tests/data/Bug52133Test.php | 2 +- tests/data/Relationships/Bug50910Test.php | 4 +- .../{Bug33806.php => Bug33806Test.php} | 0 tests/include/Bug43652.php | 113 --- .../include/MVC/View/Bug56373Test.php | 45 +- tests/include/SearchForm/Bug48846Test.php | 112 --- ...55733Test.php => Bug55733CurrencyTest.php} | 0 tests/include/SugarQueue/CronTest.php | 1 + tests/include/SugarQueue/JobQueueTest.php | 3 +- .../include/database/Bug44291Test.php | 22 +- .../include/generic/SugarWidgets/Bug45716.php | 934 ------------------ tests/include/javascript/Bug56694v2Test.php | 205 ++++ tests/include/utils/Bug46122Test.php | 10 +- tests/include/utils/Bug46850Test.php | 2 +- tests/include/utils/Bug48369Test.php | 4 +- tests/include/utils/Bug49397Test.php | 2 +- .../{bug54472.php => Bug54472Test.php} | 9 +- .../{SugarJSMin.php => SugarJSMinTest.php} | 0 ...9819_39820.php => Bugs39819_39820Test.php} | 2 +- .../{Bug12755.php => Bug12755Test.php} | 0 ...ests.php => DynamicFieldsCurrencyTest.php} | 27 +- .../templates/Fields/Bug56694Test.php | 204 ++++ .../Emails/FindEmailFromBeanIdsTest.php | 4 +- .../Emails/HandleBodyInHTMLformatTest.php | 3 +- tests/modules/Home/QuickSearchTests.php | 86 -- ...nvertLeadTests.php => ConvertLeadTest.php} | 11 +- tests/modules/ModuleBuilder/Bug42085Test.php | 82 -- tests/modules/ModuleBuilder/Bug45339Test.php | 304 ++++++ tests/modules/ModuleBuilder/Bug48826Test.php | 95 -- .../ModuleBuilder/parsers/Bug39729Test.php} | 61 +- .../{Bug42727.php => Bug42727Test.php} | 6 +- .../Bug44819Test.php} | 38 +- tests/modules/Schedulers/SchedulerTest.php | 5 +- ...226TestPartB.php => Bug43226PartBTest.php} | 4 +- .../Bug44515.php => Users/Bug54858Test.php} | 89 +- tests/service/Bug48748Test.php | 126 --- tests/service/RESTAPI3Test.php | 10 - themes/Sugar5/css/style.css | 82 +- 181 files changed, 2853 insertions(+), 3240 deletions(-) delete mode 100644 include/MVC/View/tpls/gsdetail.tpl delete mode 100644 include/MVC/View/views/view.gs.php rename tests/include/{Bug33806.php => Bug33806Test.php} (100%) delete mode 100755 tests/include/Bug43652.php rename include/SugarFields/Fields/Multienum/WirelessEditView.tpl => tests/include/MVC/View/Bug56373Test.php (62%) mode change 100644 => 100755 delete mode 100755 tests/include/SearchForm/Bug48846Test.php rename tests/include/SugarFields/Fields/Currency/{Bug55733Test.php => Bug55733CurrencyTest.php} (100%) rename include/SugarFields/Fields/Multienum/WirelessDetailView.tpl => tests/include/database/Bug44291Test.php (84%) mode change 100644 => 100755 delete mode 100755 tests/include/generic/SugarWidgets/Bug45716.php create mode 100755 tests/include/javascript/Bug56694v2Test.php rename tests/jssource/{bug54472.php => Bug54472Test.php} (95%) rename tests/jssource/{SugarJSMin.php => SugarJSMinTest.php} (100%) rename tests/modules/Administration/{Bugs39819_39820.php => Bugs39819_39820Test.php} (98%) rename tests/modules/CampaignLog/{Bug12755.php => Bug12755Test.php} (100%) rename tests/modules/DynamicFields/{DynamicFieldsCurrencyTests.php => DynamicFieldsCurrencyTest.php} (78%) create mode 100755 tests/modules/DynamicFields/templates/Fields/Bug56694Test.php delete mode 100755 tests/modules/Home/QuickSearchTests.php rename tests/modules/Leads/{ConvertLeadTests.php => ConvertLeadTest.php} (99%) delete mode 100755 tests/modules/ModuleBuilder/Bug42085Test.php create mode 100755 tests/modules/ModuleBuilder/Bug45339Test.php delete mode 100755 tests/modules/ModuleBuilder/Bug48826Test.php rename tests/{include/database/Bug44291.php => modules/ModuleBuilder/parsers/Bug39729Test.php} (67%) rename tests/modules/Opportunities/{Bug42727.php => Bug42727Test.php} (95%) rename tests/modules/{ProductTemplates/Bug44515-WithoutCustom.php => Schedulers/Bug44819Test.php} (71%) rename tests/modules/UpgradeWizard/SugarMerge/{Bug43226TestPartB.php => Bug43226PartBTest.php} (98%) rename tests/modules/{ProductTemplates/Bug44515.php => Users/Bug54858Test.php} (51%) delete mode 100755 tests/service/Bug48748Test.php diff --git a/cache/include/javascript/sugar_grp1.js b/cache/include/javascript/sugar_grp1.js index 40bb69b4..9aa5bf6d 100644 --- a/cache/include/javascript/sugar_grp1.js +++ b/cache/include/javascript/sugar_grp1.js @@ -103,7 +103,11 @@ if(!myregexp.test(timeStr)) return false return true;} function inRange(value,min,max){if(typeof num_grp_sep!='undefined'&&typeof dec_sep!='undefined') -value=unformatNumberNoParse(value,num_grp_sep,dec_sep).toString();return value>=min&&value<=max;} +value=unformatNumberNoParse(value,num_grp_sep,dec_sep).toString();var result=true;if(typeof min=='number'&&valuemax) +{result=false;} +return result;} function bothExist(item1,item2){if(typeof item1=='undefined'){return false;} if(typeof item2=='undefined'){return false;} if((item1==''&&item2!='')||(item1!=''&&item2=='')){return false;} @@ -164,7 +168,12 @@ break;case'error':isError=true;add_error_style(formname,validate[formname][i][na if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'callback':if(typeof validate[formname][i][callbackIndex]=='function') {var result=validate[formname][i][callbackIndex](formname,validate[formname][i][nameIndex]);if(result==false) {isError=true;add_error_style(formname,validate[formname][i][nameIndex],requiredTxt+" "+validate[formname][i][msgIndex]);}} -break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+") ");} +break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');if(typeof validate[formname][i][minIndex]=='number'&&typeof validate[formname][i][maxIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+")");} +else if(typeof validate[formname][i][minIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_SHOULD_BE')+' '+validate[formname][i][minIndex]+' '+SUGAR.language.get('app_strings','MSG_OR_GREATER'));} +else if(typeof validate[formname][i][maxIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][maxIndex]);}} break;case'isbefore':compareTo=form[validate[formname][i][compareToIndex]];if(typeof compareTo!='undefined'){if(trim(compareTo.value)!=''||(validate[formname][i][allowblank]!='true')){date2=trim(compareTo.value);date1=trim(form[validate[formname][i][nameIndex]].value);if(trim(date1).length!=0&&!isBefore(date1,date2)){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+"("+date1+") "+SUGAR.language.get('app_strings','MSG_IS_NOT_BEFORE')+' '+date2);}}} break;case'less':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);maximum=parseFloat(validate[formname][i][maxIndex]);if(typeof maximum!='undefined'){if(value>maximum){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][altMsgIndex]);}} break;case'more':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);minimum=parseFloat(validate[formname][i][minIndex]);if(typeof minimum!='undefined'){if(value]*)>((.|\s|\v|\0)*?)<\s*\/script\s*>/igm;var lastIndex=-1;var result=objRegex.exec(text);while(result&&result.index>lastIndex){lastIndex=result.index -try{var script=document.createElement('script');script.type='text/javascript';if(result[1].indexOf("src=")>-1){var srcRegex=/.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm;var srcResult=result[1].replace(srcRegex,'$1');script.src=srcResult;}else{script.text=result[2];} -document.body.appendChild(script);} +try{if(result[1].indexOf("src=")>-1){var srcRegex=/.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm;var srcResult=result[1].replace(srcRegex,'$1');var r1=/:\/\//igm;if(r1.test(srcResult)&&srcResult.indexOf(window.location.hostname)==-1) +{YUI().use('get',function(Y) +{var url=srcResult;Y.Get.script(srcResult,{autopurge:false,onSuccess:function(o){},onFailure:function(o){},onTimeout:function(o){}});});} +else +{YUI().use("io-base",function(Y){var cfg,response;cfg={method:'GET',sync:true,on:{success:function(transactionid,response,arguments) +{SUGAR.util.globalEval(response.responseText);}}};response=Y.io(srcResult,cfg);});}}else{SUGAR.util.globalEval(result[2]);}} catch(e){if(typeof(console)!="undefined"&&typeof(console.log)=="function") {console.log("error adding script");console.log(e);console.log(result);}} result=objRegex.exec(text);}},getLeftColObj:function(){leftColObj=document.getElementById('leftCol');while(leftColObj.nodeName!='TABLE'){leftColObj=leftColObj.firstChild;} @@ -644,16 +657,17 @@ return final_arr;}/* End of File include/javascript/sugar_3.js */ SUGAR.ajaxUI={loadingWindow:false,callback:function(o) {var cont;if(typeof window.onbeforeunload=="function") -window.onbeforeunload=null;scroll(0,0);SUGAR.ajaxUI.hideLoadingPanel();try{var r=YAHOO.lang.JSON.parse(o.responseText);cont=r.content;if(r.title) +window.onbeforeunload=null;scroll(0,0);try{var r=YAHOO.lang.JSON.parse(o.responseText);cont=r.content;if(r.title) {document.title=html_entity_decode(r.title);} if(r.action) {action_sugar_grp1=r.action;} if(r.favicon) {SUGAR.ajaxUI.setFavicon(r.favicon);} -var c=document.getElementById("content");c.innerHTML=cont;SUGAR.util.evalScript(cont);if(r.moduleList) +var c=document.getElementById("content");c.style.visibility='hidden';c.innerHTML=cont;SUGAR.util.evalScript(cont);c.style.visibility='visible';if(r.moduleList) {SUGAR.themes.setModuleTabs(r.moduleList);} if(typeof(r.responseTime)!='undefined'){var rt=$("#responseTime");if(rt.length>0){rt.html(rt.html().replace(/[\d]+\.[\d]+/,r.responseTime));} -else if(typeof(logoStats)!="undefined"){$("#logo").attr("title",logoStats.replace(/[\d]+\.[\d]+/,r.responseTime)).tipTip({maxWidth:"auto",edgeOffset:10});}}}catch(e){SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) +else if(typeof(logoStats)!="undefined"){$("#logo").attr("title",logoStats.replace(/[\d]+\.[\d]+/,r.responseTime)).tipTip({maxWidth:"auto",edgeOffset:10});}} +SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) {if(!SUGAR.ajaxUI.errorPanel){SUGAR.ajaxUI.errorPanel=new YAHOO.widget.Panel("ajaxUIErrorPanel",{modal:false,visible:true,constraintoviewport:true,width:"800px",height:"600px",close:true});} var panel=SUGAR.ajaxUI.errorPanel;panel.setHeader(SUGAR.language.get('app_strings','ERR_AJAX_LOAD'));panel.setBody('');panel.setFooter(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FOOTER'));panel.render(document.body);SUGAR.util.doWhen(function(){var f=document.getElementById("ajaxErrorFrame");return f!=null&&f.contentWindow!=null&&f.contentWindow.document!=null;},function(){document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML=errorMessage;window.setTimeout('throw "AjaxUI error parsing response"',300);});SUGAR.ajaxUI.errorMessage=errorMessage;window.setTimeout('if((typeof(document.getElementById("ajaxErrorFrame")) == "undefined" || typeof(document.getElementById("ajaxErrorFrame")) == null || document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML == "")){document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML=SUGAR.ajaxUI.errorMessage;}',3000);panel.show();panel.center();throw"AjaxUI error parsing response";},canAjaxLoadModule:function(module) {var checkLS=/&LicState=check/.exec(window.location.search);if(checkLS||(typeof(SUGAR.config.disableAjaxUI)!='undefined'&&SUGAR.config.disableAjaxUI==true)){return false;} diff --git a/cache/include/javascript/sugar_grp_emails.js b/cache/include/javascript/sugar_grp_emails.js index 592b8204..b7067434 100644 --- a/cache/include/javascript/sugar_grp_emails.js +++ b/cache/include/javascript/sugar_grp_emails.js @@ -744,11 +744,13 @@ return false;var hide=document.getElementById('setEditor'+idx).checked;SE.compos if(idx!=null){var sel=document.getElementById('signatures'+idx);}else{var sel=document.getElementById('signature_id');idx=SE.tinyInstances.currentHtmleditor;} if(typeof(SE.composeLayout.loadedTinyInstances[idx])!='undefined'&&SE.composeLayout.loadedTinyInstances[idx]==false){setTimeout("SE.composeLayout.setSignature("+idx+");",1000);return;} var signature='';try{signature=sel.options[sel.selectedIndex].value;}catch(e){} -var openTag='
 ';var closeTag=' 
';var t=tinyMCE.getInstanceById('htmleditor'+idx);if(typeof(t)!='undefined') +var openTag='
';var closeTag='
';var t=tinyMCE.getInstanceById('htmleditor'+idx);if(typeof(t)!='undefined') {t.contentDocument=t.contentWindow.document;var html=t.getContent();} else {var html='';} -var htmllow=html.toLowerCase();var start=htmllow.indexOf(openTag);var end=htmllow.indexOf(closeTag)+closeTag.length;if(signature==''){if(start>-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;t.setContent(html);} +var htmllow=html.toLowerCase();var start=htmllow.indexOf(openTag);var end=htmllow.indexOf(closeTag);if(end>=0){end+=closeTag.length;} +else{end=htmllow.length;} +if(signature==''){if(start>-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;t.setContent(html);} SE.signatures.lastAttemptedLoad='';return false;} if(!SE.signatures.lastAttemptedLoad) SE.signatures.lastAttemptedLoad='';SE.signatures.lastAttemptedLoad=signature;if(typeof(SE.signatures[signature])=='undefined'){SE.signatures.lastAttemptedLoad='';SE.signatures.targetInstance=(idx)?idx:"";AjaxObject.target='';AjaxObject.startRequest(callbackLoadSignature,urlStandard+"&emailUIAction=getSignature&id="+signature);}else{var newSignature=this.prepareSignature(SE.signatures[signature]);if(SE.signatures.lastAttemptedLoad&&start>-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;} diff --git a/cache/include/javascript/sugar_grp_jsolait.js b/cache/include/javascript/sugar_grp_jsolait.js index 2fe8f0b1..710da053 100644 --- a/cache/include/javascript/sugar_grp_jsolait.js +++ b/cache/include/javascript/sugar_grp_jsolait.js @@ -104,7 +104,9 @@ GLOBAL_REGISTRY.focus.fields.date_start=date_start;if(has_meridiem){GLOBAL_REGIS GLOBAL_REGISTRY.focus.fields.duration_hours=document.forms[form_name].duration_hours.value;GLOBAL_REGISTRY.focus.fields.duration_minutes=document.forms[form_name].duration_minutes.value;GLOBAL_REGISTRY.focus.fields.datetime_start=SugarDateTime.mysql2jsDateTime(GLOBAL_REGISTRY.focus.fields.date_start,GLOBAL_REGISTRY.focus.fields.time_start);GLOBAL_REGISTRY.scheduler_attendees_obj.init();GLOBAL_REGISTRY.scheduler_attendees_obj.display();} SugarWidgetScheduler.prototype.display=function(){this.parentNode.innerHTML='';var attendees=new SugarWidgetSchedulerAttendees();attendees.load(this.parentNode);var search=new SugarWidgetSchedulerSearch();search.load(this.parentNode);} SugarClass.inherit("SugarWidgetSchedulerAttendees","SugarClass");function SugarWidgetSchedulerAttendees(){this.init();} -SugarWidgetSchedulerAttendees.prototype.init=function(){var form_name;if(typeof document.EditView!='undefined') +SugarWidgetSchedulerAttendees.prototype.init=function(){SugarWidgetSchedulerAttendees.allowedTypes=['Contact','Lead'];$(document).ready(function() +{$('#add_parent_invitee_label').css('visibility','hidden');SugarWidgetSchedulerAttendees.setAddParentLinkVisibility();$('#parent_type').change(function() +{SugarWidgetSchedulerAttendees.setAddParentLinkVisibility();});});var form_name;if(typeof document.EditView!='undefined') form_name="EditView";else if(typeof document.CalendarEditView!='undefined') form_name="CalendarEditView";else return;GLOBAL_REGISTRY.scheduler_attendees_obj=this;var date_start=document.forms[form_name].date_start.value;var hour_start=parseInt(date_start.substring(11,13),10);var minute_start=parseInt(date_start.substring(14,16),10);var has_meridiem=/am|pm/i.test(date_start);if(has_meridiem){var meridiem=trim(date_start.substring(16));} @@ -132,6 +134,18 @@ if(typeof GLOBAL_REGISTRY.focus.users_arr_hash=='undefined'){GLOBAL_REGISTRY.foc for(var i=0;i-1) +{$('#add_parent_invitee').parent().css('display','');} +else +{$('#add_parent_invitee').parent().css('display','none');}} +SugarWidgetSchedulerAttendees.formAddParent=function() +{parent_id=$("#parent_id").val();parent_name=$("#parent_name").val();parent_type=$("#parent_type option:selected").text();if(parent_id.length>0&&$.inArray(parent_type,SugarWidgetSchedulerAttendees.allowedTypes)>-1) +{invitee={fields:{id:parent_id,full_name:parent_name},module:parent_type};contains=false;for(var i=0;i-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;t.setContent(html);} +var htmllow=html.toLowerCase();var start=htmllow.indexOf(openTag);var end=htmllow.indexOf(closeTag);if(end>=0){end+=closeTag.length;} +else{end=htmllow.length;} +if(signature==''){if(start>-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;t.setContent(html);} SE.signatures.lastAttemptedLoad='';return false;} if(!SE.signatures.lastAttemptedLoad) SE.signatures.lastAttemptedLoad='';SE.signatures.lastAttemptedLoad=signature;if(typeof(SE.signatures[signature])=='undefined'){SE.signatures.lastAttemptedLoad='';SE.signatures.targetInstance=(idx)?idx:"";AjaxObject.target='';AjaxObject.startRequest(callbackLoadSignature,urlStandard+"&emailUIAction=getSignature&id="+signature);}else{var newSignature=this.prepareSignature(SE.signatures[signature]);if(SE.signatures.lastAttemptedLoad&&start>-1){var htmlPart1=html.substr(0,start);var htmlPart2=html.substr(end,html.length);html=htmlPart1+htmlPart2;} diff --git a/data/SugarBean.php b/data/SugarBean.php index 72a46b68..53f2c838 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -2630,8 +2630,8 @@ class SugarBean } $query_array = $parentbean->$related_field_name->getSubpanelQuery(array(), true); } - $table_where = $this_subpanel->get_where(); - $where_definition = $query_array['where']; + $table_where = preg_replace('/^\s*WHERE/i', '', $this_subpanel->get_where()); + $where_definition = preg_replace('/^\s*WHERE/i', '', $query_array['where']); if(!empty($table_where)) { @@ -2653,7 +2653,6 @@ class SugarBean - $subwhere = str_replace('WHERE', '', $subwhere); $list_fields = $this_subpanel->get_list_fields(); foreach($list_fields as $list_key=>$list_field) { diff --git a/files.md5 b/files.md5 index 5ff7f98c..ef24e565 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -24,10 +24,10 @@ $md5_string = array ( './include/SugarObjects/templates/file/metadata/dashletviewdefs.php' => '02a352e76cf96e4fefb6aca135665b16', './include/SugarObjects/templates/file/metadata/editviewdefs.php' => 'f38cffca30b1c2a2ea0e0682c58b0802', './include/SugarObjects/templates/file/metadata/SearchFields.php' => 'af4f358ab40fe05713b8d394aac0c386', - './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'b05da88f0c1db5fc5fec78df44bc1675', + './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'b6ef2856f1e79901614532c93f1f8f8a', './include/SugarObjects/templates/file/metadata/listviewdefs.php' => '51e64700d10537b7514ec3825116cf28', './include/SugarObjects/templates/file/metadata/detailviewdefs.php' => 'b601dd9c5302569586ad28dfb15a1005', - './include/SugarObjects/templates/file/language/en_us.lang.php' => '682baaa27ae3060deaa1a4902a13de43', + './include/SugarObjects/templates/file/language/en_us.lang.php' => '4937f9cf1aded496bc63b512d906f949', './include/SugarObjects/templates/file/language/application/en_us.lang.php' => '4b510f1c470d9f4a7bf1791d47d36c83', './include/SugarObjects/templates/file/File.php' => '2e2ceb1a921678171d05c8202c634279', './include/SugarObjects/templates/issue/config.php' => '92befb45176ef9d23be2f27f0ac59fc6', @@ -43,10 +43,10 @@ $md5_string = array ( './include/SugarObjects/templates/issue/metadata/editviewdefs.php' => '71f03090fae8d8e9e735e43d8e43b267', './include/SugarObjects/templates/issue/metadata/SearchFields.php' => 'a70e6a1a312c7568c5f1d4241900aa3b', './include/SugarObjects/templates/issue/metadata/popupdefs.php' => '5efd231db0c52e00d186927a6a6e5ce8', - './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => '22b186fcdeaca6550d28ba1df682ec69', + './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => '20e863a64ba7a535d45b553cdcfcfe41', './include/SugarObjects/templates/issue/metadata/listviewdefs.php' => 'a9eb9955ece3f5632a4b1a9ab3e56e9a', './include/SugarObjects/templates/issue/metadata/detailviewdefs.php' => 'a282d0fbde2b7d953bae3e27b41a1410', - './include/SugarObjects/templates/issue/language/en_us.lang.php' => '01125f95956706630ee7f27233e6d75a', + './include/SugarObjects/templates/issue/language/en_us.lang.php' => 'a5d927d2292a677a766e1356ef371256', './include/SugarObjects/templates/issue/language/application/en_us.lang.php' => '1e7759c750b218ade41325c56d23dbd5', './include/SugarObjects/templates/company/config.php' => 'a9b4d6ee2c4a4d3b40194db8d3696ff3', './include/SugarObjects/templates/company/vardefs.php' => '3b2dce514f71aeb8a1e53bf7b4100b31', @@ -61,13 +61,13 @@ $md5_string = array ( './include/SugarObjects/templates/company/metadata/editviewdefs.php' => '6acc6288525f5168b30436397ce24eac', './include/SugarObjects/templates/company/metadata/SearchFields.php' => 'ecfa75634d3ceb65befd17c0506c59a0', './include/SugarObjects/templates/company/metadata/popupdefs.php' => '8a5c5bc0a6e2555f03b1cee9f1050d79', - './include/SugarObjects/templates/company/metadata/subpanels/default.php' => '6d4254462dbfef445d2a6e752ec037c6', + './include/SugarObjects/templates/company/metadata/subpanels/default.php' => '174c299475ff428fe78838f915116013', './include/SugarObjects/templates/company/metadata/listviewdefs.php' => '91efe4582d964ebca4bf0f3cb5b72ad2', './include/SugarObjects/templates/company/metadata/detailviewdefs.php' => '469035a8cd3809b9736d6053ddf55475', - './include/SugarObjects/templates/company/language/en_us.lang.php' => 'c9a98e5acc779109f500d30bc291fb65', + './include/SugarObjects/templates/company/language/en_us.lang.php' => 'e9672de5bcddbeaad1860152707afabe', './include/SugarObjects/templates/company/language/application/en_us.lang.php' => '959d9ce9f8538ed0b9c304df6ab0275c', './include/SugarObjects/templates/person/config.php' => '03a311c5d9412313a2c81bbf607781bd', - './include/SugarObjects/templates/person/vardefs.php' => 'a4df1bb6a062d549b9ceda8d8162cb0c', + './include/SugarObjects/templates/person/vardefs.php' => 'a6892d258419add1c7af0b2d8e65c921', './include/SugarObjects/templates/person/icons/person.gif' => 'ea5e2b2022166291d01ccedaf24b4e33', './include/SugarObjects/templates/person/icons/person_32.gif' => '1550c24a793910550200679be1c5c078', './include/SugarObjects/templates/person/icons/Createperson.gif' => '2e20692d501b15729294b80f4f311d77', @@ -78,10 +78,10 @@ $md5_string = array ( './include/SugarObjects/templates/person/metadata/editviewdefs.php' => 'f9ad330e5504343bae231586a010a2a6', './include/SugarObjects/templates/person/metadata/SearchFields.php' => 'c00e75e1bce6083588e81f94993165d5', './include/SugarObjects/templates/person/metadata/popupdefs.php' => 'cfd688340e8909e639c9a547ba5302dc', - './include/SugarObjects/templates/person/metadata/subpanels/default.php' => 'caa38f2c9ba9caeb1c9b426a865880a9', + './include/SugarObjects/templates/person/metadata/subpanels/default.php' => 'cdddc037707788cd28f8ee85e93e5b88', './include/SugarObjects/templates/person/metadata/listviewdefs.php' => '05ce4144900a1e6d3949cb3d50c0ea5d', './include/SugarObjects/templates/person/metadata/detailviewdefs.php' => '3345c1e3c927e0ed0ba010cb0cc7fdfe', - './include/SugarObjects/templates/person/language/en_us.lang.php' => '03d26660f443329319c29b1bd14c478d', + './include/SugarObjects/templates/person/language/en_us.lang.php' => '6e1b1001dcd92b7382fdc25064830171', './include/SugarObjects/templates/person/Person.php' => '763305f02b1506a2f0e00f9408b5cfdc', './include/SugarObjects/templates/basic/vardefs.php' => '595e708242310b7863643e48d397263a', './include/SugarObjects/templates/basic/icons/Createbasic.gif' => 'e25889cd660d838655f5e213fe565f0d', @@ -95,12 +95,12 @@ $md5_string = array ( './include/SugarObjects/templates/basic/metadata/editviewdefs.php' => '383c82a80e106ad26f8799f0d6ef4bce', './include/SugarObjects/templates/basic/metadata/SearchFields.php' => '5f9e33fd0e092600018395642bb2bf4c', './include/SugarObjects/templates/basic/metadata/popupdefs.php' => '22cc4bcb7b9a0bdc122505c673cc8a78', - './include/SugarObjects/templates/basic/metadata/subpanels/default.php' => 'f2b7f012d1ecfd6c2d92107171ecfa57', + './include/SugarObjects/templates/basic/metadata/subpanels/default.php' => '410acc53d0fab8ae012a02a3364deb28', './include/SugarObjects/templates/basic/metadata/listviewdefs.php' => '8ae55ca38bd4097f803459cf6377236d', './include/SugarObjects/templates/basic/metadata/detailviewdefs.php' => '51497e751a06a600bfbada94a9391a4e', './include/SugarObjects/templates/basic/Dashlets/Dashlet/m-n-Dashlet.meta.php' => '740b8ba760e4dc175f6e7bfd6fbbb817', './include/SugarObjects/templates/basic/Dashlets/Dashlet/m-n-Dashlet.php' => '56a2aa815eacffff6ed1a738abb50fae', - './include/SugarObjects/templates/basic/language/en_us.lang.php' => 'd8dc6b1937ebc5b83f62a26508d2519e', + './include/SugarObjects/templates/basic/language/en_us.lang.php' => 'd3093a8ce836f4889aca85826acd69f7', './include/SugarObjects/templates/sale/config.php' => '1cc46713cae6da9a82dc781d8b657a93', './include/SugarObjects/templates/sale/vardefs.php' => 'ef79a30abf34b6d137b0b7089dac5049', './include/SugarObjects/templates/sale/Chance.php' => 'f7a25a2785cad1409100713128b08e44', @@ -118,10 +118,10 @@ $md5_string = array ( './include/SugarObjects/templates/sale/metadata/editviewdefs.php' => 'ce3fab90e79f6da9757d8b6e84c361a9', './include/SugarObjects/templates/sale/metadata/SearchFields.php' => 'db976229bbf9d48e60e5e77c44e2b77c', './include/SugarObjects/templates/sale/metadata/popupdefs.php' => '9eee26574c217160464c0e91bd7f3f18', - './include/SugarObjects/templates/sale/metadata/subpanels/default.php' => '091fd0cc777134fea5e47df4c6881834', + './include/SugarObjects/templates/sale/metadata/subpanels/default.php' => 'c5e57020caffbc4eba3b257783b54b54', './include/SugarObjects/templates/sale/metadata/listviewdefs.php' => '460e480ac30b727eab87cfb4b568dbc5', './include/SugarObjects/templates/sale/metadata/detailviewdefs.php' => 'f3a3f8048e7178b5ddff79001117ead2', - './include/SugarObjects/templates/sale/language/en_us.lang.php' => '44f5c49618c4be967d3a8f113230f68b', + './include/SugarObjects/templates/sale/language/en_us.lang.php' => '7851057d9ded7b05c7f876c21ac9bfa4', './include/SugarObjects/templates/sale/language/application/en_us.lang.php' => 'd5b45bede3053880aff57e4551bc4295', './include/SugarObjects/forms/FormBase.php' => '31eff850186ccd48b965d6e73b574366', './include/SugarObjects/forms/PersonFormBase.php' => 'ed4c4b3be028f2b98aab62961fa6112b', @@ -277,7 +277,7 @@ $md5_string = array ( './include/SubPanel/SubPanelDynamic.html' => '4f74fcd4211256ec95d0054799608906', './include/SubPanel/tpls/singletabmenu.tpl' => '252c751fac27affd042dc7ba1ee83a00', './include/SubPanel/SubPanelDefinitions.php' => '78199f5f0bfe90e1fb1c76afe776e72d', - './include/SubPanel/SubPanelTiles.php' => 'b14a0f1af9988518b632a0f815d291ce', + './include/SubPanel/SubPanelTiles.php' => 'ef1d0d3aa0acbb2e4bcd633b343fb8ce', './include/SubPanel/registered_layout_defs.php' => 'd71c8000fd9dabffa19a3711f60c0f39', './include/SubPanel/SubPanelViewer.php' => 'de240547489fe04b229caa2c5fc34e61', './include/SubPanel/SubPanel.php' => '22713e2b27e94ce43af75048b4694394', @@ -360,7 +360,7 @@ $md5_string = array ( './include/SugarFields/Fields/Phone/EditView.tpl' => 'a1632f6042dce3fbd4ed3319df131482', './include/SugarFields/Fields/Phone/ListView.tpl' => '1d072c0d32ed66aba1b7d7a4a635e07a', './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => 'b061cfcafa73da70b4cd297367d94e35', - './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => '1e3b90f82507ece35ab90abff047a117', + './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => 'e61039a77a012311d0d54b431869cbb2', './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => '2a87aef9aba605ade492223e126e86b3', './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => '04aad57b92d7039a11132845be4a0a47', './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '06b6d8acd48103d3efd8b09941e7a056', @@ -377,7 +377,7 @@ $md5_string = array ( './include/SugarFields/Fields/Enum/SearchView.tpl' => '0bd1380b5df678fc4c896a26697245d6', './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => '3963542a5b484e74c52c2b78ba861bbb', './include/SugarFields/Fields/Readonly/SugarFieldReadonly.php' => 'ebfe6aca8cd5c641a9cf0a4e111e64bb', - './include/SugarFields/Fields/Int/RangeSearchForm.tpl' => '04c353e693db5bfde201e95e0c32e47d', + './include/SugarFields/Fields/Int/RangeSearchForm.tpl' => '1914f7fb237badb054f7078f5a6e832e', './include/SugarFields/Fields/Int/SearchForm.tpl' => '31e3db4bef2f283b3469530c8919a29c', './include/SugarFields/Fields/Int/DetailView.tpl' => '0a15bc93bfb3099b717ad8438f855def', './include/SugarFields/Fields/Int/SugarFieldInt.php' => '241800a0f770b96297875e9b8f0d9ac2', @@ -404,7 +404,7 @@ $md5_string = array ( './include/SugarFields/Fields/Base/InlineEditView.tpl' => '8ae00593c64a7c5171a9f4f463cbb1d3', './include/SugarFields/Fields/Base/SearchForm.tpl' => '89584f42f6317bd59182cf6aa8cc0763', './include/SugarFields/Fields/Base/DetailView.tpl' => '0862eead55f684a00a978662cedca828', - './include/SugarFields/Fields/Base/SugarFieldBase.php' => '1745920fda4cd44a700128ef99929b71', + './include/SugarFields/Fields/Base/SugarFieldBase.php' => '0c689e72a3f70d0e857e27f1df84df39', './include/SugarFields/Fields/Base/EditViewFunction.tpl' => 'cc97e23ed4bc84c8bf7bdfad700a1371', './include/SugarFields/Fields/Base/EditView.tpl' => 'b6ac28598bf744bb907e12e420368501', './include/SugarFields/Fields/Base/ListView.tpl' => 'e5bef5e195aad2fb3fa6c1ae93c8bcca', @@ -424,8 +424,6 @@ $md5_string = array ( './include/SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php' => '57e6fa57d7b1c109fd276a047c4dc0b1', './include/SugarFields/Fields/Assigned_user_name/SearchView.tpl' => 'e6949bbc092460af32c5c108be011cd4', './include/SugarFields/Fields/Multienum/DetailView.tpl' => '6e2d1bcc30258e5ae66ba5a0c0adb7d4', - './include/SugarFields/Fields/Multienum/WirelessDetailView.tpl' => '7044c39f90dea4f1d6b5dc7043205f1a', - './include/SugarFields/Fields/Multienum/WirelessEditView.tpl' => '25a63f0d714fe39a885ca125c430ccea', './include/SugarFields/Fields/Multienum/EditViewFunction.tpl' => '95ba0af2ce15b8c3372cde1746392a41', './include/SugarFields/Fields/Multienum/EditView.tpl' => 'bf916ff2f686bf8e809a22076f49dae7', './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => 'dd429ba718e4975dbdc023f038ff6763', @@ -477,10 +475,10 @@ $md5_string = array ( './include/SugarCharts/swf/groupByChart.swf' => '2eca03fe41128001349bacf997b1fedc', './include/SugarCharts/SugarChartFactory.php' => '4873cc48dd3a2258af3a7998713b2398', './include/SugarCharts/JsChart.php' => '93080932f4335c6ef0c74049d3c566ce', - './include/SugarCharts/SugarChart.php' => 'b7e886ffcb138fe982de53cbdf508bef', + './include/SugarCharts/SugarChart.php' => '4a1139531b33ab4f62d26c4316ffef65', './include/SugarCharts/Jit/js/sugarCharts.js' => '643ed60792a2efe2c62c6ee3f094d735', './include/SugarCharts/Jit/js/mySugarCharts.js' => '6b3dd85fe7c6d5714b6d12c63e536982', - './include/SugarCharts/Jit/js/Jit/jit.js' => 'a9f9f3efa0c6d7af942edbd3cddf9833', + './include/SugarCharts/Jit/js/Jit/jit.js' => 'de9a71d630e97395d4bae316c5995fca', './include/SugarCharts/Jit/tpls/chart.tpl' => '035936b0a337a1b52edccffcd6e44e65', './include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl' => '2c4808cf07078a03c669b52ab5f6997a', './include/SugarCharts/Jit/JitReports.php' => '3a8e246da525fb36ffe1fd49447d4103', @@ -578,12 +576,12 @@ $md5_string = array ( './include/nusoap/license.txt' => '25823f4a2e463ab2c6b5873f07e428e1', './include/nusoap/class.wsdl.php' => 'cd7f1a43ca08891ac1ce04d4d1282c49', './include/nusoap/class.soap_val.php' => '084a898ecf261c201427fd41d4ee40e0', - './include/utils.php' => 'fce96348de7f3adadd99220c84d4757c', + './include/utils.php' => '5184935200fafb7e32b0e99321d939f6', './include/SugarHttpClient.php' => '87fa99a397caaaceb121a21d91ed5260', './include/Sugar_Smarty.php' => 'ac140125309e194a7f43747d41417cd4', './include/phpmailer/extras/htmlfilter.php' => '4d5143899340a690d41a4959428ea674', './include/phpmailer/LICENSE' => '278f2557e3b277b94e9a8430f6a6d0a9', - './include/phpmailer/class.smtp.php' => 'fd00211692e65984f97f2e4820bd6302', + './include/phpmailer/class.smtp.php' => 'e2b6f117a5ee857f5af551e11b867b21', './include/phpmailer/README' => '5a77656de86a8d65fe03fad7f851534f', './include/phpmailer/language/phpmailer.lang-pl.php' => '3933cfa44296e3c3e41b8fe8bf89092c', './include/phpmailer/language/phpmailer.lang-de.php' => 'be8f19de5d7a12568066fb04e7feeb8c', @@ -622,13 +620,13 @@ $md5_string = array ( './include/database/MssqlHelper.php' => '6b3a36ab4462e0f838c35e0e74e0f02b', './include/database/DBManagerFactory.php' => '021c6c562cd96f304544af0e336dc736', './include/database/SqlsrvManager.php' => '4a3d6c5e56ae8fe5fdb07ead522c324e', - './include/database/MssqlManager.php' => 'ca46f743f0d54ae40ed8b3de54329fc1', + './include/database/MssqlManager.php' => 'a57a3088cab4b17101698bbf8b8e52a4', './include/timezone/timezones.php' => '15844342704f03ef8d40603abe9aa99b', './include/SugarSQLValidate.php' => 'eb288af9ccb9828370ef3999ad926619', './include/connectors/ConnectorFactory.php' => '33d27fc539bbd684cf7deb0cea6ed37d', './include/connectors/utils/ConnectorUtils.php' => 'e0f8c33d5ab473259db9c246f169b23b', './include/connectors/utils/ConnectorHtmlHelperFactory.php' => '992e79942eb00bdd0e2fe071d61ef652', - './include/connectors/utils/ConnectorHtmlHelper.php' => '28820022d59b71de4533dc5955a09d2a', + './include/connectors/utils/ConnectorHtmlHelper.php' => 'f707ff2a7177c1541a0a8095d82d4f58', './include/connectors/component.php' => '95c819efe3484a6d1dcba9aefbb4ce0e', './include/connectors/filters/default/filter.php' => '45977b4a20344dccb602ece1e48e50d1', './include/connectors/filters/FilterFactory.php' => '8b1dd8be358b3c9401383fa9adbb94e5', @@ -652,9 +650,9 @@ $md5_string = array ( './include/templates/TemplateDragDropChooser.php' => '312be77f2351b29f7e79bf416ddd8772', './include/templates/Template.php' => '36ef9b944d7e36d9853d9879f6194969', './include/templates/TemplateGroupChooser.php' => '6ae99e0ff3795b613d03ec0474e52c46', - './include/TemplateHandler/TemplateHandler.php' => '2c70ff6e5927aeedf93da151b9124397', + './include/TemplateHandler/TemplateHandler.php' => '4da8355d19789c5c532c621d12d049ed', './include/SugarTheme/SugarTheme.php' => 'dcebbc005e58ed68b7923423e614f516', - './include/SugarTheme/getImage.php' => '0cdce763d79863dcdfc6b9e1b13a3516', + './include/SugarTheme/getImage.php' => '19291feae95e57bc666eec37b612664e', './include/SugarTheme/SugarSprites.php' => '10818287a033eed727e4269522cc7044', './include/SugarTheme/cssmin.php' => '05384ba957435def09368425e4480688', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => '687d5cf1b099d7f81bd40cace28f33dc', @@ -743,15 +741,15 @@ $md5_string = array ( './include/EditView/header.tpl' => '1851218e36edd4d98fdbb803a2f79977', './include/EditView/QuickCreate.tpl' => 'fa3dacaca4c4985fa7d4e19e44d8a30a', './include/EditView/EditView.php' => '585450ac1a175834d05e944f77364c17', - './include/EditView/EditView2.php' => '701cb0edc2ded8ad06c9df64efea3788', + './include/EditView/EditView2.php' => 'a03923ba3c798ef5990abd23d83948f7', './include/EditView/PopupQuickCreate.php' => '9a8b7a895799ed90058b3e070ad7f672', './include/EditView/SugarVCR.tpl' => '5b46cb6d983f213ec90733aa54bfba45', './include/EditView/EditView.tpl' => 'fe408b4bea39633daf1025738f1f4b4e', './include/EditView/QuickCreate.php' => 'a4351f400593c2a1933176d8e34bc82c', - './include/EditView/SubpanelQuickEdit.php' => 'fffaf282dad4779c25d5296e64d5c900', + './include/EditView/SubpanelQuickEdit.php' => 'f7bc58f5f93c60cf2953ec9dbf1e0b15', './include/SugarQueue/SugarCronJobs.php' => 'd7b547d698238a2bd170c86ce3ed67e1', './include/SugarQueue/SugarCronRemoteJobs.php' => '8a30786e408efd58067d73d0acb630f9', - './include/SugarQueue/SugarJobQueue.php' => '13f33437bb20259ce088c020cc7839dd', + './include/SugarQueue/SugarJobQueue.php' => '7bb5fbf971c8c5a2c1d8b710f89db793', './include/tcpdf/unicode_data.php' => 'd20008bba6110e94611ac0939a92913b', './include/tcpdf/LICENSE.TXT' => '7fbc338309ac38fefcd64b04bb903e34', './include/tcpdf/htmlcolors.php' => '0015bab537767d694b0304d91a87c5f1', @@ -789,18 +787,18 @@ $md5_string = array ( './include/tcpdf/CHANGELOG.TXT' => 'b41664d05748e067b3d52ba1eba1e9c3', './include/tcpdf/tcpdf.php' => 'e1032f914233be45b287bbb29bdfb452', './include/tcpdf/README.TXT' => 'f64835b5e9149a89515a9eb589d13a38', - './include/javascript/ajaxUI.js' => '2355a161085c71249ce4abc4ce3ff858', + './include/javascript/ajaxUI.js' => '127986b360cdede27e18b3a7f0041c0a', './include/javascript/calendar.js' => '74fcfcacbdf160e7eb749d7697ad8788', './include/javascript/iscroll.js' => 'f6b1477d2416ee1c40578d56c89220c1', './include/javascript/include.js' => 'f3ef613992bd21dcb9a6033c03675b90', './include/javascript/dashlets.js' => '7413774e4d198914fcd0050ef8c988e6', - './include/javascript/popup_helper.js' => '99f47f03a5d74955f621c505b566f121', + './include/javascript/popup_helper.js' => '46d109cf50d597ed76bfded78429939f', './include/javascript/report_additionals.js' => '0a02af169030d061650538f4ded32bc9', './include/javascript/quicksearch.js' => 'ca621e02502f9a1d033792f5cb88b3e7', './include/javascript/sugar_yui_overrides.js' => '2044e4ff54670e82359c21cca12b2dd5', './include/javascript/cookie.js' => '88a6745e90f7c043394eca8b106068b2', './include/javascript/popup_parent_helper.js' => '592953cb14307a0ce288261d40c4f8a9', - './include/javascript/sugar_3.js' => '21774b3305dca7717e679098d3f2f0bd', + './include/javascript/sugar_3.js' => 'fa4ca2af1a0b212ed34c8063cd4b9adb', './include/javascript/jquery.js' => '819fb9d29c24f79d34343e9f182aaf24', './include/javascript/sugar_connection_event_listener.js' => '27234843e68e64fc9c399044619320be', './include/javascript/jsclass_async.js' => 'd725c16df9803e561437c4a2e13d1372', @@ -873,7 +871,7 @@ $md5_string = array ( './include/javascript/jquery/jquery.showLoading.js' => '573787c855a3389081b878302f905df7', './include/javascript/sugarwidgets/SugarYUILoader.js' => 'c8198074c79a9df405d87800127c4e96', './include/javascript/sugarwidgets/SugarYUIWidgets.js' => '0cb717a8613fc8389e8ff416c5f1af09', - './include/javascript/javascript.php' => '302783deea1447541d58f199ed58e8a4', + './include/javascript/javascript.php' => '990933cc3c6f4c8f40cf3949392b010a', './include/javascript/getYUIComboFile.php' => '4445ac6a0e847e8e8a7279a9b380a2fb', './include/javascript/phpjs/get_html_translation_table.js' => '054b9c1274686f591c68909704b112fb', './include/javascript/phpjs/html_entity_decode.js' => '5ba6eed789f2a2f171e5b8fa5cef04c4', @@ -2229,7 +2227,7 @@ $md5_string = array ( './include/javascript/yui3/build/oop/oop-min.js' => '18d01168cdb05e6b8787e0274dd59568', './include/javascript/yui3/build/oop/oop.js' => '34bb70e9e4fc05e958234e52208a3f4f', './include/javascript/yui3/index.html' => '34db637b1b8f7789823bda3e0da02864', - './include/javascript/jsAlerts.php' => '8fdc717c5046c81681ffaa513f9ae156', + './include/javascript/jsAlerts.php' => 'fd592ebe707314a0b30fc1e0e97bbd67', './include/javascript/tiny_mce/tiny_mce_dev.js' => '1688bdfb91dfc0b32a59685cba03f715', './include/javascript/tiny_mce/tiny_mce_popup.js' => '9a9c125814b9715982d246a1ee78084f', './include/javascript/tiny_mce/tiny_mce.js' => '2192ee1b557660fe152f031cea4ff4c2', @@ -2550,13 +2548,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' => '36bd6d457e2eda66b6e4ffdf54f7b44f', - './include/MVC/View/tpls/gsdetail.tpl' => '7cc49638892eabda4000ad105f58473a', './include/MVC/View/tpls/Importvcard.tpl' => '55563c9368088b0ac99ec7aecf7619d0', './include/MVC/View/tpls/xsrf.tpl' => 'd62524430cf4e4701fe86737f8a7682f', './include/MVC/View/tpls/modulelistmenu.tpl' => '136df5b86eb938738c37bc836c8ace97', './include/MVC/View/views/view.metadata.php' => '358be31f180b06068b9c9296de8a5415', - './include/MVC/View/views/view.importvcardsave.php' => '8bd57468686c0893aefdf4007b99d5ee', - './include/MVC/View/views/view.gs.php' => '43892f69640e1f9562bbf3934deab9d1', + './include/MVC/View/views/view.importvcardsave.php' => '06077ded9cb261005b36a33aac9f3188', './include/MVC/View/views/view.quickedit.php' => '986cc9fda8e782b31668586ed5d296e0', './include/MVC/View/views/view.quickcreate.php' => '49806236c0cc41cc5a8b39c2008f6c4f', './include/MVC/View/views/view.detail.config.php' => 'c39a0838b0caa86281c6f500779260df', @@ -2569,7 +2565,7 @@ $md5_string = array ( './include/MVC/View/views/view.xml.php' => '5ca6f033ae95a3d8d7eacbaaac86d58a', './include/MVC/View/views/view.sugarpdf.config.php' => '85c23b2aa8b6af2b82efc3eae453a118', './include/MVC/View/views/view.favorites.php' => 'e8585f22c20d50e37895a3c968f6790e', - './include/MVC/View/views/view.importvcard.php' => 'fd7a69f7fb258ce490acbf0334b263f9', + './include/MVC/View/views/view.importvcard.php' => 'c066d470c13bdd9d41fddef1d0d01bff', './include/MVC/View/views/view.ajaxui.php' => '2b6496589d96202d453cb98ffbc51d3a', './include/MVC/View/views/view.classic.config.php' => '5d90625b2648beb884b29c10a076b1fe', './include/MVC/View/views/view.edit.php' => 'c815bae865c215630d964e590db57aca', @@ -2583,9 +2579,9 @@ $md5_string = array ( './include/MVC/View/views/view.classic.php' => '36203ddc3461f3b8c2e24f2c2dbe69e3', './include/MVC/View/views/view.detail.php' => 'bd0d0ff2a23f06455082c98a0a058857', './include/MVC/View/ViewFactory.php' => '56116e594364b8a34b3d8986e93fce1e', - './include/MVC/View/SugarView.php' => '2934558e5e0e9b11dee7b2d2c82fd664', + './include/MVC/View/SugarView.php' => '32982051f3e7659f6bd433fa4738c43a', './include/MVC/SugarModule.php' => '1d53f536613de51c996600e26c14ca97', - './include/MVC/SugarApplication.php' => 'ef96e41cf130618b759cba91a83d949b', + './include/MVC/SugarApplication.php' => '70e7bd5e869e44e4c15a8df5e43dadd6', './include/MVC/Controller/file_access_control_map.php' => '6bf1388c2830450cb92d8b9e374a04d5', './include/MVC/Controller/entry_point_registry.php' => '070df1183cc98ae22d1914f5617203fb', './include/MVC/Controller/SugarController.php' => 'bdea5e50de511437f75f0f4f093afeb3', @@ -2596,7 +2592,7 @@ $md5_string = array ( './include/SearchForm/tpls/footer.tpl' => '3461531f4a52f4aecc61756098bb982f', './include/SearchForm/tpls/header.tpl' => '8b71afe9e844839dddf7cde148de2a9a', './include/SearchForm/tpls/SugarSpot.tpl' => '6085b2f4406c9097be7ac951e6470e81', - './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => 'f8d8d9a835a80ce85bcd0b6b801ad7cf', + './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => 'e872a89839aacc5abd236c52a9660b7c', './include/SearchForm/tpls/SearchFormGeneric.tpl' => '2e5f84f3de4d7e15d122e57253acfa91', './include/SearchForm/SugarSpot.php' => 'a899046092d8a1bdb1fd93352b209ab4', './include/SearchForm/SearchForm.php' => '37a79061b1ef9fc6be0ada54cf4b9a9b', @@ -2622,7 +2618,7 @@ $md5_string = array ( './include/ListView/ListViewSmarty.php' => 'a69eeef5b31ce1e1fa029519006f9f35', './include/ListView/ListViewData.php' => '3797a56eeb35041d403100afc200bc26', './include/ListView/ListViewGeneric.tpl' => '32370f4af0164b0985b20c7b7079800c', - './include/ListView/ListView.php' => '3ac177d210dbfa86f9408de539306385', + './include/ListView/ListView.php' => '1ea1f2788eeb0e0c7d7bc047221eb0d7', './include/ListView/ListViewFacade.php' => 'e82b5372d43acd05f1dbe5855c40cdbd', './include/ListView/ListViewDCMenu.tpl' => 'e7f7ad82a50d2998a933c7e8c333c080', './include/ListView/ListViewXTPL.php' => '5fff1f22e74a373c216a5358e9be1aae', @@ -2630,22 +2626,22 @@ $md5_string = array ( './include/ListView/ListViewDisplay.php' => 'a7a82261525d89a7247eea8e591db9aa', './include/ListView/ListViewNoMassUpdate.tpl' => '979476d174c8fa58af325195f03a3b29', './include/vCard.php' => 'b9b49b4d676cbb05c00771e037687ef3', - './include/upload_file.php' => 'f380b6ee4714d8977994b07f1c1bcf17', + './include/upload_file.php' => '3f2b33e37ce73612401ca178375668e3', './include/controller/Controller.php' => 'c5d723fc98af89861c9e68ae49ac9fee', - './include/formbase.php' => '46189b0cab499a78ffc418c728343008', + './include/formbase.php' => '83bb022a5179b6a203b3d677bc21efc5', './include/SugarOauth.php' => 'e9c19b3799b9f64560a80eb1523144f8', './include/resource/ResourceManager.php' => 'c5a246f1eab1d1af90b1a5cb1b1044f5', './include/resource/Observers/WebResourceObserver.php' => 'b88f9b5b9d7498fcdd8fc7ccf3cf80a7', './include/resource/Observers/ResourceObserver.php' => 'd93dc69d2372859fe8fb0f1068587d54', './include/resource/Observers/SoapResourceObserver.php' => 'bff762397d04d958883d06ed160d8bd1', './include/language/jsLanguage.php' => '3aade005a1d8758085838ed1a22ebf34', - './include/language/en_us.lang.php' => 'ca9f3df7c3c371fa332b715cc9ad75c7', + './include/language/en_us.lang.php' => 'dbb89df09c1f0fbd6f9c627afb717e04', './include/language/en_us.notify_template.html' => 'ca23107160665bd7ebb6e94177a3a1ba', './include/pclzip/readme.txt' => '2265cad9ccb84cfcd4093ce26b22dc97', './include/pclzip/gnu-lgpl.txt' => '7fbc338309ac38fefcd64b04bb903e34', './include/pclzip/pclzip.lib.php' => 'f42cfbdfccc2dcd85df39638ae2d141c', './include/SugarEmailAddress/SugarEmailAddress.js' => '6217eae817e6af59e21666cc3087a9d9', - './include/SugarEmailAddress/SugarEmailAddress.php' => '4d99e6c0a205463857b61e9ce0acf220', + './include/SugarEmailAddress/SugarEmailAddress.php' => '2673a2bec92c810eedc4d1cc7bd63952', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '7606911a788f6fa0f4aca806679e4098', './include/SugarEmailAddress/templates/forDetailView.tpl' => '8a913b1d6cbaf35ff7237c8c6022af9c', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => '0dc9422da0b8ec60a58ae06d7215c3fb', @@ -2773,7 +2769,7 @@ $md5_string = array ( './include/DetailView/DetailView.php' => '3df8ccba8aca6dffb5969c47001d7435', './include/DetailView/DetailView2.php' => '4f800afa17ab95068341a3474e78fb76', './include/generic/DeleteRelationship.php' => '73e87c09bc4e90c35a551a6d290965c1', - './include/generic/Save2.php' => '86436c1acbe31df170b88d9d4f4a3d5e', + './include/generic/Save2.php' => '3d3e77582a8f9617417a84a0a5165c39', './include/generic/LayoutManager.php' => '48a5feb70ed0fc1f360d6ba9d917d139', './include/generic/SugarWidgets/SugarWidgetSubPanelEditRoleButton.php' => 'ffd2ba1b7c2b0124a3b70dc00009a94d', './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => 'b6375e51b1f1f3b827c9aa300cdd065e', @@ -2782,7 +2778,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php' => 'be445affddc003efff8e6206031385a0', './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => 'dee020ff9030fee04b450be6d2f57db4', './include/generic/SugarWidgets/SugarWidgetFieldchar.php' => 'ff4c04e9e87b53eabd82a38fe8c16e35', - './include/generic/SugarWidgets/SugarWidgetFieldmultienum.php' => '67c9e3e9789e3f8798dec1156bf4656f', + './include/generic/SugarWidgets/SugarWidgetFieldmultienum.php' => 'ef4f0eec6d7fb12bd9b76d9f26ce0cb6', './include/generic/SugarWidgets/SugarWidgetField.php' => '677f2d56818b2b35611e73799d80140b', './include/generic/SugarWidgets/SugarWidgetSubPanelIcon.php' => '2a22c376b999d71977dcbcf33b48941c', './include/generic/SugarWidgets/SugarWidgetSubPanelTopMessage.php' => 'a61dac690bca32a9da19652d34d277a5', @@ -2829,13 +2825,13 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '934a6ff7977d2b3501d1551e31445b3b', './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => '396cf26585199d9f4709af3e21de089c', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'eda0760a68c648b6924ff97e44d294e5', - './include/generic/SugarWidgets/SugarWidgetReportField.php' => '4289b5997f1ab0a3861fd157b1a2faa4', + './include/generic/SugarWidgets/SugarWidgetReportField.php' => '4046f65a6ccbbb49386e9b19fc756cf7', './include/generic/SugarWidgets/SugarWidgetSubPanelCloseButton.php' => '8add175bc8b9b0576efc420c9211d7b1', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => '3d0a6b29a27135a455a781a0a81e24f8', './include/generic/SugarWidgets/SugarWidgetFieldnum.php' => '15c06a35b7f2ee9f0a41716d5b6d393d', './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => '671e5fda243f814fb2d3afe9d7a0c1da', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectAccountButton.php' => '7c46e299d2783d00cb36be8517100452', - './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '18c0640e149e709ecc37482c248bb46e', + './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '5abc50ae12d767fa5496a89912363321', './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => '7b67281f140b86aad81ec6e817453467', './include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonMeetings.php' => 'b122f559be91ce0a6ea228dc4c94b4c7', './include/generic/SugarWidgets/SugarWidgetFieldfloat.php' => 'c666c7874c49637db91c03b53abaa572', @@ -2853,7 +2849,7 @@ $md5_string = array ( './include/SugarCache/SugarCacheMemcache.php' => 'd306cd13994ec1d378cc426eb0dbef58', './include/SugarCache/SugarCacheZend.php' => 'e587fc379b1a9840695e78abcdf74f6d', './include/SugarCache/SugarCacheMemcached.php' => 'd245841d98e458934ba0268947bf78c7', - './include/SugarCache/SugarCache.php' => 'c15d93f1eed146d06b505d413426ceaa', + './include/SugarCache/SugarCache.php' => '8ff3166c70de143d6b903cd12fb2cf5f', './include/SugarCache/SugarCacheAbstract.php' => 'e6454b1a1ec37154d72e9b40c7f8de6e', './include/SugarCache/SugarCacheWincache.php' => '850515f946957878fba73f02a67e93be', './include/SugarCache/SugarCacheRedis.php' => '568dd3f238414b893c06197be4f01786', @@ -3301,11 +3297,11 @@ $md5_string = array ( './Zend/Loader.php' => '3a440481f38852f58a39b712ca87d1f9', './Zend/Registry.php' => '56b05bc37aa19203e114fe93782b33b0', './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', - './json_server.php' => 'b629a8707237bcaad05acd58c7c6161f', + './json_server.php' => 'c1e64ae2fd286d52c827051043228a74', './SugarSecurity.php' => 'e87f1efee51af1d8801dc2376068cee3', './export.php' => '7639b2373c4d0c73765033d70abfb55d', './data/BeanFactory.php' => '5148eb779611ca40e342900456fc6f29', - './data/SugarBean.php' => '19643e48de769ecb959fb1cf5ce94f4a', + './data/SugarBean.php' => '592c181708651b1b9faed97f9f41df68', './data/Link.php' => 'de95f31cf30c2f46a234c4a840c01f84', './data/Relationships/One2OneRelationship.php' => '88194998edcdad83a887aa1ef014d5de', './data/Relationships/EmailAddressRelationship.php' => '1a46e6504810e22a7854b64af2377fdf', @@ -3323,7 +3319,7 @@ $md5_string = array ( './service/core/SugarSoapService.php' => 'f4f422721d9e907b35251978d1607093', './service/core/SugarRestServiceImpl.php' => 'd1a216a0907104a536ac894155f42136', './service/core/WSDL.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', - './service/core/SugarWebServiceImpl.php' => '6b91e89c7addb670d6d4d92d73c9cba9', + './service/core/SugarWebServiceImpl.php' => '42fbf782692386c2e5dd17322d9c715b', './service/core/SoapHelperWebService.php' => 'ed7f64798d7220d6e97d984c256c211e', './service/core/SugarWebService.php' => '57d68047756a2241b46ddc7bbc7db539', './service/core/PHP5Soap.php' => 'bec53408906a366dd024abff4ef6d5f2', @@ -3343,12 +3339,12 @@ $md5_string = array ( './service/v3/soap.php' => 'd24efe4da4263ebf08872c5bfd9caa26', './service/v3/registry.php' => '05ac619953459b229719023a5de2f2eb', './service/v3/rest.php' => 'a0958deeacb950bb921ef16afdfd4393', - './service/v3/SugarWebServiceImplv3.php' => 'b7aae7d01c1b89c1d769eff3f0799d94', - './service/v3/SugarWebServiceUtilv3.php' => '7273ac117cbb6211b9e3b06823b3387c', - './service/v3_1/SugarWebServiceImplv3_1.php' => 'cc513f778f8de6847ba7d37976caeebe', + './service/v3/SugarWebServiceImplv3.php' => '1e5896f16f3a72070cccbb202c36fc77', + './service/v3/SugarWebServiceUtilv3.php' => 'a1a5712040f4c1e08103767b0f9bef78', + './service/v3_1/SugarWebServiceImplv3_1.php' => 'a73f5627fc7a6679409512c16f484b99', './service/v3_1/soap.php' => 'cca72b94407d160e626dd7fedde64e30', './service/v3_1/registry.php' => '1d87b03fc44c8f52798e51794b9d0bab', - './service/v3_1/SugarWebServiceUtilv3_1.php' => '978ee442125726b824c909c90e5fa665', + './service/v3_1/SugarWebServiceUtilv3_1.php' => 'e4c98eac147a06225e06b8c1b11db9d7', './service/v3_1/rest.php' => '7dc6d7f6cbb30a48e778d1f834a462c8', './service/v4_1/soap.php' => '7c63568c21b0ee71eb6aac6b5adebc5d', './service/v4_1/registry.php' => 'd26ac7142d9c2b8491754f2d01711088', @@ -3363,7 +3359,7 @@ $md5_string = array ( './service/v4/registry.php' => 'eb5f47fb4e4a536aad58984a433b41d5', './service/v4/rest.php' => '0721bd365d3151c72db6f95ce4b7e186', './service/v4/SugarWebServiceImplv4.php' => 'ed700353ab607dd4ef970892b4b70971', - './service/v4/SugarWebServiceUtilv4.php' => 'e0c1a0e4d61fd6c97cf68f4c90cd6d8b', + './service/v4/SugarWebServiceUtilv4.php' => 'ad12ac38cba925d6cf5df39f90b85da3', './custom/index.html' => '601a18f179c2ac55779c9bac46942525', './modules/EmailTemplates/EmailTemplate.js' => 'c8ab748acfbda3ad0c5d8f6aa17f267b', './modules/EmailTemplates/EmailTemplate.php' => '34875a194aa7527c4582fe80825ece80', @@ -3470,7 +3466,7 @@ $md5_string = array ( './modules/Audit/Popup_picker.php' => '369ed37e8871947cae810838e9ad3f8d', './modules/Audit/language/en_us.lang.php' => '4b250a9c07b0f30383cceabdbda25a8f', './modules/iCals/Server.php' => '46efc1e6f756b139c8281d55829f34f9', - './modules/iCals/HTTP_WebDAV_Server_iCal.php' => '5abdfad554cfb5a782f6e9f9b0ae9580', + './modules/iCals/HTTP_WebDAV_Server_iCal.php' => '203944d373f7db4f6dae06a8d7b9a7b8', './modules/iCals/iCal.php' => '7efd624a7b70a2395abe2a0830207705', './modules/OAuthKeys/vardefs.php' => 'a22b30275d60d0796af0edc2a540fd25', './modules/OAuthKeys/controller.php' => 'b5bbc3b2221d9dc948d743bd02c50b2f', @@ -3514,10 +3510,10 @@ $md5_string = array ( './modules/Documents/GetLatestRevision.php' => '4810e123a8d2793523ba6010bcf3a55f', './modules/Documents/tpls/view.extdoc.tpl' => '1ca19fa9546ede05285d2f84a7dad8b1', './modules/Documents/Menu.php' => '380b1812ad68a9b70f6940ee3ffb3590', - './modules/Documents/vardefs.php' => 'f6e24627374f2b0359f89ba9e62875be', + './modules/Documents/vardefs.php' => 'edb22d290ba04bc258b73d3bd55bb851', './modules/Documents/DocumentExternalApiDropDown.php' => 'd4a205ecc9c70686ba90822eede2e54a', './modules/Documents/views/view.edit.php' => '51ffc2415e3a6d4f3f3fd8f310451256', - './modules/Documents/views/view.extdoc.php' => '4952ce7d1ad95f8544ab63eba854eec0', + './modules/Documents/views/view.extdoc.php' => '4d33d781f6d270468dd78db3713d69c1', './modules/Documents/views/view.detail.php' => '63d25e2a9517c0fed495feeae6b8ed79', './modules/Documents/field_arrays.php' => '5d1668261acf5205c872f326b9218957', './modules/Documents/Document.php' => '915b7e09df384de87137c85c50e0c9b8', @@ -3549,12 +3545,12 @@ $md5_string = array ( './modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php' => '5f5e0cbb4e4f7781176cfd2338267580', './modules/DynamicFields/templates/Fields/TemplateAddressCountry.php' => 'b6c42b51c77c9c260677a0c9a3990c5b', './modules/DynamicFields/templates/Fields/TemplateHTML.php' => '54a7b54e35652a082428b4680b93cc95', - './modules/DynamicFields/templates/Fields/TemplateInt.php' => '9d02b6819753b1ccf617eb4c5c70ec8b', + './modules/DynamicFields/templates/Fields/TemplateInt.php' => '18de82c9b82115eaa406b8fcc17c5907', './modules/DynamicFields/templates/Fields/TemplateIFrame.php' => 'e7b366897709c12396ac423cdf77b9dc', './modules/DynamicFields/templates/Fields/TemplateEncrypt.php' => '28db5af0d64cff070439a52b22588f50', './modules/DynamicFields/templates/Fields/TemplateBoolean.php' => 'a64de32021cb733c65fe52e7d886516a', './modules/DynamicFields/templates/Fields/TemplateEnum.php' => '2976012ad9cf5fbd7154daea7a8a7372', - './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => '6b6fd13d8722275aa42ed9bf2b76f9e2', + './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => '77e2ed88920fb69e11cd34c44d00496c', './modules/DynamicFields/templates/Fields/TemplateTextArea.php' => '306e84550b9500fe3e50aecdba70e7fb', './modules/DynamicFields/templates/Fields/TemplateEmail.php' => '0c5f1a9f9e72bcc3eab2fecd0bea40e3', './modules/DynamicFields/templates/Fields/TemplateCurrencyId.php' => 'cd40d536288a69de9eaa792a35369c7d', @@ -3606,14 +3602,14 @@ $md5_string = array ( './modules/DynamicFields/templates/Fields/TemplateRadioEnum.php' => 'fd593ace4380d03f814902ef3c72acc0', './modules/DynamicFields/templates/Fields/TemplateURL.php' => '42ad0725334368ae17b70d6bb77be92e', './modules/DynamicFields/templates/Fields/TemplateId.php' => '1e60856dfe5c3b955d0ffb04337b7b8f', - './modules/DynamicFields/templates/Fields/TemplateField.php' => 'a86c6031fbd920a9e93accce1cd12411', + './modules/DynamicFields/templates/Fields/TemplateField.php' => '55bfefab3b0fed1d44bc4d33cf911b9d', './modules/DynamicFields/templates/Fields/TemplateCurrency.php' => 'ea510b1868f5dc211521653c976f4b1e', './modules/DynamicFields/templates/Files/EditView.php' => '8f438261aedc77e16c79c1cae4d3a9ac', './modules/DynamicFields/templates/Files/DetailView.php' => '6761c1d44ae1c7931778addfec404c4e', './modules/DynamicFields/language/en_us.lang.php' => 'ff24deef2abe9d43722d09b861acde84', './modules/DynamicFields/FieldsMetaData.php' => 'fdea25798cde860a9ca26514798745c0', './modules/DynamicFields/FieldViewer.php' => '650bf8da3b81dc6c02b485ffae257eb5', - './modules/DynamicFields/UpgradeFields.php' => '94256fcc419774c426bed4e16d0b0992', + './modules/DynamicFields/UpgradeFields.php' => '5c4e4b0bf89257042b575e310e7b0190', './modules/Charts/DynamicAction.php' => '92cb8f5f38f39e2f0941e540538a7f1c', './modules/Charts/PredefinedChart.php' => 'c6e0e66e219b06d5cec5a660689f54ad', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageConfigure.tpl' => 'c934826b8c835eb5872c50ea73f0a860', @@ -3655,7 +3651,7 @@ $md5_string = array ( './modules/Charts/code/Chart_my_pipeline_by_sales_stage.php' => 'b113bc62d9939b9c88de397e0dbf4281', './modules/Charts/code/Chart_pipeline_by_sales_stage.php' => '1206aa03a657c8742077b049c6cffec9', './modules/Charts/code/Chart_pipeline_by_lead_source.php' => 'ba05404a1f840ff230b153b35b912c23', - './modules/Calendar/Cal.js' => '08fc0b75cdcd21404730b44e2f807421', + './modules/Calendar/Cal.js' => '764c28f5a68500062329e44519ad8e1a', './modules/Calendar/CalendarGrid.php' => '5d18df889c49932ea8b36f5bea07e62e', './modules/Calendar/Cal.css' => '386d40836c98a4c8de44da1f169e593f', './modules/Calendar/tpls/footer.tpl' => '8587ef6903693da23a0ad7d27755c553', @@ -3801,7 +3797,7 @@ $md5_string = array ( './modules/Emails/javascript/init.js' => 'b48256570c9c73556b36248fd7b45d8b', './modules/Emails/javascript/displayOneEmailTemplate.js' => '4efbf9ed736dffca56a40d16456adf58', './modules/Emails/javascript/ajax.js' => '8f5fe6bceb18a5f88c98dea09eacffcd', - './modules/Emails/javascript/EmailUICompose.js' => '70b4108c9e5591a5c6132f36228cb5d9', + './modules/Emails/javascript/EmailUICompose.js' => 'a4b38e26f0fd9bd8e70d8d4e2df26241', './modules/Emails/javascript/EmailUI.js' => '8a62cd712eb4f7c5fac2713f00a160d6', './modules/Emails/javascript/grid.js' => '3f466dcfd19ed70d90ff386eb40ff28d', './modules/Emails/javascript/viewPrintable.js' => '1e5ed81de106298be2e5c11f955c6a09', @@ -3821,7 +3817,7 @@ $md5_string = array ( './modules/Emails/PessimisticLock.php' => 'eec9f812607afdf9681c668939cf1794', './modules/Emails/language/en_us.lang.php' => '694b3c5daffb0a1d311a6c12efdbb0b8', './modules/Emails/ListViewMyInbox.html' => '80a65ca00efffeda3eed9767b4dc5164', - './modules/Emails/Email.php' => 'f0fadd2a69b36cff199f97101168b772', + './modules/Emails/Email.php' => '579338214fa6d4afef15ab81dd57268f', './modules/Emails/subpanels/ForQueues.php' => '627f6382bc5961151c8ff23c44e3dae7', './modules/Emails/subpanels/ForHistory.php' => '7b08fa447e4f5623997e1b9fa1016389', './modules/Emails/subpanels/ForContacts.php' => '1e6eec75a19bfe36e1fbb9a47fa56d76', @@ -3860,12 +3856,12 @@ $md5_string = array ( './modules/Schedulers/Menu.php' => 'ec8fe31293309109bc89184d9e59d4d1', './modules/Schedulers/vardefs.php' => '8e502b914fdbb030d4bac26392a2bd85', './modules/Schedulers/views/view.list.php' => 'd887dcc7a7415af59f54352e2d25e667', - './modules/Schedulers/views/view.edit.php' => '70dd21560f94f19e3d415acc7e7d2c40', + './modules/Schedulers/views/view.edit.php' => 'fe327412000aa29aaf82c0aef11eb7e3', './modules/Schedulers/views/view.detail.php' => '7f6141c765ac02024be3e9adf8125d29', './modules/Schedulers/EditView.php' => '17e7ea9a33c92765aafd7504f80d0e3e', './modules/Schedulers/field_arrays.php' => 'cc96b2df3fc8573b600f1595c1572a5b', './modules/Schedulers/SchedulerDaemon.php' => 'f750c573f651acf60b319275b980b803', - './modules/Schedulers/Scheduler.php' => '5d37648db5f6b3a934e510ffadc8ddc2', + './modules/Schedulers/Scheduler.php' => '5c5abe671fbfc3a86e49093cc5e9b0bb', './modules/Schedulers/metadata/searchdefs.php' => 'a75affb2a436476c4b544f41ef5e5f3f', './modules/Schedulers/metadata/subpaneldefs.php' => '0c954d9ff9fa9cfeb0ee98437d49b9a0', './modules/Schedulers/metadata/editviewdefs.php' => '4f01fea0e76c37ca96e557ec57876898', @@ -3905,7 +3901,7 @@ $md5_string = array ( './modules/EAPM/metadata/listviewdefs.php' => 'eb47130b8d3968a59fa85c3ac46ef33c', './modules/EAPM/metadata/detailviewdefs.php' => 'a50be5be8c7d2b28d89636ce28d059e3', './modules/EAPM/action_view_map.php' => 'eacbc68a782c95abe515ea1dd653b4f7', - './modules/EAPM/language/en_us.lang.php' => 'f573b62d145e3c8ae2f8492894cfad37', + './modules/EAPM/language/en_us.lang.php' => 'a67e679bbb57eca78ddab39c8c0c175b', './modules/EAPM/CheckLogins.php' => 'bef441c4cc5a8ba9f564a46308673155', './modules/InboundEmail/InboundEmail.js' => '6426fe35d2261f05c941d334d17618db', './modules/InboundEmail/EditGroupFolder.php' => '0567428bfcddf16d2ef3654d8c965df2', @@ -3915,7 +3911,7 @@ $md5_string = array ( './modules/InboundEmail/vardefs.php' => '9165aa71623a179d41cf5d9b85145ff1', './modules/InboundEmail/View.html' => 'bc8a276ffbe71fa4763a040ae6c5daad', './modules/InboundEmail/DetailView.html' => 'dd0bafd353b564debffaeb59f98f512f', - './modules/InboundEmail/EditView.php' => 'c6921bb98de78481ba55b4164d5255ba', + './modules/InboundEmail/EditView.php' => '454b00d1a55c0d8f576477e4dfbbd7a3', './modules/InboundEmail/ListView.php' => '69f5836cee3be0e4afcd740d795ca44e', './modules/InboundEmail/field_arrays.php' => '80b0dde460bc6d96c9d2d9af9d73aaff', './modules/InboundEmail/DetailView.php' => 'a171268c4c9e85ac2fc62efce30deeb7', @@ -3927,7 +3923,7 @@ $md5_string = array ( './modules/InboundEmail/language/en_us.lang.php' => 'ae833e99a3be579da67788c144af7ee2', './modules/InboundEmail/InboundEmailTest.php' => '04ac2888e0372a0315d4086ec2e765f5', './modules/InboundEmail/SaveGroupFolder.php' => '59a7d467ab0166f09f5b0e746898fecb', - './modules/InboundEmail/EditView.html' => 'b6bd18a951e87e1867709dd48b1be198', + './modules/InboundEmail/EditView.html' => 'e7fd626dae6447d96c7c21284235be31', './modules/ModuleBuilder/tpls/layoutView.tpl' => '20e973581c87254cb0ff8535722eab38', './modules/ModuleBuilder/tpls/tabBG.png' => '8e2561b0bba66f327d602e6c5f06aa08', './modules/ModuleBuilder/tpls/LayoutEditor.css' => 'd05c482d3367fb032f5314210df2ffee', @@ -3972,7 +3968,7 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/RelationshipFactory.php' => 'fbea97175032b7b4c661fedcf5c270e2', './modules/ModuleBuilder/parsers/relationships/ManyToManyRelationship.php' => '62656c236d3e96dda5960a5afd78bb9c', './modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' => 'ab2a7e3f86bd46511a844eade9ae0f39', - './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => 'd3ea4e88767b1c80daf672373c341524', + './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '6206157bf579ba3b86d32e648304f0ec', './modules/ModuleBuilder/parsers/relationships/RelationshipsInterface.php' => 'f75349afd3df2d632e9426f039a8665a', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => '3f9fe1c68eac3e2ddeebd1acf059e172', './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => '9403baf40f9b35578af9b68666662349', @@ -3980,13 +3976,13 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/ManyToOneRelationship.php' => '93c1301e823145f8d7dac99d8ddd75d3', './modules/ModuleBuilder/parsers/relationships/OneToManyRelationship.php' => '76761d4122cd790065a59f92bd64bc96', './modules/ModuleBuilder/parsers/views/UndeployedMetaDataImplementation.php' => 'd08c83158fc599313de72722cc8d9ea9', - './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => '9bf70fa555014fd415478b66ee2de930', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '077c65a76467be03f17fd0c677b090fa', + './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => '12b6c0a73b0aea4059a619584fa67306', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '2efb03cf422cd0a32eb33ca08d82494f', './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => '983372e3529c23ff91237434f7c3e9bb', './modules/ModuleBuilder/parsers/views/MetaDataImplementationInterface.php' => '96a4fcfa2ee73ff09cb2d868c3ac686f', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => '5135692589012551cd63d5efd43419e1', './modules/ModuleBuilder/parsers/views/History.php' => 'a564c9e3b8c97298cca20e70ddda1060', - './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => '42220536052241844c59285762872d6c', + './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => 'a75a0935b31347144719638081b3d8f7', './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'bb5f5c2be17774499559cb56b272b00c', './modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' => 'f492a0646a1f9bd8bbee809fd1b0c78a', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'e36cbef6bc14174d015f17f1fd0578d8', @@ -4012,7 +4008,7 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.modulefield.php' => '0ddd7c1412185c73d3aa2428d7ca8ecb', './modules/ModuleBuilder/views/view.relationship.php' => '59e94a5659c958248c3b6353e19ad4d0', './modules/ModuleBuilder/views/view.history.php' => '300fe8425bd9b4758ed01d7796c295c1', - './modules/ModuleBuilder/views/view.layoutview.php' => 'ee1bbc8abb49557a6a3a9d98cb808658', + './modules/ModuleBuilder/views/view.layoutview.php' => '109915eb59ccde9fc02f86a05cd98124', './modules/ModuleBuilder/views/view.displaydeploy.php' => 'a028806a1ece6afc4c08f75d5ba1ec9c', './modules/ModuleBuilder/views/view.displaydeployresult.php' => 'ad8f2e54fe51b48031a01418519945f8', './modules/ModuleBuilder/views/view.relationships.php' => '7358fdc5124faa2761a6d5dcdc6ba6b0', @@ -4053,12 +4049,12 @@ $md5_string = array ( './modules/ModuleBuilder/MB/MBModule.php' => 'db62117969740eb4bf8418c7caca92d6', './modules/ModuleBuilder/MB/AjaxCompose.php' => '0cf04c16ff5531e9b354a21bb56fb17c', './modules/ModuleBuilder/MB/MBPackageTree.php' => '479f8be396033c768a3b82780d8420a9', - './modules/ModuleBuilder/MB/MBPackage.php' => '8ac03a0316199829747b838aa595fab7', + './modules/ModuleBuilder/MB/MBPackage.php' => '7b0dc087a0aed5de9714440717fccee2', './modules/ModuleBuilder/MB/MBVardefs.php' => 'b20c90fac5d47104d918ec502b3781ae', './modules/ModuleBuilder/MB/MBLanguage.php' => '1d1a81b9394953038980af83a724792b', - './modules/ModuleBuilder/MB/ModuleBuilder.php' => 'ab6b03dfeb337023aba6a3f2ace024ef', + './modules/ModuleBuilder/MB/ModuleBuilder.php' => 'ea380cbffc685a656b46226437940b27', './modules/ModuleBuilder/MB/MBRelationship.php' => '387ceae2d9fbaeb0b6c5a04f59e869d5', - './modules/ModuleBuilder/language/en_us.lang.php' => '86c7fb502b7430ebe576e33893527ddb', + './modules/ModuleBuilder/language/en_us.lang.php' => '8df41e10426eb39f411ca44d19e93330', './modules/ModuleBuilder/Forms.php' => 'e0b1a511f6979cc7536df6a72dcf466d', './modules/BeanDictionary.php' => '233575feabf6c1890205aaeef299c689', './modules/ACL/Save.php' => '866f5017539a906c1df5010bc42e3829', @@ -4172,7 +4168,7 @@ $md5_string = array ( './modules/Opportunities/Save.php' => 'c09e98757bed656984ff81482a5a6b30', './modules/Opportunities/tpls/QuickCreate.tpl' => '731c98d4b49e7a608da03ce0819a2204', './modules/Opportunities/Menu.php' => 'b3d13418f68ba1eef892b965309e2b2a', - './modules/Opportunities/vardefs.php' => 'fa481edd038ced6eb222812d09f0d796', + './modules/Opportunities/vardefs.php' => '40d0c852f462dd24f9ca4a2649d165c4', './modules/Opportunities/views/view.edit.php' => '4b8faec19049c606fb827cf64c709d54', './modules/Opportunities/views/view.detail.php' => 'c35c409304d14f05cf500b129a4e31a9', './modules/Opportunities/OpportunityFormBase.php' => '576d892f4f2e117eb95ff3a09286730c', @@ -4270,19 +4266,19 @@ $md5_string = array ( './modules/Users/PasswordRequirementBox.js' => '5501145e15a9b907efc9df667462d52b', './modules/Users/User.js' => 'f608f699e43355dbebcf6bf26a460a4e', './modules/Users/UserEditView.js' => '829b9bd128f07eeb48181aaee9ca6576', - './modules/Users/UserViewHelper.php' => '7e56be60efbe5ac4facf17adfa95707d', + './modules/Users/UserViewHelper.php' => '6357222e0228e9f1ef2ebaa3e8ec207d', './modules/Users/Error.php' => 'e47d743efb522af6e4861396be53e8b6', './modules/Users/Save.php' => '51cbd4dede5b4547eb3075830664dbd5', - './modules/Users/tpls/DetailViewFooter.tpl' => '41360606a7be7665511d0a4edfb4924b', - './modules/Users/tpls/EditViewFooter.tpl' => 'd9e9670a7b2eaa592ea7f72897bf80b7', - './modules/Users/tpls/EditViewHeader.tpl' => 'a3db8cb89fe92f5d15ad18aee0587848', + './modules/Users/tpls/DetailViewFooter.tpl' => '2704ca14938eda68ca6837b07756cd7d', + './modules/Users/tpls/EditViewFooter.tpl' => 'b5eac46989fe419fc430a3e1ee10275f', + './modules/Users/tpls/EditViewHeader.tpl' => 'ee68b170624b9383c82f1e4563475155', './modules/Users/tpls/wizard.tpl' => 'f8f87728585eb6f754f0d5ec52d640ff', './modules/Users/tpls/QuickEditFooter.tpl' => 'ca1415ac61ae726339e359a43a25d97e', './modules/Users/tpls/DetailViewHeader.tpl' => '19474abc8c3237969d39112b812770ca', './modules/Users/tpls/EditViewGroup.tpl' => '216c9826dbe366a4658d1f45201a8ad4', './modules/Users/ChangePassword.php' => '2a6c396c3bb376eb1e0665d60f85ab5d', './modules/Users/Menu.php' => 'd57ecd83a83934875b98d855f9175a37', - './modules/Users/vardefs.php' => '9a67cfe3b21b9c56a6883ca3a0434e32', + './modules/Users/vardefs.php' => '6f4b4470377bfa60aa093caae82c8131', './modules/Users/PopupUsers.php' => '4014d4aec3ea2b4197dcddf8f0cb726d', './modules/Users/ListRoles.php' => '5aecfc211a0f4f9d08010a3f7ab4f334', './modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php' => 'd560e09d6f9611d7e27b33567adb2e51', @@ -4307,13 +4303,13 @@ $md5_string = array ( './modules/Users/login.css' => '7bd919080a241940a69df4cdf31247b3', './modules/Users/reassignUserRecords.php' => 'c056d5516a8173b4eba06c60c12ed496', './modules/Users/views/view.quickedit.php' => '5a458c0188281d6ef893bf9e066ad4c6', - './modules/Users/views/view.wizard.php' => '0ee43721692818879c9ccf06e102bf3b', + './modules/Users/views/view.wizard.php' => 'd2fa0fd69550ef7cc66a73feda7bc04d', './modules/Users/views/view.list.php' => '2da7405c724b558b493865af34b4523c', - './modules/Users/views/view.edit.php' => 'ec80bb2f2ee512e751e0c456c52d3c6d', + './modules/Users/views/view.edit.php' => '22f01225194b0cff754d7bf8098d7f07', './modules/Users/views/view.detail.php' => 'ea79f6d76e0b9ac1650a018fca3f857a', './modules/Users/controller.php' => 'ab707e79b219d0f9a9302b7549cf9d8e', './modules/Users/SaveSignature.php' => 'cc2276e326ce4a58a4fce9b147302c4f', - './modules/Users/User.php' => 'bff839e28f1a81ccbb04d2e86c2efc20', + './modules/Users/User.php' => '5ba0dc1bb9bbd39eb5125c73976ee3a5', './modules/Users/login.tpl' => 'ea831fdb2eaeac643665acb6cb947f33', './modules/Users/LoggedOut.tpl' => '56f709612a02e111d2411a771b11cd80', './modules/Users/SaveTimezone.php' => '3a27e5b03cbb1a9501401521dd2c1168', @@ -4349,7 +4345,7 @@ $md5_string = array ( './modules/Users/UserSignature.php' => '410eac350e431f5f5e88ca59a01ad7d3', './modules/Users/Popup_picker.html' => '44ecf49fcfd43110437ff32d25736fa1', './modules/Users/Changenewpassword.php' => 'a4c0bfaaf278973c844be58320b81e53', - './modules/Users/language/en_us.lang.php' => '358d4575a02576bd6931e1f2df59fb1e', + './modules/Users/language/en_us.lang.php' => '0bc4f624ce098fe46245e55eac42d668', './modules/Users/Logout.php' => '4d8773fffd6b85b1f39a61e05faf472f', './modules/Users/Popup_Users_picker.html' => '72ca55f89e936ccf6c8b1f252ee54236', './modules/Users/Changenewpassword.tpl' => '8d01c6786232a13cb1ced470885ca4b5', @@ -4422,7 +4418,7 @@ $md5_string = array ( './modules/Studio/wizards/RenameModules.tpl' => '1a29a8a12ec9afc5abdc0074a088596f', './modules/Studio/wizards/StudioWizard.php' => '23195644bedf65eaa92e0a376eb18b5b', './modules/Studio/wizards/EditDropDownWizard.php' => 'a3da04814708fd946b3890096aab6c2d', - './modules/Studio/wizards/RenameModules.php' => 'ad8e51b3eca1bacf73378135c11722ca', + './modules/Studio/wizards/RenameModules.php' => '7aec243e72395bd3d2153f547acebb3e', './modules/Studio/Forms.php' => '146fc487f71a06a03041ead8a0bc41c0', './modules/UpgradeWizard/upgradeWizard.js' => 'a025fad4c0f65eb5c893cef6d1e107cf', './modules/UpgradeWizard/deleteCache.php' => 'df77658b8c5c1c86badb998120ab73e5', @@ -4446,7 +4442,7 @@ $md5_string = array ( './modules/UpgradeWizard/processing.gif' => 'd7c43fc19181ee59862601bfce100b41', './modules/UpgradeWizard/systemCheckJson.php' => '1b3ca3638039d16eab4dc010373effcd', './modules/UpgradeWizard/end.php' => '156a8eec0106685ba60de86190381f0b', - './modules/UpgradeWizard/uw_utils.php' => '9837434d4d6640181bbc0908b18d8abc', + './modules/UpgradeWizard/uw_utils.php' => '30fc0f5f974afea027b84d86b7da3310', './modules/UpgradeWizard/preflightJson.php' => 'f9430751b95094f6d831f98fbaed9d80', './modules/UpgradeWizard/upgradeTimeCounter.php' => '13650e724da4e4fe127bae4a8073565c', './modules/UpgradeWizard/uw_files.php' => 'a874d9aca1246f5125cb8007e9a9364a', @@ -4477,16 +4473,16 @@ $md5_string = array ( './modules/UserPreferences/controller.php' => '3a24db343c36883966b82102ab15a5ba', './modules/UserPreferences/field_arrays.php' => 'f2e3b2179e594e95d7e5d3fb2786323c', './modules/UserPreferences/index.php' => '903eebcc2f8a7d04d245821c5f13121f', - './modules/UserPreferences/UserPreference.php' => '17db32c275129ffaf0253f1e72d79ab7', + './modules/UserPreferences/UserPreference.php' => '3445d8d3dee076a46facefe75647f5b6', './modules/Calls/CallHelper.php' => 'b351db4a49e4b47b518a04e4b20c504f', './modules/Calls/Save.php' => '89bcb06dff3026f3627692ee1616d86a', './modules/Calls/tpls/footer.tpl' => '7c4a89f076f85e253dcfa064d1a86ae3', './modules/Calls/tpls/QuickCreate.tpl' => '83609a9e601a5599dc3f3d2674665941', './modules/Calls/tpls/detailHeader.tpl' => '80c5550af52dc424831101182a9a0dce', './modules/Calls/Menu.php' => '858bb3073b45d382034626a6ae3e13dd', - './modules/Calls/vardefs.php' => 'ac2980875114f34a8d087846144549cc', + './modules/Calls/vardefs.php' => 'be5564766ac098579f75769feb16a236', './modules/Calls/CallsQuickCreate.php' => '1d0f9551f8a18c310d5c37f80a7ee82a', - './modules/Calls/CallFormBase.php' => '5d05ab5c814c2b716ca3b7ee015f17a0', + './modules/Calls/CallFormBase.php' => '9641734f0901841f24960fc3f5846303', './modules/Calls/views/view.list.php' => '5b950a91d105b087fdf4a2972f082e54', './modules/Calls/views/view.edit.php' => '8c94e4b5f35e895b73cf1236abb252fb', './modules/Calls/Call.php' => '730aa76c67ae97883a61557b1c607cae', @@ -4495,7 +4491,7 @@ $md5_string = array ( './modules/Calls/metadata/searchdefs.php' => '892464b109427176fc0dc9ca870ae1e4', './modules/Calls/metadata/subpaneldefs.php' => '74cfe6de17819f40cc6aca39a688a4bd', './modules/Calls/metadata/quickcreatedefs.php' => 'b9a18b440a38cffd04461985c688cbbd', - './modules/Calls/metadata/editviewdefs.php' => '716496f9957a632976fa583a0d075196', + './modules/Calls/metadata/editviewdefs.php' => '43826b2f9b118c4a86da2dc33b9978a3', './modules/Calls/metadata/SearchFields.php' => '478819054d7ea0c931e4601ccbfd62b4', './modules/Calls/metadata/subpanels/ForHistory.php' => 'f645f3a7148de0c2ad69f2c8c9797784', './modules/Calls/metadata/subpanels/ForActivities.php' => '9c8bae8ce3153c87403ea4b9c3ee0d19', @@ -4507,7 +4503,7 @@ $md5_string = array ( './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => 'bbb096633528bb22b112d6e3dc78d9d1', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php' => '81158ed6fa50d810929b4ff429657161', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '6bf0c16b793ffcadcf14333530dafe83', - './modules/Calls/language/en_us.lang.php' => '7fb36747cd1457db91de6f2f10f04a5f', + './modules/Calls/language/en_us.lang.php' => '191b9e3d6488873d207ab9e5b62d7b99', './modules/Calls/SubPanelViewInvitees.html' => '4e7eeaa3d0ea3807ce8632669df1e176', './modules/ACLActions/ACLAction.php' => '46bd8be93b5b7dc499a1e6da89e3e4e9', './modules/ACLActions/Menu.php' => '8e2a919d4a5ef7be81da1d595c040756', @@ -4549,7 +4545,7 @@ $md5_string = array ( './modules/Connectors/connectors/sources/ext/rest/linkedin/language/en_us.lang.php' => '96a61d905c5f567917ff0a2ddc540185', './modules/Connectors/connectors/sources/ext/rest/insideview/config.php' => 'c92b8816212c0ef5203a9c19676fb193', './modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php' => '9ea893764bea3c7ef9007e9c523a41cc', - './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => 'f78e9df36a38ce2393c31c9f827e1f68', + './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => '6fb1a8d4171a47561ca474f7fcc164a4', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview.png' => 'b94d9483f486e0f53b3d98c6d04bd9f6', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_collapsed.png' => 'dc728b8cb2023847a28eb54a06c4d78e', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_expanded.png' => 'db7e5e84b7891adaed90dfd211338959', @@ -4711,7 +4707,7 @@ $md5_string = array ( './modules/Campaigns/WebToLeadCreation.html' => '05e6a884007096050f3b3c9d23b4adcc', './modules/Campaigns/Popup_picker.php' => '1dc35486da8c1bfdbd81d571c53b0eae', './modules/Campaigns/language/en_us.lang.php' => 'd6862113c333f321ddcea53237cb1893', - './modules/Campaigns/ProcessBouncedEmails.php' => 'fc27f459dea7f56c4119ee284e2850dd', + './modules/Campaigns/ProcessBouncedEmails.php' => '47faaf463873a2c7815e146adb20aafb', './modules/Campaigns/MailMerge.php' => '70fee5f3d6433de51b52cde759428168', './modules/Campaigns/TrackDetailView.tpl' => '9f8c6b5b42475e01c700631791c80219', './modules/Campaigns/ProspectLink.php' => 'f3003adb8efc2c7809f7e0383ee9ebf9', @@ -4778,13 +4774,13 @@ $md5_string = array ( './modules/Trackers/store/DatabaseStore.php' => 'b1d4b896857730070bbaab624ad763f3', './modules/vCals/Server.php' => '283e007951f8f6b95ec97e9a3b1cb034', './modules/vCals/vardefs.php' => '6da81e3f0d0c44fa2a0110c8be208e17', - './modules/vCals/HTTP_WebDAV_Server_vCal.php' => '5a6b18b368756d72906cb30a6a8c5bbe', + './modules/vCals/HTTP_WebDAV_Server_vCal.php' => 'ab4c2c4ccdf95839e21383918eb4ac73', './modules/vCals/field_arrays.php' => 'edf597f757a7476101f8c0a6f9ae7bd5', - './modules/vCals/vCal.php' => 'fa6be09ed4e177d569a1427d64862f7a', + './modules/vCals/vCal.php' => '83527b251132ba4a8971e65a96cdccc2', './modules/Bugs/Bug.php' => '4d81ce0448c970a0f04287e359dd02ed', './modules/Bugs/tpls/QuickCreate.tpl' => '8cb257fc67aa10e35b93927896fcc61f', './modules/Bugs/Menu.php' => '08b918b895b6e4e30507e6329482da6e', - './modules/Bugs/vardefs.php' => 'f5ea3eb73c1778791525d349a803d06f', + './modules/Bugs/vardefs.php' => '2d69e0dd205aa215c0d04ace3fa309f7', './modules/Bugs/views/view.edit.php' => 'ad81ea5a1895c1dcf2fd4f92194637b5', './modules/Bugs/views/view.detail.php' => 'f97331e3c895ef164cc11826525e3945', './modules/Bugs/field_arrays.php' => '0470b4d1d01a61f4f60ce326aabd589e', @@ -4918,7 +4914,7 @@ $md5_string = array ( './modules/Import/views/view.step2.php' => '0d92e6b7b74f46b33ad4764cc10bbb4a', './modules/Import/views/ImportListView.php' => '8a86c159a94446b315785c4ca0f8fa25', './modules/Import/views/view.step4.php' => '2759ba63cac39f2d75fa521bbc9c2b3d', - './modules/Import/views/view.last.php' => '7de2a0605e5f6dc2989f0b7ee75a98c5', + './modules/Import/views/view.last.php' => '7526c2816673754cd8bed41d464c2368', './modules/Import/views/ImportView.php' => '2f5f4cdad18fe3d61da136238dc07fd0', './modules/Import/views/view.undo.php' => '445e58df91429d47e2e34192ea4f7892', './modules/Import/views/view.step1.php' => '7a6f866ef1917412702b560b613d2a9c', @@ -4943,7 +4939,7 @@ $md5_string = array ( './modules/Import/Forms.php' => '314917d04d7839e651e26df955d76242', './modules/Import/UsersLastImport.php' => '6e8e429b3eb290ef163e4ca5df88acf0', './modules/DocumentRevisions/Menu.php' => '9054429dd38912ae01e43cb3dc8bcab5', - './modules/DocumentRevisions/vardefs.php' => '8c30033ea2313f6826012a0e036125af', + './modules/DocumentRevisions/vardefs.php' => '41b6fa31845dd9b710a290d1b78cf934', './modules/DocumentRevisions/field_arrays.php' => 'a4549f63cc8eda02062d788119c43bc3', './modules/DocumentRevisions/DocumentRevision.php' => 'e9dbc304fd09bb3c70d975e2ef176447', './modules/DocumentRevisions/metadata/editviewdefs.php' => '2a64c25167c1ac91b20ba1b9f12febeb', @@ -4987,7 +4983,7 @@ $md5_string = array ( './modules/Project/language/en_us.lang.php' => 'c62a8abfa09841a60c54f90e6c9d4e6a', './modules/Project/SubPanelView.html' => 'a8cfd450c5a10dac0f401a57c430a519', './modules/Project/ProjectQuickCreate.php' => '0b45e5508713bd8397d38194ed2743ae', - './modules/Meetings/jsclass_scheduler.js' => 'b1364e950a651985cf5523353211bfde', + './modules/Meetings/jsclass_scheduler.js' => 'b22f203a83ddee9499d28e3be3b53bde', './modules/Meetings/duration_dependency.js' => '68137bd02d0b9cff86e857ffe2d758a8', './modules/Meetings/Save.php' => '82a55c7692d587e20236135aca956f43', './modules/Meetings/tpls/footer.tpl' => 'e0a83373e481789efd51511c01acd3e6', @@ -4996,12 +4992,12 @@ $md5_string = array ( './modules/Meetings/tpls/extMeetingNotInvited.tpl' => '4cd1dd9a2f232673e7828455bb0df98e', './modules/Meetings/tpls/extMeetingNoStart.tpl' => '4f0e0734534e99f878aa68196f46678f', './modules/Meetings/tpls/detailHeader.tpl' => '80c5550af52dc424831101182a9a0dce', - './modules/Meetings/tpls/reminders.tpl' => '394f1ff57bdfef5047e57e3e7807631b', + './modules/Meetings/tpls/reminders.tpl' => '5848a89a0337c9b681979a8776441d7c', './modules/Meetings/Menu.php' => '63348eb6a3845e5d48389fe80ed6bfff', - './modules/Meetings/vardefs.php' => '36101b541ce81f67bb17078a3bc17063', + './modules/Meetings/vardefs.php' => 'd0058766c72a3d3bc8f69fcf5236aaab', './modules/Meetings/JoinExternalMeeting.php' => 'b71a1a110ff5483fc45d49859d1a5ed4', './modules/Meetings/Meeting.php' => '74f83a963ce41c971ffe9ac9c02c9528', - './modules/Meetings/views/view.listbytype.php' => '61e0b1d6c77c420c061cc4edccc30b8e', + './modules/Meetings/views/view.listbytype.php' => '3ebd214c8727254c33c32619615a8eb4', './modules/Meetings/views/view.list.php' => 'ba747ebcc7fff9f6036e532056d12fb8', './modules/Meetings/views/view.edit.php' => '12b46ccee3f27ce1dfc45187db422e59', './modules/Meetings/field_arrays.php' => '86f22811951f74445e12f0ecc4883021', @@ -5009,7 +5005,7 @@ $md5_string = array ( './modules/Meetings/metadata/searchdefs.php' => '1812616f0e6dc434312700ebdcf5fe51', './modules/Meetings/metadata/subpaneldefs.php' => '9fcb40ed13d8cffc9cc054e0908726b1', './modules/Meetings/metadata/quickcreatedefs.php' => 'd32ee617268e3c5aa6e97e9e796d81f3', - './modules/Meetings/metadata/editviewdefs.php' => '72c96ea4f33ace58cf879e7ad660723e', + './modules/Meetings/metadata/editviewdefs.php' => '266280a6fc7cecbf8bd70c78dc0ac420', './modules/Meetings/metadata/SearchFields.php' => '06b45aadf77c191d52f16b79c912f896', './modules/Meetings/metadata/subpanels/ForHistory.php' => '28f07ed10e8d45bca8121a9bd1f76fba', './modules/Meetings/metadata/subpanels/ForActivities.php' => '06fbdaca02a664e63b06dd5cef35ca0a', @@ -5023,9 +5019,9 @@ $md5_string = array ( './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => '1f17c035ab5229249ccb4dbbb51a1d39', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '4a6c86deb8c094a5eee079604ea3af3b', './modules/Meetings/MeetingsQuickCreate.php' => '5e67b447ae39ad80afe5588a4a293388', - './modules/Meetings/language/en_us.lang.php' => '5fdc57290ad2a3267928821da294b0dc', + './modules/Meetings/language/en_us.lang.php' => '12c53ba42da07a141e3d0f214459b6b0', './modules/Meetings/SubPanelViewInvitees.html' => '7f9d1da5e8384457cadabf14412a88a5', - './modules/Meetings/MeetingFormBase.php' => '125d67b87d70e61e2e074c9279bb4090', + './modules/Meetings/MeetingFormBase.php' => '1e71c4b3b44293526272618eb16c8d41', './modules/Administration/RepairIndex.php' => '31d55e4ce8069277191685e503ade848', './modules/Administration/RepairActivities.php' => '51359b6e6594e7587fdfd3ef50ebb944', './modules/Administration/RepairSeedUsers.php' => '835c36a2118b92fb8c1bcdad8f49baae', @@ -5050,7 +5046,7 @@ $md5_string = array ( './modules/Administration/ExportCustomFieldStructure.php' => 'ee31a1faf8364f2164b6b0dd3561c920', './modules/Administration/RebuildConfig.php' => '39fe5857d01ec5a38c41f25deba490e3', './modules/Administration/expandDatabase.php' => 'e8a4f5cbf41fd945eb7cfd1304ffcaed', - './modules/Administration/UpgradeWizard_commit.php' => '79ad4c6de14e1d3c8fe3cd28088d6d1a', + './modules/Administration/UpgradeWizard_commit.php' => '84fc99295c64ac9748a1ff33a6cae144', './modules/Administration/RebuildSchedulers.php' => '8a019b515ec6b861b5d8389d8db6cbc4', './modules/Administration/RebuildJSLang.php' => 'c805d230536a0a2588b2f354bebca2f7', './modules/Administration/Administration.php' => '573341a9042e3eeacd70e1ac2f7541a5', @@ -5062,9 +5058,9 @@ $md5_string = array ( './modules/Administration/views/view.languages.php' => 'eca8a961cbf9e45bb21127ee1db25768', './modules/Administration/views/view.repair.php' => '187ce3268bf6576687701d2dbe42dd57', './modules/Administration/views/view.backups.php' => '23ad77a7ac7d106221079c6d20b43ed6', - './modules/Administration/controller.php' => 'e83cadf5313419dd7662b951e1bb2bac', + './modules/Administration/controller.php' => '4a91ca7e2626e56a3424630c820fc123', './modules/Administration/Async.php' => '3a6cc7676af1b2c884eb7113cc8fd178', - './modules/Administration/SupportPortal.php' => '0bd583e18376f7ec8f0a2f57b8b0d104', + './modules/Administration/SupportPortal.php' => '841eb95688d84913efb4ed2ad43b7d9e', './modules/Administration/RebuildAudit.php' => '9fbc7f3a2e53c19c9baf32a0bd0b85c4', './modules/Administration/Updater.html' => 'c26f212c3692529cbb0c81c20ffa5415', './modules/Administration/Diagnostic.tpl' => 'dd85b66e84e47c05f1da3cd8ccefaec3', @@ -5077,7 +5073,7 @@ $md5_string = array ( './modules/Administration/templates/Languages.tpl' => '0c578621730bbdb5117f05859a4da1a6', './modules/Administration/templates/ConfigureAjaxUI.tpl' => 'ebcf209c34092fabe26cef1b04e74721', './modules/Administration/templates/ShortcutBar.tpl' => '34b17e29780b6aae7fbeb22286f7c6ee', - './modules/Administration/templates/GlobalSearchSettings.tpl' => '3a0b6fbdaff00cef847c83818b974aad', + './modules/Administration/templates/GlobalSearchSettings.tpl' => 'a0bdd0162b9af1a20956e0a8409e6139', './modules/Administration/templates/ConfigureTabs.tpl' => '2ad084fdd0fa9ce1625f4f45f380327f', './modules/Administration/templates/RepairDatabase.tpl' => '1818950fcb51f4f185446f463bc79eda', './modules/Administration/templates/themeSettings.tpl' => '76b185bc1ae63c22dcdda3d1ec9999e5', @@ -5088,12 +5084,12 @@ $md5_string = array ( './modules/Administration/updateTimezonePrefs.php' => '46aea97ac223ee9e40328b39696164b3', './modules/Administration/updater_utils.php' => 'ca5c63f9b7d4590abfed013b6f3ec89f', './modules/Administration/DiagnosticDownload.php' => '5a09f54e964d71d49211bde5cb49a449', - './modules/Administration/DisplayWarnings.php' => '3b14925531f2d1011ecc1ce03478314f', + './modules/Administration/DisplayWarnings.php' => 'a213dc06752ed24dd25310f1c492b5ef', './modules/Administration/RepairJSFile.php' => 'f8cf5338d5659ea27a2662d44150b7fd', './modules/Administration/metadata/adminpaneldefs.php' => '46ef34966f9ac3a0340edbafe667c1a4', './modules/Administration/metadata/SearchFields.php' => '787123be8e7e907e9754da7bf36ead0a', './modules/Administration/clear_chart_cache.php' => 'a4be1a29a9f98f1f86215c6540c0b712', - './modules/Administration/action_view_map.php' => 'e70c869d8157de4584b4da0aec2117e4', + './modules/Administration/action_view_map.php' => '9100b9a5200f0254a4ec3a55c989bfa7', './modules/Administration/javascript/Async.js' => '0c06f8cf06b199ab709c736af28550be', './modules/Administration/javascript/Administration.js' => '1c95e215282e9eb015b1571a5bf64457', './modules/Administration/RebuildFulltextIndices.php' => '29f65499b800240030127b243afc4cf1', @@ -5207,13 +5203,13 @@ $md5_string = array ( './modules/Home/tour.js' => '02de392c74cf4fe1ee3d2420b1909853', './modules/Home/tour.css' => '50c0d1290fa8a412910733605d3739fe', './modules/Home/Home.html' => 'db09f83e17d4b882ef673c2cd01751ec', - './modules/Home/tour.tpl' => '990ef52a6086b790c4ee6f40c312015d', + './modules/Home/tour.tpl' => '413b83fb670ab5351689938b6126754e', './modules/Home/SubpanelEdits.php' => 'a7c382727fd45ea8e3f3be39846b7ada', - './modules/Home/QuickSearch.php' => '858a24650ffb6f432d28c006371293b6', + './modules/Home/QuickSearch.php' => '1e3d633374cc290cf4fceadf4de6dc09', './modules/Home/Home.tpl' => 'a2bd30c3b40d5df6b929a274ddff83ac', './modules/Home/Menu.php' => '9f95dba812226231c76b38da981f6513', './modules/Home/sitemap.tpl' => '3619e568a9ad07ab4b5e35dd3780b298', - './modules/Home/views/view.tour.php' => 'b2404d4d157c9e186c6830d5844e1801', + './modules/Home/views/view.tour.php' => '3dc3f80c5aaa969b148c575a8ba7d644', './modules/Home/views/view.additionaldetailsretrieve.php' => 'b0ca3fbad18270986844993c737e49d3', './modules/Home/views/view.list.php' => 'ddcaf125190670eb41676357c6e8f903', './modules/Home/views/view.modulelistmenu.php' => 'a1a8df55d774b049f8728fd70d8de48c', @@ -5260,7 +5256,7 @@ $md5_string = array ( './modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl' => 'a071ef1e73c24bb302f83cb1bc7d7de6', './modules/Home/dashlets.php' => 'd7ee77314c504c10c60f385fe3f97cda', './modules/Home/index.php' => '7b9a63243baa0e43020546536d54788c', - './modules/Home/language/en_us.lang.php' => '700e6beb201b01c09be395e83b58769a', + './modules/Home/language/en_us.lang.php' => '25f3c79b0c48aeaa58d79d1116394f5a', './modules/Home/SaveSubpanelLayout.php' => '91dfc82a810257041e19df963b342b55', './modules/Home/UnifiedSearchAdvancedForm.tpl' => '6213260d588340fc97e52ec0f3e1b977', './modules/Home/UnifiedSearchAdvanced.php' => 'f4d08a6b065441300e397132cbcd6125', @@ -5270,16 +5266,16 @@ $md5_string = array ( './modules/Home/LastViewed.php' => 'e4fd8c8ebf25ad8a93173deabf4b35bc', './modules/Home/AddToFavorites.php' => '2d1240598be9e7f74c497fe3a6578868', './modules/Home/TrainingPortal.php' => '1ec4a300d6dfd51f80eb642eee05f0f0', - './cache/include/javascript/sugar_grp_jsolait.js' => '9aced6d7d2669515690f61e506834ed9', - './cache/include/javascript/sugar_grp_quickcomp.js' => '464a1159cee19a73c9a4035b47a6e18e', - './cache/include/javascript/sugar_grp_emails.js' => 'f7b4e51bb49e38469713799426d8eca6', + './cache/include/javascript/sugar_grp_jsolait.js' => '3cb26c71028e55342bfbac69a6d9a851', + './cache/include/javascript/sugar_grp_quickcomp.js' => '7cb7287770e281b471fc8753e06c6ffb', + './cache/include/javascript/sugar_grp_emails.js' => 'ba25857e9cb53d11cb20bc5dae61cec8', './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' => '9c3853420e26cad638181691de71e991', './cache/include/javascript/sugar_field_grp.js' => '339b3b1d92f554dbac7fad410360c8f1', './cache/include/javascript/sugar_grp1_jquery.js' => '9c164fdc669d8af0c3e11559154a214c', - './cache/include/javascript/sugar_grp1.js' => '7a7f9d3e7e0ec6f805b291f9d905db63', + './cache/include/javascript/sugar_grp1.js' => '8829293fb198afd43a6eb77bb47a2959', './cache/layout/index.html' => '9cd784063d39b18d308932c28c385853', './cache/images/index.html' => '9cd784063d39b18d308932c28c385853', './cache/xml/index.html' => '9cd784063d39b18d308932c28c385853', @@ -5350,7 +5346,7 @@ $md5_string = array ( './metadata/prospect_lists_prospectsMetaData.php' => 'fe3dc7d813428ca0fa774884a88ef5c4', './metadata/inboundEmail_autoreplyMetaData.php' => '7c670a62c7142827bbdf675c8b4be221', './metadata/acl_roles_actionsMetaData.php' => 'a3446107943a271bf6e329a80deb06e8', - './sugar_version.php' => '4f6fe3fd3b40543a4fa4362a8ec2291f', + './sugar_version.php' => 'f75a5d5392cb7e4910b46e5b4aaaa8f3', './cron.php' => '96a6fd7893809132e902086e77dde30c', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './TreeData.php' => '7040af43bf01c450f4e225ece5e3f30c', @@ -6597,7 +6593,7 @@ $md5_string = array ( './themes/Sugar5/images/select.gif' => '2090e9761478fb6bee48c197b0f102dc', './themes/Sugar5/images/arrow_down.gif' => '7ae60aa70170713428e265b1cc695291', './themes/Sugar5/themedef.php' => '79f66d3ad564f057ab233f595c84f28c', - './themes/Sugar5/css/style.css' => '4fb70bd8ac2a9243b3bb28f6fe55cacc', + './themes/Sugar5/css/style.css' => '4d3a38bd7e9d6ccc1f61c7416927fa37', './themes/Sugar5/css/chart.css' => '78bf9d159067f20c5e3fc6adf7762f1c', './themes/Sugar5/css/print.css' => 'c00fb2d3011318e43c4b1332080d1698', './themes/Sugar5/css/yui.css' => '45d099cc32f4ea1cf99817b9374e0566', @@ -6618,7 +6614,7 @@ $md5_string = array ( './jssource/src_files/modules/Currencies/EditView.js' => '83b17318ef591148bbc75e2aebb5c8d5', './jssource/src_files/modules/Administration/javascript/Async.js' => 'd0e7a85e67bde67980dad376c11f1221', './jssource/src_files/modules/Administration/javascript/Administration.js' => '8c7eb2c4bd0024ab3f020d84c58ef1d5', - './jssource/src_files/modules/Meetings/jsclass_scheduler.js' => '38fd2043bdc095d22960685a08729dab', + './jssource/src_files/modules/Meetings/jsclass_scheduler.js' => '3d3817196769cec073bad93d15ac6494', './jssource/src_files/modules/Meetings/duration_dependency.js' => '59bac762067bf2baa5fa6d52824d0338', './jssource/src_files/modules/Project/Project.js' => '935ffab1d5effc64a12e43c5ed8f243d', './jssource/src_files/modules/Contacts/Contact.js' => '57e5e967dd1d1f623d4248922115f258', @@ -6644,14 +6640,14 @@ $md5_string = array ( './jssource/src_files/modules/EAPM/EAPMEdit.js' => '127511d0f21897d3424692d2fa3b7b3f', './jssource/src_files/modules/Schedulers/Schedulers.js' => '60e06fbc7695f413cc76aef1f2c393ff', './jssource/src_files/modules/ACLRoles/ACLRoles.js' => 'a4e950601a92d86219b5b2c00c41fd74', - './jssource/src_files/modules/Calendar/Cal.js' => '1da5052ead1952855103a596421b8ac1', + './jssource/src_files/modules/Calendar/Cal.js' => 'a3534d7b563bb5650447f734e59d0757', './jssource/src_files/modules/Documents/documents.js' => 'b15b9c6f9ec7ea2bc2ad3dbfb5de46bd', './jssource/src_files/modules/Leads/Lead.js' => 'c81abe209fd0eb0b07fe03e822181221', './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => '3ba07abfef8bbfbba604ed19ebd52fd0', './jssource/src_files/service/utils/SugarRest.js' => '25bb6ba045022c695e3b3582f4a00ce6', './jssource/src_files/include/MySugar/javascript/MySugar.js' => '33dea628a26df11e8d89eb78f4684db4', './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '38bed07b58bbd3f74ab81c169089650e', - './jssource/src_files/include/javascript/ajaxUI.js' => '47b2ebed0ecf6c97c8c676fa578a176d', + './jssource/src_files/include/javascript/ajaxUI.js' => '1995926ed3a525e197d37062b9adfdb1', './jssource/src_files/include/javascript/calendar.js' => '8a64349697d88a99b897514e60afcb4d', './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', './jssource/src_files/include/javascript/include.js' => 'b120bd1c521be781c2dee60e719fb15d', @@ -7417,7 +7413,7 @@ $md5_string = array ( './jssource/src_files/include/javascript/yui3/build/stylesheet/stylesheet-min.js' => '75bd882fb0e8921fa84a7ec0f7b25644', './jssource/src_files/include/javascript/yui3/assets/dpSyntaxHighlighter.js' => 'e3c2434acdcd9f4b0717efba1d7d7ebb', './jssource/src_files/include/javascript/yui3/assets/syntax.js' => '4099ad678b4ce516afa04ba6b112a568', - './jssource/src_files/include/javascript/popup_helper.js' => '9f9ea7e2407013e33670ef67a12e737a', + './jssource/src_files/include/javascript/popup_helper.js' => '334ccafb2386ce684d7e4522d8c88b49', './jssource/src_files/include/javascript/phpjs/get_html_translation_table.js' => '9667941dd790119d552f99b6d6b73fdf', './jssource/src_files/include/javascript/phpjs/html_entity_decode.js' => '022ed687a9c7c55a21b4a2aaa848921d', './jssource/src_files/include/javascript/phpjs/license.js' => '8d1e879645acd34b64c2270879203213', @@ -7427,7 +7423,7 @@ $md5_string = array ( './jssource/src_files/include/javascript/sugar_yui_overrides.js' => 'ac6afa48c7c53dd7a52fc0e812c54d4f', './jssource/src_files/include/javascript/cookie.js' => 'c4e6168195f22c5fbb1780a0745bde24', './jssource/src_files/include/javascript/popup_parent_helper.js' => 'c546e26584026b47054eecbcba234410', - './jssource/src_files/include/javascript/sugar_3.js' => '0770f4e0882a2cfade6a615768e1ceb3', + './jssource/src_files/include/javascript/sugar_3.js' => '5c77eccc2b45d09ad5f9dfbd96ba4444', './jssource/src_files/include/javascript/jquery.js' => '219073097031d9c1a95a1291d66f3a10', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => 'e38a0e0155991cbc8fabaa59bcb1b705', './jssource/src_files/include/javascript/jsclass_async.js' => '95072f5177e01c78662f14596255402e', @@ -7456,7 +7452,7 @@ $md5_string = array ( './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '4c95a8c2071e0d5b4ae1531a790f1492', './jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js' => '96960358d66fbc0499c8a22cdd93775d', './jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js' => 'df95d66e1bc6a83e23224bcf9a2c7355', - './jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => '88df69bdc4b1619a0da7cf0df8c841eb', + './jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js' => '16bd7c57e0c6cba5a944b620552260d0', './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => '103bcede04c3e18e7ebf1df5a68fa3c4', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '0f97d6009e2d91ea00eb18b788e04ae0', './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => 'c3b0f7249b491eafd0a09aaa2caceea5', @@ -7482,7 +7478,7 @@ $md5_string = array ( './install/installDisabled.php' => '109a830700ae4da30dfe773abb1ca84d', './install/performSetup.php' => '77b700aafa8787d254bef9512ef1ce4d', './install/install_defaults.php' => '8fdb4b9eacb7b264339875c327cc6694', - './install/install_utils.php' => '70e8cd44bc5535ad2d0e256ca8052172', + './install/install_utils.php' => 'f0a0aae0c0e5ae9ed14630ab761d0b35', './install/UserDemoData.php' => '3cd1325c661876c7b8164bb9a38a137c', './install/demoData.en_us.php' => '7357ecb854d7a6ef69c64228a27f2804', './install/UploadLangFileCheck.php' => '9011e63c597c34b77a100de2c4b941d7', @@ -7514,10 +7510,10 @@ $md5_string = array ( './campaign_trackerv2.php' => 'd474548736ceaf4275064094e5aa798b', './install.php' => 'a4e2e1c845b63962dfa89cd8ff50c9f7', './soap/SoapDeprecated.php' => '309e512eb7592c910a824f991869c4b4', - './soap/SoapError.php' => 'dff0c6fc02f66fbb4f86a91691ee300e', + './soap/SoapError.php' => '10185ef40a2442914fa8707591cf7b9d', './soap/SoapHelperFunctions.php' => '0cda7e6e106832d2b04dc2ce607ea614', './soap/SoapPortalHelper.php' => '302d5e90cf56d708b6d3f087fec2e72f', - './soap/SoapSugarUsers.php' => 'c13cd8250bfdf16f6bcf7c9b8ade9e96', + './soap/SoapSugarUsers.php' => '7e37b94b10e10b8f863831b6f3652575', './soap/SoapStudio.php' => '0fd81758942a52940c119f3afa134fcd', './soap/SoapRelationshipHelper.php' => '03cfb58253ac766d90ddf57d38d36afe', './soap/SoapErrorDefinitions.php' => '0ba2c58cdbdaec479860537420e4cf30', diff --git a/include/EditView/EditView2.php b/include/EditView/EditView2.php index 9e4e84d9..ab9e46b4 100644 --- a/include/EditView/EditView2.php +++ b/include/EditView/EditView2.php @@ -430,6 +430,11 @@ class EditView $this->focus->assigned_user_name = get_assigned_user_name($this->focus->assigned_user_id); } + if (!empty($this->focus->job) && $this->focus->job_function == '') + { + $this->focus->job_function = $this->focus->job; + } + foreach ($this->focus->toArray() as $name => $value) { $valueFormatted = false; diff --git a/include/EditView/SubpanelQuickEdit.php b/include/EditView/SubpanelQuickEdit.php index e4b2ac78..fd163962 100644 --- a/include/EditView/SubpanelQuickEdit.php +++ b/include/EditView/SubpanelQuickEdit.php @@ -71,7 +71,7 @@ class SubpanelQuickEdit{ $this->ev = new EditView(); $this->ev->view = $view; $this->ev->ss = new Sugar_Smarty(); - //$_REQUEST['return_action'] = 'SubPanelViewer'; + $_REQUEST['return_action'] = 'SubPanelViewer'; diff --git a/include/ListView/ListView.php b/include/ListView/ListView.php index d84cf54b..2a245c6d 100644 --- a/include/ListView/ListView.php +++ b/include/ListView/ListView.php @@ -458,8 +458,11 @@ 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($layout_manager->widgetDisplay($list_field) != "") - $button_contents[] = $layout_manager->widgetDisplay($list_field); + if ( '' != $_content = $layout_manager->widgetDisplay($list_field) ) + { + $button_contents[] = $_content; + unset($_content); + } } else { $count++; $this->xTemplate->assign('CLASS', ""); diff --git a/include/MVC/SugarApplication.php b/include/MVC/SugarApplication.php index 1f16b77f..b987ee6a 100644 --- a/include/MVC/SugarApplication.php +++ b/include/MVC/SugarApplication.php @@ -576,9 +576,7 @@ class SugarApplication if(isset($_REQUEST['MSID'])) { session_id($_REQUEST['MSID']); session_start(); - if(isset($_SESSION['user_id']) && isset($_SESSION['seamless_login'])){ - unset ($_SESSION['seamless_login']); - }else{ + if(!isset($_SESSION['user_id'])){ if(isset($_COOKIE['PHPSESSID'])){ self::setCookie('PHPSESSID', '', time()-42000, '/'); } diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index c989ad75..b085d617 100644 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -441,12 +441,7 @@ class SugarView // get the last viewed records $tracker = new Tracker(); $history = $tracker->get_recently_viewed($current_user->id); - foreach ( $history as $key => $row ) { - $history[$key]['item_summary_short'] = to_html(getTrackerSubstring($row['item_summary'])); //bug 56373 - need to re-HTML-encode - $history[$key]['image'] = SugarThemeRegistry::current() - ->getImage($row['module_name'],'border="0" align="absmiddle"',null,null,'.gif',$row['item_summary']); - } - $ss->assign("recentRecords",$history); + $ss->assign("recentRecords",$this->processRecentRecords($history)); } $bakModStrings = $mod_strings; @@ -1621,6 +1616,22 @@ EOHTML; return $this->ss->fetch($file); } + /** + * handles the tracker output, and adds a link and a shortened name. + * given html safe input, it will preserve html safety + * + * @param array $history - returned from the tracker + * @return array augmented history with image link and shortened name + */ + protected function processRecentRecords($history) { + foreach ( $history as $key => $row ) { + $history[$key]['item_summary_short'] = to_html(getTrackerSubstring($row['item_summary'])); //bug 56373 - need to re-HTML-encode + $history[$key]['image'] = SugarThemeRegistry::current() + ->getImage($row['module_name'],'border="0" align="absmiddle"',null,null,'.gif',$row['item_summary']); + } + return $history; + } + /** * Determines whether the state of the post global array indicates there was an error uploading a * file that exceeds the post_max_size setting. Such an error can be detected if: diff --git a/include/MVC/View/tpls/gsdetail.tpl b/include/MVC/View/tpls/gsdetail.tpl deleted file mode 100644 index cc89d4b8..00000000 --- a/include/MVC/View/tpls/gsdetail.tpl +++ /dev/null @@ -1,93 +0,0 @@ -{* -/********************************************************************************* - * SugarCRM Community Edition is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU Affero General Public License version 3 as published by the - * Free Software Foundation with the addition of the following permission added - * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK - * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY - * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more - * details. - * - * You should have received a copy of the GNU Affero General Public License along with - * this program; if not, see http://www.gnu.org/licenses or write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA. - * - * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, - * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. - * - * The interactive user interfaces in modified source and object code versions - * of this program must display Appropriate Legal Notices, as required under - * Section 5 of the GNU Affero General Public License version 3. - * - * In accordance with Section 7(b) of the GNU Affero General Public License version 3, - * these Appropriate Legal Notices must retain the display of the "Powered by - * SugarCRM" logo. If the display of the logo is not reasonably feasible for - * technical reasons, the Appropriate Legal Notices must display the words - * "Powered by SugarCRM". - ********************************************************************************/ - - -*} - - -
-

{$BEAN_NAME}

-
-
- - {foreach from=$DETAILS item=DETAIL name="recordlist"} - {if !$fields[$DETAIL.field].hidden} - - - - - {/if} - {/foreach} - - - - -
{$DETAIL.label|strip_semicolon}: - {if !empty($DETAIL.customCode)} - {eval var=$DETAIL.customCode} - {else} - {sugar_field parentFieldArray='fields' vardef=$fields[$DETAIL.field] displayType='wirelessDetailView' displayParams='' typeOverride=$DETAIL.type} - {/if} -
 
-

{$LBL_GS_HELP}

-
-
-
-
-
\ No newline at end of file diff --git a/include/MVC/View/views/view.gs.php b/include/MVC/View/views/view.gs.php deleted file mode 100644 index 9b118be8..00000000 --- a/include/MVC/View/views/view.gs.php +++ /dev/null @@ -1,205 +0,0 @@ -"; - private $matchHitEnd = ""; - - public function ViewGS() - { - $this->searchString = empty($_REQUEST['q']) ? null : $_REQUEST['q']; - $this->searchRegex = '/' . $this->searchString . '/i'; - $this->options['show_title'] = false; - $this->options['show_header'] = false; - $this->options['show_footer'] = false; - $this->options['show_javascript'] = false; - $this->options['show_subpanels'] = false; - $this->options['show_search'] = false; - parent::SugarView(); - } - - - private function _getGlobalSearchFields() - { - $results = array(); - foreach ( $this->bean->field_name_map as $fieldName => $entry) - { - if( isset($entry['unified_search']) && $entry['unified_search'] ) - { - if($fieldName == 'email_addresses' || $fieldName == 'emails') - $results[] = 'email1'; - else - $results[] = $fieldName; - } - } - return $results; - } - - function preDisplay() - { - $this->searchFields = $this->_getGlobalSearchFields(); - - } - - /** - * @see SugarView::display() - */ - public function display() - { - // no record, we should also provide a way out - if (empty($this->bean->id)){ - sugar_die($GLOBALS['app_strings']['ERROR_NO_RECORD']); - } - - // set up Smarty variables - $this->ss->assign('BEAN_ID', $this->bean->id); - $this->ss->assign('BEAN_NAME', $this->bean->name); - $this->ss->assign('MODULE', $this->module); - $this->ss->assign('MODULE_NAME', translate('LBL_MODULE_NAME',$this->module)); - - //Get the fields to display - $detailFields = $this->bean_details('WirelessDetailView'); - $this->ss->assign('DETAILS', $detailFields); - - //Of the fields to display, highlight text based on match - $matchedFields = $this->setMatchedFields($detailFields); - $this->ss->assign('fields', $matchedFields); - - $this->ss->assign('ENABLE_FORM', $this->checkEditPermissions()); - $this->ss->assign('LBL_GS_HELP', $GLOBALS['app_strings']['LBL_GS_HELP']); - - // display the detail view - $file = 'include/MVC/View/tpls/gsdetail.tpl'; - - if(file_exists('custom/'.$file)) - { - $this->ss->display('custom/'.$file); - } else { - $this->ss->display($file); - } - - } - - protected function setMatchedFields($fields) - { - if($this->searchString == null) - { - return $fields; - } - - - foreach ($fields as &$field) - { - if($field['value'] == '') - { - continue; - } - - //Check if we have a search match and set the highlight flag - $matchReplace = $this->matchHitStart . '${0}' . $this->matchHitEnd; - - if(isset($field['name']) && ($field['name'] == 'email1' || $field['name'] == 'email2')) - { - if(preg_match_all("/\(.*?)\<\/a\>/is", $field['value'], $matches)) - { - $aValue = $matches[1][0]; - $aReplacedValue = preg_replace($this->searchRegex, $matchReplace, $aValue); - $newLink = preg_replace("/\(.*?)\<\/a\>/i", "{$aReplacedValue}", $field['value']); - $field['value'] = $newLink; - } - } else if(isset($field['type']) && $field['type'] == 'phone') { - //Do a string replacement for phone fields since it may contain special characters - $matchReplace = $this->matchHitStart . $this->searchString . $this->matchHitEnd; - $field['value'] = str_replace($this->searchString, $matchReplace, $field['value']); - } else { - if (isset($field['type']) && $field['type'] == 'enum') //TODO: Handle enums since we are destroying the key. - { - continue; - } - $field['value'] = preg_replace($this->searchRegex, $matchReplace, $field['value']); - } - } - - return $fields; - } - /** - * Public function that attains the bean detail and sets up an array for - * Smarty consumption. - */ - public function bean_details($view) - { - - require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ; - global $current_user; - - // traverse through the wirelessviewdefs metadata to get the fields and values - $bean_details = array(); - - foreach($this->searchFields as $field) - { - // handle empty assigned_user_name - if(empty($this->bean->assigned_user_name)) { - if(!empty($this->bean->assigned_user_id)){ - $this->bean->assigned_user_name = get_assigned_user_name($this->bean->assigned_user_id); - }else{ - $this->bean->assigned_user_name = $GLOBALS['current_user']->user_name; - } - } - - - $field_info = $this->setup_detail_field($field); - - if (is_array($field_info)) - { - $name = is_array($field) ? $field['name'] : $field; - - $bean_details[$name] = $field_info; - } - } - - return $bean_details; - } -} diff --git a/include/MVC/View/views/view.importvcard.php b/include/MVC/View/views/view.importvcard.php index cf64b9c5..1fc758a8 100644 --- a/include/MVC/View/views/view.importvcard.php +++ b/include/MVC/View/views/view.importvcard.php @@ -47,7 +47,7 @@ require_once('include/vCard.php'); class ViewImportvcard extends SugarView { - var $type = 'detail'; + var $type = 'edit'; public function __construct() { diff --git a/include/MVC/View/views/view.importvcardsave.php b/include/MVC/View/views/view.importvcardsave.php index 4310c003..8d7c861e 100644 --- a/include/MVC/View/views/view.importvcardsave.php +++ b/include/MVC/View/views/view.importvcardsave.php @@ -46,7 +46,7 @@ require_once('include/vCard.php'); class ViewImportvcardsave extends SugarView { - var $type = 'detail'; + var $type = 'save'; public function __construct() { diff --git a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl index 876f8361..bf845117 100644 --- a/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl +++ b/include/SearchForm/tpls/SearchFormGenericAdvanced.tpl @@ -103,8 +103,8 @@ {if $displayType != 'popupView'} -   - +   + {if $DOCUMENTS_MODULE}   {/if} diff --git a/include/SubPanel/SubPanelTiles.php b/include/SubPanel/SubPanelTiles.php index d457ca47..3a0b2ed7 100644 --- a/include/SubPanel/SubPanelTiles.php +++ b/include/SubPanel/SubPanelTiles.php @@ -328,7 +328,7 @@ if(document.DetailView != null && if (empty($this->show_tabs)) { - $show_icon_html = SugarThemeRegistry::current()->getImage( 'advanced_search', 'border="0 align="absmiddle""',null,null,'.gif',translate('LBL_SHOW')); + $show_icon_html = SugarThemeRegistry::current()->getImage( 'advanced_search', 'border="0" align="absmiddle"',null,null,'.gif',translate('LBL_SHOW')); $hide_icon_html = SugarThemeRegistry::current()->getImage( 'basic_search', 'border="0" align="absmiddle"',null,null,'.gif',translate('LBL_HIDE')); $max_min = " " diff --git a/include/SugarCache/SugarCache.php b/include/SugarCache/SugarCache.php index 54ffce9d..70670ef1 100644 --- a/include/SugarCache/SugarCache.php +++ b/include/SugarCache/SugarCache.php @@ -130,6 +130,18 @@ class SugarCache } } } + + /** + * Try to reset file from caches + */ + public static function cleanFile( $file ) + { + // APC + if ( function_exists('apc_delete_file') && ini_get('apc.stat') == 0 ) + { + apc_delete_file( $file ); + } + } } /** diff --git a/include/SugarCharts/Jit/js/Jit/jit.js b/include/SugarCharts/Jit/js/Jit/jit.js index 400ff7da..fadc749e 100644 --- a/include/SugarCharts/Jit/js/Jit/jit.js +++ b/include/SugarCharts/Jit/js/Jit/jit.js @@ -232,7 +232,49 @@ for(i=0;ibaseHeight?size:baseHeight)+this.config.subtreeOffset;},getEdge:function(node,type,s){var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b));};};var dim=this.node;var w=node.getData('width');var h=node.getData('height');if(type=='begin'){if(dim.align=="center"){return this.dispatch(s,$C(0,h/2),$C(-w/2,0),$C(0,-h/2),$C(w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";}else if(type=='end'){if(dim.align=="center"){return this.dispatch(s,$C(0,-h/2),$C(w/2,0),$C(0,h/2),$C(-w/2,0));}else if(dim.align=="left"){return this.dispatch(s,$C(0,0),$C(w,0),$C(0,h),$C(0,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,-h),$C(0,0),$C(0,0),$C(-w,0));}else throw"align: not implemented";}},getScaledTreePosition:function(node,scale){var dim=this.node;var w=node.getData('width');var h=node.getData('height');var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var $C=function(a,b){return function(){return node.pos.add(new Complex(a,b)).$scale(1-scale);};};if(dim.align=="left"){return this.dispatch(s,$C(0,h),$C(0,0),$C(0,0),$C(w,0));}else if(dim.align=="center"){return this.dispatch(s,$C(0,h / 2),$C(-w / 2,0),$C(0,-h / 2),$C(w / 2,0));}else if(dim.align=="right"){return this.dispatch(s,$C(0,0),$C(-w,0),$C(0,-h),$C(0,0));}else throw"align: not implemented";},treeFitsInCanvas:function(node,canvas,level){var csize=canvas.getSize();var s=(this.config.multitree&&('$orn'in node.data)&&node.data.$orn)||this.config.orientation;var size=this.dispatch(s,csize.width,csize.height);var baseSize=this.getTreeBaseSize(node,level,function(level,node){return level===0||!node.anySubnode();});return(baseSize=0){node.drawn=false;var ctx=canvas.getCtx();var diff=viz.geom.getScaledTreePosition(node,scale);ctx.translate(diff.x,diff.y);ctx.scale(scale,scale);} -this.plotTree(node,$.merge(opt,{'withLabels':true,'hideLabels':!!scale,'plotSubtree':function(n,ch){var root=config.multitree&&!('$orn'in node.data);var orns=root&&node.getData('orns');return!root||orns.indexOf(elem.getData('orn'))>-1;}}),animating);if(scale>=0)node.drawn=true;},getAlignedPos:function(pos,width,height){var nconfig=this.node;var square,orn;if(nconfig.align=="center"){square={x:pos.x-width / 2,y:pos.y-height / 2};}else if(nconfig.align=="left"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y};}else{square={x:pos.x,y:pos.y-height / 2};}}else if(nconfig.align=="right"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y-height};}else{square={x:pos.x-width,y:pos.y-height / 2};}}else throw"align: not implemented";return square;},getOrientation:function(adj){var config=this.config;var orn=config.orientation;if(config.multitree){var nodeFrom=adj.nodeFrom;var nodeTo=adj.nodeTo;orn=(('$orn'in nodeFrom.data)&&nodeFrom.data.$orn)||(('$orn'in nodeTo.data)&&nodeTo.data.$orn);} +this.plotTree(node,$.merge(opt,{'withLabels':true,'hideLabels':!!scale,'plotSubtree':function(n,ch){var root=config.multitree&&!('$orn'in node.data);var orns=root&&node.getData('orns');return!root||orns.indexOf(elem.getData('orn'))>-1;}}),animating);if(scale>=0)node.drawn=true;},positions:function(dimArray,fontHeight) +{var group=[];var isLastElem=false;var i;var newArray=[];var position=0;var currentState;for(i=0;i0) +{newArray.push({type:'group',val:group,groupHeight:0,groupPosition:group[0].position});group=[];} +var figureHeight=position;for(i=0;ifigureheight) +{offset=(figureheight-lastValue.groupHeight)-lastValue.groupPosition;lastValue.groupPosition+=offset;for(var li=0;lilastValue.groupPosition) +{block[block.length-2]=this.pipelineMergeGroup(lastValue,prelastValue);block.pop();rebuild=true;} +if(block.length<3) +{return block;}} +for(var i=1;iblock[i].groupPosition) +{block[i-1]=this.pipelineMergeGroup(block[i],block[i-1]);block.splice(i,1);rebuild=true;}} +if(rebuild) +{block=this.pipelineMoveBlocks(block,figureheight,fontHeight);} +return block;},pipelineMergeGroup:function(lastValue,prelastValue) +{var newGroup;newGroup=prelastValue;newGroup.val=newGroup.val.concat(lastValue.val);newGroup=this.pipelineGetHeight(newGroup);newGroup.groupPosition=prelastValue.groupPosition;return newGroup;},getAlignedPos:function(pos,width,height){var nconfig=this.node;var square,orn;if(nconfig.align=="center"){square={x:pos.x-width / 2,y:pos.y-height / 2};}else if(nconfig.align=="left"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y};}else{square={x:pos.x,y:pos.y-height / 2};}}else if(nconfig.align=="right"){orn=this.config.orientation;if(orn=="bottom"||orn=="top"){square={x:pos.x-width / 2,y:pos.y-height};}else{square={x:pos.x-width,y:pos.y-height / 2};}}else throw"align: not implemented";return square;},getOrientation:function(adj){var config=this.config;var orn=config.orientation;if(config.multitree){var nodeFrom=adj.nodeFrom;var nodeTo=adj.nodeTo;orn=(('$orn'in nodeFrom.data)&&nodeFrom.data.$orn)||(('$orn'in nodeTo.data)&&nodeTo.data.$orn);} return orn;}});$jit.ST.Label={};$jit.ST.Label.Native=new Class({Implements:Graph.Label.Native,renderLabel:function(canvas,node,controller){var ctx=canvas.getCtx();var coord=node.pos.getc(true);ctx.fillText(node.name,coord.x,coord.y);}});$jit.ST.Label.DOM=new Class({Implements:Graph.Label.DOM,placeLabel:function(tag,node,controller){var pos=node.pos.getc(true),config=this.viz.config,dim=config.Node,canvas=this.viz.canvas,w=node.getData('width'),h=node.getData('height'),radius=canvas.getSize(),labelPos,orn;var ox=canvas.translateOffsetX,oy=canvas.translateOffsetY,sx=canvas.scaleOffsetX,sy=canvas.scaleOffsetY,posx=pos.x*sx+ox,posy=pos.y*sy+oy;if(dim.align=="center"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}else if(dim.align=="left"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy+radius.height/2)};}else{labelPos={x:Math.round(posx+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}}else if(dim.align=="right"){orn=config.orientation;if(orn=="bottom"||orn=="top"){labelPos={x:Math.round(posx-w / 2+radius.width/2),y:Math.round(posy-h+radius.height/2)};}else{labelPos={x:Math.round(posx-w+radius.width/2),y:Math.round(posy-h / 2+radius.height/2)};}}else throw"align: not implemented";var style=tag.style;style.left=labelPos.x+'px';style.top=labelPos.y+'px';style.display=this.fitsInCanvas(labelPos,canvas)?'':'none';controller.onPlaceLabel(tag,node);}});$jit.ST.Label.SVG=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.SVG],initialize:function(viz){this.viz=viz;}});$jit.ST.Label.HTML=new Class({Implements:[$jit.ST.Label.DOM,Graph.Label.HTML],initialize:function(viz){this.viz=viz;}});$jit.ST.Plot.NodeTypes=new Class({'none':{'render':$.empty,'contains':$.lambda(false)},'circle':{'render':function(node,canvas){var dim=node.getData('dim'),pos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.circle.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'square':{'render':function(node,canvas){var dim=node.getData('dim'),dim2=dim/2,pos=this.getAlignedPos(node.pos.getc(true),dim,dim);this.nodeHelper.square.render('fill',{x:pos.x+dim2,y:pos.y+dim2},dim2,canvas);},'contains':function(node,pos){var dim=node.getData('dim'),npos=this.getAlignedPos(node.pos.getc(true),dim,dim),dim2=dim/2;this.nodeHelper.square.contains({x:npos.x+dim2,y:npos.y+dim2},dim2);}},'ellipse':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.ellipse.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}},'rectangle':{'render':function(node,canvas){var width=node.getData('width'),height=node.getData('height'),pos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.render('fill',{x:pos.x+width/2,y:pos.y+height/2},width,height,canvas);},'contains':function(node,pos){var width=node.getData('width'),height=node.getData('height'),npos=this.getAlignedPos(node.pos.getc(true),width,height);this.nodeHelper.rectangle.contains({x:npos.x+width/2,y:npos.y+height/2},width,height,canvas);}}});$jit.ST.Plot.EdgeTypes=new Class({'none':$.empty,'line':{'render':function(adj,canvas){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth1&&direction[0]!=node.id);this.edgeHelper.arrow.render(from,to,dim,inv,canvas);},'contains':function(adj,pos){var orn=this.getOrientation(adj),nodeFrom=adj.nodeFrom,nodeTo=adj.nodeTo,rel=nodeFrom._depth40?40:fixedDim;this.st.graph.eachNode(function(n){var acum=0,animateValue=[];$.each(n.getData('valueArray'),function(v){acum+=+v;animateValue.push(0);});if(grouped){fixedDim=animateValue.length*40;} -n.setData(dim1,fixedDim);if(animate){n.setData(dim2,acum*height / maxValue,'end');n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height / maxValue;}),'end');var dimArray=n.getData('dimArray');if(!dimArray){n.setData('dimArray',animateValue);}}else{if(ticks.enable){n.setData(dim2,acum*height / maxTickValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height / maxTickValue;}));}else{n.setData(dim2,acum*height / maxValue);n.setData('dimArray',$.map(n.getData('valueArray'),function(n){return n*height / maxValue;}));}}});}});Options.FunnelChart={$extend:true,animate:true,type:'stacked',labelOffset:3,barsOffset:0,hoveredColor:'#9fd4ff',orientation:'vertical',showAggregates:true,showLabels:true,Tips:{enable:false,onShow:$.empty,onHide:$.empty},Events:{enable:false,onClick:$.empty}};$jit.ST.Plot.NodeTypes.implement({'funnelchart-basic':{'render':function(node,canvas){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),valueArray=node.getData('valueArray'),valuelabelArray=node.getData('valuelabelArray'),linkArray=node.getData('linkArray'),colorArray=node.getData('colorArray'),colorLength=colorArray.length,stringArray=node.getData('stringArray');var ctx=canvas.getCtx(),opt={},border=node.getData('border'),gradient=node.getData('gradient'),config=node.getData('config'),horz=config.orientation=='horizontal',aggregates=config.showAggregates,showLabels=config.showLabels,label=config.Label,size=canvas.getSize(),labelOffset=config.labelOffset+10;minWidth=width*.25;ratio=.65;if(colorArray&&dimArray&&stringArray){for(var i=0,l=dimArray.length,acum=0,valAcum=0;i0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+((acum+labelOffsetHeight)*ratio);var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+(newDimArray[i].position*ratio);var labelOffsetRight=(newDimArray[i].filament)?(next_mV.width+25):0;var labelOffsetLeft=(newDimArray[i].filament)?(next_mVL.width+25):0;ctx.beginPath();ctx.moveTo(bottomWidth/2,y-acum);ctx.lineTo(bottomWidthLabel / 2+(labelOffset-10),y-newDimArray[i].position);ctx.lineTo(bottomWidthLabel / 2+(labelOffset)+labelOffsetRight+mV.width,y-newDimArray[i].position);ctx.stroke();ctx.beginPath();ctx.moveTo(-bottomWidth/2,y-acum);ctx.lineTo(-bottomWidthLabel / 2-(labelOffset-10),y-newDimArray[i].position);ctx.lineTo(-bottomWidthLabel / 2-(labelOffset)-labelOffsetLeft-mVL.width,y-newDimArray[i].position);ctx.stroke();}} acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);} for(var i=0,l=dimArray.length,acum=0,valAcum=0;i0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var labelOffsetRight=(previousElementHeight0)?((i%2!=0&&dimArray[i]0)?((i%2!=0&&dimArray[i]>0;});linear.addColorStop(0,'rgba('+color+',1)');linear.addColorStop(0.5,'rgba('+colorRgb+',1)');linear.addColorStop(1,'rgba('+color+',1)');ctx.fillStyle=linear;} +if((i+1)0)?dimArray[i-1]:100;var labelOffsetHeight=(previousElementHeight0)?((dimArray[i]>label.size)?(dimArray[i]/2)-(label.size/2):label.size):0;var labelOffsetRight=(newDimArray[i].filament)?(next_mV.width+20):0;var labelOffsetLeft=(newDimArray[i].filament)?(next_mVL.width+20):0;var topWidth=minWidth+((acum+dimArray[i])*ratio);var bottomWidth=minWidth+((acum)*ratio);var bottomWidthLabel=minWidth+(newDimArray[i].position*ratio);if(gradient){var linear;linear=ctx.createLinearGradient(-topWidth/2,y-acum-dimArray[i]/2,topWidth/2,y-acum-dimArray[i]/2);var colorRgb=$.hexToRgb(colori);var color=$.map($.hexToRgb(colorArray[i%colorLength].slice(1)),function(v){return(v*.5)>>0;});linear.addColorStop(0,'rgba('+color+',1)');linear.addColorStop(0.5,'rgba('+colorRgb+',1)');linear.addColorStop(1,'rgba('+color+',1)');ctx.fillStyle=linear;} ctx.beginPath();ctx.moveTo(-topWidth/2,y-acum-dimArray[i]);ctx.lineTo(topWidth/2,y-acum-dimArray[i]);ctx.lineTo(bottomWidth/2,y-acum);ctx.lineTo(-bottomWidth/2,y-acum);ctx.closePath();ctx.fill();if(border&&border.name==stringArray[i]){opt.acum=acum;opt.dimValue=dimArray[i];} if(border){ctx.save();ctx.lineWidth=2;ctx.strokeStyle=border.color;ctx.restore();} -if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';acumValueLabel=valAcum;if(showLabels(node.name,valAcum,node)){ctx.textAlign='left';ctx.fillText(stringArray[i],(bottomWidthLabel/2)+labelOffset+labelOffsetRight,y-acum-labelOffsetHeight-label.size/2);ctx.textAlign='right';ctx.fillText(valuelabelArray[i],(-bottomWidthLabel/2)-labelOffset-labelOffsetLeft,y-acum-labelOffsetHeight-label.size/2);} +if(label.type=='Native'){ctx.save();ctx.fillStyle=ctx.strokeStyle=label.color;ctx.font=label.style+' '+label.size+'px '+label.family;ctx.textBaseline='middle';acumValueLabel=valAcum;if(showLabels(node.name,valAcum,node)){ctx.textAlign='left';ctx.fillText(stringArray[i],(bottomWidthLabel / 2)+labelOffset+labelOffsetRight,y-newDimArray[i].position-label.size / 2);ctx.textAlign='right';ctx.fillText(valuelabelArray[i],(-bottomWidthLabel / 2)-labelOffset-labelOffsetLeft,y-newDimArray[i].position-label.size / 2);} ctx.restore();} acum+=(dimArray[i]||0);valAcum+=(valueArray[i]||0);}}},'contains':function(node,mpos){var pos=node.pos.getc(true),width=node.getData('width'),height=node.getData('height'),algnPos=this.getAlignedPos(pos,width,height),x=algnPos.x,y=algnPos.y,dimArray=node.getData('dimArray'),config=node.getData('config'),st=node.getData('st'),rx=mpos.x-x,horz=config.orientation=='horizontal',minWidth=width*.25;ratio=.65,canvas=node.getData('canvas'),size=canvas.getSize(),offsetY=st.config.offsetY;if(mpos.y>y||mpos.yboundRight){return false;} diff --git a/include/SugarCharts/SugarChart.php b/include/SugarCharts/SugarChart.php index 5149c120..00c1406d 100644 --- a/include/SugarCharts/SugarChart.php +++ b/include/SugarCharts/SugarChart.php @@ -450,7 +450,11 @@ class SugarChart { $this->chart_yAxis['yMax'] = $this->chart_properties['gaugeTarget']; $this->chart_yAxis['yStep'] = 1; $data .= $this->processDataGroup(2, 'GaugePosition', $gaugePosition, $gaugePosition, ''); - $data .= $this->processGauge($gaugePosition, $this->chart_properties['gaugeTarget']); + if (isset($this->chart_properties['gaugePhases']) && is_array($this->chart_properties['gaugePhases'])) { + $data .= $this->processGauge($gaugePosition, $this->chart_properties['gaugeTarget'], $this->chart_properties['gaugePhases']); + } else { + $data .= $this->processGauge($gaugePosition, $this->chart_properties['gaugeTarget']); + } return $data; } diff --git a/include/SugarEmailAddress/SugarEmailAddress.php b/include/SugarEmailAddress/SugarEmailAddress.php index 5d458d31..da72e18c 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.php +++ b/include/SugarEmailAddress/SugarEmailAddress.php @@ -190,12 +190,13 @@ class SugarEmailAddress extends SugarBean { foreach($this->addresses as $address) { if(!empty($address['email_address'])) { $guid = create_guid(); + $emailId = isset($address['email_address_id']) + && isset($current_links[$address['email_address_id']]) + ? $address['email_address_id'] : null; $emailId = $this->AddUpdateEmailAddress($address['email_address'], $address['invalid_email'], $address['opt_out'], - isset($address['email_address_id']) ? - $address['email_address_id'] : - null);// this will save the email address if not found + $emailId);// this will save the email address if not found //verify linkage and flags. $upd_eabr=""; @@ -667,7 +668,7 @@ class SugarEmailAddress extends SugarBean { } else { - $data = array(); + $data = $a; } $upd_q = 'UPDATE ' . $this->table_name . ' ' . diff --git a/include/SugarFields/Fields/Base/SugarFieldBase.php b/include/SugarFields/Fields/Base/SugarFieldBase.php index ce73b067..609bb67a 100644 --- a/include/SugarFields/Fields/Base/SugarFieldBase.php +++ b/include/SugarFields/Fields/Base/SugarFieldBase.php @@ -235,9 +235,6 @@ class SugarFieldBase { if ( $displayType == 'ListView' || $displayType == 'popupView' || $displayType == 'searchView' - || $displayType == 'wirelessEditView' - || $displayType == 'wirelessDetailView' - || $displayType == 'wirelessListView' ) { // Traditionally, before 6.0, additional functions were never called, so this code doesn't get called unless the vardef forces it if ( $onListView ) { diff --git a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl b/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl index 26689557..ceec8484 100644 --- a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl +++ b/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl @@ -168,4 +168,13 @@ YAHOO.util.Event.addListener('search_form_clear', 'click', {$id}_range_reset); {rdelim} {rdelim}); + +YAHOO.util.Event.onDOMReady(function() {ldelim} + if(document.getElementById('search_form_clear_advanced')) + {ldelim} + YAHOO.util.Event.addListener('search_form_clear_advanced', 'click', {$id}_range_reset); + {rdelim} + +{rdelim}); + diff --git a/include/SugarFields/Fields/Int/RangeSearchForm.tpl b/include/SugarFields/Fields/Int/RangeSearchForm.tpl index 749bf58a..1973cbac 100644 --- a/include/SugarFields/Fields/Int/RangeSearchForm.tpl +++ b/include/SugarFields/Fields/Int/RangeSearchForm.tpl @@ -82,6 +82,14 @@ YAHOO.util.Event.addListener('search_form_clear', 'click', {$id}_range_reset); {rdelim} {rdelim}); + +YAHOO.util.Event.onDOMReady(function() {ldelim} + if(document.getElementById('search_form_clear_advanced')) + {ldelim} + YAHOO.util.Event.addListener('search_form_clear_advanced', 'click', {$id}_range_reset); + {rdelim} +{rdelim}); + diff --git a/include/SugarObjects/templates/basic/language/en_us.lang.php b/include/SugarObjects/templates/basic/language/en_us.lang.php index 25518e1e..52ef6fad 100644 --- a/include/SugarObjects/templates/basic/language/en_us.lang.php +++ b/include/SugarObjects/templates/basic/language/en_us.lang.php @@ -50,6 +50,8 @@ $mod_strings = array( 'LBL_CREATED_USER'=>'Created by User', 'LBL_MODIFIED_USER'=>'Modified by User', 'LBL_LIST_NAME'=>'Name', +'LBL_EDIT_BUTTON' => 'Edit', + 'LBL_REMOVE' => 'Remove', ); \ No newline at end of file diff --git a/include/SugarObjects/templates/basic/metadata/subpanels/default.php b/include/SugarObjects/templates/basic/metadata/subpanels/default.php index 49e06426..6e9f3db6 100644 --- a/include/SugarObjects/templates/basic/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/basic/metadata/subpanels/default.php @@ -56,11 +56,13 @@ $subpanel_layout = array( 'width' => '45%', ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => $module_name, 'width' => '4%', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => $module_name, 'width' => '5%', diff --git a/include/SugarObjects/templates/company/language/en_us.lang.php b/include/SugarObjects/templates/company/language/en_us.lang.php index cb86f7cd..621741c8 100644 --- a/include/SugarObjects/templates/company/language/en_us.lang.php +++ b/include/SugarObjects/templates/company/language/en_us.lang.php @@ -131,6 +131,10 @@ $mod_strings = array ( 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', 'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this record?', 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Are you sure you want to remove this record as a member organization?', + + 'LBL_EDIT_BUTTON' => 'Edit ', + 'LBL_REMOVE' => 'Remove', + ); diff --git a/include/SugarObjects/templates/company/metadata/subpanels/default.php b/include/SugarObjects/templates/company/metadata/subpanels/default.php index ec5f02ba..29372d04 100644 --- a/include/SugarObjects/templates/company/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/company/metadata/subpanels/default.php @@ -68,11 +68,13 @@ $subpanel_layout = array( 'target_module' => 'Employees', ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => $module_name, 'width' => '4%', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => $module_name, 'width' => '5%', diff --git a/include/SugarObjects/templates/file/language/en_us.lang.php b/include/SugarObjects/templates/file/language/en_us.lang.php index 0af07e8e..5c9509c6 100644 --- a/include/SugarObjects/templates/file/language/en_us.lang.php +++ b/include/SugarObjects/templates/file/language/en_us.lang.php @@ -117,6 +117,10 @@ $mod_strings = array ( 'LBL_TREE_TITLE' => 'Documents', //sub-panel vardefs. 'LBL_LIST_DOCUMENT_NAME'=>'Document Name', + + 'LBL_EDIT_BUTTON' => 'Edit ', + 'LBL_REMOVE' => 'Remove', + ); diff --git a/include/SugarObjects/templates/file/metadata/subpanels/default.php b/include/SugarObjects/templates/file/metadata/subpanels/default.php index 72b84b0d..2e8a83e3 100644 --- a/include/SugarObjects/templates/file/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/file/metadata/subpanels/default.php @@ -77,11 +77,13 @@ $subpanel_layout = array( ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => $module_name, 'width' => '5%', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => $module_name, 'width' => '5%', diff --git a/include/SugarObjects/templates/issue/language/en_us.lang.php b/include/SugarObjects/templates/issue/language/en_us.lang.php index 9af9d256..f4d7c1aa 100644 --- a/include/SugarObjects/templates/issue/language/en_us.lang.php +++ b/include/SugarObjects/templates/issue/language/en_us.lang.php @@ -64,6 +64,10 @@ $mod_strings = array ( 'LBL_SYSTEM_ID' =>'System Id:', 'LBL_TYPE'=>'Type:', 'LBL_SUBJECT' => 'Subject:', + + 'LBL_EDIT_BUTTON' => 'Edit', + 'LBL_REMOVE' => 'Remove', + ); ?> diff --git a/include/SugarObjects/templates/issue/metadata/subpanels/default.php b/include/SugarObjects/templates/issue/metadata/subpanels/default.php index 45b4d762..7586416b 100644 --- a/include/SugarObjects/templates/issue/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/issue/metadata/subpanels/default.php @@ -38,7 +38,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $module_name = ''; -$_object_name = '<_object_name>'; $subpanel_layout = array( 'top_buttons' => array( array('widget_class' => 'SubPanelTopCreateButton'), @@ -48,11 +47,6 @@ $subpanel_layout = array( 'where' => '', 'list_fields' => array( - $_object_name . '_number'=>array( - 'vname' => 'LBL_NUMBER', - 'width' => '5%', - ), - 'name'=>array( 'vname' => 'LBL_SUBJECT', 'widget_class' => 'SubPanelDetailViewLink', @@ -78,11 +72,13 @@ $subpanel_layout = array( 'target_module' => 'Employees', ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => $module_name, 'width' => '4%', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => $module_name, 'width' => '5%', diff --git a/include/SugarObjects/templates/person/language/en_us.lang.php b/include/SugarObjects/templates/person/language/en_us.lang.php index c213212a..683fe397 100644 --- a/include/SugarObjects/templates/person/language/en_us.lang.php +++ b/include/SugarObjects/templates/person/language/en_us.lang.php @@ -83,4 +83,8 @@ $mod_strings = array( 'LBL_WORK_PHONE'=>'Work Phone', 'LNK_IMPORT_VCARD' => 'Create From vCard', 'LBL_ANY_EMAIL' => 'Any Email', + +'LBL_EDIT_BUTTON' => 'Edit', +'LBL_REMOVE' => 'Remove', + ); \ No newline at end of file diff --git a/include/SugarObjects/templates/person/metadata/subpanels/default.php b/include/SugarObjects/templates/person/metadata/subpanels/default.php index 92020d98..23072383 100644 --- a/include/SugarObjects/templates/person/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/person/metadata/subpanels/default.php @@ -82,11 +82,13 @@ $subpanel_layout = array( 'width' => '15%', ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => 'Contacts', 'width' => '5%', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => 'Contacts', 'width' => '5%', diff --git a/include/SugarObjects/templates/person/vardefs.php b/include/SugarObjects/templates/person/vardefs.php index 6585b56d..6eb2a187 100644 --- a/include/SugarObjects/templates/person/vardefs.php +++ b/include/SugarObjects/templates/person/vardefs.php @@ -212,7 +212,7 @@ $vardefs =array( 'source' => 'non-db', 'group'=>'email1', 'merge_filter' => 'enabled', - 'studio' => array('editField' => true, 'searchview' => false, 'popupsearch' => false), // bug 46859 + 'studio' => array('editview' => true, 'editField' => true, 'searchview' => false, 'popupsearch' => false), // bug 46859 'full_text_search' => array('boost' => 3, 'index' => 'not_analyzed'), //bug 54567 ), 'email2' => diff --git a/include/SugarObjects/templates/sale/language/en_us.lang.php b/include/SugarObjects/templates/sale/language/en_us.lang.php index a3b36426..85a6cce2 100644 --- a/include/SugarObjects/templates/sale/language/en_us.lang.php +++ b/include/SugarObjects/templates/sale/language/en_us.lang.php @@ -133,6 +133,9 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'LBL_CURRENCY_ID'=>'Currency ID', 'LBL_CURRENCY_NAME'=>'Currency Name', 'LBL_CURRENCY_SYMBOL'=>'Currency Symbol', + 'LBL_EDIT_BUTTON' => 'Edit', + 'LBL_REMOVE' => 'Remove', + ); diff --git a/include/SugarObjects/templates/sale/metadata/subpanels/default.php b/include/SugarObjects/templates/sale/metadata/subpanels/default.php index 59013212..446f5d9c 100644 --- a/include/SugarObjects/templates/sale/metadata/subpanels/default.php +++ b/include/SugarObjects/templates/sale/metadata/subpanels/default.php @@ -83,6 +83,7 @@ $subpanel_layout = array( 'target_module' => 'Employees', ), 'edit_button'=>array( + 'vname' => 'LBL_EDIT_BUTTON', 'widget_class' => 'SubPanelEditButton', 'module' => $module_name, 'width' => '4%', @@ -91,6 +92,7 @@ $subpanel_layout = array( 'usage'=>'query_only', ), 'remove_button'=>array( + 'vname' => 'LBL_REMOVE', 'widget_class' => 'SubPanelRemoveButton', 'module' => $module_name, 'width' => '5%', diff --git a/include/SugarQueue/SugarJobQueue.php b/include/SugarQueue/SugarJobQueue.php index c0443b7a..11117230 100644 --- a/include/SugarQueue/SugarJobQueue.php +++ b/include/SugarQueue/SugarJobQueue.php @@ -162,7 +162,8 @@ class SugarJobQueue { // fail jobs that are too old $ret = true; - $date = $this->db->convert($this->db->quoted($GLOBALS['timedate']->getNow()->modify("+{$this->timeout} seconds")->asDb()), 'datetime'); + // bsitnikovski@sugarcrm.com bugfix #56144: Scheduler Bug + $date = $this->db->convert($this->db->quoted($GLOBALS['timedate']->getNow()->modify("-{$this->timeout} seconds")->asDb()), 'datetime'); $res = $this->db->query("SELECT id FROM {$this->job_queue_table} WHERE status='".SchedulersJob::JOB_STATUS_RUNNING."' AND date_modified <= $date"); while($row = $this->db->fetchByAssoc($res)) { $this->resolveJob($row["id"], SchedulersJob::JOB_FAILURE, translate('ERR_TIMEOUT', 'SchedulersJobs')); diff --git a/include/SugarTheme/getImage.php b/include/SugarTheme/getImage.php index 7a3070e4..4de6b256 100644 --- a/include/SugarTheme/getImage.php +++ b/include/SugarTheme/getImage.php @@ -35,6 +35,15 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ + +// Bug 57062 /////////////////////////////// +if((!empty($_REQUEST['spriteNamespace']) && substr_count($_REQUEST['spriteNamespace'], '..') > 0) || + (!empty($_REQUEST['imageName']) && substr_count($_REQUEST['imageName'], '..') > 0)) { + die(); +} +// End Bug 57062 /////////////////////////////// + + // try to use the user's theme if we can figure it out if ( isset($_REQUEST['themeName']) && SugarThemeRegistry::current()->name != $_REQUEST['themeName']) { SugarThemeRegistry::set($_REQUEST['themeName']); diff --git a/include/TemplateHandler/TemplateHandler.php b/include/TemplateHandler/TemplateHandler.php index 2f0f606d..1007451e 100644 --- a/include/TemplateHandler/TemplateHandler.php +++ b/include/TemplateHandler/TemplateHandler.php @@ -288,6 +288,14 @@ class TemplateHandler { */ function deleteTemplate($module, $view) { if(is_file($this->cacheDir . $this->templateDir . $module . '/' .$view . '.tpl')) { + // Bug #54634 : RTC 18144 : Cannot add more than 1 user to role but popup is multi-selectable + if ( !isset($this->ss) ) + { + $this->loadSmarty(); + } + $cache_file_name = $this->ss->_get_compile_path($this->cacheDir . $this->templateDir . $module . '/' .$view . '.tpl'); + SugarCache::cleanFile($cache_file_name); + return unlink($this->cacheDir . $this->templateDir . $module . '/' .$view . '.tpl'); } return false; diff --git a/include/connectors/utils/ConnectorHtmlHelper.php b/include/connectors/utils/ConnectorHtmlHelper.php index b0a9a389..812641b4 100644 --- a/include/connectors/utils/ConnectorHtmlHelper.php +++ b/include/connectors/utils/ConnectorHtmlHelper.php @@ -79,6 +79,7 @@ class ConnectorHtmlHelper $iconFilePath = $formatter->getIconFilePath(); $iconFilePath = empty($iconFilePath) ? 'themes/default/images/MoreDetail.png' : $iconFilePath; + $code .= ''
                          . $id .''; diff --git a/include/database/MssqlManager.php b/include/database/MssqlManager.php index 204aee0d..81ac50c8 100644 --- a/include/database/MssqlManager.php +++ b/include/database/MssqlManager.php @@ -403,18 +403,14 @@ class MssqlManager extends DBManager $unionOrderBy = ' order by ' . $unionOrderBy; } - //if start is 0, then just use a top query - if($start == 0) { - $limitUnionSQL = "SELECT TOP $count * FROM (" .$unionsql .") as top_count ".$unionOrderBy; - } else { - //if start is more than 0, then use top query in conjunction - //with rownumber() function to create limit query. - $limitUnionSQL = "SELECT TOP $count * FROM( select ROW_NUMBER() OVER ( order by " - .$rowNumOrderBy.") AS row_number, * FROM (" - .$unionsql .") As numbered) " - . "As top_count_limit WHERE row_number > $start " - .$unionOrderBy; - } + //Bug 56560 either start = 0 or > 0, use top query in conjunction + //with rownumber() function to create limit query. + //otherwise, it shows duplicates when paging on activities subpanel + $limitUnionSQL = "SELECT TOP $count * FROM( select ROW_NUMBER() OVER ( order by " + .$rowNumOrderBy.") AS row_number, * FROM (" + .$unionsql .") As numbered) " + . "As top_count_limit WHERE row_number > $start " + .$unionOrderBy; return $limitUnionSQL; } @@ -442,25 +438,21 @@ class MssqlManager extends DBManager if ($start == 0) { $match_two = strtolower($matches[2]); if (!strpos($match_two, "distinct")> 0 && strpos($match_two, "distinct") !==0) { - if ($count > 20) { - $orderByMatch = array(); - preg_match('/^(.*)(ORDER BY)(.*)$/is',$matches[3], $orderByMatch); - if (!empty($orderByMatch[3])) { - $newSQL = "SELECT TOP $count * FROM - ( - " . $matches[1] . " ROW_NUMBER() - OVER (ORDER BY " . $this->returnOrderBy($sql, $orderByMatch[3]) . ") AS row_number, - " . $matches[2] . $orderByMatch[1]. " - ) AS a - WHERE row_number > $start"; - } - else { - $newSQL = $matches[1] . " TOP $count " . $matches[2] . $matches[3]; - } + $orderByMatch = array(); + preg_match('/^(.*)(ORDER BY)(.*)$/is',$matches[3], $orderByMatch); + if (!empty($orderByMatch[3])) { + $selectPart = array(); + preg_match('/^(.*)(\bFROM .*)$/isU', $matches[2], $selectPart); + $newSQL = "SELECT TOP $count * FROM + ( + " . $matches[1] . $selectPart[1] . ", ROW_NUMBER() + OVER (ORDER BY " . $this->returnOrderBy($sql, $orderByMatch[3]) . ") AS row_number + " . $selectPart[2] . $orderByMatch[1]. " + ) AS a + WHERE row_number > $start"; } else { - //proceed as normal - $newSQL = $matches[1] . " TOP $count " . $matches[2] . $matches[3]; + $newSQL = $matches[1] . " TOP $count " . $matches[2] . $matches[3]; } } else { diff --git a/include/formbase.php b/include/formbase.php index 33cb7da7..4072e502 100644 --- a/include/formbase.php +++ b/include/formbase.php @@ -337,4 +337,133 @@ function isCloseAndCreateNewPressed() { } +/** + * Functions from Save2.php + * @see include/generic/Save2.php + */ + +function add_prospects_to_prospect_list($parent_id,$child_id) +{ + $focus=BeanFactory::getBean('Prospects'); + if(is_array($child_id)){ + $uids = $child_id; + } + else{ + $uids = array($child_id); + } + + $relationship = ''; + foreach($focus->get_linked_fields() as $field => $def) { + if ($focus->load_relationship($field)) { + if ( $focus->$field->getRelatedModuleName() == 'ProspectLists' ) { + $relationship = $field; + break; + } + } + } + + if ( $relationship != '' ) { + foreach ( $uids as $id) { + $focus->retrieve($id); + $focus->load_relationship($relationship); + $focus->prospect_lists->add( $parent_id ); + } + } +} + +function add_to_prospect_list($query_panel,$parent_module,$parent_type,$parent_id,$child_id,$link_attribute,$link_type,$parent) +{ + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$query_panel); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_module); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_type); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_id); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$child_id); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$link_attribute); + $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$link_type); + require_once('include/SubPanel/SubPanelTiles.php'); + + + if (!class_exists($parent_type)) { + require_once('modules/'.cleanDirName($parent_module).'/'.cleanDirName($parent_type).'.php'); + } + $focus = new $parent_type(); + $focus->retrieve($parent_id); + if(empty($focus->id)) { + return false; + } + if(empty($parent)) { + return false; + } + + //if link_type is default then load relationship once and add all the child ids. + $relationship_attribute=$link_attribute; + + //find all prospects based on the query + + $subpanel = new SubPanelTiles($parent, $parent->module_dir); + $thisPanel=$subpanel->subpanel_definitions->load_subpanel($query_panel); + if(empty($thisPanel)) { + return false; + } + $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -99,-99,'', $thisPanel); + + if(!empty($result['list'])) { + foreach($result['list'] as $object) { + if ($link_type != 'default') { + $relationship_attribute=strtolower($object->$link_attribute); + } + $GLOBALS['log']->debug('add_prospects_to_prospect_list:relationship_attribute:'.$relationship_attribute); + // load relationship for the first time or on change of relationship atribute. + if (empty($focus->$relationship_attribute)) { + $focus->load_relationship($relationship_attribute); + } + //add + $focus->$relationship_attribute->add($object->$child_id); + } + } +} + +//Link rows returned by a report to parent record. +function save_from_report($report_id,$parent_id, $module_name, $relationship_attr_name) { + global $beanFiles; + global $beanList; + + $GLOBALS['log']->debug("Save2: Linking with report output"); + $GLOBALS['log']->debug("Save2:Report ID=".$report_id); + $GLOBALS['log']->debug("Save2:Parent ID=".$parent_id); + $GLOBALS['log']->debug("Save2:Module Name=".$module_name); + $GLOBALS['log']->debug("Save2:Relationship Attribute Name=".$relationship_attr_name); + + $bean_name = $beanList[$module_name]; + $GLOBALS['log']->debug("Save2:Bean Name=".$bean_name); + require_once($beanFiles[$bean_name]); + $focus = new $bean_name(); + + $focus->retrieve($parent_id); + $focus->load_relationship($relationship_attr_name); + + //fetch report definition. + global $current_language, $report_modules, $modules_report; + + $mod_strings = return_module_language($current_language,"Reports"); + + + $saved = new SavedReport(); + $saved->disable_row_level_security = true; + $saved->retrieve($report_id, false); + + //initiailize reports engine with the report definition. + require_once('modules/Reports/SubpanelFromReports.php'); + $report = new SubpanelFromReports($saved); + $report->run_query(); + + $sql = $report->query_list[0]; + $GLOBALS['log']->debug("Save2:Report Query=".$sql); + $result = $report->db->query($sql); + while($row = $report->db->fetchByAssoc($result)) + { + $focus->$relationship_attr_name->add($row['primaryid']); + } +} + ?> diff --git a/include/generic/Save2.php b/include/generic/Save2.php index f27a9aa0..35df5763 100644 --- a/include/generic/Save2.php +++ b/include/generic/Save2.php @@ -58,130 +58,6 @@ ARGS: require_once('include/formbase.php'); -function add_prospects_to_prospect_list($parent_id,$child_id) -{ - $focus=BeanFactory::getBean('Prospects'); - if(is_array($child_id)){ - $uids = $child_id; - } - else{ - $uids = array($child_id); - } - - $relationship = ''; - foreach($focus->get_linked_fields() as $field => $def) { - if ($focus->load_relationship($field)) { - if ( $focus->$field->getRelatedModuleName() == 'ProspectLists' ) { - $relationship = $field; - break; - } - } - } - - if ( $relationship != '' ) { - foreach ( $uids as $id) { - $focus->retrieve($id); - $focus->load_relationship($relationship); - $focus->prospect_lists->add( $parent_id ); - } - } -} - -function add_to_prospect_list($query_panel,$parent_module,$parent_type,$parent_id,$child_id,$link_attribute,$link_type,$parent) -{ - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$query_panel); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_module); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_type); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_id); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$child_id); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$link_attribute); - $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$link_type); - require_once('include/SubPanel/SubPanelTiles.php'); - - - if (!class_exists($parent_type)) { - require_once('modules/'.cleanDirName($parent_module).'/'.cleanDirName($parent_type).'.php'); - } - $focus = new $parent_type(); - $focus->retrieve($parent_id); - if(empty($focus->id)) { - return false; - } - if(empty($parent)) { - return false; - } - - //if link_type is default then load relationship once and add all the child ids. - $relationship_attribute=$link_attribute; - - //find all prospects based on the query - - $subpanel = new SubPanelTiles($parent, $parent->module_dir); - $thisPanel=$subpanel->subpanel_definitions->load_subpanel($query_panel); - if(empty($thisPanel)) { - return false; - } - $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -1,-1,'', $thisPanel); - - if(!empty($result['list'])) { - foreach($result['list'] as $object) { - if ($link_type != 'default') { - $relationship_attribute=strtolower($object->$link_attribute); - } - $GLOBALS['log']->debug('add_prospects_to_prospect_list:relationship_attribute:'.$relationship_attribute); - // load relationship for the first time or on change of relationship atribute. - if (empty($focus->$relationship_attribute)) { - $focus->load_relationship($relationship_attribute); - } - //add - $focus->$relationship_attribute->add($object->$child_id); - } - } -} - -//Link rows returned by a report to parent record. -function save_from_report($report_id,$parent_id, $module_name, $relationship_attr_name) { - global $beanFiles; - global $beanList; - - $GLOBALS['log']->debug("Save2: Linking with report output"); - $GLOBALS['log']->debug("Save2:Report ID=".$report_id); - $GLOBALS['log']->debug("Save2:Parent ID=".$parent_id); - $GLOBALS['log']->debug("Save2:Module Name=".$module_name); - $GLOBALS['log']->debug("Save2:Relationship Attribute Name=".$relationship_attr_name); - - $bean_name = $beanList[$module_name]; - $GLOBALS['log']->debug("Save2:Bean Name=".$bean_name); - require_once($beanFiles[$bean_name]); - $focus = new $bean_name(); - - $focus->retrieve($parent_id); - $focus->load_relationship($relationship_attr_name); - - //fetch report definition. -global $current_language, $report_modules, $modules_report; - -$mod_strings = return_module_language($current_language,"Reports"); - - - $saved = new SavedReport(); - $saved->disable_row_level_security = true; - $saved->retrieve($report_id, false); - - //initiailize reports engine with the report definition. - require_once('modules/Reports/SubpanelFromReports.php'); - $report = new SubpanelFromReports($saved); - $report->run_query(); - - $sql = $report->query_list[0]; - $GLOBALS['log']->debug("Save2:Report Query=".$sql); - $result = $report->db->query($sql); - while($row = $report->db->fetchByAssoc($result)) - { - $focus->$relationship_attr_name->add($row['primaryid']); - } -} - $refreshsubpanel=true; if (isset($_REQUEST['return_type']) && $_REQUEST['return_type'] == 'report') { save_from_report($_REQUEST['subpanel_id'] //report_id diff --git a/include/generic/SugarWidgets/SugarWidgetFielddatetime.php b/include/generic/SugarWidgets/SugarWidgetFielddatetime.php index e6cb3bd5..18eb524e 100644 --- a/include/generic/SugarWidgets/SugarWidgetFielddatetime.php +++ b/include/generic/SugarWidgets/SugarWidgetFielddatetime.php @@ -523,6 +523,26 @@ class SugarWidgetFieldDateTime extends SugarWidgetReportField return $this->reporter->db->convert($this->_get_column_select($layout_def), "date_format", array('%Y-%m'))."\n"; } + /** + * For oracle we have to return order by string like group by string instead of return field alias + * + * @param array $layout_def definition of field + * @return string order by string for field + */ + function queryOrderByMonth($layout_def) + { + $orderBy = $this->reporter->db->convert($this->_get_column_select($layout_def), "date_format", array('%Y-%m')); + + if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') + { + return $orderBy . " ASC\n"; + } + else + { + return $orderBy . " DESC\n"; + } + } + /** * Select addon datetime field for "day" field in reports * @@ -581,6 +601,32 @@ class SugarWidgetFieldDateTime extends SugarWidgetReportField array("'-'", $this->reporter->db->convert($column, "quarter"))); } + /** + * For oracle we have to return order by string like group by string instead of return field alias + * + * @param array $layout_def definition of field + * @return string order by string for field + */ + public function queryOrderByQuarter($layout_def) + { + $column = $this->_get_column_select($layout_def); + $orderBy = $this->reporter->db->convert( + $this->reporter->db->convert($column, "date_format", array('%Y')), + 'CONCAT', + array("'-'", $this->reporter->db->convert($column, "quarter")) + ); + + + if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') + { + return $orderBy . " ASC\n"; + } + else + { + return $orderBy . " DESC\n"; + } + } + function displayInput(&$layout_def) { global $timedate, $current_language, $app_strings; $home_mod_strings = return_module_language($current_language, 'Home'); diff --git a/include/generic/SugarWidgets/SugarWidgetFieldmultienum.php b/include/generic/SugarWidgets/SugarWidgetFieldmultienum.php index e1418ffa..baeefbb8 100644 --- a/include/generic/SugarWidgets/SugarWidgetFieldmultienum.php +++ b/include/generic/SugarWidgets/SugarWidgetFieldmultienum.php @@ -39,23 +39,45 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class SugarWidgetFieldMultiEnum extends SugarWidgetFieldEnum { public function queryFilternot_one_of(&$layout_def) { - $col_name = $this->_get_column_select($layout_def) . " NOT LIKE " ; - $query = array(); - foreach ($layout_def['input_name0'] as $val) - { - $query[] = $col_name . $this->reporter->db->quoted('%' . $this->encodeMultienumCustom($layout_def, $val) . '%'); - } - return '('. implode(' AND ', $query) .')'; + $arr = array (); + foreach ($layout_def['input_name0'] as $value) { + array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); + } + $reporter = $this->layout_manager->getAttribute("reporter"); + + $col_name = $this->_get_column_select($layout_def) . " NOT LIKE " ; + $arr_count = count($arr); + $query = ""; + foreach($arr as $key=>$val) { + $query .= $col_name; + $value = preg_replace("/^'/", "'%", $val, 1); + $value = preg_replace("/'$/", "%'", $value, 1); + $query .= $value; + if ($key != ($arr_count - 1)) + $query.= " OR " ; + } + return '('.$query.')'; } public function queryFilterone_of(&$layout_def) { - $col_name = $this->_get_column_select($layout_def) . " LIKE " ; - $query = array(); - foreach ($layout_def['input_name0'] as $val) - { - $query[] = $col_name . $this->reporter->db->quoted('%' . $this->encodeMultienumCustom($layout_def, $val) . '%'); - } - return '('. implode(' OR ', $query) .')'; + $arr = array (); + foreach ($layout_def['input_name0'] as $value) { + array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); + } + $reporter = $this->layout_manager->getAttribute("reporter"); + + $col_name = $this->_get_column_select($layout_def) . " LIKE " ; + $arr_count = count($arr); + $query = ""; + foreach($arr as $key=>$val) { + $query .= $col_name; + $value = preg_replace("/^'/", "'%", $val, 1); + $value = preg_replace("/'$/", "%'", $value, 1); + $query .= $value; + if ($key != ($arr_count - 1)) + $query.= " OR " ; + } + return '('.$query.')'; } public function queryFilteris($layout_def) { diff --git a/include/generic/SugarWidgets/SugarWidgetReportField.php b/include/generic/SugarWidgets/SugarWidgetReportField.php index 2836fdcd..57da52f4 100644 --- a/include/generic/SugarWidgets/SugarWidgetReportField.php +++ b/include/generic/SugarWidgets/SugarWidgetReportField.php @@ -165,7 +165,11 @@ class SugarWidgetReportField extends SugarWidgetField $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2']; } else { - $order_by = $this->_get_column_alias($layout_def)." \n"; + /** + * Bug #54990 + * use the table and column names in order by in order to support all databases + */ + $order_by = $layout_def['table_alias'] . "." . $layout_def['name'] . " \n"; } if ( empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') @@ -326,4 +330,4 @@ class SugarWidgetReportField extends SugarWidgetField return "($column IS NOT NULL AND $column <> ".$this->reporter->db->emptyValue($layout_def['type']).")"; } -} \ No newline at end of file +} diff --git a/include/javascript/ajaxUI.js b/include/javascript/ajaxUI.js index 6ce3e21c..671ea067 100644 --- a/include/javascript/ajaxUI.js +++ b/include/javascript/ajaxUI.js @@ -34,16 +34,17 @@ ********************************************************************************/ SUGAR.ajaxUI={loadingWindow:false,callback:function(o) {var cont;if(typeof window.onbeforeunload=="function") -window.onbeforeunload=null;scroll(0,0);SUGAR.ajaxUI.hideLoadingPanel();try{var r=YAHOO.lang.JSON.parse(o.responseText);cont=r.content;if(r.title) +window.onbeforeunload=null;scroll(0,0);try{var r=YAHOO.lang.JSON.parse(o.responseText);cont=r.content;if(r.title) {document.title=html_entity_decode(r.title);} if(r.action) {action_sugar_grp1=r.action;} if(r.favicon) {SUGAR.ajaxUI.setFavicon(r.favicon);} -var c=document.getElementById("content");c.innerHTML=cont;SUGAR.util.evalScript(cont);if(r.moduleList) +var c=document.getElementById("content");c.style.visibility='hidden';c.innerHTML=cont;SUGAR.util.evalScript(cont);c.style.visibility='visible';if(r.moduleList) {SUGAR.themes.setModuleTabs(r.moduleList);} if(typeof(r.responseTime)!='undefined'){var rt=$("#responseTime");if(rt.length>0){rt.html(rt.html().replace(/[\d]+\.[\d]+/,r.responseTime));} -else if(typeof(logoStats)!="undefined"){$("#logo").attr("title",logoStats.replace(/[\d]+\.[\d]+/,r.responseTime)).tipTip({maxWidth:"auto",edgeOffset:10});}}}catch(e){SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) +else if(typeof(logoStats)!="undefined"){$("#logo").attr("title",logoStats.replace(/[\d]+\.[\d]+/,r.responseTime)).tipTip({maxWidth:"auto",edgeOffset:10});}} +SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) {if(!SUGAR.ajaxUI.errorPanel){SUGAR.ajaxUI.errorPanel=new YAHOO.widget.Panel("ajaxUIErrorPanel",{modal:false,visible:true,constraintoviewport:true,width:"800px",height:"600px",close:true});} var panel=SUGAR.ajaxUI.errorPanel;panel.setHeader(SUGAR.language.get('app_strings','ERR_AJAX_LOAD'));panel.setBody('');panel.setFooter(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FOOTER'));panel.render(document.body);SUGAR.util.doWhen(function(){var f=document.getElementById("ajaxErrorFrame");return f!=null&&f.contentWindow!=null&&f.contentWindow.document!=null;},function(){document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML=errorMessage;window.setTimeout('throw "AjaxUI error parsing response"',300);});SUGAR.ajaxUI.errorMessage=errorMessage;window.setTimeout('if((typeof(document.getElementById("ajaxErrorFrame")) == "undefined" || typeof(document.getElementById("ajaxErrorFrame")) == null || document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML == "")){document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML=SUGAR.ajaxUI.errorMessage;}',3000);panel.show();panel.center();throw"AjaxUI error parsing response";},canAjaxLoadModule:function(module) {var checkLS=/&LicState=check/.exec(window.location.search);if(checkLS||(typeof(SUGAR.config.disableAjaxUI)!='undefined'&&SUGAR.config.disableAjaxUI==true)){return false;} diff --git a/include/javascript/javascript.php b/include/javascript/javascript.php index 8f30ace4..51478140 100644 --- a/include/javascript/javascript.php +++ b/include/javascript/javascript.php @@ -97,15 +97,16 @@ class javascript{ if(isset($this->sugarbean->field_name_map[$field]['validation'])){ switch($this->sugarbean->field_name_map[$field]['validation']['type']){ case 'range': - $min = 0; - $max = 100; + $min = false; + $max = false; if(isset($this->sugarbean->field_name_map[$field]['validation']['min'])){ - $min = $this->sugarbean->field_name_map[$field]['validation']['min']; + $min = filter_var($this->sugarbean->field_name_map[$field]['validation']['min'], FILTER_VALIDATE_INT); } if(isset($this->sugarbean->field_name_map[$field]['validation']['max'])){ - $max = $this->sugarbean->field_name_map[$field]['validation']['max']; + $max = filter_var($this->sugarbean->field_name_map[$field]['validation']['max'], FILTER_VALIDATE_INT); } - if($min > $max){ + if ($min !== false && $max !== false && $min > $max) + { $max = $min; } if(!empty($displayField)){ @@ -193,8 +194,15 @@ class javascript{ } function addFieldRange($field, $type,$displayName, $required, $prefix='',$min, $max){ - $this->script .= "addToValidateRange('".$this->formname."', '".$prefix.$field."', '".$type . "', {$this->getRequiredString($required)},'" - . $this->stripEndColon(translate($displayName,$this->sugarbean->module_dir)) . "', $min, $max );\n"; + $this->script .= "addToValidateRange(" + . "'" . $this->formname . "', " + . "'" . $prefix . $field . "', '" + . $type . "', " + . $this->getRequiredString($required) . ", '" + . $this->stripEndColon(translate($displayName, $this->sugarbean->module_dir)) . "', " + . ($min === false ? 'false' : $min) . ", " + . ($max === false ? 'false' : $max) + . ");\n"; } function addFieldIsValidDate($field, $type, $displayName, $msg, $required, $prefix='') { diff --git a/include/javascript/jsAlerts.php b/include/javascript/jsAlerts.php index d724fd12..8e14335d 100644 --- a/include/javascript/jsAlerts.php +++ b/include/javascript/jsAlerts.php @@ -95,7 +95,7 @@ EOQ; AND meetings_users.accept_status != 'decline' AND meetings.reminder_time != -1 AND meetings_users.deleted != 1 - AND meetings.status != 'Held' + AND meetings.status = 'Planned' AND date_start >= $dateTimeNow AND date_start <= $dateTimeMax"; $result = $db->query($selectMeetings); @@ -168,7 +168,7 @@ EOQ; AND calls_users.accept_status != 'decline' AND calls.reminder_time != -1 AND calls_users.deleted != 1 - AND calls.status != 'Held' + AND calls.status = 'Planned' AND date_start >= $dateTimeNow AND date_start <= $dateTimeMax"; diff --git a/include/javascript/popup_helper.js b/include/javascript/popup_helper.js index 61060b8a..76e130db 100644 --- a/include/javascript/popup_helper.js +++ b/include/javascript/popup_helper.js @@ -70,7 +70,10 @@ eval("var selection_list_array = {"+array_contents.join(",")+"}");eval("var temp var passthru_data=Object();if(typeof(request_data.passthru_data)!='undefined') {passthru_data=request_data.passthru_data;} var form_name=request_data.form_name;var field_to_name_array=request_data.field_to_name_array;closePopup();var call_back_function=eval("window.opener."+request_data.call_back_function);var result_data={"form_name":form_name,"selection_list":selection_list_array,"passthru_data":passthru_data,"select_entire_list":form.select_entire_list.value,"current_query_by_page":form.current_query_by_page.value};call_back_function(result_data);} -function toggleMore(spanId,img_id,module,action,params){toggle_more_go=function(){oReturn=function(body,caption,width,theme){$(".ui-dialog").find(".open").dialog("close");var $dialog=$('
').html(body).dialog({autoOpen:false,title:caption,width:300,position:{my:'right top',at:'left top',of:$('#'+spanId+' img')}});$dialog.dialog('open');} +function toggleMore(spanId,img_id,module,action,params){toggle_more_go=function(){oReturn=function(body,caption,width,theme){$(".ui-dialog").find(".open").dialog("close");var el='#'+spanId+' img';if(action=='DisplayInlineTeams') +{el='#'+spanId;} +var $dialog=$('
').html(body).dialog({autoOpen:false,title:caption,width:300,position:{my:'right top',at:'left top',of:$(el)}});var width=$dialog.dialog("option","width");var pos=$(el).offset();var ofWidth=$(el).width();if((pos.left+ofWidth)-40=min&&value<=max;} +value=unformatNumberNoParse(value,num_grp_sep,dec_sep).toString();var result=true;if(typeof min=='number'&&valuemax) +{result=false;} +return result;} function bothExist(item1,item2){if(typeof item1=='undefined'){return false;} if(typeof item2=='undefined'){return false;} if((item1==''&&item2!='')||(item1!=''&&item2=='')){return false;} @@ -197,7 +201,12 @@ break;case'error':isError=true;add_error_style(formname,validate[formname][i][na if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'callback':if(typeof validate[formname][i][callbackIndex]=='function') {var result=validate[formname][i][callbackIndex](formname,validate[formname][i][nameIndex]);if(result==false) {isError=true;add_error_style(formname,validate[formname][i][nameIndex],requiredTxt+" "+validate[formname][i][msgIndex]);}} -break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+") ");} +break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');if(typeof validate[formname][i][minIndex]=='number'&&typeof validate[formname][i][maxIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+")");} +else if(typeof validate[formname][i][minIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_SHOULD_BE')+' '+validate[formname][i][minIndex]+' '+SUGAR.language.get('app_strings','MSG_OR_GREATER'));} +else if(typeof validate[formname][i][maxIndex]=='number') +{add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][maxIndex]);}} break;case'isbefore':compareTo=form[validate[formname][i][compareToIndex]];if(typeof compareTo!='undefined'){if(trim(compareTo.value)!=''||(validate[formname][i][allowblank]!='true')){date2=trim(compareTo.value);date1=trim(form[validate[formname][i][nameIndex]].value);if(trim(date1).length!=0&&!isBefore(date1,date2)){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+"("+date1+") "+SUGAR.language.get('app_strings','MSG_IS_NOT_BEFORE')+' '+date2);}}} break;case'less':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);maximum=parseFloat(validate[formname][i][maxIndex]);if(typeof maximum!='undefined'){if(value>maximum){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][altMsgIndex]);}} break;case'more':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);minimum=parseFloat(validate[formname][i][minIndex]);if(typeof minimum!='undefined'){if(value]*)>((.|\s|\v|\0)*?)<\s*\/script\s*>/igm;var lastIndex=-1;var result=objRegex.exec(text);while(result&&result.index>lastIndex){lastIndex=result.index -try{var script=document.createElement('script');script.type='text/javascript';if(result[1].indexOf("src=")>-1){var srcRegex=/.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm;var srcResult=result[1].replace(srcRegex,'$1');script.src=srcResult;}else{script.text=result[2];} -document.body.appendChild(script);} +try{if(result[1].indexOf("src=")>-1){var srcRegex=/.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm;var srcResult=result[1].replace(srcRegex,'$1');var r1=/:\/\//igm;if(r1.test(srcResult)&&srcResult.indexOf(window.location.hostname)==-1) +{YUI().use('get',function(Y) +{var url=srcResult;Y.Get.script(srcResult,{autopurge:false,onSuccess:function(o){},onFailure:function(o){},onTimeout:function(o){}});});} +else +{YUI().use("io-base",function(Y){var cfg,response;cfg={method:'GET',sync:true,on:{success:function(transactionid,response,arguments) +{SUGAR.util.globalEval(response.responseText);}}};response=Y.io(srcResult,cfg);});}}else{SUGAR.util.globalEval(result[2]);}} catch(e){if(typeof(console)!="undefined"&&typeof(console.log)=="function") {console.log("error adding script");console.log(e);console.log(result);}} result=objRegex.exec(text);}},getLeftColObj:function(){leftColObj=document.getElementById('leftCol');while(leftColObj.nodeName!='TABLE'){leftColObj=leftColObj.firstChild;} diff --git a/include/language/en_us.lang.php b/include/language/en_us.lang.php index ae6b51cb..c5b50512 100644 --- a/include/language/en_us.lang.php +++ b/include/language/en_us.lang.php @@ -1346,7 +1346,7 @@ $app_strings = array ( 'LBL_EMAIL_DELETE_ERROR_DESC' => 'You do not have access to this area. Contact your site administrator to obtain access.', 'LBL_EMAIL_ERROR_DUPE_FOLDER_NAME' => 'Sugar Folder names must be unique.', 'LBL_EMAIL_ERROR_EMPTY' => 'Please enter some search criteria.', - 'LBL_EMAIL_ERROR_GENERAL_TITLE' => 'An error has occured', + 'LBL_EMAIL_ERROR_GENERAL_TITLE' => 'An error has occurred', 'LBL_EMAIL_ERROR_LIST_NAME' => 'An email list with that name already exists', 'LBL_EMAIL_ERROR_MESSAGE_DELETED' => 'Message Removed from Server', 'LBL_EMAIL_ERROR_IMAP_MESSAGE_DELETED' => 'Either message Removed from Server or moved to a different folder', @@ -1359,7 +1359,7 @@ $app_strings = array ( 'LBL_EMAIL_ERROR_NO_IMAP_FOLDER_RENAME' => 'IMAP folder renaming is not supported at this time.', 'LBL_EMAIL_ERROR_SERVER' => 'A mail server address is required.', 'LBL_EMAIL_ERROR_SAVE_ACCOUNT' => 'The mail account may not have been saved.', - 'LBL_EMAIL_ERROR_TIMEOUT' => 'An error has occured while communicating with the mail server.', + 'LBL_EMAIL_ERROR_TIMEOUT' => 'An error has occurred while communicating with the mail server.', 'LBL_EMAIL_ERROR_USER' => 'A login name is required.', 'LBL_EMAIL_ERROR_PASSWORD' => 'A password is required.', 'LBL_EMAIL_ERROR_PORT' => 'A mail server port is required.', @@ -1620,7 +1620,7 @@ $app_strings = array ( 'LBL_INVALID_FILE_EXTENSION' => 'Invalid File Extension', - 'ERR_AJAX_LOAD' => 'An error has occured:', + 'ERR_AJAX_LOAD' => 'An error has occurred:', 'ERR_AJAX_LOAD_FAILURE' => 'There was an error processing your request, please try again at a later time.', 'ERR_AJAX_LOAD_FOOTER' => 'If this error persists, please have your administrator disable Ajax for this module', 'ERR_CREATING_FIELDS' => 'Error filling in additional detail fields: ', @@ -3237,7 +3237,7 @@ $app_list_strings['kbdocument_status_dom'] = array ( 'Sugar'=>'Sugar', 'WebEx'=>'WebEx', 'GoToMeeting'=>'GoToMeeting', - 'LotusLive'=>'LotusLive', + 'IBMSmartCloud'=>'IBM SmartCloud', 'Google' => 'Google', 'Box' => 'Box.net', 'Facebook'=>'Facebook', diff --git a/include/phpmailer/class.smtp.php b/include/phpmailer/class.smtp.php index 9ede6ee9..961e79d3 100644 --- a/include/phpmailer/class.smtp.php +++ b/include/phpmailer/class.smtp.php @@ -1,4 +1,44 @@ smtp_conn)) { + $GLOBALS['log']->warn('SMTP Connection is not a valid resource'); + return ""; + } + $data = ""; while(!feof($this->smtp_conn)) { $str = @fgets($this->smtp_conn,515); diff --git a/include/upload_file.php b/include/upload_file.php index cec1b5c7..fcdbf934 100644 --- a/include/upload_file.php +++ b/include/upload_file.php @@ -291,16 +291,16 @@ class UploadFile $file_ext = pathinfo($filename, PATHINFO_EXTENSION); //If no file extension is available and the mime is octet-stream try to determine the mime type. - $recheckMime = empty($file_ext) && ($_FILES_element['type'] == 'application/octet-stream'); + $recheckMime = empty($file_ext) && !empty($_FILES_element['type']) && ($_FILES_element['type'] == 'application/octet-stream'); - if( $_FILES_element['type'] && !$recheckMime) { + if (!empty($_FILES_element['type']) && !$recheckMime) { $mime = $_FILES_element['type']; } elseif( function_exists( 'mime_content_type' ) ) { $mime = mime_content_type( $_FILES_element['tmp_name'] ); } elseif( function_exists( 'ext2mime' ) ) { $mime = ext2mime( $_FILES_element['name'] ); } else { - $mime = ' application/octet-stream'; + $mime = 'application/octet-stream'; } return $mime; } diff --git a/include/utils.php b/include/utils.php index e7c85e1a..cb64c1ae 100644 --- a/include/utils.php +++ b/include/utils.php @@ -60,7 +60,7 @@ function make_sugar_config(&$sugar_config) global $default_charset; global $default_currency_name; global $default_currency_symbol; - global $default_currency_iso4217; + global $default_currency_iso4217; global $defaultDateFormat; global $default_language; global $default_module; @@ -3071,7 +3071,7 @@ function display_stack_trace($textOnly=false){ } function StackTraceErrorHandler($errno, $errstr, $errfile,$errline, $errcontext) { - $error_msg = " $errstr occured in $errfile on line $errline [" . date("Y-m-d H:i:s") . ']'; + $error_msg = " $errstr occurred in $errfile on line $errline [" . date("Y-m-d H:i:s") . ']'; $halt_script = true; switch($errno){ case 2048: return; //depricated we have lots of these ignore them @@ -4863,3 +4863,37 @@ function clean_sensitive_data($defs, $data) } return $data; } + +/** + * Return relations with labels for duplicates + */ +function getDuplicateRelationListWithTitle($def, $var_def, $module) +{ + global $current_language; + $select_array = array_unique($def); + if (count($select_array) < count($def)) + { + $temp_module_strings = return_module_language($current_language, $module); + $temp_duplicate_array = array_diff_assoc($def, $select_array); + $temp_duplicate_array = array_merge($temp_duplicate_array, array_intersect($select_array, $temp_duplicate_array)); + + foreach ($temp_duplicate_array as $temp_key => $temp_value) + { + // Don't add duplicate relationships + if (!empty($var_def[$temp_key]['relationship']) && array_key_exists($var_def[$temp_key]['relationship'], $select_array)) + { + continue; + } + $select_array[$temp_key] = $temp_value; + } + + // Add the relationship name for easier recognition + foreach ($select_array as $key => $value) + { + $select_array[$key] .= ' (' . $key . ')'; + } + } + + asort($select_array); + return $select_array; +} diff --git a/install/install_utils.php b/install/install_utils.php index 536b28c3..4554dba7 100644 --- a/install/install_utils.php +++ b/install/install_utils.php @@ -623,10 +623,10 @@ function handleDbCreateSugarUser() { echo $mod_strings['LBL_PERFORM_DONE']; } else { echo "
"; - echo "An error occured when creating user:
"; + echo "An error occurred when creating user:
"; echo "$err
"; echo "
"; - installLog("An error occured when creating user: $err"); + installLog("An error occurred when creating user: $err"); } } diff --git a/json_server.php b/json_server.php index f5afdafc..f4738246 100644 --- a/json_server.php +++ b/json_server.php @@ -297,7 +297,7 @@ function construct_where(&$query_obj, $table='',$module=null) /////////////////////////////////////////////////////////////////////////////// //// JSON SERVER HANDLER LOGIC //ignore notices -error_reporting(E_ALL & ~E_NOTICE); +error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); ob_start(); insert_charset_header(); global $sugar_config; diff --git a/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js b/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js index adf95053..140c1a8a 100644 --- a/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js +++ b/jssource/src_files/include/SugarCharts/Jit/js/Jit/jit.js @@ -9469,8 +9469,194 @@ $jit.ST.Plot = new Class({ } }), animating); if(scale >= 0) node.drawn = true; - }, - + }, + + /** + * Return array with correct positions for each element + * + * @param {Array} dimArray + * @param {Number} fontHeight + * @return {Array} + */ + positions: function(dimArray, fontHeight) + { + var group = []; + var isLastElem = false; + var i; + var newArray = []; + var position = 0; + var currentState; + + + for (i = 0; i < dimArray.length; i++) + { + currentState = {type: 'element', position: position, height: dimArray[i], font: fontHeight, filament: true}; + if (dimArray[i] <= fontHeight) + { + if (isLastElem) + { + group = []; + } + group.push(currentState); + isLastElem = false; + } + else + { + group.push(currentState); + newArray.push({type: 'group', val:group, groupHeight: 0, groupPosition: group[0].position}); + group = []; + isLastElem = true; + } + position += dimArray[i]; + } + if (group.length > 0) + { + newArray.push({type: 'group', val: group, groupHeight: 0, groupPosition: group[0].position}); + group = []; + } + var figureHeight = position; + + for (i = 0; i < newArray.length; i++) + { + newArray[i] = this.pipelineGetHeight(newArray[i]); + } + + newArray = this.pipelineMoveBlocks(newArray, figureHeight, fontHeight); + + var ret = []; + for (i = 0; i < newArray.length; i++) + { + group = newArray[i].val; + for (var k = 0; k < group.length; k++) + { + ret.push(group[k]); + } + } + return ret; + }, + + /** + * Return recalculation group height(groupHeight) and positions of elements + * + * @param {Array} group + * @return {Array} + */ + pipelineGetHeight: function(group) + { + var position = 0; + var between = 3; + var count = group.val.length; + var fontHeight = group.val[0].font; + var positionStart = group.val[0].position; + + if (count == 1) + { + group.groupHeight = group.val[0].font; + group.val[0].filament = false; + return group; + } + + if (count == 2) + { + group.groupHeight = fontHeight * 2 + between; + group.val[1].position = positionStart + fontHeight + between; + group.val[0].filament = false; + group.val[1].filament = false; + return group; + } + + var even = true; + for (var i = 0; i < group.val.length; i++) + { + group.val[i].position = positionStart + position; + even = i % 2; + position += between; + if (even) + { + group.val[i].filament = false; + position += fontHeight; + } + else + { + group.val[i].filament = true; + } + } + group.groupHeight = (group.val[group.val.length - 1].position - group.val[0].position) + fontHeight + between; + return group; + }, + + /** + * Return array with new group and elements positions relation figure layout border + * + * @param {Array} block + * @param {Number} figureheight + * @param {Number} fontHeight + * @return {Array} + */ + pipelineMoveBlocks: function(block, figureheight, fontHeight) + { + var offset; + var rebuild; + if (block.length < 2) + { + return block; + } + + var lastValue = block[block.length - 1]; + var prelastValue; + if ((lastValue.groupPosition + lastValue.groupHeight) > figureheight) + { + offset = (figureheight - lastValue.groupHeight) - lastValue.groupPosition; + lastValue.groupPosition += offset; + for (var li = 0; li < lastValue.val.length; li++) + { + lastValue.val[li].position += offset; + } + prelastValue = block[block.length - 2]; + if (prelastValue.groupPosition + fontHeight > lastValue.groupPosition) + { + block[block.length - 2] = this.pipelineMergeGroup(lastValue, prelastValue); + block.pop(); + rebuild = true; + } + if (block.length < 3) + { + return block; + } + } + for (var i = 1; i < block.length; i++) + { + if ( (block[i - 1].groupPosition + block[i - 1].groupHeight) > block[i].groupPosition) + { + block[i - 1] = this.pipelineMergeGroup(block[i], block[i - 1]); + block.splice(i, 1); + rebuild = true; + } + } + if (rebuild) + { + block = this.pipelineMoveBlocks(block, figureheight, fontHeight); + } + return block; + }, + + /** + * Merge two groups + * + * @param {Array} lastValue + * @param {Array} prelastValue + * @return {Array} + */ + pipelineMergeGroup: function(lastValue, prelastValue) + { + var newGroup; + newGroup = prelastValue; + newGroup.val = newGroup.val.concat(lastValue.val); + newGroup = this.pipelineGetHeight(newGroup); + newGroup.groupPosition = prelastValue.groupPosition; + return newGroup; + }, + /* Method: getAlignedPos @@ -13436,7 +13622,7 @@ $jit.ST.Plot.NodeTypes.implement({ ratio = .65; if (colorArray && dimArray && stringArray) { - + var newDimArray = this.positions(dimArray, label.size); // horizontal lines for (var i=0, l=dimArray.length, acum=0, valAcum=0; i 0) ? dimArray[i - 1] : 100; var labelOffsetHeight = (previousElementHeight < label.size && i > 0) ? ((dimArray[i] > label.size) ? (dimArray[i]/2) - (label.size/2) : label.size) : 0; var topWidth = minWidth + ((acum + dimArray[i]) * ratio); - var bottomWidth = minWidth + ((acum) * ratio); - var bottomWidthLabel = minWidth + ((acum + labelOffsetHeight) * ratio); - var labelOffsetRight = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mV.width + 20 : 0) : 0; - var labelOffsetLeft = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mVL.width + 20 : 0) : 0; + var bottomWidth = minWidth + ((acum) * ratio); + var bottomWidthLabel = minWidth + (newDimArray[i].position * ratio); + var labelOffsetRight = (newDimArray[i].filament) ? (next_mV.width + 25) : 0; + var labelOffsetLeft = (newDimArray[i].filament) ? (next_mVL.width + 25) : 0; // ctx.fillRect((-bottomWidth/2) - mVL.width - config.labelOffset , y - acum, bottomWidth + mVL.width + mV.width + (config.labelOffset*2), 1); //right lines ctx.beginPath(); ctx.moveTo(bottomWidth/2,y - acum); // - ctx.lineTo(bottomWidthLabel/2 + (labelOffset-10),y - acum - labelOffsetHeight); // top right - ctx.lineTo(bottomWidthLabel/2 + (labelOffset) + labelOffsetRight + mV.width,y - acum - labelOffsetHeight); // bottom right + ctx.lineTo(bottomWidthLabel / 2 + (labelOffset - 10), y - newDimArray[i].position); // top right + ctx.lineTo(bottomWidthLabel / 2 + (labelOffset) + labelOffsetRight + mV.width, y - newDimArray[i].position); // bottom right ctx.stroke(); //left lines ctx.beginPath(); ctx.moveTo(-bottomWidth/2,y - acum); // - ctx.lineTo(-bottomWidthLabel/2 - (labelOffset-10),y - acum - labelOffsetHeight); // top right - ctx.lineTo(-bottomWidthLabel/2 - (labelOffset) - labelOffsetLeft -mVL.width,y - acum - labelOffsetHeight); // bottom right + ctx.lineTo( - bottomWidthLabel / 2 - (labelOffset - 10), y - newDimArray[i].position); // top right + ctx.lineTo( - bottomWidthLabel / 2 - (labelOffset) - labelOffsetLeft - mVL.width, y - newDimArray[i].position); // bottom right ctx.stroke(); } } @@ -13494,14 +13692,24 @@ $jit.ST.Plot.NodeTypes.implement({ var mV = 10; var mVL = 10; } + if ((i + 1) < l) + { + next_mV = ctx.measureText(stringArray[i + 1]); + next_mVL = ctx.measureText(String(valuelabelArray[i + 1])); + } + else + { + next_mV = mV; + next_mVL = mVL; + } var previousElementHeight = (i > 0) ? dimArray[i - 1] : 100; var labelOffsetHeight = (previousElementHeight < label.size && i > 0) ? ((dimArray[i] > label.size) ? (dimArray[i]/2) - (label.size/2) : label.size) : 0; - var labelOffsetRight = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mV.width + 20 : 0) : 0; - var labelOffsetLeft = (previousElementHeight < label.size && i > 0) ? ((i%2!=0 && dimArray[i] < label.size) ? mVL.width + 20 : 0) : 0; + var labelOffsetRight = (newDimArray[i].filament) ? (next_mV.width + 20) : 0; + var labelOffsetLeft = (newDimArray[i].filament) ? (next_mVL.width + 20) : 0; var topWidth = minWidth + ((acum + dimArray[i]) * ratio); var bottomWidth = minWidth + ((acum) * ratio); - var bottomWidthLabel = minWidth + ((acum + labelOffsetHeight) * ratio); + var bottomWidthLabel = minWidth + (newDimArray[i].position * ratio); if(gradient) { @@ -13552,9 +13760,9 @@ $jit.ST.Plot.NodeTypes.implement({ ctx.textAlign = 'left'; - ctx.fillText(stringArray[i],(bottomWidthLabel/2) + labelOffset + labelOffsetRight, y - acum - labelOffsetHeight - label.size/2); + ctx.fillText(stringArray[i], (bottomWidthLabel / 2) + labelOffset + labelOffsetRight, y - newDimArray[i].position - label.size / 2); ctx.textAlign = 'right'; - ctx.fillText(valuelabelArray[i],(-bottomWidthLabel/2) - labelOffset - labelOffsetLeft, y - acum - labelOffsetHeight - label.size/2); + ctx.fillText(valuelabelArray[i], (- bottomWidthLabel / 2) - labelOffset - labelOffsetLeft, y - newDimArray[i].position - label.size / 2); } ctx.restore(); } diff --git a/jssource/src_files/include/javascript/ajaxUI.js b/jssource/src_files/include/javascript/ajaxUI.js index f1531eca..bb97b8b2 100644 --- a/jssource/src_files/include/javascript/ajaxUI.js +++ b/jssource/src_files/include/javascript/ajaxUI.js @@ -44,7 +44,6 @@ SUGAR.ajaxUI = { if (typeof window.onbeforeunload == "function") window.onbeforeunload = null; scroll(0,0); - SUGAR.ajaxUI.hideLoadingPanel(); try{ var r = YAHOO.lang.JSON.parse(o.responseText); cont = r.content; @@ -63,8 +62,14 @@ SUGAR.ajaxUI = { } var c = document.getElementById("content"); + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // hide content of placeholder before apply new one + // @see SUGAR.util.evalScript + c.style.visibility = 'hidden'; c.innerHTML = cont; SUGAR.util.evalScript(cont); + // all javascripts have been processed - show content of placeholder + c.style.visibility = 'visible'; if ( r.moduleList) { @@ -82,7 +87,13 @@ SUGAR.ajaxUI = { $("#logo").attr("title", logoStats.replace(/[\d]+\.[\d]+/, r.responseTime)).tipTip({maxWidth: "auto", edgeOffset: 10}); } } + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // hide ajax loading message after all scripts are processed + SUGAR.ajaxUI.hideLoadingPanel(); } catch (e){ + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // hide ajax loading message after all scripts are processed + SUGAR.ajaxUI.hideLoadingPanel(); SUGAR.ajaxUI.showErrorMessage(o.responseText); } }, diff --git a/jssource/src_files/include/javascript/popup_helper.js b/jssource/src_files/include/javascript/popup_helper.js index 3041547c..3dab4866 100644 --- a/jssource/src_files/include/javascript/popup_helper.js +++ b/jssource/src_files/include/javascript/popup_helper.js @@ -263,22 +263,34 @@ function toggleMore(spanId, img_id, module, action, params){ $(".ui-dialog").find(".open").dialog("close"); + var el = '#'+spanId+ ' img'; + if (action == 'DisplayInlineTeams') + { + el = '#'+spanId; + } var $dialog = $('
') .html(body) .dialog({ autoOpen: false, title: caption, width: 300, - position: { + position: { my: 'right top', at: 'left top', - of: $('#'+spanId+ ' img') + of: $(el) } }); - - + + var width = $dialog.dialog( "option", "width" ); + var pos = $(el).offset(); + var ofWidth = $(el).width(); + + if((pos.left + ofWidth) - 40 < width) { + $dialog.dialog("option","position",{my: 'left top',at: 'right top',of: $(el)}) ; + } + $dialog.dialog('open'); - + } success = function(data) { diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js index e72f69ff..8fd44334 100644 --- a/jssource/src_files/include/javascript/sugar_3.js +++ b/jssource/src_files/include/javascript/sugar_3.js @@ -630,7 +630,16 @@ function isTime(timeStr) { function inRange(value, min, max) { if (typeof num_grp_sep != 'undefined' && typeof dec_sep != 'undefined') value = unformatNumberNoParse(value, num_grp_sep, dec_sep).toString(); - return value >= min && value <= max; + var result = true; + if (typeof min == 'number' && value < min) + { + result = false; + } + if (typeof max == 'number' && value > max) + { + result = false; + } + return result; } function bothExist(item1, item2) { @@ -1005,7 +1014,18 @@ function validate_form(formname, startsWith){ if(!inRange(trim(form[validate[formname][i][nameIndex]].value), validate[formname][i][minIndex], validate[formname][i][maxIndex])){ isError = true; var lbl_validate_range = SUGAR.language.get('app_strings', 'LBL_VALIDATE_RANGE'); - add_error_style(formname, validate[formname][i][nameIndex], validate[formname][i][msgIndex] + " value " + form[validate[formname][i][nameIndex]].value + " " + lbl_validate_range + " (" +validate[formname][i][minIndex] + " - " + validate[formname][i][maxIndex] + ") "); + if (typeof validate[formname][i][minIndex] == 'number' && typeof validate[formname][i][maxIndex] == 'number') + { + add_error_style(formname, validate[formname][i][nameIndex], validate[formname][i][msgIndex] + " value " + form[validate[formname][i][nameIndex]].value + " " + lbl_validate_range + " (" +validate[formname][i][minIndex] + " - " + validate[formname][i][maxIndex] + ")"); + } + else if (typeof validate[formname][i][minIndex] == 'number') + { + add_error_style(formname, validate[formname][i][nameIndex], validate[formname][i][msgIndex] + " " + SUGAR.language.get('app_strings', 'MSG_SHOULD_BE') + ' ' + validate[formname][i][minIndex] + ' ' + SUGAR.language.get('app_strings', 'MSG_OR_GREATER')); + } + else if (typeof validate[formname][i][maxIndex] == 'number') + { + add_error_style(formname, validate[formname][i][nameIndex], validate[formname][i][msgIndex] + " " + SUGAR.language.get('app_strings', 'MSG_IS_MORE_THAN') + ' ' + validate[formname][i][maxIndex]); + } } break; case 'isbefore': @@ -2797,6 +2817,20 @@ SUGAR.util = function () { } return url; }, + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + var rnotwhite = /\S/; + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, evalScript:function(text){ if (isSafari) { var waitUntilLoaded = function(){ @@ -2856,16 +2890,67 @@ SUGAR.util = function () { while(result && result.index > lastIndex){ lastIndex = result.index try{ - var script = document.createElement('script'); - script.type= 'text/javascript'; + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // Change approach to handle javascripts included to body of ajax response. + // To load & run javascripts and inline javascript in correct order load them as synchronous requests + // JQuery library uses this approach to eval scripts if(result[1].indexOf("src=") > -1){ var srcRegex = /.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm; var srcResult = result[1].replace(srcRegex, '$1'); - script.src = srcResult; + + // Check is ulr cross domain or not + var r1 = /:\/\//igm; + if ( r1.test(srcResult) && srcResult.indexOf(window.location.hostname) == -1 ) + { + // if script is cross domain it cannot be loaded via ajax request + // try load script asynchronous by creating script element in the body + // YUI 3.3 doesn't allow load scrips synchronously + // YUI 3.5 do it + YUI().use('get', function (Y) + { + var url = srcResult; + Y.Get.script(srcResult, + { + autopurge: false, + onSuccess : function(o) { }, + onFailure: function(o) { }, + onTimeout: function(o) { } + }); + }); + // TODO: for YUI 3.5 - load scripts as script object synchronous + /* + YUI().use('get', function (Y) { + var url = srcResult; + Y.Get.js([{url: url, async: false}], function (err) {}); + }); + */ + } + else + { + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // Create a YUI instance using the io-base module. + YUI().use("io-base", function(Y) { + var cfg, response; + cfg = { + method: 'GET', + sync: true, + on: { + success: function(transactionid, response, arguments) + { + SUGAR.util.globalEval(response.responseText); + } + } + }; + // Call synchronous request to load javascript content + // restonse will be processed in success function + response = Y.io(srcResult, cfg); + }); + } }else{ - script.text = result[2]; + // Bug #49205 : Subpanels fail to load when selecting subpanel tab + // execute script in global context + SUGAR.util.globalEval(result[2]); } - document.body.appendChild(script); } catch(e) { if(typeof(console) != "undefined" && typeof(console.log) == "function") diff --git a/jssource/src_files/modules/Calendar/Cal.js b/jssource/src_files/modules/Calendar/Cal.js index 1244a22a..d055eb9b 100644 --- a/jssource/src_files/modules/Calendar/Cal.js +++ b/jssource/src_files/modules/Calendar/Cal.js @@ -1618,11 +1618,32 @@ if(CAL.view == 'shared'){ // Pick the div that contains 2 custom attributes we // use for storing values in case of 'shared' view - parentWithUserValues = $('div[user_id][user_name]'); + parentWithUserValues = $('div[user_id][user_name]'); // Pull out the values user_name = parentWithUserValues.attr('user_name'); user_id = parentWithUserValues.attr('user_id'); - + + // Shared by multiple users, need to get attributes from user whom is clicked + if (parentWithUserValues.length > 1) { + var theUserName, theUserId; + var theUser = cell.parentNode; + while (theUser) { + if (theUser.getAttribute("user_name") && theUser.getAttribute("user_id")) { + theUserName = theUser.getAttribute("user_name"); + theUserId = theUser.getAttribute("user_id"); + break; + } + else { + theUser = theUser.parentNode; + } + } + // Found user in the parentNode iteration, use it + if (theUserName && theUserId) { + user_name = theUserName; + user_id = theUserId; + } + } + CAL.GR_update_user(user_id); }else{ user_id = CAL.current_user_id; diff --git a/jssource/src_files/modules/Meetings/jsclass_scheduler.js b/jssource/src_files/modules/Meetings/jsclass_scheduler.js index 3098f4b2..11aaf65b 100644 --- a/jssource/src_files/modules/Meetings/jsclass_scheduler.js +++ b/jssource/src_files/modules/Meetings/jsclass_scheduler.js @@ -435,6 +435,24 @@ function SugarWidgetSchedulerAttendees() { SugarWidgetSchedulerAttendees.prototype.init = function() { + // A list of modules which allow the parent to be in the invitees + SugarWidgetSchedulerAttendees.allowedTypes = ['Contact', 'Lead']; + + $(document).ready(function() + { + // Hide the link label + $('#add_parent_invitee_label').css('visibility', 'hidden'); + + // Set visibility on load + SugarWidgetSchedulerAttendees.setAddParentLinkVisibility(); + + // Add listener for parent_type, so we can hide/unhide the link + $('#parent_type').change(function() + { + SugarWidgetSchedulerAttendees.setAddParentLinkVisibility(); + }); + }); + var form_name; if(typeof document.EditView != 'undefined') form_name = "EditView"; @@ -599,6 +617,52 @@ SugarWidgetSchedulerAttendees.form_add_attendee = function (list_row) { GLOBAL_REGISTRY.scheduler_attendees_obj.display(); } +// Function sets the visibility of the Add Parent Link +SugarWidgetSchedulerAttendees.setAddParentLinkVisibility = function() +{ + parent_type = $('#parent_type option:selected').text(); + if ($.inArray(parent_type, SugarWidgetSchedulerAttendees.allowedTypes) > -1) + { + $('#add_parent_invitee').parent().css('display', ''); + } + else + { + $('#add_parent_invitee').parent().css('display', 'none'); + } +} + +// Function used to add the parent to the invitees +SugarWidgetSchedulerAttendees.formAddParent = function() +{ + parent_id = $("#parent_id").val(); + parent_name = $("#parent_name").val(); + parent_type = $("#parent_type option:selected").text(); + + // If it's an allowed parent type and the parent is selected, add it to the invitees + if (parent_id.length > 0 && $.inArray(parent_type, SugarWidgetSchedulerAttendees.allowedTypes) > -1) + { + invitee = { + fields: + {id:parent_id, full_name:parent_name}, + module:parent_type}; + + contains = false; + for(var i = 0; i < GLOBAL_REGISTRY.focus.users_arr.length; i++) + { + if (GLOBAL_REGISTRY.focus.users_arr[i]['fields']['id'] == invitee['fields']['id']) + { + contains = true; + break; + } + } + + if (!contains) + { + GLOBAL_REGISTRY.focus.users_arr[GLOBAL_REGISTRY.focus.users_arr.length] = invitee; + GLOBAL_REGISTRY.scheduler_attendees_obj.display(); + } + } +} ////////////////////////////////////////////////// // class: SugarWidgetScheduleRow diff --git a/modules/Administration/DisplayWarnings.php b/modules/Administration/DisplayWarnings.php index efa3f9d2..337ccde0 100644 --- a/modules/Administration/DisplayWarnings.php +++ b/modules/Administration/DisplayWarnings.php @@ -47,25 +47,6 @@ if(!empty($_SESSION['display_lotuslive_alert'])){ displayAdminError(translate('MSG_RECONNECT_LOTUSLIVE', 'Administration')); } -//BEGIN SUGARCRM flav=pro -if( is_admin($current_user) && file_exists('include/SugarSearchEngine/SugarSearchEngineFactory.php') ) -{ - require_once('include/SugarSearchEngine/SugarSearchEngineFactory.php'); - $ftsType = SugarSearchEngineFactory::getFTSEngineNameFromConfig(); - if(!empty($ftsType) && isset($GLOBALS['sugar_config']['full_text_engine'][$ftsType]['valid']) && !$GLOBALS['sugar_config']['full_text_engine'][$ftsType]['valid']) - { - displayAdminError(translate('LBL_FTS_CONNECTION_INVALID', 'Administration')); - } - -} -if (is_admin($current_user)) -{ - if (!empty($GLOBALS['sugar_config']['fts_disable_notification'])) - { - displayAdminError(translate('LBL_FTS_DISABLED', 'Administration')); - } -} -//END SUGARCRM flav=pro diff --git a/modules/Administration/SupportPortal.php b/modules/Administration/SupportPortal.php index 0b48d141..906ad277 100644 --- a/modules/Administration/SupportPortal.php +++ b/modules/Administration/SupportPortal.php @@ -135,7 +135,6 @@ switch ($_REQUEST['view']) { array('name' => 'Administration', 'action' => 'licensesettings', 'anchor' => '1910574'), array('name' => 'Administration', 'action' => 'diagnostic', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'listviewofflineclient', 'anchor' => '1111949'), - array('name' => 'Administration', 'action' => 'enablewirelessmodules', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'backups', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'upgrade', 'anchor' => '1111949'), array('name' => 'Administration', 'action' => 'locale', 'anchor' => '1111949'), diff --git a/modules/Administration/UpgradeWizard_commit.php b/modules/Administration/UpgradeWizard_commit.php index d388fdfe..ade44c26 100644 --- a/modules/Administration/UpgradeWizard_commit.php +++ b/modules/Administration/UpgradeWizard_commit.php @@ -384,6 +384,7 @@ switch( $install_type ){ default: break; } + $current_user->incrementETag("mainMenuETag"); break; case "full": // purposely flow into "case: patch" diff --git a/modules/Administration/action_view_map.php b/modules/Administration/action_view_map.php index 8ff0ceaf..8c5d5e35 100644 --- a/modules/Administration/action_view_map.php +++ b/modules/Administration/action_view_map.php @@ -40,7 +40,6 @@ $action_view_map['repair'] = 'repair'; $action_view_map['configuretabs'] = 'configuretabs'; $action_view_map['configureajaxui'] = 'configureajaxui'; $action_view_map['configurefts'] = 'configurefts'; -$action_view_map['enablewirelessmodules'] = 'enablewirelessmodules'; $action_view_map['configureshortcutbar'] = 'configureshortcutbar'; $action_view_map['viewofflineclients'] = 'viewofflineclients'; $action_view_map['backups'] = 'backups'; diff --git a/modules/Administration/controller.php b/modules/Administration/controller.php index aadfcbf0..1de41d81 100644 --- a/modules/Administration/controller.php +++ b/modules/Administration/controller.php @@ -79,58 +79,6 @@ class AdministrationController extends SugarController header("Location: index.php?module=Administration&action=Languages"); } - public function action_updatewirelessenabledmodules() - { - require_once('modules/Administration/Forms.php'); - - global $app_strings, $current_user, $moduleList; - - if (!is_admin($current_user)) sugar_die($app_strings['ERR_NOT_ADMIN']); - - require_once('modules/Configurator/Configurator.php'); - $configurator = new Configurator(); - $configurator->saveConfig(); - - if ( isset( $_REQUEST['enabled_modules'] ) && ! empty ($_REQUEST['enabled_modules'] )) - { - $updated_enabled_modules = array () ; - foreach ( explode (',', $_REQUEST['enabled_modules'] ) as $e ) - { - $updated_enabled_modules [ $e ] = array () ; - } - - // transfer across any pre-existing definitions for the enabled modules from the current module registry - if (file_exists('include/MVC/Controller/wireless_module_registry.php')) - { - require('include/MVC/Controller/wireless_module_registry.php'); - if ( ! empty ( $wireless_module_registry ) ) - { - foreach ( $updated_enabled_modules as $e => $def ) - { - if ( isset ( $wireless_module_registry [ $e ] ) ) - { - $updated_enabled_modules [ $e ] = $wireless_module_registry [ $e ] ; - } - - } - } - } - - $filename = 'custom/include/MVC/Controller/wireless_module_registry.php' ; - - mkdir_recursive ( dirname ( $filename ) ) ; - write_array_to_file ( 'wireless_module_registry', $updated_enabled_modules, $filename ); - foreach($moduleList as $mod){ - sugar_cache_clear("CONTROLLER_wireless_module_registry_$mod"); - } - //Users doesn't appear in the normal module list, but its value is cached on login. - sugar_cache_clear("CONTROLLER_wireless_module_registry_Users"); - sugar_cache_reset(); - } - - echo "true"; - } - /** * action_saveglobalsearchsettings diff --git a/modules/Administration/templates/GlobalSearchSettings.tpl b/modules/Administration/templates/GlobalSearchSettings.tpl index b8507a89..2fe649b9 100644 --- a/modules/Administration/templates/GlobalSearchSettings.tpl +++ b/modules/Administration/templates/GlobalSearchSettings.tpl @@ -56,7 +56,7 @@
- + @@ -213,4 +213,4 @@ {/literal} \ No newline at end of file + diff --git a/modules/Bugs/vardefs.php b/modules/Bugs/vardefs.php index 9e76da16..231aa235 100644 --- a/modules/Bugs/vardefs.php +++ b/modules/Bugs/vardefs.php @@ -48,7 +48,10 @@ $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => ' 'comment' => 'The software or service release that manifested the bug', 'duplicate_merge' => 'disabled', 'audited' =>true, - 'studio' => array('fields' => 'false', 'listview' => false, 'wirelesslistview' => false ), // tyoung bug 16442 - don't show in studio fields list + 'studio' => array( + 'fields' => 'false', // tyoung bug 16442 - don't show in studio fields list + 'listview' => false, + ), 'massupdate' => true, ), 'release_name'=> @@ -73,13 +76,6 @@ $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => ' 'quickcreate' => false, 'basic_search' => false, 'advanced_search' => false, - //BEGIN SUGARCRM flav=pro - 'wirelesseditview' => false, - 'wirelessdetailview' => false, - 'wirelesslistview' => 'visible', - 'wireless_basic_search' => false, - 'wireless_advanced_search' => false, - //END SUGARCRM flav=pro ), ), @@ -93,7 +89,10 @@ $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => ' 'comment' => 'The software or service release that corrected the bug', 'duplicate_merge' => 'disabled', 'audited' =>true, - 'studio' => array('fields' => 'false', 'listview' => false, 'wirelesslistview' => false), // tyoung bug 16442 - don't show in studio fields list + 'studio' => array( + 'fields' => 'false', // tyoung bug 16442 - don't show in studio fields list + 'listview' => false, + ), 'massupdate' => true, ), 'fixed_in_release_name'=> @@ -118,13 +117,6 @@ $dictionary['Bug'] = array('table' => 'bugs', 'audited'=>true, 'comment' => ' 'quickcreate' => false, 'basic_search' => false, 'advanced_search' => false, - //BEGIN SUGARCRM flav=pro - 'wirelesseditview' => false, - 'wirelessdetailview' => false, - 'wirelesslistview' => 'visible', - 'wireless_basic_search' => false, - 'wireless_advanced_search' => false, - //END SUGARCRM flav=pro ), ), 'source' => diff --git a/modules/Calendar/Cal.js b/modules/Calendar/Cal.js index 45d11a77..c4448375 100644 --- a/modules/Calendar/Cal.js +++ b/modules/Calendar/Cal.js @@ -213,7 +213,10 @@ CAL.full_form=function(){var e=document.createElement('input');e.setAttribute('t CAL.disable_buttons=function(){CAL.get("btn-save").setAttribute("disabled","disabled");CAL.get("btn-send-invites").setAttribute("disabled","disabled");CAL.get("btn-delete").setAttribute("disabled","disabled");CAL.get("btn-full-form").setAttribute("disabled","disabled");if(CAL.enable_repeat){CAL.get("btn-edit-all-recurrences").setAttribute("disabled","disabled");CAL.get("btn-remove-all-recurrences").setAttribute("disabled","disabled");}} CAL.enable_buttons=function(){CAL.get("btn-save").removeAttribute("disabled");CAL.get("btn-send-invites").removeAttribute("disabled");if(CAL.get("record").value!="") CAL.get("btn-delete").removeAttribute("disabled");CAL.get("btn-full-form").removeAttribute("disabled");if(CAL.enable_repeat){CAL.get("btn-edit-all-recurrences").removeAttribute("disabled");CAL.get("btn-remove-all-recurrences").removeAttribute("disabled");}} -CAL.dialog_create=function(cell){var e,user_id,user_name;CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;CAL.open_edit_dialog();CAL.disable_buttons();var module_name=CAL.get("current_module").value;if(CAL.view=='shared'){parentWithUserValues=$('div[user_id][user_name]');user_name=parentWithUserValues.attr('user_name');user_id=parentWithUserValues.attr('user_id');CAL.GR_update_user(user_id);}else{user_id=CAL.current_user_id;user_name=CAL.current_user_name;CAL.GR_update_user(CAL.current_user_id);} +CAL.dialog_create=function(cell){var e,user_id,user_name;CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;CAL.open_edit_dialog();CAL.disable_buttons();var module_name=CAL.get("current_module").value;if(CAL.view=='shared'){parentWithUserValues=$('div[user_id][user_name]');user_name=parentWithUserValues.attr('user_name');user_id=parentWithUserValues.attr('user_id');if(parentWithUserValues.length>1){var theUserName,theUserId;var theUser=cell.parentNode;while(theUser){if(theUser.getAttribute("user_name")&&theUser.getAttribute("user_id")){theUserName=theUser.getAttribute("user_name");theUserId=theUser.getAttribute("user_id");break;} +else{theUser=theUser.parentNode;}} +if(theUserName&&theUserId){user_name=theUserName;user_id=theUserId;}} +CAL.GR_update_user(user_id);}else{user_id=CAL.current_user_id;user_name=CAL.current_user_name;CAL.GR_update_user(CAL.current_user_id);} var params={'module_name':module_name,'user_id':user_id,'user_name':user_name,'date_start':cell.getAttribute("datetime")};CAL.current_params=params;CAL.load_create_form(CAL.current_params);} CAL.dialog_save=function(){CAL.disable_buttons();ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));if(CAL.get("send_invites").value=="1"){CAL.get("title-cal-edit").innerHTML=CAL.lbl_sending;}else{CAL.get("title-cal-edit").innerHTML=CAL.lbl_saving;} CAL.fill_invitees();CAL.fill_repeat_data();var callback={success:function(o){try{res=eval("("+o.responseText+")");}catch(err){alert(CAL.lbl_error_saving);CAL.editDialog.cancel();ajaxStatus.hideStatus();return;} diff --git a/modules/Calls/CallFormBase.php b/modules/Calls/CallFormBase.php index 736e405e..97d36c5f 100644 --- a/modules/Calls/CallFormBase.php +++ b/modules/Calls/CallFormBase.php @@ -403,12 +403,7 @@ function handleSave($prefix,$redirect=true,$useRequired=false) { $focus->contacts_arr = $contactInvitees; $focus->leads_arr = array(); $focus->leads_arr = $leadInvitees; - if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Contacts') { - $focus->contacts_arr[] = $_POST['parent_id']; - } - if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Leads') { - $focus->leads_arr[] = $_POST['parent_id']; - } + // Call the Call module's save function to handle saving other fields besides // the users and contacts relationships $focus->update_vcal = false; // Bug #49195 : don't update vcal b/s related users aren't saved yet, create vcal cache below diff --git a/modules/Calls/language/en_us.lang.php b/modules/Calls/language/en_us.lang.php index 855f6dcf..3e42d465 100644 --- a/modules/Calls/language/en_us.lang.php +++ b/modules/Calls/language/en_us.lang.php @@ -88,6 +88,7 @@ $mod_strings = array ( 'LNK_NEW_APPOINTMENT' => 'Create Appointment', 'LBL_SCHEDULING_FORM_TITLE' => 'Scheduling', 'LBL_ADD_INVITEE' => 'Add Invitees', + 'LBL_ADD_PARENT_INVITEE' => 'Add Related person to invitees', 'LBL_NAME' => 'Name', 'LBL_FIRST_NAME' => 'First Name', 'LBL_LAST_NAME' => 'Last Name', diff --git a/modules/Calls/metadata/editviewdefs.php b/modules/Calls/metadata/editviewdefs.php index ba15b557..de111f9b 100644 --- a/modules/Calls/metadata/editviewdefs.php +++ b/modules/Calls/metadata/editviewdefs.php @@ -144,8 +144,14 @@ function formSubmitCheck(){ldelim}var duration=true;if(typeof(isValidDuration)!= 'name' => 'duration_hours', 'label' => 'LBL_DURATION', 'customCode' => '{literal}{/literal}{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINUTES}', - ), + array ( + 'name' => 'add_parent_invitee', + 'comment' => 'Link to add invitees', + 'customCode' => '{$MOD.LBL_ADD_PARENT_INVITEE}', + ), + ), + array ( array( 'name' => 'reminder_time', 'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}', diff --git a/modules/Calls/vardefs.php b/modules/Calls/vardefs.php index ffa129cf..2f08b340 100644 --- a/modules/Calls/vardefs.php +++ b/modules/Calls/vardefs.php @@ -442,6 +442,17 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'reportable' => false, 'studio' => false, ), + 'add_parent_invitee' => + array( + 'name' => 'add_parent_invitee', + 'vname' => 'LBL_ADD_PARENT_INVITEE', + 'type' => 'varchar', + 'source' => 'non-db', + 'comment' => 'Helper field for Add To Parent link', + 'massupdate' => false, + 'reportable' => false, + 'importable' => false, + ), ), 'indices' => array ( array( diff --git a/modules/Campaigns/ProcessBouncedEmails.php b/modules/Campaigns/ProcessBouncedEmails.php index ffef85c1..df0081ad 100644 --- a/modules/Campaigns/ProcessBouncedEmails.php +++ b/modules/Campaigns/ProcessBouncedEmails.php @@ -106,7 +106,9 @@ function markEmailAddressInvalid($email_address) $sea = new SugarEmailAddress(); $rs = $sea->retrieve_by_string_fields( array('email_address_caps' => trim(strtoupper($email_address))) ); if($rs != null) - $sea->AddUpdateEmailAddress($email_address, 1,0); + { + $sea->AddUpdateEmailAddress($email_address, 1, 0, $rs->id); + } } /** diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl b/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl index 66286f6f..1c7f0f2d 100644 --- a/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl @@ -122,10 +122,10 @@ function toggleGettingStartedButton(){ldelim} diff --git a/modules/DocumentRevisions/vardefs.php b/modules/DocumentRevisions/vardefs.php index 7290ec89..c443e597 100644 --- a/modules/DocumentRevisions/vardefs.php +++ b/modules/DocumentRevisions/vardefs.php @@ -82,7 +82,7 @@ $dictionary['DocumentRevision'] = array('table' => 'document_revisions' 'type' => 'enum', 'function' => 'getDocumentsExternalApiDropDown', 'len' => '100', - 'comment' => 'Document type (ex: Google, box.net, LotusLive)', + 'comment' => 'Document type (ex: Google, box.net, IBM SmartCloud)', 'studio' => 'false', ), 'doc_url' => diff --git a/modules/Documents/vardefs.php b/modules/Documents/vardefs.php index c4b4c4b7..4811bb1f 100644 --- a/modules/Documents/vardefs.php +++ b/modules/Documents/vardefs.php @@ -75,7 +75,7 @@ $dictionary['Document'] = array('table' => 'documents', 'type' => 'enum', 'function' => 'getDocumentsExternalApiDropDown', 'len' => '100', - 'comment' => 'Document type (ex: Google, box.net, LotusLive)', + 'comment' => 'Document type (ex: Google, box.net, IBM SmartCloud)', 'popupHelp' => 'LBL_DOC_TYPE_POPUP', 'massupdate' => false, 'options' => 'eapm_list', diff --git a/modules/Documents/views/view.extdoc.php b/modules/Documents/views/view.extdoc.php index 54f63683..f45bb15b 100644 --- a/modules/Documents/views/view.extdoc.php +++ b/modules/Documents/views/view.extdoc.php @@ -60,7 +60,7 @@ class DocumentsViewExtdoc extends SugarView } if ( !isset($_REQUEST['apiName']) ) { - $apiName = 'LotusLive'; + $apiName = 'IBMSmartCloud'; } else { $tmpApi = ExternalAPIFactory::loadAPI($_REQUEST['apiName'],true); if ( $tmpApi === false ) diff --git a/modules/DynamicFields/UpgradeFields.php b/modules/DynamicFields/UpgradeFields.php index cbe7b0f0..b114cb18 100644 --- a/modules/DynamicFields/UpgradeFields.php +++ b/modules/DynamicFields/UpgradeFields.php @@ -61,6 +61,8 @@ require_once('modules/DynamicFields/DynamicField.php'); } foreach($modules as $the_module=>$fields){ + if(isset($beanList[$the_module])) + { $class_name = $beanList[$the_module]; echo "

Scanning $the_module
"; @@ -115,6 +117,7 @@ require_once('modules/DynamicFields/DynamicField.php'); } } } + } } diff --git a/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php b/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php index ffb33afd..dafb6255 100644 --- a/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php +++ b/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php @@ -160,10 +160,15 @@ class TemplateDatetimecombo extends TemplateRange foreach($this->vardef_map as $vardef=>$field){ if(isset($_REQUEST[$vardef])){ // Bug #48826. Some fields are allowed to have special characters and must be decoded from the request + // Bug 49774, 49775: Strip html tags from 'formula' and 'dependency'. if (is_string($_REQUEST[$vardef]) && in_array($vardef, $this->decode_from_request_fields_map)) - $this->$vardef = html_entity_decode($_REQUEST[$vardef]); + { + $this->$vardef = html_entity_decode(strip_tags(from_html($_REQUEST[$vardef]))); + } else + { $this->$vardef = $_REQUEST[$vardef]; + } if($vardef != $field){ $this->$field = $this->$vardef; diff --git a/modules/DynamicFields/templates/Fields/TemplateField.php b/modules/DynamicFields/templates/Fields/TemplateField.php index 5745e4bb..30c15d27 100644 --- a/modules/DynamicFields/templates/Fields/TemplateField.php +++ b/modules/DynamicFields/templates/Fields/TemplateField.php @@ -478,15 +478,13 @@ class TemplateField{ if(isset($_REQUEST[$vardef])){ $this->$vardef = $_REQUEST[$vardef]; - // Bug #48826. Some fields are allowed to have special characters and must be decoded from the request + // Bug #48826. Some fields are allowed to have special characters and must be decoded from the request + // Bug 49774, 49775: Strip html tags from 'formula' and 'dependency'. if (is_string($this->$vardef) && in_array($vardef, $this->decode_from_request_fields_map)) - $this->$vardef = html_entity_decode($this->$vardef); + { + $this->$vardef = html_entity_decode(strip_tags(from_html($this->$vardef))); + } - // Bug 49774, 49775: Strip html tags from 'formula' and 'dependency'. - // Add to the list below if we need to do the same for other fields. - if (!empty($this->$vardef) && in_array($vardef, array('formula', 'dependency'))){ - $this->$vardef = to_html(strip_tags(from_html($this->$vardef))); - } //Remove potential xss code from help field if($field == 'help' && !empty($this->$vardef)) diff --git a/modules/DynamicFields/templates/Fields/TemplateInt.php b/modules/DynamicFields/templates/Fields/TemplateInt.php index 7f2b47b8..dd2f55d4 100644 --- a/modules/DynamicFields/templates/Fields/TemplateInt.php +++ b/modules/DynamicFields/templates/Fields/TemplateInt.php @@ -69,15 +69,19 @@ class TemplateInt extends TemplateRange function get_field_def(){ $vardef = parent::get_field_def(); $vardef['disable_num_format'] = isset($this->disable_num_format) ? $this->disable_num_format : $this->ext3;//40005 - - $vardef['validation'] = array( - 'type' => 'range', - 'min' => null, - 'max' => null); - $vardef['min'] = $vardef['validation']['min'] = isset($this->min) ? $this->min : $this->ext1; - - $vardef['max'] = $vardef['validation']['max'] = isset($this->max) ? $this->max : $this->ext2; + $vardef['min'] = isset($this->min) ? $this->min : $this->ext1; + $vardef['max'] = isset($this->max) ? $this->max : $this->ext2; + $vardef['min'] = filter_var($vardef['min'], FILTER_VALIDATE_INT); + $vardef['max'] = filter_var($vardef['max'], FILTER_VALIDATE_INT); + if ($vardef['min'] !== false || $vardef['max'] !== false) + { + $vardef['validation'] = array( + 'type' => 'range', + 'min' => $vardef['min'], + 'max' => $vardef['max'] + ); + } if(!empty($this->auto_increment)) { diff --git a/modules/EAPM/language/en_us.lang.php b/modules/EAPM/language/en_us.lang.php index 7a2107c1..7c6848c9 100644 --- a/modules/EAPM/language/en_us.lang.php +++ b/modules/EAPM/language/en_us.lang.php @@ -94,10 +94,10 @@ $mod_strings = array ( // Various strings used throughout the external account modules 'LBL_MEET_NOW_BUTTON' => 'Meet Now', - 'LBL_VIEW_LOTUS_LIVE_MEETINGS' => 'View Upcoming LotusLive™ Meetings', - 'LBL_TITLE_LOTUS_LIVE_MEETINGS' => 'Upcoming LotusLive™ Meetings', - 'LBL_VIEW_LOTUS_LIVE_DOCUMENTS' => 'View LotusLive™ Files', - 'LBL_TITLE_LOTUS_LIVE_DOCUMENTS' => 'LotusLive™ Files', + 'LBL_VIEW_LOTUS_LIVE_MEETINGS' => 'View Upcoming IBM SmartCloud™ Meetings', + 'LBL_TITLE_LOTUS_LIVE_MEETINGS' => 'Upcoming IBM SmartCloud™ Meetings', + 'LBL_VIEW_LOTUS_LIVE_DOCUMENTS' => 'View IBM SmartCloud™ Files', + 'LBL_TITLE_LOTUS_LIVE_DOCUMENTS' => 'IBM SmartCloud™ Files', 'LBL_REAUTHENTICATE_LABEL' => 'Reauthenticate', 'LBL_REAUTHENTICATE_KEY' => 'a', 'LBL_APPLICATION_FOUND_NOTICE' => 'An account for this application already exists. We have reinstated the existing account.', diff --git a/modules/Emails/Email.php b/modules/Emails/Email.php index 9beea1c3..2a86c903 100644 --- a/modules/Emails/Email.php +++ b/modules/Emails/Email.php @@ -1185,7 +1185,7 @@ class Email extends SugarBean { continue; } if(!empty($parts["name"])) { - $res[] = "{$parts["name"]} <{$parts["email"]}>"; + $res[] = "{$parts['name']} <{$parts['email']}>"; } else { $res[] .= $parts["email"]; } @@ -1427,7 +1427,7 @@ class Email extends SugarBean { if(empty($text)) { return ''; } - $text = str_replace("\n", "\n
", $text); + $text = str_replace("\n", "
", $text); $out = "
{$text}
"; return $out; diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index 1647a86a..a7c52a67 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -1453,8 +1453,8 @@ SE.composeLayout = { } - var openTag = '
 '; - var closeTag = ' 
'; + var openTag = '
'; + var closeTag = '
'; var t = tinyMCE.getInstanceById('htmleditor' + idx); //IE 6 Hack if(typeof(t) != 'undefined') @@ -1469,7 +1469,13 @@ SE.composeLayout = { var htmllow = html.toLowerCase(); var start = htmllow.indexOf(openTag); - var end = htmllow.indexOf(closeTag) + closeTag.length; + var end = htmllow.indexOf(closeTag); + if (end >= 0) { + end += closeTag.length; + } + else { + end = htmllow.length; + } // selected "none" - remove signature from email if(signature == '') { diff --git a/modules/Home/QuickSearch.php b/modules/Home/QuickSearch.php index 1d9a57b1..b4deeeb9 100644 --- a/modules/Home/QuickSearch.php +++ b/modules/Home/QuickSearch.php @@ -225,16 +225,19 @@ class quicksearchQuery } } - $whereClause = sprintf('(%s)', implode(" {$args['group']} ", $conditionArray)); + $whereClauseArray = array(); + if (!empty($conditionArray)) { + $whereClauseArray[] = sprintf('(%s)', implode(" {$args['group']} ", $conditionArray)); + } if(!empty($this->extra_where)) { - $whereClause .= " AND ({$this->extra_where})"; + $whereClauseArray[] = "({$this->extra_where})"; } if ($table == 'users') { - $whereClause .= sprintf(" AND users.status='Active'"); + $whereClauseArray[] = "users.status='Active'"; } - return $whereClause; + return implode(' AND ', $whereClauseArray); } /** diff --git a/modules/Home/language/en_us.lang.php b/modules/Home/language/en_us.lang.php index 2860630a..8e4184f5 100644 --- a/modules/Home/language/en_us.lang.php +++ b/modules/Home/language/en_us.lang.php @@ -271,7 +271,10 @@ $mod_strings = array ( 'LBL_TOUR_DONE' => 'You\'re Done!', 'LBL_TOUR_REFERENCE_1' => 'You can always reference our', 'LBL_TOUR_REFERENCE_2' => 'through the "Support" link under the profile tab.', - 'LNK_TOUR_DOCUMENTATION' => 'documentation' + 'LNK_TOUR_DOCUMENTATION' => 'documentation', + 'LBL_TOUR_CALENDAR_URL_1' => 'Do you share your SugarCRM calendar with 3rd party applications, such as Microsoft Outlook or Exchange? If so, you have a new URL. This new, more secure URL includes a personal key which will prevent unauthorized publishing of your calendar.', + 'LBL_TOUR_CALENDAR_URL_2' => 'Retrieve your new shared calendar URL.', + ); diff --git a/modules/Home/tour.tpl b/modules/Home/tour.tpl index 3a6cbd44..61aca864 100644 --- a/modules/Home/tour.tpl +++ b/modules/Home/tour.tpl @@ -60,6 +60,13 @@
{$mod.LBL_TOUR_FEATURES}

{$mod.LBL_TOUR_VISIT} {$mod.LNK_TOUR_DOCUMENTATION}.

+ + {if $view_calendar_url} +
+

{$view_calendar_url}

+
+ {/if} +
diff --git a/modules/Home/views/view.tour.php b/modules/Home/views/view.tour.php index 231146e1..7f2a2748 100644 --- a/modules/Home/views/view.tour.php +++ b/modules/Home/views/view.tour.php @@ -38,12 +38,29 @@ require_once('include/MVC/View/SugarView.php'); class HomeViewTour extends SugarView { - public function display() - { - global $sugar_flavor; - $this->ss->assign('mod', return_module_language($GLOBALS['current_language'], 'Home')); - $this->ss->assign("sugarFlavor",$sugar_flavor); - $this->ss->display('modules/Home/tour.tpl'); - } + public function display() + { + global $sugar_flavor; + global $current_user; + $mod_strings = return_module_language($GLOBALS['current_language'], 'Home'); + $this->ss->assign('mod', $mod_strings); + $this->ss->assign("sugarFlavor",$sugar_flavor); + + //check the upgrade history to see if this instance has been upgraded, if so then present the calendar url message + //if no upgrade history exists then we can assume this is an install and we do not show the calendar message + $uh = new UpgradeHistory(); + $upgrade = count($uh->getAll())>0 ? true : false; + if($upgrade) + { + //create the url with the user id and scrolltocal flag. This will be passed into language string + $urlForString = $mod_strings['LBL_TOUR_CALENDAR_URL_1']; + $urlForString .= '
'; + $urlForString .= $mod_strings['LBL_TOUR_CALENDAR_URL_2'].''; + $this->ss->assign('view_calendar_url', $urlForString ); + } + $this->ss->display('modules/Home/tour.tpl'); + + } + } ?> diff --git a/modules/Import/views/view.last.php b/modules/Import/views/view.last.php index 961a6da2..3edb8982 100644 --- a/modules/Import/views/view.last.php +++ b/modules/Import/views/view.last.php @@ -78,17 +78,23 @@ class ImportViewLast extends ImportView $dupeCount = 0; $createdCount = 0; $updatedCount = 0; - $fp = sugar_fopen(ImportCacheFiles::getStatusFileName(),'r'); - while (( $row = fgetcsv($fp, 8192) ) !== FALSE) + $fp = sugar_fopen(ImportCacheFiles::getStatusFileName(), 'r'); + + // Read the data if we successfully opened file + if ($fp !== false) { - $count += (int) $row[0]; - $errorCount += (int) $row[1]; - $dupeCount += (int) $row[2]; - $createdCount += (int) $row[3]; - $updatedCount += (int) $row[4]; + // Read rows 1 by 1 and add the info + while ($row = fgetcsv($fp, 8192)) + { + $count += (int) $row[0]; + $errorCount += (int) $row[1]; + $dupeCount += (int) $row[2]; + $createdCount += (int) $row[3]; + $updatedCount += (int) $row[4]; + } + fclose($fp); } - fclose($fp); - + $this->ss->assign("showUndoButton",FALSE); if($createdCount > 0) { diff --git a/modules/InboundEmail/EditView.html b/modules/InboundEmail/EditView.html index be4be6e7..c0b5f8c9 100644 --- a/modules/InboundEmail/EditView.html +++ b/modules/InboundEmail/EditView.html @@ -142,7 +142,7 @@ + {MOD.LBL_FROM_ADDR}:{APP.LBL_REQUIRED_SYMBOL}{TIPS.LBL_FROM_ADDR_DESC} + {MOD.LBL_CREATE_CASE}: {TIPS.LBL_CREATE_CASE_HELP} + {MOD.LBL_CREATE_CASE_REPLY_TEMPLATE}: {TIPS.LBL_CREATE_CASE_REPLY_TEMPLATE_HELP} + {MOD.LBL_AUTOREPLY}: {TIPS.LBL_AUTOREPLY_HELP} + {MOD.LBL_FILTER_DOMAIN}: {TIPS.LBL_FILTER_DOMAIN_DESC} + {MOD.LBL_MAX_AUTO_REPLIES}: {TIPS.LBL_MAX_AUTO_REPLIES_DESC} diff --git a/modules/InboundEmail/EditView.php b/modules/InboundEmail/EditView.php index 967ed382..7e75c0ad 100644 --- a/modules/InboundEmail/EditView.php +++ b/modules/InboundEmail/EditView.php @@ -356,6 +356,32 @@ $quicksearch_js = ""; //$javascript = get_set_focus_js(). $javascript->getScript() . $quicksearch_js; $xtpl->assign('JAVASCRIPT', get_set_focus_js(). $javascript->getScript() . $quicksearch_js); +require_once('include/Smarty/plugins/function.sugar_help.php'); +$tipsStrings = array( + 'LBL_SSL_DESC', + 'LBL_ASSIGN_TO_TEAM_DESC', + 'LBL_ASSIGN_TO_GROUP_FOLDER_DESC', + 'LBL_FROM_ADDR_DESC', + 'LBL_CREATE_CASE_HELP', + 'LBL_CREATE_CASE_REPLY_TEMPLATE_HELP', + 'LBL_ALLOW_OUTBOUND_GROUP_USAGE_DESC', + 'LBL_AUTOREPLY_HELP', + 'LBL_FILTER_DOMAIN_DESC', + 'LBL_MAX_AUTO_REPLIES_DESC', +); +$smarty = null; +$tips = array(); +foreach ($tipsStrings as $string) +{ + if (!empty($mod_strings[$string])) + { + $tips[$string] = smarty_function_sugar_help(array( + 'text' => $mod_strings[$string] + ), $smarty); + } +} +$xtpl->assign('TIPS', $tips); + // WINDOWS work arounds //if(is_windows()) { // $xtpl->assign('MAYBE', ''); diff --git a/modules/Meetings/MeetingFormBase.php b/modules/Meetings/MeetingFormBase.php index 410978e6..b61cef70 100644 --- a/modules/Meetings/MeetingFormBase.php +++ b/modules/Meetings/MeetingFormBase.php @@ -374,12 +374,6 @@ function handleSave($prefix,$redirect=true, $useRequired=false) { $focus->leads_arr = array(); $focus->leads_arr = $leadInvitees; - if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Contacts') { - $focus->contacts_arr[] = $_POST['parent_id']; - } - if(!empty($_POST['parent_id']) && $_POST['parent_type'] == 'Leads') { - $focus->leads_arr[] = $_POST['parent_id']; - } // Call the Meeting module's save function to handle saving other fields besides // the users and contacts relationships $focus->update_vcal = false; // Bug #49195 : don't update vcal b/s related users aren't saved yet, create vcal cache below diff --git a/modules/Meetings/jsclass_scheduler.js b/modules/Meetings/jsclass_scheduler.js index 5f9aa51c..87e50ed8 100644 --- a/modules/Meetings/jsclass_scheduler.js +++ b/modules/Meetings/jsclass_scheduler.js @@ -80,7 +80,9 @@ GLOBAL_REGISTRY.focus.fields.date_start=date_start;if(has_meridiem){GLOBAL_REGIS GLOBAL_REGISTRY.focus.fields.duration_hours=document.forms[form_name].duration_hours.value;GLOBAL_REGISTRY.focus.fields.duration_minutes=document.forms[form_name].duration_minutes.value;GLOBAL_REGISTRY.focus.fields.datetime_start=SugarDateTime.mysql2jsDateTime(GLOBAL_REGISTRY.focus.fields.date_start,GLOBAL_REGISTRY.focus.fields.time_start);GLOBAL_REGISTRY.scheduler_attendees_obj.init();GLOBAL_REGISTRY.scheduler_attendees_obj.display();} SugarWidgetScheduler.prototype.display=function(){this.parentNode.innerHTML='';var attendees=new SugarWidgetSchedulerAttendees();attendees.load(this.parentNode);var search=new SugarWidgetSchedulerSearch();search.load(this.parentNode);} SugarClass.inherit("SugarWidgetSchedulerAttendees","SugarClass");function SugarWidgetSchedulerAttendees(){this.init();} -SugarWidgetSchedulerAttendees.prototype.init=function(){var form_name;if(typeof document.EditView!='undefined') +SugarWidgetSchedulerAttendees.prototype.init=function(){SugarWidgetSchedulerAttendees.allowedTypes=['Contact','Lead'];$(document).ready(function() +{$('#add_parent_invitee_label').css('visibility','hidden');SugarWidgetSchedulerAttendees.setAddParentLinkVisibility();$('#parent_type').change(function() +{SugarWidgetSchedulerAttendees.setAddParentLinkVisibility();});});var form_name;if(typeof document.EditView!='undefined') form_name="EditView";else if(typeof document.CalendarEditView!='undefined') form_name="CalendarEditView";else return;GLOBAL_REGISTRY.scheduler_attendees_obj=this;var date_start=document.forms[form_name].date_start.value;var hour_start=parseInt(date_start.substring(11,13),10);var minute_start=parseInt(date_start.substring(14,16),10);var has_meridiem=/am|pm/i.test(date_start);if(has_meridiem){var meridiem=trim(date_start.substring(16));} @@ -108,6 +110,18 @@ if(typeof GLOBAL_REGISTRY.focus.users_arr_hash=='undefined'){GLOBAL_REGISTRY.foc for(var i=0;i-1) +{$('#add_parent_invitee').parent().css('display','');} +else +{$('#add_parent_invitee').parent().css('display','none');}} +SugarWidgetSchedulerAttendees.formAddParent=function() +{parent_id=$("#parent_id").val();parent_name=$("#parent_name").val();parent_type=$("#parent_type option:selected").text();if(parent_id.length>0&&$.inArray(parent_type,SugarWidgetSchedulerAttendees.allowedTypes)>-1) +{invitee={fields:{id:parent_id,full_name:parent_name},module:parent_type};contains=false;for(var i=0;i'Accept?', 'LBL_ADD_BUTTON'=> 'Add', 'LBL_ADD_INVITEE' => 'Add Invitees', + 'LBL_ADD_PARENT_INVITEE' => 'Add Related person to invitees', 'LBL_COLON' => ':', 'LBL_CONTACT_NAME' => 'Contact:', 'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts', diff --git a/modules/Meetings/metadata/editviewdefs.php b/modules/Meetings/metadata/editviewdefs.php index 3cf7012d..1b59c52d 100644 --- a/modules/Meetings/metadata/editviewdefs.php +++ b/modules/Meetings/metadata/editviewdefs.php @@ -133,10 +133,10 @@ function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.E 'updateCallback' => 'SugarWidgetScheduler.update_time();', ), ), - array ( - 'name' => 'parent_name', - 'label' => 'LBL_LIST_RELATED_TO', + 'name' => 'location', + 'comment' => 'Meeting location', + 'label' => 'LBL_LOCATION', ), ), @@ -151,11 +151,9 @@ function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.E 'updateCallback' => 'SugarWidgetScheduler.update_time();', ), ), - array ( - 'name' => 'location', - 'comment' => 'Meeting location', - 'label' => 'LBL_LOCATION', + 'name' => 'parent_name', + 'label' => 'LBL_LIST_RELATED_TO', ), ), @@ -179,6 +177,11 @@ function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.E ', 'customCodeReadOnly' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ', ), + array ( + 'name' => 'add_parent_invitee', + 'comment' => 'Link to add invitees', + 'customCode' => '{$MOD.LBL_ADD_PARENT_INVITEE}', + ), ), array ( array ( diff --git a/modules/Meetings/tpls/reminders.tpl b/modules/Meetings/tpls/reminders.tpl index 5065b561..b60b0946 100644 --- a/modules/Meetings/tpls/reminders.tpl +++ b/modules/Meetings/tpls/reminders.tpl @@ -66,7 +66,9 @@ {assign var="EMAIL_REMINDER_TIME_DISPLAY" value="inline"} {/if} - {if $view == "EditView" || $view == "QuickCreate" || $view == "QuickEdit" || $view == "wirelessedit"} + +{if $view == "EditView" || $view == "QuickCreate" || $view == "QuickEdit"} +
diff --git a/modules/Meetings/vardefs.php b/modules/Meetings/vardefs.php index d23a4fc0..d4d843e8 100644 --- a/modules/Meetings/vardefs.php +++ b/modules/Meetings/vardefs.php @@ -501,6 +501,17 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'reportable' => false, 'importable' => false, ), + 'add_parent_invitee' => + array( + 'name' => 'add_parent_invitee', + 'vname' => 'LBL_ADD_PARENT_INVITEE', + 'type' => 'varchar', + 'source' => 'non-db', + 'comment' => 'Helper field for Add To Parent link', + 'massupdate' => false, + 'reportable' => false, + 'importable' => false, + ), ), 'relationships' => array ( 'meetings_assigned_user' => diff --git a/modules/Meetings/views/view.listbytype.php b/modules/Meetings/views/view.listbytype.php index 20dbd328..1956a800 100644 --- a/modules/Meetings/views/view.listbytype.php +++ b/modules/Meetings/views/view.listbytype.php @@ -47,19 +47,19 @@ class MeetingsViewListbytype extends ViewList { } function listViewProcess(){ - if (!$eapmBean = EAPM::getLoginInfo('LotusLive', true) ) { + if (!$eapmBean = EAPM::getLoginInfo('IBMSmartCloud', true) ) { $smarty = new Sugar_Smarty(); - echo $smarty->fetch('include/externalAPI/LotusLive/LotusLiveSignup.'.$GLOBALS['current_language'].'.tpl'); + echo $smarty->fetch('include/externalAPI/IBMSmartCloud/IBMSmartCloudSignup.'.$GLOBALS['current_language'].'.tpl'); return; } - $apiName = 'LotusLive'; + $apiName = 'IBMSmartCloud'; $api = ExternalAPIFactory::loadAPI($apiName,true); $api->loadEAPM($eapmBean); $quickCheck = $api->quickCheckLogin(); if ( ! $quickCheck['success'] ) { - $errorMessage = string_format(translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'), array('LotusLive')); + $errorMessage = string_format(translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'), array('IBM SmartCloud')); $errorMessage .= ''; $errorMessage .= ''; $errorMessage .= ''; @@ -108,7 +108,7 @@ class MeetingsViewListbytype extends ViewList { function processSearchForm(){ // $type = 'LotusLiveDirect'; - $type = 'LotusLive'; + $type = 'IBMSmartCloud'; global $timedate; $two_hours_ago = $GLOBALS['db']->convert($GLOBALS['db']->quoted($timedate->asDb($timedate->getNow()->get("-2 hours"))), 'datetime'); diff --git a/modules/ModuleBuilder/MB/MBPackage.php b/modules/ModuleBuilder/MB/MBPackage.php index dfe9ee51..ebc14abc 100644 --- a/modules/ModuleBuilder/MB/MBPackage.php +++ b/modules/ModuleBuilder/MB/MBPackage.php @@ -228,7 +228,7 @@ function buildInstall($path){ } function getBuildDir(){ - return MB_PACKAGE_BUILD . '/' . $this->name; + return MB_PACKAGE_BUILD . DIRECTORY_SEPARATOR . $this->name; } function getZipDir(){ @@ -370,7 +370,7 @@ function buildInstall($path){ //creation of the installdefs[] array for the manifest when exporting customizations function customBuildInstall($modules, $path, $extensions = array()){ $columns=$this->getColumnsName(); - $installdefs = array ('id' => $this->name); + $installdefs = array ('id' => $this->name, 'relationships' => array()); $include_path="$path/SugarModules/include/language"; if(file_exists($include_path) && is_dir($include_path)){ $dd= dir($include_path); @@ -397,8 +397,16 @@ function buildInstall($path){ $this->getCustomMetadataManifestForModule($value, $installdefs); }//fi }//foreach + $relationshipsMetaFiles = $this->getCustomRelationshipsMetaFilesByModuleName($value, true, true); + if($relationshipsMetaFiles) + { + foreach ($relationshipsMetaFiles as $file) + { + $installdefs['relationships'][] = array('meta_data' => str_replace('custom', '', $file)); + } + } }//foreach - if (is_dir("$path/Extension")) + if (is_dir($path . DIRECTORY_SEPARATOR . 'Extension')) { $this->getExtensionsManifestForPackage($path, $installdefs); } @@ -407,10 +415,10 @@ function buildInstall($path){ private function getLanguageManifestForModule($module, &$installdefs) { - $lang_path = 'custom/modules/' . $module . '/language'; + $lang_path = 'custom' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'language'; foreach(scandir($lang_path) as $langFile) { - if(substr($langFile, 0, 1) != '.' && is_file($lang_path . '/' . $langFile)){ + if(substr($langFile, 0, 1) != '.' && is_file($lang_path . DIRECTORY_SEPARATOR . $langFile)){ $lang = substr($langFile, 0, strpos($langFile, '.')); $installdefs['language'][] = array( 'from'=> '/SugarModules/modules/' . $module . '/language/'. $langFile, @@ -485,33 +493,36 @@ function buildInstall($path){ } } } - - private function getExtensionsManifestForPackage($path, &$installdefs) + + /** + * @todo private changed protected for testing purposes. + * + * @param string $path + * @param array $installdefs link + */ + protected function getExtensionsManifestForPackage($path, &$installdefs) { - $extPath = "$path/Extension/modules"; - foreach(scandir($extPath) as $moduleDir) + $installdefs['copy'] = array(); + $generalPath = DIRECTORY_SEPARATOR . 'Extension' . DIRECTORY_SEPARATOR . 'modules'; + + $recursiveIterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($path . $generalPath), + RecursiveIteratorIterator::SELF_FIRST + ); + + /* @var $fInfo SplFileInfo */ + foreach (new RegexIterator($recursiveIterator, "/\.php$/i") as $fInfo) { - if(substr($moduleDir, 0, 1) != '.' && is_dir("$extPath/$moduleDir/Ext")){ - foreach(scandir("$extPath/$moduleDir/Ext") as $type) - { - if(substr($type, 0, 1) != '.' && is_dir("$extPath/$moduleDir/Ext/$type")){ - foreach(scandir("$extPath/$moduleDir/Ext/$type") as $file) - { - if(substr($file, 0, 1) != '.' && strtolower(substr($file, -4)) == ".php") - { - $installdefs['copy'][] = array( - 'from'=> "/Extension/modules/$moduleDir/Ext/$type/$file", - 'to'=> "custom/Extension/modules/$moduleDir/Ext/$type/$file", - ); - } - } - } - } - } + + $newPath = substr($fInfo->getPathname(), strrpos($fInfo->getPathname(), $generalPath)); + + $installdefs['copy'][] = array( + 'from' => '' . $newPath, + 'to' => 'custom' . $newPath + ); } } - //return an array which contain the name of fields_meta_data table's columns function getColumnsName(){ @@ -526,40 +537,44 @@ function buildInstall($path){ //creation of the custom fields ZIP file (use getmanifest() and customBuildInstall() ) function exportCustom($modules, $export=true, $clean = true){ - $path=$this->getBuildDir(); - if($clean && file_exists($path))rmdir_recursive($path); + + $relationshipFiles = array(); + + $path = $this->getBuildDir(); + if ($clean && file_exists($path)) { + rmdir_recursive($path); + } //Copy the custom files to the build dir - foreach($modules as $mod){ - $extensions = $this->getExtensionsList($mod); - $pathmod="$path/SugarModules/modules/$mod"; - if(mkdir_recursive($pathmod)){ - if(file_exists("custom/modules/$mod")){ - copy_recursive("custom/modules/$mod", "$pathmod"); + foreach ($modules as $module) { + $pathmod = "$path/SugarModules/modules/$module"; + if (mkdir_recursive($pathmod)) { + if (file_exists("custom/modules/$module")) { + copy_recursive("custom/modules/$module", "$pathmod"); //Don't include cached extension files if (is_dir("$pathmod/Ext")) rmdir_recursive("$pathmod/Ext"); } //Convert modstring files to extension compatible arrays - $this->convertLangFilesToExtensions("$pathmod/language"); + $this->convertLangFilesToExtensions("$pathmod/language"); } - $pathext="$path/Extension/modules/$mod/Ext"; - if (!empty($extensions) && mkdir_recursive($pathext)) - { - foreach($extensions as $type => $files) - { - sugar_mkdir("$pathext/$type"); - foreach($files as $file => $filePath) - { - copy ($filePath, "$pathext/$type/$file"); - } - } + + $extensions = $this->getExtensionsList($module, $modules); + $relMetaFiles = $this->getCustomRelationshipsMetaFilesByModuleName($module, true); + $extensions = array_merge($extensions, $relMetaFiles); + + foreach ($extensions as $file) { + $fileInfo = new SplFileInfo($file); + $trimmedPath = ltrim($fileInfo->getPath(), 'custom'); + + sugar_mkdir($path . $trimmedPath, NULL, true); + copy($file, $path . $trimmedPath . '/' . $fileInfo->getFilename()); } } - + $this->copyCustomDropdownValuesForModules($modules,$path); if(file_exists($path)){ $manifest = $this->getManifest(true).$this->customBuildInstall($modules,$path); - sugar_file_put_contents($path .'/manifest.php', $manifest);; + sugar_file_put_contents($path .'/manifest.php', $manifest); } if(file_exists('modules/ModuleBuilder/MB/LICENSE.txt')){ copy('modules/ModuleBuilder/MB/LICENSE.txt', $path . '/LICENSE.txt'); @@ -707,46 +722,77 @@ function buildInstall($path){ } } - private function getExtensionsList($module, $excludeRelationships = true) - { - require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ; - $extPath = 'custom/Extension/modules/'; - $modExtPath = $extPath . $module . '/Ext'; - $rels = new DeployedRelationships($module); - $relList = $rels->getRelationshipList (); - - $ret = array(); - if (is_dir($modExtPath)) - { - $extFolders = scandir($modExtPath); - foreach($extFolders as $extFolder) - { - if (!is_dir("$modExtPath/$extFolder") || substr($extFolder, 0, 1) == ".") - continue; - - foreach( scandir("$modExtPath/$extFolder") as $extFile) - { - - if (substr($extFile, 0, 1) == "." || strtolower(substr($extFile, -4)) != ".php") - continue; - //Exclude relattionship extension files - if ($excludeRelationships && ( - (substr($extFile, 0, 6) == "custom" && isset($relList[substr($extFile, 6, strlen($extFile) - 10)])) || - (substr($extFile, 6, 6) == "custom" && isset($relList[substr($extFile, 12, strlen($extFile) - 16)])) - )) { - continue; + /** + * Get _custom_ extensions for module. + * Default path - custom/Extension/modules/$module/Ext. + * + * @param array $module Name. + * @param mixed $includeRelationships ARRAY - relationships files between $module and names in array; + * TRUE - with all relationships files; + * @return array Paths. + */ + protected function getExtensionsList($module, $includeRelationships = true) + { + if (BeanFactory::getBeanName($module) === false) + { + return array(); + } + + $result = array(); + $includeMask = false; + $extPath = sprintf('custom%1$sExtension%1$smodules%1$s' . $module . '%1$sExt', DIRECTORY_SEPARATOR); + + if (is_array($includeRelationships)) + { + $includeMask = array(); + $customRels = $this->getCustomRelationshipsByModuleName($module); + + $includeRelationships[] = $module; + + foreach ($customRels as $k => $v) + { + if ( + in_array($v->getLhsModule(), $includeRelationships) && + in_array($v->getRhsModule(), $includeRelationships) + ) + { + $includeMask[] = $k; + } + } + } + + $recursiveIterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($extPath), + RecursiveIteratorIterator::SELF_FIRST + ); + + /* @var $fileInfo SplFileInfo */ + foreach ($recursiveIterator as $fileInfo) + { + + if ($fileInfo->isFile() && !in_array($fileInfo->getPathname(), $result)) + { + if ($includeMask === false) + { + $result[] = $fileInfo->getPathname(); + } + else + { + foreach ($includeMask as $v) + { + if (strpos($fileInfo->getFilename(), $v) !== false) + { + $result[] = $fileInfo->getPathname(); + break; + } } - - if (!isset($ret[$extFolder])) - $ret[$extFolder] = array(); - - $ret[$extFolder][$extFile ] = "$modExtPath/$extFolder/$extFile"; - } - } - } - return $ret; - } - + } + } + } + + return $result; + } + /** * Returns a set of field defs for fields that will exist when this package is deployed * based on the relationships in all of its modules. @@ -823,6 +869,97 @@ function buildInstall($path){ return $zipDir. '/project_'. $this->name. $date. '.zip'; } + /** + * @param string $moduleName + * @param bool $lhs Return relationships where $moduleName - left module in join. + * @return mixed Array or false when module name is wrong. + */ + protected function getCustomRelationshipsByModuleName($moduleName, $lhs = false) + { + if (BeanFactory::getBeanName($moduleName) === false) + { + return false; + } + + $result = array(); + $relation = null; + $module = new StudioModule($moduleName); + + /* @var $rel DeployedRelationships */ + $rel = $module->getRelationships(); + + $relList = $rel->getRelationshipList(); + + foreach ($relList as $relationshipName) + { + $relation = $rel->get($relationshipName); + + if ($relation->getFromStudio()) + { + if ($lhs && $relation->getLhsModule() != $moduleName) + { + continue; + } + $result[$relationshipName] = $relation; + } + } + + return $result; + } + /** + * @param string $moduleName + * @param bool $lhs Return relationships where $moduleName - left module in join. + * @param bool $metadataOnly Return only relationships metadata file. + * @return array + */ + protected function getCustomRelationshipsMetaFilesByModuleName($moduleName, $lhs = false, $metadataOnly = false) + { + + $path = $metadataOnly ? + 'custom' . DIRECTORY_SEPARATOR . 'metadata' . DIRECTORY_SEPARATOR : + 'custom' . DIRECTORY_SEPARATOR; + $result = array(); + + $relationships = $this->getCustomRelationshipsByModuleName($moduleName, $lhs); + + if (!$relationships) + { + return array(); + } + + $recursiveIterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($path), + RecursiveIteratorIterator::SELF_FIRST + ); + + /** + * @var $fileInfo SplFileInfo + */ + foreach ($recursiveIterator as $fileInfo) + { + if ($fileInfo->isFile() && !in_array($fileInfo->getPathname(), $result)) + { + foreach ($relationships as $k => $v) + { + + if (strpos($fileInfo->getFilename(), $k) !== false) + { + $result[] = $fileInfo->getPathname(); + break; + } + } + } + } + + return $result; + } + + public function deleteBuild() + { + return rmdir_recursive($this->getBuildDir()); + } + } + ?> diff --git a/modules/ModuleBuilder/MB/ModuleBuilder.php b/modules/ModuleBuilder/MB/ModuleBuilder.php index 7d1ce84d..d9f0e980 100644 --- a/modules/ModuleBuilder/MB/ModuleBuilder.php +++ b/modules/ModuleBuilder/MB/ModuleBuilder.php @@ -44,7 +44,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); define ( 'MB_PACKAGE_PATH', 'custom/modulebuilder/packages' ) ; -define ( 'MB_PACKAGE_BUILD', 'custom/modulebuilder/builds' ) ; +define('MB_PACKAGE_BUILD', 'custom' . DIRECTORY_SEPARATOR . 'modulebuilder' . DIRECTORY_SEPARATOR . 'builds'); require_once ('modules/ModuleBuilder/MB/MBPackage.php') ; class ModuleBuilder diff --git a/modules/ModuleBuilder/language/en_us.lang.php b/modules/ModuleBuilder/language/en_us.lang.php index 638693e7..b005b3eb 100644 --- a/modules/ModuleBuilder/language/en_us.lang.php +++ b/modules/ModuleBuilder/language/en_us.lang.php @@ -347,7 +347,7 @@ $mod_strings = array( 'LBL_HOME' => 'Home', 'LBL_NONE'=>'-None-', 'LBL_DEPLOYE_COMPLETE'=>'Deploy complete', -'LBL_DEPLOY_FAILED' =>'An error has occured during deploy process, your package may not have installed correctly', +'LBL_DEPLOY_FAILED' =>'An error has occurred during deploy process, your package may not have installed correctly', 'LBL_ADD_FIELDS'=>'Add Custom Fields', 'LBL_AVAILABLE_SUBPANELS'=>'Available Subpanels', 'LBL_ADVANCED'=>'Advanced', @@ -561,7 +561,7 @@ $mod_strings = array( 'ERROR_INVALID_KEY_VALUE'=> "Error: Invalid Key Value: [']", 'ERROR_NO_HISTORY' => 'No history files found', 'ERROR_MINIMUM_FIELDS' => 'The layout must contain at least one field', -'ERROR_GENERIC_TITLE' => 'An error has occured', +'ERROR_GENERIC_TITLE' => 'An error has occurred', 'ERROR_REQUIRED_FIELDS' => 'Are you sure you wish to continue? The following required fields are missing from the layout: ', 'ERROR_ARE_YOU_SURE' => 'Are you sure you wish to continue?', diff --git a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php index cc24d1d2..6bca18cb 100644 --- a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php +++ b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php @@ -162,7 +162,21 @@ class AbstractRelationship $this->deleted = $this->definition [ 'deleted' ] = true ; } - + public function getFromStudio() + { + return $this->from_studio; + } + + public function getLhsModule() + { + return $this->lhs_module; + } + + public function getRhsModule() + { + return $this->rhs_module; + } + public function getType () { return $this->relationship_type ; diff --git a/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php b/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php index 5d28b4f5..2e28c557 100644 --- a/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php +++ b/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php @@ -160,7 +160,6 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl $type = $module->getType () ; $this->_sourceFilename = self::getFileName ( $view, $moduleName, MB_CUSTOMMETADATALOCATION ) ; - // Now we can copy the wireless view from the template global $current_language; $mod = return_module_language($current_language , $moduleName); $loadedForWrite = $this->_loadFromPopupFile ( "include/SugarObjects/templates/$type/metadata/".basename ( $this->_sourceFilename ) , $mod, $view, true); @@ -399,4 +398,4 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl { $this->_saveToFile ( $file, $defs ) ; } -} \ No newline at end of file +} diff --git a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php index 8656dfc7..cb595d27 100644 --- a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php @@ -788,11 +788,6 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat { foreach ( $panels as $rows) { foreach ($rows as $fields) { - //wireless layouts have one less level of depth - if (is_array($fields) && isset($fields['name'])) { - $ret[$fields['name']] = $fields; - continue; - } if (!is_array($fields)) { $ret[$fields] = $fields; continue; @@ -928,4 +923,4 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat } } -?> \ No newline at end of file +?> diff --git a/modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php b/modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php index 838269ae..70c2de87 100644 --- a/modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php +++ b/modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php @@ -73,6 +73,18 @@ class UndeployedSubpanelImplementation extends AbstractMetaDataImplementation im $this->module->mbvardefs->updateVardefs () ; $this->_fielddefs = & $this->module->mbvardefs->vardefs [ 'fields' ] ; + $templates = & $this->module->config['templates']; + $template_def=""; + foreach ( $templates as $template => $a ){ + if($a===1) $template_def = $template; + } + $template_subpanel_def = 'include/SugarObjects/templates/'.$template_def. '/metadata/subpanels/default.php'; + if (file_exists($template_subpanel_def)){ + include($template_subpanel_def); + if (!empty($subpanel_layout['list_fields'])) + $this->_mergeFielddefs($this->_fielddefs, $subpanel_layout['list_fields']); + } + $subpanel_layout = $this->module->getAvailibleSubpanelDef ( $this->_subpanelName ) ; $this->_viewdefs = & $subpanel_layout [ 'list_fields' ] ; $this->_mergeFielddefs($this->_fielddefs, $this->_viewdefs); diff --git a/modules/ModuleBuilder/views/view.layoutview.php b/modules/ModuleBuilder/views/view.layoutview.php index c88abbb2..06fb0a68 100644 --- a/modules/ModuleBuilder/views/view.layoutview.php +++ b/modules/ModuleBuilder/views/view.layoutview.php @@ -134,6 +134,7 @@ class ViewLayoutView extends ViewEdit $parser->_viewdefs [ 'panels' ] = $editViewPanels; $parser->_fielddefs = $parser2->_fielddefs; $parser->setUseTabs($parser2->getUseTabs()); + $parser->setTabDefs($parser2->getTabDefs()); } } diff --git a/modules/Opportunities/vardefs.php b/modules/Opportunities/vardefs.php index 821a2686..dda7c81b 100644 --- a/modules/Opportunities/vardefs.php +++ b/modules/Opportunities/vardefs.php @@ -165,7 +165,11 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' 'duplicate_merge'=>'0', 'audited'=>true, 'comment' => 'Formatted amount of the opportunity', - 'studio' => array('wirelesseditview'=>false, 'wirelessdetailview'=>false, 'editview'=>false, 'detailview'=>false, 'quickcreate'=>false,), + 'studio' => array( + 'editview'=>false, + 'detailview'=>false, + 'quickcreate'=>false, + ), ), 'currency_id' => array ( diff --git a/modules/Schedulers/Scheduler.php b/modules/Schedulers/Scheduler.php index ee50e81c..7aec00d0 100644 --- a/modules/Schedulers/Scheduler.php +++ b/modules/Schedulers/Scheduler.php @@ -91,37 +91,43 @@ class Scheduler extends SugarBean { protected function getUser() { if(empty($this->user)) { - $this->initUser(); + $this->user = Scheduler::initUser(); } return $this->user; } - protected function initUser() + /** + * Function returns an Admin user for running Schedulers or false if no admin users are present in the system + * (which means the Scheduler Jobs which need admin rights will fail to execute) + */ + public static function initUser() { $user = new User(); - //check is default admin exists - $adminId = $this->db->getOne( - 'SELECT id FROM users WHERE id='.$this->db->quoted('1').' AND is_admin=1 AND deleted=0 AND status='.$this->db->quoted('Active'), + $db = DBManagerFactory::getInstance(); + + //Check is default admin exists + $adminId = $db->getOne( + 'SELECT id FROM users WHERE id = ' . $db->quoted('1') . ' AND is_admin = 1 AND deleted = 0 AND status = ' . $db->quoted('Active'), true, 'Error retrieving Admin account info' ); - if (false === $adminId) {//retrive another admin - $adminId = $this->db->getOne( - 'SELECT id FROM users WHERE is_admin=1 AND deleted=0 AND status='.$this->db->quoted('Active'), + + if ($adminId === false) {// Retrieve another admin if default admin doesn't exist + $adminId = $db->getOne( + 'SELECT id FROM users WHERE is_admin = 1 AND deleted = 0 AND status = ' . $db->quoted('Active'), true, 'Error retrieving Admin account info' ); - if ($adminId) { + if ($adminId) {// Get admin user $user->retrieve($adminId); - } else { + } else {// Return false and log error $GLOBALS['log']->fatal('No Admin account found!'); return false; } - - } else { - $user->retrieve('1'); // Scheduler jobs run as default Admin + } else {// Scheduler jobs run as default Admin + $user->retrieve('1'); } - $this->user = $user; + return $user; } diff --git a/modules/Schedulers/views/view.edit.php b/modules/Schedulers/views/view.edit.php index 8532d752..2eb4e41a 100644 --- a/modules/Schedulers/views/view.edit.php +++ b/modules/Schedulers/views/view.edit.php @@ -40,13 +40,13 @@ require_once('include/MVC/View/views/view.edit.php'); class SchedulersViewEdit extends ViewEdit { protected static $xtDays = array( - 0 => 'MON', - 1 => 'TUE', - 2 => 'WED', - 3 => 'THU', - 4 => 'FRI', - 5 => 'SAT', - 6 => 'SUN'); + 1 => 'MON', + 2 => 'TUE', + 3 => 'WED', + 4 => 'THU', + 5 => 'FRI', + 6 => 'SAT', + 0 => 'SUN'); public function __construct() { diff --git a/modules/Studio/wizards/RenameModules.php b/modules/Studio/wizards/RenameModules.php index b816436f..6aa95726 100644 --- a/modules/Studio/wizards/RenameModules.php +++ b/modules/Studio/wizards/RenameModules.php @@ -529,12 +529,15 @@ class RenameModules $replaceKey = $linkEntry['vname']; $oldStringValue = $mod_strings[$replaceKey]; - //At this point we don't know if we should replace the string with the plural or singular version of the new - //strings so we'll try both but with the plural version first since it should be longer than the singular. - $replacedString = str_replace(html_entity_decode_utf8($renameFields['prev_plural'], ENT_QUOTES), $renameFields['plural'], $oldStringValue); - if ($replacedString == $oldStringValue) { - $replacedString = str_replace(html_entity_decode_utf8($renameFields['prev_singular'], ENT_QUOTES), $renameFields['singular'], $replacedString); + // Use the plural value of the two only if it's longer and the old language string contains it, + // singular otherwise + if (strlen($renameFields['prev_plural']) > strlen($renameFields['prev_singular']) && strpos($oldStringValue, $renameFields['prev_plural']) !== false) { + $key = 'plural'; + } else { + $key = 'singular'; + } + $replacedString = str_replace(html_entity_decode_utf8($renameFields['prev_' . $key], ENT_QUOTES), $renameFields[$key], $oldStringValue); $replacementStrings[$replaceKey] = $replacedString; } } diff --git a/modules/UpgradeWizard/uw_utils.php b/modules/UpgradeWizard/uw_utils.php index 2d289728..33cbadb7 100644 --- a/modules/UpgradeWizard/uw_utils.php +++ b/modules/UpgradeWizard/uw_utils.php @@ -3022,6 +3022,20 @@ function upgradeUserPreferences() { $current_user->savePreferencesToDB(); } + $changed = false; + if(!$current_user->getPreference('calendar_publish_key')) { + // set publish key if not set already + $current_user->setPreference('calendar_publish_key', create_guid()); + $changed = true; + } + + + // we need to force save the changes to disk, otherwise we lose them. + if($changed) + { + $current_user->savePreferencesToDB(); + } + } //while } diff --git a/modules/UserPreferences/UserPreference.php b/modules/UserPreferences/UserPreference.php index 2c242bff..88ddbeb3 100644 --- a/modules/UserPreferences/UserPreference.php +++ b/modules/UserPreferences/UserPreference.php @@ -305,7 +305,7 @@ class UserPreference extends SugarBean $user = $this->_userFocus; // these are not the preferences you are looking for [ hand waving ] - if(!empty($_SESSION['unique_key']) && $_SESSION['unique_key'] != $sugar_config['unique_key']) return; + if(empty($GLOBALS['installing']) && !empty($_SESSION['unique_key']) && $_SESSION['unique_key'] != $sugar_config['unique_key']) return; $GLOBALS['log']->debug('Saving Preferences to DB ' . $user->user_name); if(isset($_SESSION[$user->user_name. '_PREFERENCES']) && is_array($_SESSION[$user->user_name. '_PREFERENCES'])) { diff --git a/modules/Users/User.php b/modules/Users/User.php index 1073a69f..f6b01754 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -480,12 +480,20 @@ class User extends Person { } + // set some default preferences when creating a new user + $setNewUserPreferences = empty($this->id) || !empty($this->new_with_id); parent::save($check_notify); + // set some default preferences when creating a new user + if ( $setNewUserPreferences ) { + if(!$this->getPreference('calendar_publish_key')) { + $this->setPreference('calendar_publish_key', create_guid()); + } + } $this->savePreferencesToDB(); return $this->id; @@ -1595,8 +1603,6 @@ EOQ; } } - - function create_new_list_query($order_by, $where,$filter=array(),$params=array(), $show_deleted = 0,$join_type='', $return_array = false,$parentbean=null, $singleSelect = false) { //call parent method, specifying for array to be returned $ret_array = parent::create_new_list_query($order_by, $where,$filter,$params, $show_deleted,$join_type, true,$parentbean, $singleSelect); diff --git a/modules/Users/UserViewHelper.php b/modules/Users/UserViewHelper.php index 85aa9e33..2d0d34ab 100644 --- a/modules/Users/UserViewHelper.php +++ b/modules/Users/UserViewHelper.php @@ -93,7 +93,7 @@ class UserViewHelper { $this->setupEmailSettings(); $this->setupThemeTab(); $this->setupAdvancedTab(); - + } protected function assignUserTypes() { @@ -112,7 +112,7 @@ class UserViewHelper { // check if the user has access to the User Management $this->ss->assign('USER_ADMIN',$current_user->isAdminForModule('Users')&& !is_admin($current_user)); - + if ($this->is_current_admin) { $this->ss->assign('IS_ADMIN','1'); @@ -140,7 +140,7 @@ class UserViewHelper { $this->ss->assign('IS_FOCUS_ADMIN', is_admin($this->bean)); - + if($edit_self) { $this->ss->assign('EDIT_SELF','1'); } @@ -149,7 +149,7 @@ class UserViewHelper { } } - + protected function setupButtonsAndTabs() { global $current_user; @@ -192,13 +192,13 @@ class UserViewHelper { } if (isset($buttons_header)) $this->ss->assign("BUTTONS_HEADER", $buttons_header); if (isset($buttons_footer)) $this->ss->assign("BUTTONS_FOOTER", $buttons_footer); - + if (isset($this->bean->id)) { $this->ss->assign('ID',$this->bean->id); } - + } @@ -211,7 +211,7 @@ class UserViewHelper { */ public function setupUserTypeDropdown() { global $current_user; - + //if this is an existing bean and the type is empty, then populate user type if(!empty($this->bean->id) && empty($this->bean->user_type)) @@ -260,7 +260,7 @@ class UserViewHelper { $userTypeDropdown .= ' disabled '; } $userTypeDropdown .= '>'; - + $userTypeDescription = ''; $setSelected = !empty($this->bean->id); @@ -273,15 +273,15 @@ class UserViewHelper { } } $userTypeDropdown .= '
 
'; - + $this->ss->assign('USER_TYPE_DROPDOWN',$userTypeDropdown); $this->ss->assign('USER_TYPE_READONLY',$userTypes[$userType]['label'] . "
 
"); - + } protected function setupPasswordTab() { global $current_user; - + $this->ss->assign('PWDSETTINGS', isset($GLOBALS['sugar_config']['passwordsetting']) ? $GLOBALS['sugar_config']['passwordsetting'] : array()); @@ -303,14 +303,14 @@ class UserViewHelper { } else { $this->ss->assign('CHANGE_PWD', '0'); } - + // Make sure group users don't get a password change prompt if ( $this->usertype == 'GROUP' ) { $this->ss->assign('CHANGE_PWD', '0'); } $configurator = new Configurator(); - if ( isset($configurator->config['passwordsetting']) + if ( isset($configurator->config['passwordsetting']) && ($configurator->config['passwordsetting']['SystemGeneratedPasswordON'] || $configurator->config['passwordsetting']['forgotpasswordON']) && $this->usertype != 'GROUP' && $this->usertype != 'PORTAL_ONLY' ) { @@ -329,7 +329,7 @@ class UserViewHelper { $this->ss->assign('HIDE_STATIC_USERTYPE','none'); } } - + } protected function setupThemeTab() { @@ -343,18 +343,18 @@ class UserViewHelper { $this->ss->assign("USER_THEME_COLOR", $this->bean->getPreference('user_theme_color')); $this->ss->assign("USER_THEME_FONT", $this->bean->getPreference('user_theme_font')); $this->ss->assign("USER_THEME", $user_theme); - + // Build a list of themes that support group modules $this->ss->assign("DISPLAY_GROUP_TAB", 'none'); - + $selectedTheme = $user_theme; if(!isset($user_theme)) { $selectedTheme = $GLOBALS['sugar_config']['default_theme']; } - + $themeList = SugarThemeRegistry::availableThemes(); $themeGroupList = array(); - + foreach ( $themeList as $themeId => $themeName ) { $currThemeObj = SugarThemeRegistry::get($themeId); if ( isset($currThemeObj->group_tabs) && $currThemeObj->group_tabs == 1 ) { @@ -367,9 +367,9 @@ class UserViewHelper { } } $this->ss->assign("themeGroupListJSON",json_encode($themeGroupList)); - + } - + protected function setupAdvancedTab() { $this->setupAdvancedTabUserSettings(); $this->setupAdvancedTabTeamSettings(); @@ -378,7 +378,8 @@ class UserViewHelper { $this->setupAdvancedTabPdfSettings(); } - protected function setupAdvancedTabUserSettings() { + protected function setupAdvancedTabUserSettings() + { global $current_user, $locale, $app_strings, $app_list_strings, $sugar_config; // This is for the "Advanced" tab, it's not controlled by the metadata UI so we have to do more for it. @@ -394,10 +395,10 @@ class UserViewHelper { $this->ss->assign('EXPORT_CHARSET_DISPLAY', $export_charset); //end:12293 - if( $this->bean->getPreference('use_real_names') == 'on' - || ( empty($this->bean->id) - && isset($GLOBALS['sugar_config']['use_real_names']) - && $GLOBALS['sugar_config']['use_real_names'] + if( $this->bean->getPreference('use_real_names') == 'on' + || ( empty($this->bean->id) + && isset($GLOBALS['sugar_config']['use_real_names']) + && $GLOBALS['sugar_config']['use_real_names'] && $this->bean->getPreference('use_real_names') != 'off') ) { $this->ss->assign('USE_REAL_NAMES', 'CHECKED'); } @@ -410,20 +411,21 @@ class UserViewHelper { $this->ss->assign('NO_OPPS', 'CHECKED'); } - $reminder_time = $this->bean->getPreference('reminder_time'); - if(empty($reminder_time)){ - $reminder_time = -1; - } - $email_reminder_time = $this->bean->getPreference('email_reminder_time'); - if(empty($email_reminder_time)){ - $email_reminder_time = -1; - } - $this->ss->assign("REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']); - $this->ss->assign("EMAIL_REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']); - $this->ss->assign("REMINDER_TIME", $reminder_time); - $this->ss->assign("EMAIL_REMINDER_TIME", $email_reminder_time); - $this->ss->assign("REMINDER_TABINDEX", "12"); - $this->ss->assign('CALENDAR_PUBLISH_KEY', $this->bean->getPreference('calendar_publish_key' )); + $reminder_time = $this->bean->getPreference('reminder_time'); + if(empty($reminder_time)){ + $reminder_time = -1; + } + $email_reminder_time = $this->bean->getPreference('email_reminder_time'); + if(empty($email_reminder_time)){ + $email_reminder_time = -1; + } + $this->ss->assign("REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']); + $this->ss->assign("EMAIL_REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']); + $this->ss->assign("REMINDER_TIME", $reminder_time); + $this->ss->assign("EMAIL_REMINDER_TIME", $email_reminder_time); + $this->ss->assign("REMINDER_TABINDEX", "12"); + $publish_key = $this->bean->getPreference('calendar_publish_key' ); + $this->ss->assign('CALENDAR_PUBLISH_KEY', $publish_key); $publish_url = $sugar_config['site_url'].'/vcal_server.php'; $token = "/"; @@ -435,15 +437,15 @@ class UserViewHelper { $token = '?parms='; } } - - $publish_url .= $token.'type=vfb&source=outlook&key='.$this->bean->getPreference('calendar_publish_key' ) . ''; + + $publish_url .= $token."type=vfb&source=outlook&key=$publish_key"; if (! empty($this->bean->email1)) { $publish_url .= '&email='.$this->bean->email1; } else { $publish_url .= '&user_name='.$this->bean->user_name; } - $ical_url = $sugar_config['site_url'].'/ical_server.php?type=ics&key='.$this->bean->getPreference('calendar_publish_key' ) . ''; + $ical_url = $sugar_config['site_url']."/ical_server.php?type=ics&key=$publish_key"; if (! empty($this->bean->email1)) { $ical_url .= '&email='.$this->bean->email1; @@ -453,7 +455,7 @@ class UserViewHelper { } $this->ss->assign("CALENDAR_PUBLISH_URL", $publish_url); - $this->ss->assign("CALENDAR_SEARCH_URL", $sugar_config['site_url'].'/vcal_server.php/type=vfb&email=%NAME%@%SERVER%'); + $this->ss->assign("CALENDAR_SEARCH_URL", $sugar_config['site_url']."/vcal_server.php/type=vfb&key=$publish_key&email=%NAME%@%SERVER%"); $this->ss->assign("CALENDAR_ICAL_URL", $ical_url); $this->ss->assign("SETTINGS_URL", $sugar_config['site_url']); @@ -479,11 +481,11 @@ class UserViewHelper { if(!empty($this->bean->external_auth_only)) { $this->ss->assign('EXTERNAL_AUTH_ONLY_CHECKED', 'CHECKED'); } - + if($this->is_super_admin && !empty($authclass)) { $this->ss->assign('DISPLAY_EXTERNAL_AUTH',true); } - + } protected function setupAdvancedTabNavSettings() { @@ -511,8 +513,8 @@ class UserViewHelper { require_once('modules/MySettings/TabController.php'); $chooser = new TemplateGroupChooser(); $controller = new TabController(); - - + + if($this->is_current_admin || $controller->get_users_can_edit()) { $chooser->display_hide_tabs = true; } else { @@ -573,14 +575,14 @@ class UserViewHelper { if(empty($this->bean->id)) { // remove default timezone for new users(set later) $this->bean->user_preferences['timezone'] = ''; } - + $userTZ = $this->bean->getPreference('timezone'); - + if(empty($userTZ) && !$this->bean->is_group && !$this->bean->portal_only) { $userTZ = TimeDate::guessTimezone(); $this->bean->setPreference('timezone', $userTZ); } - + if(!$this->bean->getPreference('ut')) { $this->ss->assign('PROMPTTZ', ' checked'); } @@ -588,7 +590,7 @@ class UserViewHelper { $this->ss->assign('TIMEZONEOPTIONS', TimeDate::getTimezoneList()); $this->ss->assign("TIMEZONE", TimeDate::tzName($userTZ)); - + // FG - Bug 4236 - Managed First Day of Week $fdowDays = array(); foreach ($app_list_strings['dom_cal_day_long'] as $d) { @@ -606,7 +608,7 @@ class UserViewHelper { //// Numbers and Currency display require_once('modules/Currencies/ListCurrency.php'); $currency = new ListCurrency(); - + // 10/13/2006 Collin - Changed to use Localization.getConfigPreference // This was the problem- Previously, the "-99" currency id always assumed // to be defaulted to US Dollars. However, if someone set their install to use @@ -620,14 +622,14 @@ class UserViewHelper { $selectCurrency = $currency->getSelectOptions(); $this->ss->assign("CURRENCY", $selectCurrency); } - + $currencyList = array(); foreach($locale->currencies as $id => $val ) { $currencyList[$id] = $val['symbol']; } $currencySymbolJSON = json_encode($currencyList); $this->ss->assign('currencySymbolJSON', $currencySymbolJSON); - + $currencyDisplay = new Currency(); if(isset($cur_id) ) { $currencyDisplay->retrieve($cur_id); @@ -635,7 +637,7 @@ class UserViewHelper { } else { $this->ss->assign("CURRENCY_DISPLAY", $currencyDisplay->getDefaultISO4217() .' '.$currencyDisplay->getDefaultCurrencySymbol() ); } - + // fill significant digits dropdown $significantDigits = $locale->getPrecedentPreference('default_currency_significant_digits', $this->bean); $sigDigits = ''; @@ -646,16 +648,16 @@ class UserViewHelper { $sigDigits .= ""; } } - + $this->ss->assign('sigDigits', $sigDigits); $this->ss->assign('CURRENCY_SIG_DIGITS', $significantDigits); - + $num_grp_sep = $this->bean->getPreference('num_grp_sep'); $dec_sep = $this->bean->getPreference('dec_sep'); $this->ss->assign("NUM_GRP_SEP",(empty($num_grp_sep) ? $GLOBALS['sugar_config']['default_number_grouping_seperator'] : $num_grp_sep)); $this->ss->assign("DEC_SEP",(empty($dec_sep) ? $GLOBALS['sugar_config']['default_decimal_seperator'] : $dec_sep)); $this->ss->assign('getNumberJs', $locale->getNumberJs()); - + //// Name display format $this->ss->assign('default_locale_name_format', $locale->getLocaleFormatMacro($this->bean)); $this->ss->assign('getNameJs', $locale->getNameJs()); @@ -665,7 +667,7 @@ class UserViewHelper { protected function setupAdvancedTabPdfSettings() { } - + protected function setupEmailSettings() { global $current_user, $app_list_strings; @@ -693,10 +695,10 @@ class UserViewHelper { } else { $this->ss->assign('EMAIL_LINK_TYPE', $app_list_strings['dom_email_link_type'][$raw_email_link_type]); } - + ///// END EMAIL OPTIONS /////////////////////////////////////////////////////////////////////////////// - + ///////////////////////////////////////////// /// Handle email account selections for users @@ -714,7 +716,7 @@ class UserViewHelper { $mail_smtppass = ""; $mail_smtpdisplay = $systemOutboundEmail->mail_smtpdisplay; $mail_smtpauth_req=true; - + if( !$systemOutboundEmail->isAllowUserAccessToSystemDefaultOutbound() ) { $mail_smtpauth_req = $systemOutboundEmail->mail_smtpauth_req; $userOverrideOE = $systemOutboundEmail->getUsersMailerForSystemOverride($this->bean->id); @@ -722,15 +724,15 @@ class UserViewHelper { $mail_smtpuser = $userOverrideOE->mail_smtpuser; $mail_smtppass = $userOverrideOE->mail_smtppass; } - - + + if(!$mail_smtpauth_req && (empty($systemOutboundEmail->mail_smtpserver) || empty($systemOutboundEmail->mail_smtpuser) || empty($systemOutboundEmail->mail_smtppass))) { $hide_if_can_use_default = true; } else{ $hide_if_can_use_default = false; } } - + $this->ss->assign("mail_smtpdisplay", $mail_smtpdisplay); $this->ss->assign("mail_smtpserver", $mail_smtpserver); $this->ss->assign("mail_smtpuser", $mail_smtpuser); @@ -741,7 +743,7 @@ class UserViewHelper { $this->ss->assign('MAIL_SMTPSSL',$mail_smtpssl); } $this->ss->assign('HIDE_IF_CAN_USE_DEFAULT_OUTBOUND',$hide_if_can_use_default ); - + } diff --git a/modules/Users/language/en_us.lang.php b/modules/Users/language/en_us.lang.php index 95acadd5..2e734efd 100644 --- a/modules/Users/language/en_us.lang.php +++ b/modules/Users/language/en_us.lang.php @@ -117,6 +117,7 @@ $mod_strings = array ( 'LBL_CHANGE_SYSTEM_PASSWORD' => 'Please provide a new password.', 'LBL_CHANGE_PASSWORD_TITLE' => 'Password', 'LBL_CHOOSE_A_KEY' => 'Choose a key to prevent unauthorized publishing of your calendar', + 'LBL_NO_KEY' => 'Key is not set. Please set key to enable publishing.', 'LBL_CHOOSE_WHICH' => 'Select which modules are accessible within the top navigation bar. Designate the order in which you would like the modules to appear.', 'LBL_CITY' => 'City', diff --git a/modules/Users/tpls/DetailViewFooter.tpl b/modules/Users/tpls/DetailViewFooter.tpl index 59a1b897..30f6f84d 100644 --- a/modules/Users/tpls/DetailViewFooter.tpl +++ b/modules/Users/tpls/DetailViewFooter.tpl @@ -193,17 +193,17 @@
- + - + - + - + diff --git a/modules/Users/tpls/EditViewFooter.tpl b/modules/Users/tpls/EditViewFooter.tpl index c0c2adb5..f4cf96e8 100644 --- a/modules/Users/tpls/EditViewFooter.tpl +++ b/modules/Users/tpls/EditViewFooter.tpl @@ -372,15 +372,15 @@ - + - + - + @@ -414,15 +414,27 @@ function Admin_check(){ return true; } + $(document).ready(function() { - $('#calendar_publish_key').keypress(function(){ - $('#cal_pub_key_span').html( $(this).val()); - $('#ical_pub_key_span').html( $(this).val()); + var checkKey = function(key) { + if(key != '') { + $(".calendar_publish_ok").css('display', 'inline'); + $(".calendar_publish_none").css('display', 'none'); + $('#cal_pub_key_span').html( key ); + $('#ical_pub_key_span').html( key ); + $('#search_pub_key_span').html( key ); + } else { + $(".calendar_publish_ok").css('display', 'none'); + $(".calendar_publish_none").css('display', 'inline'); + } + }; + $('#calendar_publish_key').keyup(function(){ + checkKey($(this).val()); }); $('#calendar_publish_key').change(function(){ - $('#cal_pub_key_span').html( $(this).val()); - $('#ical_pub_key_span').html( $(this).val()); + checkKey($(this).val()); }); + checkKey($('#calendar_publish_key').val()); }); {/literal} diff --git a/modules/Users/tpls/EditViewHeader.tpl b/modules/Users/tpls/EditViewHeader.tpl index cebcc8be..5df8b349 100644 --- a/modules/Users/tpls/EditViewHeader.tpl +++ b/modules/Users/tpls/EditViewHeader.tpl @@ -114,6 +114,16 @@ EditView_tabs.on('contentReady', function(e){ } {/literal} {/if} + +{if $scroll_to_cal} + {literal} + //we are coming from the tour welcome page, so we need to simulate a click on the 4th tab + // and scroll to the calendar_options div after the tabs have rendered + document.getElementById('tab4').click(); + document.getElementById('calendar_options').scrollIntoView(); + {/literal} +{/if} + }); diff --git a/modules/Users/vardefs.php b/modules/Users/vardefs.php index a860e53c..e73b3ff0 100644 --- a/modules/Users/vardefs.php +++ b/modules/Users/vardefs.php @@ -59,14 +59,6 @@ $dictionary['User'] = array( 'quickcreate' => false, 'basic_search' => false, 'advanced_search' => false, - //BEGIN SUGARCRM flav=pro - 'wirelesseditview' => false, - 'wirelessdetailview' => true, - 'wirelesslistview' => false, - 'wireless_basic_search' => false, - 'wireless_advanced_search' => false, - 'rollup' => false, - //END SUGARCRM flav=pro ), ) , 'user_hash' => array( @@ -95,7 +87,6 @@ $dictionary['User'] = array( 'searchview'=>false, 'editview'=>false, 'quickcreate'=>false, - 'wirelesseditview' => false, ), ) , @@ -215,15 +206,21 @@ $dictionary['User'] = array( 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', 'required' => true, - 'studio' => array('editview' => false, 'quickcreate' => false, 'wirelesseditview' => false), + 'studio' => array( + 'editview' => false, + 'quickcreate' => false, + ), ) , 'date_modified' => array( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', 'required' => true, - 'studio' => array('editview' => false, 'quickcreate' => false, 'wirelesseditview' => false), - ) , + 'studio' => array( + 'editview' => false, + 'quickcreate' => false, + ), + ), 'modified_user_id' => array( 'name' => 'modified_user_id', 'rname' => 'user_name', diff --git a/modules/Users/views/view.edit.php b/modules/Users/views/view.edit.php index e7025a75..0cbed5a6 100644 --- a/modules/Users/views/view.edit.php +++ b/modules/Users/views/view.edit.php @@ -214,6 +214,11 @@ EOD $action_button_footer = array_merge($action_button_footer, $this->ss->get_template_vars('BUTTONS_FOOTER')); $this->ss->assign('ACTION_BUTTON_FOOTER', $action_button_footer); + //if the request object has 'scrolltocal' set, then we are coming here from the tour window box and need to set flag to true + // so that footer.tpl fires off script to scroll to calendar section + if(!empty($_REQUEST['scrollToCal'])){ + $this->ss->assign('scroll_to_cal', true); + } $this->ev->process($processSpecial,$processFormName); echo $this->ev->display($this->showTitle); diff --git a/modules/Users/views/view.wizard.php b/modules/Users/views/view.wizard.php index 694a0540..cdd08453 100644 --- a/modules/Users/views/view.wizard.php +++ b/modules/Users/views/view.wizard.php @@ -45,14 +45,10 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('modules/Users/Forms.php'); require_once('modules/Configurator/Configurator.php'); -/** - * ViewWireless_Login extends SugarWirelessView and is the login view. - */ class ViewWizard extends SugarView { /** - * Constructor for the view, it runs the constructor of SugarWirelessView and - * sets the footer option to true (it is off in the SugarWirelessView constructor) + * Constructor. */ public function __construct() { diff --git a/modules/iCals/HTTP_WebDAV_Server_iCal.php b/modules/iCals/HTTP_WebDAV_Server_iCal.php index c1693310..42548403 100644 --- a/modules/iCals/HTTP_WebDAV_Server_iCal.php +++ b/modules/iCals/HTTP_WebDAV_Server_iCal.php @@ -129,7 +129,7 @@ require_once 'modules/vCals/HTTP_WebDAV_Server_vCal.php'; echo $this->vcal_focus->get_vcal_freebusy($this->user_focus); } else if ($this->vcal_type == 'ics') { // DO HTTP AUTHORIZATION for iCal: - if ( $this->user_focus->getPreference('calendar_publish_key') && + if ( empty($this->publish_key ) || $this->publish_key != $this->user_focus->getPreference('calendar_publish_key' )) { $this->http_status("401 not authorized"); header('WWW-Authenticate: Basic realm="SugarCRM iCal"'); diff --git a/modules/vCals/HTTP_WebDAV_Server_vCal.php b/modules/vCals/HTTP_WebDAV_Server_vCal.php index 4847ae8f..0b86e89b 100644 --- a/modules/vCals/HTTP_WebDAV_Server_vCal.php +++ b/modules/vCals/HTTP_WebDAV_Server_vCal.php @@ -44,13 +44,13 @@ require_once 'modules/Calendar/Calendar.php'; require_once 'include/HTTP_WebDAV_Server/Server.php'; - + /** * Filesystem access using WebDAV * * @access public */ - class HTTP_WebDAV_Server_vCal extends HTTP_WebDAV_Server + class HTTP_WebDAV_Server_vCal extends HTTP_WebDAV_Server { /** * Root directory for WebDAV access @@ -77,14 +77,14 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; * Serve a webdav request * * @access public - * @param string + * @param string */ - function ServeRequest($base = false) + function ServeRequest($base = false) { global $sugar_config,$current_language; - if (!empty($sugar_config['session_dir'])) + if (!empty($sugar_config['session_dir'])) { session_save_path($sugar_config['session_dir']); } @@ -109,7 +109,7 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; */ // set root directory, defaults to webserver document root if not set - if ($base) { + if ($base) { $this->base = realpath($base); // TODO throw if not a directory } else if(!$this->base) { $this->base = $_SERVER['DOCUMENT_ROOT']; @@ -163,8 +163,8 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; // select user by email if ( ! empty($query_arr['email'])) { - - + + // clean the string! $query_arr['email'] = clean_string($query_arr['email']); //get user info @@ -198,7 +198,7 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; // { $this->user_focus->loadPreferences(); // } - + // let the base class do all the work parent::ServeRequest(); } @@ -212,9 +212,16 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; * @param string Password * @return bool true on successful authentication */ - function check_auth($type, $user, $pass) + function check_auth($type, $user, $pass) { - return true; + if(isset($_SESSION['authenticated_user_id'])) { + // allow logged in users access to freebusy info + return true; + } + if(!empty($this->publish_key) && !empty($this->user_focus) && $this->user_focus->getPreference('calendar_publish_key' ) == $this->publish_key) { + return true; + } + return false; } @@ -237,7 +244,7 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; if ($this->vcal_type == 'vfb') { $this->http_status("200 OK"); - echo $this->vcal_focus->get_vcal_freebusy($this->user_focus); + echo $this->vcal_focus->get_vcal_freebusy($this->user_focus); } else { $this->http_status("404 Not Found"); } @@ -329,22 +336,22 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; } // DO AUTHORIZATION for publishing Free/busy to Sugar: - if ( $this->user_focus->getPreference('calendar_publish_key') && + if ( empty($this->publish_key) || $this->publish_key != $this->user_focus->getPreference('calendar_publish_key' )) { $this->http_status("401 not authorized"); return; - + } // retrieve $arr = array('user_id'=>$this->user_focus->id,'type'=>'vfb','source'=>$this->source); - $this->vcal_focus->retrieve_by_string_fields($arr); + $this->vcal_focus->retrieve_by_string_fields($arr); $isUpdate = false; - if ( ! empty($this->vcal_focus->user_id ) && - $this->vcal_focus->user_id != -1 ) + if ( ! empty($this->vcal_focus->user_id ) && + $this->vcal_focus->user_id != -1 ) { $isUpdate = true; } @@ -354,7 +361,7 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; $content = ''; // read in input stream - while (!feof($options["stream"])) + while (!feof($options["stream"])) { $content .= fread($options["stream"], 4096); } @@ -377,11 +384,11 @@ require_once 'include/HTTP_WebDAV_Server/Server.php'; /** * PUT method handler - * + * * @param array parameter passing array * @return bool true on success */ - function PUT(&$options) + function PUT(&$options) { } diff --git a/modules/vCals/vCal.php b/modules/vCals/vCal.php index d464ef86..5428267b 100644 --- a/modules/vCals/vCal.php +++ b/modules/vCals/vCal.php @@ -35,15 +35,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ -/********************************************************************************* - - * Description: - ********************************************************************************/ - - - - - require_once('modules/Calendar/Calendar.php'); @@ -133,6 +124,9 @@ class vCal extends SugarBean { global $DO_USER_TIME_OFFSET,$timedate; $DO_USER_TIME_OFFSET = true; + if(empty($GLOBALS['current_user']) || empty($GLOBALS['current_user']->id)) { + $GLOBALS['current_user'] = $user_bean; + } // get activities.. queries Meetings and Calls $acts_arr = CalendarActivity::get_activities($user_bean->id, @@ -236,13 +230,13 @@ class vCal extends SugarBean { $focus->user_id = $user_focus->id; $focus->save(); } - + /** * get ics file content for meeting invite email */ - public static function get_ical_event(SugarBean $bean, User $user){ + public static function get_ical_event(SugarBean $bean, User $user){ $str = ""; - + $str .= "BEGIN:VCALENDAR\n"; $str .= "VERSION:2.0\n"; $str .= "PRODID:-//SugarCRM//SugarCRM Calendar//EN\n"; @@ -253,11 +247,11 @@ class vCal extends SugarBean { $str .= "DTEND:".SugarDateTime::createFromFormat($GLOBALS['timedate']->get_db_date_time_format(),$bean->date_end)->format(self::UTC_FORMAT)."\n"; $str .= "DTSTAMP:". $GLOBALS['timedate']->getNow(false)->format(self::UTC_FORMAT) ."\n"; $str .= "SUMMARY:" . $bean->name . "\n"; - $str .= "DESCRIPTION:" . $bean->description . "\n"; + $str .= "DESCRIPTION:" . $bean->description . "\n"; $str .= "END:VEVENT\n"; $str .= "END:VCALENDAR\n"; - - return $str; + + return $str; } } diff --git a/service/core/SugarWebServiceImpl.php b/service/core/SugarWebServiceImpl.php index 3dc0f80a..c4a73d69 100644 --- a/service/core/SugarWebServiceImpl.php +++ b/service/core/SugarWebServiceImpl.php @@ -718,7 +718,7 @@ function seamless_login($session){ if(!self::$helperObject->validate_authenticated($session)){ return 0; } - $_SESSION['seamless_login'] = true; + $GLOBALS['log']->info('End: SugarWebServiceImpl->seamless_login'); return 1; } diff --git a/service/v3/SugarWebServiceImplv3.php b/service/v3/SugarWebServiceImplv3.php index d20c07c4..9079ea7d 100644 --- a/service/v3/SugarWebServiceImplv3.php +++ b/service/v3/SugarWebServiceImplv3.php @@ -289,9 +289,6 @@ class SugarWebServiceImplv3 extends SugarWebServiceImpl { case 'default': $modules = self::$helperObject->get_visible_modules($availModules); break; - case 'mobile': - $modules = self::$helperObject->get_visible_mobile_modules($availModules); - break; case 'all': default: $modules = $availModules; diff --git a/service/v3/SugarWebServiceUtilv3.php b/service/v3/SugarWebServiceUtilv3.php index 891c07d2..bfe9c36b 100644 --- a/service/v3/SugarWebServiceUtilv3.php +++ b/service/v3/SugarWebServiceUtilv3.php @@ -254,13 +254,6 @@ class SugarWebServiceUtilv3 extends SoapHelperWebServices { $results = array(); switch ($type) { - case 'wireless': - if (file_exists('custom/modules/'.$module.'/metadata/wireless.subpaneldefs.php')) - require_once('custom/modules/'.$module.'/metadata/wireless.subpaneldefs.php'); - else if (file_exists('modules/'.$module.'/metadata/wireless.subpaneldefs.php')) - require_once('modules/'.$module.'/metadata/wireless.subpaneldefs.php'); - break; - case 'default': default: if (file_exists ('modules/'.$module.'/metadata/subpaneldefs.php' )) @@ -291,28 +284,6 @@ class SugarWebServiceUtilv3 extends SoapHelperWebServices { $results = array(); $view = strtolower($view); switch (strtolower($type)){ - case 'wireless': - if( $view == 'list'){ - require_once('include/SugarWireless/SugarWirelessListView.php'); - $GLOBALS['module'] = $module_name; //WirelessView keys off global variable not instance variable... - $v = new SugarWirelessListView(); - $results = $v->getMetaDataFile(); - } - elseif ($view == 'subpanel') - $results = $this->get_subpanel_defs($module_name, $type); - else{ - require_once('include/SugarWireless/SugarWirelessView.php'); - $v = new SugarWirelessView(); - $v->module = $module_name; - $fullView = ucfirst($view) . 'View'; - $meta = $v->getMetaDataFile('Wireless' . $fullView); - $metadataFile = $meta['filename']; - require_once($metadataFile); - //Wireless detail metadata may actually be just edit metadata. - $results = isset($viewdefs[$meta['module_name']][$fullView] ) ? $viewdefs[$meta['module_name']][$fullView] : $viewdefs[$meta['module_name']]['EditView']; - } - - break; case 'default': default: if ($view == 'subpanel') @@ -335,30 +306,6 @@ class SugarWebServiceUtilv3 extends SoapHelperWebServices { return $results; } - /** - * Examine the wireless_module_registry to determine which modules have been enabled for the mobile view. - * - * @param array $availModules An array of all the modules the user already has access to. - * @return array Modules enalbed for mobile view. - */ - function get_visible_mobile_modules($availModules){ - $enabled_modules = array(); - $availModulesKey = array_flip($availModules); - foreach ( array ( '','custom/') as $prefix) - { - if(file_exists($prefix.'include/MVC/Controller/wireless_module_registry.php')) - require $prefix.'include/MVC/Controller/wireless_module_registry.php' ; - } - - foreach ( $wireless_module_registry as $e => $def ) - { - if( isset($availModulesKey[$e]) ) - $enabled_modules[] = $e; - } - - return $enabled_modules; - } - /** * Examine the application to determine which modules have been enabled.. * @@ -478,4 +425,4 @@ class SugarWebServiceUtilv3 extends SoapHelperWebServices { return ($a_date > $b_date ) ? 1 : -1; } -} \ No newline at end of file +} diff --git a/service/v3_1/SugarWebServiceImplv3_1.php b/service/v3_1/SugarWebServiceImplv3_1.php index 1b166181..32fe2ee7 100644 --- a/service/v3_1/SugarWebServiceImplv3_1.php +++ b/service/v3_1/SugarWebServiceImplv3_1.php @@ -379,18 +379,6 @@ class SugarWebServiceImplv3_1 extends SugarWebServiceImplv3 { $nameValueArray['mobile_max_list_entries'] = self::$helperObject->get_name_value('mobile_max_list_entries', $sugar_config['wl_list_max_entries_per_page'] ); $nameValueArray['mobile_max_subpanel_entries'] = self::$helperObject->get_name_value('mobile_max_subpanel_entries', $sugar_config['wl_list_max_entries_per_subpanel'] ); - if($application == 'mobile') - { - $modules = $availModuleNames = array(); - $availModules = array_keys($_SESSION['avail_modules']); //ACL check already performed. - $modules = self::$helperObject->get_visible_mobile_modules($availModules); - $nameValueArray['available_modules'] = $modules; - //Get the vardefs md5 - foreach($modules as $mod_def) - $availModuleNames[] = $mod_def['module_key']; - - $nameValueArray['vardefs_md5'] = self::get_module_fields_md5(session_id(), $availModuleNames); - } $currencyObject = new Currency(); $currencyObject->retrieve($cur_id); @@ -431,9 +419,6 @@ class SugarWebServiceImplv3_1 extends SugarWebServiceImplv3 { case 'default': $modules = self::$helperObject->get_visible_modules($availModules); break; - case 'mobile': - $modules = self::$helperObject->get_visible_mobile_modules($availModules); - break; case 'all': default: $modules = self::$helperObject->getModulesFromList(array_flip($availModules), $availModules); diff --git a/service/v3_1/SugarWebServiceUtilv3_1.php b/service/v3_1/SugarWebServiceUtilv3_1.php index e97d1931..2e6b8b8b 100644 --- a/service/v3_1/SugarWebServiceUtilv3_1.php +++ b/service/v3_1/SugarWebServiceUtilv3_1.php @@ -100,21 +100,6 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 return $enabled_modules; } - /** - * Examine the wireless_module_registry to determine which modules have been enabled for the mobile view. - * - * @param array $availModules An array of all the modules the user already has access to. - * @return array Modules enalbed for mobile view. - */ - function get_visible_mobile_modules($availModules) - { - foreach ( array ( '','custom/') as $prefix) - { - if(file_exists($prefix.'include/MVC/Controller/wireless_module_registry.php')) - require $prefix.'include/MVC/Controller/wireless_module_registry.php' ; - } - return $this->getModulesFromList($wireless_module_registry, $availModules); - } /** * Examine the application to determine which modules have been enabled.. @@ -372,28 +357,6 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 $results = array(); $view = strtolower($view); switch (strtolower($type)){ - case 'wireless': - if( $view == 'list'){ - require_once('include/SugarWireless/SugarWirelessListView.php'); - $GLOBALS['module'] = $module_name; //WirelessView keys off global variable not instance variable... - $v = new SugarWirelessListView(); - $results = $v->getMetaDataFile(); - } - elseif ($view == 'subpanel') - $results = $this->get_subpanel_defs($module_name, $type); - else{ - require_once('include/SugarWireless/SugarWirelessView.php'); - $v = new SugarWirelessView(); - $v->module = $module_name; - $fullView = ucfirst($view) . 'View'; - $meta = $v->getMetaDataFile('Wireless' . $fullView); - $metadataFile = $meta['filename']; - require($metadataFile); - //Wireless detail metadata may actually be just edit metadata. - $results = isset($viewdefs[$meta['module_name']][$fullView] ) ? $viewdefs[$meta['module_name']][$fullView] : $viewdefs[$meta['module_name']]['EditView']; - } - - break; case 'default': default: if ($view == 'subpanel') @@ -454,7 +417,7 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 * Add ACL values to metadata files. * * @param String $module_name - * @param String $view_type (wireless or detail) + * @param String $view_type * @param String $view (list, detail,edit, etc) * @param array $metadata The metadata for the view type and view. * @return unknown @@ -468,76 +431,7 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 return $metadata; } - /** - * Parse wireless listview metadata and add ACL values. - * - * @param String $module_name - * @param array $metadata - * @return array Metadata with acls added - */ - function metdataAclParserWirelessList($module_name, $metadata) - { - global $beanList, $beanFiles; - $class_name = $beanList[$module_name]; - require_once($beanFiles[$class_name]); - $seed = new $class_name(); - - $results = array(); - foreach ($metadata as $field_name => $entry) - { - if($seed->bean_implements('ACL')) - $entry['acl'] = $this->getFieldLevelACLValue($seed->module_dir, strtolower($field_name)); - else - $entry['acl'] = 99; - - $results[$field_name] = $entry; - } - - return $results; - } - - /** - * Parse wireless detailview metadata and add ACL values. - * - * @param String $module_name - * @param array $metadata - * @return array Metadata with acls added - */ - function metdataAclParserWirelessEdit($module_name, $metadata) - { - global $beanList, $beanFiles; - $class_name = $beanList[$module_name]; - require_once($beanFiles[$class_name]); - $seed = new $class_name(); - - $results = array(); - $results['templateMeta'] = $metadata['templateMeta']; - $aclRows = array(); - //Wireless metadata only has a single panel definition. - foreach ($metadata['panels'] as $row) - { - $aclRow = array(); - foreach ($row as $field) - { - $aclField = array(); - if( is_string($field) ) - $aclField['name'] = $field; - else - $aclField = $field; - - if($seed->bean_implements('ACL')) - $aclField['acl'] = $this->getFieldLevelACLValue($seed->module_dir, $aclField['name']); - else - $aclField['acl'] = 99; - - $aclRow[] = $aclField; - } - $aclRows[] = $aclRow; - } - $results['panels'] = $aclRows; - return $results; - } /** * Return the field level acl raw value. We cannot use the hasAccess call as we do not have a valid bean * record at the moment and therefore can not specify the is_owner flag. We need the raw access value so we @@ -561,4 +455,4 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 return $_SESSION['ACL'][$current_user->id][$module]['fields'][$field]; } -} \ No newline at end of file +} diff --git a/service/v4/SugarWebServiceUtilv4.php b/service/v4/SugarWebServiceUtilv4.php index aaca276f..c4b9c644 100644 --- a/service/v4/SugarWebServiceUtilv4.php +++ b/service/v4/SugarWebServiceUtilv4.php @@ -48,30 +48,6 @@ class SugarWebServiceUtilv4 extends SugarWebServiceUtilv3_1 $view = strtolower($view); switch (strtolower($type)){ - case 'wireless': - if( $view == 'list'){ - require_once('include/SugarWireless/SugarWirelessListView.php'); - $GLOBALS['module'] = $moduleName; //WirelessView keys off global variable not instance variable... - $v = new SugarWirelessListView(); - $results = $v->getMetaDataFile(); - $results = self::formatWirelessListViewResultsToArray($results); - - } - elseif ($view == 'subpanel') - $results = $this->get_subpanel_defs($moduleName, $type); - else{ - require_once('include/SugarWireless/SugarWirelessView.php'); - $v = new SugarWirelessView(); - $v->module = $moduleName; - $fullView = ucfirst($view) . 'View'; - $meta = $v->getMetaDataFile('Wireless' . $fullView); - $metadataFile = $meta['filename']; - require($metadataFile); - //Wireless detail metadata may actually be just edit metadata. - $results = isset($viewdefs[$meta['module_name']][$fullView] ) ? $viewdefs[$meta['module_name']][$fullView] : $viewdefs[$meta['module_name']]['EditView']; - } - - break; case 'default': default: if ($view == 'subpanel') @@ -97,26 +73,6 @@ class SugarWebServiceUtilv4 extends SugarWebServiceUtilv3_1 return $results; } - /** - * Format the results for wirless list view metadata from an associative array to a - * numerically indexed array. This conversion will ensure that consumers of the metadata - * can eval the json response and iterative over the results with the order of the fields - * preserved. - * - * @param array $fields - * @return array - */ - function formatWirelessListViewResultsToArray($fields) - { - $results = array(); - foreach($fields as $key => $defs) - { - $defs['name'] = $key; - $results[] = $defs; - } - - return $results; - } /** * Equivalent of get_list function within SugarBean but allows the possibility to pass in an indicator @@ -179,89 +135,6 @@ class SugarWebServiceUtilv4 extends SugarWebServiceUtilv3_1 return $fav; } - /** - * Parse wireless editview metadata and add ACL values. - * - * @param String $module_name - * @param array $metadata - * @return array Metadata with acls added - */ - function metdataAclParserWirelessEdit($module_name, $metadata) - { - global $beanList, $beanFiles; - $class_name = $beanList[$module_name]; - require_once($beanFiles[$class_name]); - $seed = new $class_name(); - - $results = array(); - $results['templateMeta'] = $metadata['templateMeta']; - $aclRows = array(); - //Wireless metadata only has a single panel definition. - foreach ($metadata['panels'] as $row) - { - $aclRow = array(); - foreach ($row as $field) - { - $aclField = array(); - if( is_string($field) ) - $aclField['name'] = $field; - else - $aclField = $field; - - if($seed->bean_implements('ACL')) - $aclField['acl'] = $this->getFieldLevelACLValue($seed->module_dir, $aclField['name']); - else - $aclField['acl'] = ACL_FIELD_DEFAULT; - - $aclRow[] = $aclField; - } - $aclRows[] = $aclRow; - } - - $results['panels'] = $aclRows; - return $results; - } - - /** - * Parse wireless detailview metadata and add ACL values. - * - * @param String $module_name - * @param array $metadata - * @return array Metadata with acls added - */ - function metdataAclParserWirelessDetail($module_name, $metadata) - { - return self::metdataAclParserWirelessEdit($module_name, $metadata); - } - - /** - * Parse wireless listview metadata and add ACL values. - * - * @param String $module_name - * @param array $metadata - * @return array Metadata with acls added - */ - function metdataAclParserWirelessList($module_name, $metadata) - { - global $beanList, $beanFiles; - $class_name = $beanList[$module_name]; - require_once($beanFiles[$class_name]); - $seed = new $class_name(); - - $results = array(); - foreach ($metadata as $entry) - { - $field_name = $entry['name']; - if($seed->bean_implements('ACL')) - $entry['acl'] = $this->getFieldLevelACLValue($seed->module_dir, strtolower($field_name)); - else - $entry['acl'] = 99; - - $results[] = $entry; - } - - return $results; - } /** * Processes the filter_fields attribute to use with SugarBean::create_new_list_query() diff --git a/soap/SoapError.php b/soap/SoapError.php index eabc30aa..6fccc949 100644 --- a/soap/SoapError.php +++ b/soap/SoapError.php @@ -48,7 +48,7 @@ class SoapError{ function set_error($error_name){ global $error_defs; if(!isset($error_defs[$error_name])){ - $this->name = 'An Undefined Error - ' . $error_name . ' occured'; + $this->name = 'An Undefined Error - ' . $error_name . ' occurred'; $this->number = '-1'; $this->description = 'There is no error definition for ' . $error_name; }else{ diff --git a/soap/SoapSugarUsers.php b/soap/SoapSugarUsers.php index af8403f8..b2084a75 100644 --- a/soap/SoapSugarUsers.php +++ b/soap/SoapSugarUsers.php @@ -265,7 +265,7 @@ function seamless_login($session){ if(!validate_authenticated($session)){ return 0; } - $_SESSION['seamless_login'] = true; + return 1; } diff --git a/sugar_version.php b/sugar_version.php index cc1a640f..c6bd15f3 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.5.5'; -$sugar_db_version = '6.5.5'; +$sugar_version = '6.5.6'; +$sugar_db_version = '6.5.6'; $sugar_flavor = 'CE'; -$sugar_build = '8525'; -$sugar_timestamp = '2012-09-19 03:49pm'; +$sugar_build = '8566'; +$sugar_timestamp = '2012-10-17 11:26am'; ?> diff --git a/tests/PHPUnit/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php b/tests/PHPUnit/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php index 5b8e1154..e9a9e892 100755 --- a/tests/PHPUnit/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php +++ b/tests/PHPUnit/PHPUnit/Framework/MockObject/Matcher/InvokedAtLeastOnce.php @@ -78,7 +78,7 @@ class PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit_Fr if ($count < 1) { throw new PHPUnit_Framework_ExpectationFailedException( - 'Expected invocation at least once but it never occured.' + 'Expected invocation at least once but it never occurred.' ); } } diff --git a/tests/SugarTestCampaignUtilities.php b/tests/SugarTestCampaignUtilities.php index 0bea4f36..cf51da2c 100755 --- a/tests/SugarTestCampaignUtilities.php +++ b/tests/SugarTestCampaignUtilities.php @@ -76,5 +76,16 @@ class SugarTestCampaignUtilities } return $campaign_ids; } + + public static function setCreatedCampaign($ids) + { + $ids = is_array($ids) ? $ids : array($ids); + foreach ( $ids as $id ) + { + $campaign = new Campaign(); + $campaign->id = $id; + self::$_createdCampaigns[] = $campaign; + } + } } ?> \ No newline at end of file diff --git a/tests/SugarTestEmailUtilities.php b/tests/SugarTestEmailUtilities.php index 88cefa50..419fd506 100755 --- a/tests/SugarTestEmailUtilities.php +++ b/tests/SugarTestEmailUtilities.php @@ -99,5 +99,16 @@ class SugarTestEmailUtilities } return $email_ids; } + + public static function setCreatedEmail($ids) + { + $ids = is_array($ids) ? $ids : array($ids); + foreach ( $ids as $id ) + { + $email = new Email(); + $email->id = $id; + self::$_createdEmails[] = $email; + } + } } ?> \ No newline at end of file diff --git a/tests/SugarTestHelper.php b/tests/SugarTestHelper.php index 0a90dbda..457ec4e4 100755 --- a/tests/SugarTestHelper.php +++ b/tests/SugarTestHelper.php @@ -470,7 +470,7 @@ class SugarTestHelper // Restoring of theme SugarThemeRegistry::set(self::$systemVars['SugarThemeRegistry']->dirName); - + SugarCache::$isCacheReset = false; return true; } diff --git a/tests/SugarTestMeetingUtilities.php b/tests/SugarTestMeetingUtilities.php index 5109e993..be520bd6 100755 --- a/tests/SugarTestMeetingUtilities.php +++ b/tests/SugarTestMeetingUtilities.php @@ -48,6 +48,8 @@ class SugarTestMeetingUtilities $name = 'Meeting'; $meeting = new Meeting(); $meeting->name = $name . $time; + $meeting->duration_hours = '0'; + $meeting->duration_minutes = '15'; if(!empty($id)) { $meeting->new_with_id = true; @@ -107,4 +109,3 @@ class SugarTestMeetingUtilities return $meeting_ids; } } -?> \ No newline at end of file diff --git a/tests/SugarTestProspectListsUtilities.php b/tests/SugarTestProspectListsUtilities.php index 4fcbb5f5..b8e732be 100755 --- a/tests/SugarTestProspectListsUtilities.php +++ b/tests/SugarTestProspectListsUtilities.php @@ -45,6 +45,7 @@ class SugarTestProspectListsUtilities public static function removeProspectLists($prospect_list_id) { if (is_array($prospect_list_id)) { + $prospect_list_id = implode("','", $prospect_list_id); $GLOBALS['db']->query("DELETE FROM prospect_lists WHERE id IN ('{$prospect_list_id}')"); } else { @@ -59,6 +60,7 @@ class SugarTestProspectListsUtilities */ public static function removeProspectsListToProspectRelation($prospect_list_id, $prospect_id) { + $GLOBALS['db']->query("DELETE FROM prospect_lists_prospects WHERE prospect_list_id='{$prospect_list_id}' AND related_id='{$prospect_id}'"); } diff --git a/tests/data/Bug52133Test.php b/tests/data/Bug52133Test.php index 1699907e..3e5334b3 100755 --- a/tests/data/Bug52133Test.php +++ b/tests/data/Bug52133Test.php @@ -36,7 +36,7 @@ ********************************************************************************/ -class Bug52113Test extends Sugar_PHPUnit_Framework_TestCase +class Bug52133Test extends Sugar_PHPUnit_Framework_TestCase { protected $bean; protected $hook; diff --git a/tests/data/Relationships/Bug50910Test.php b/tests/data/Relationships/Bug50910Test.php index 16b89c03..454fbad6 100755 --- a/tests/data/Relationships/Bug50910Test.php +++ b/tests/data/Relationships/Bug50910Test.php @@ -35,7 +35,7 @@ ********************************************************************************/ -class Bug59010Test extends Sugar_PHPUnit_Framework_TestCase +class Bug50910Test extends Sugar_PHPUnit_Framework_TestCase { protected $emailAddress; @@ -72,4 +72,4 @@ class Bug59010Test extends Sugar_PHPUnit_Framework_TestCase $this->assertNotEmpty($current_user->email_addresses); } -} \ No newline at end of file +} diff --git a/tests/include/Bug33806.php b/tests/include/Bug33806Test.php similarity index 100% rename from tests/include/Bug33806.php rename to tests/include/Bug33806Test.php diff --git a/tests/include/Bug43652.php b/tests/include/Bug43652.php deleted file mode 100755 index 7441b5bb..00000000 --- a/tests/include/Bug43652.php +++ /dev/null @@ -1,113 +0,0 @@ -extAPI = new ExtAPIGoogle(); - $this->fileData1 = sugar_cached('unittest'); - file_put_contents($this->fileData1, "Unit test for mime type"); - } - - public function tearDown() - { - unlink($this->fileData1); - } - - function _fileMimeProvider() - { - return array( - array( array('name' => 'te.st.png','type' => 'img/png'),'img/png'), - array( array('name' => 'test.jpg','type' => 'img/jpeg'),'img/jpeg'), - array( array('name' => 'test.out','type' => 'application/octet-stream'),'application/octet-stream'), - array( array('name' => 'test_again','type' => 'img/png'),'img/png'), - ); - } - - /** - * Test the getMime function for the use case where the mime type is already provided. - * - * @dataProvider _fileMimeProvider - */ - public function testUploadFileWithMimeType($file_info, $expectedMime) - { - $uf = new UploadFile(''); - $mime = $uf->getMime($file_info); - - $this->assertEquals($expectedMime, $mime); - } - - /** - * Test file with no extension but with provided mime-type - * - * @return void - */ - public function testUploadFileWithEmptyFileExtension() - { - $file_info = array('name' => 'test', 'type' => 'application/octet-stream', 'tmp_name' => $this->fileData1); - $expectedMime = $this->extAPI->isMimeDetectionAvailable() ? 'text/plain' : 'application/octet-stream'; - $uf = new UploadFile(''); - $mime = $uf->getMime($file_info); - $this->assertEquals($expectedMime, $mime); - } - - - /** - * Test file with no extension and no provided mime-type - * - * @return void - */ - public function testUploadFileWithEmptyFileExtenEmptyMime() - { - $file_info = array('name' => 'test','tmp_name' => $this->fileData1); - $expectedMime = $this->extAPI->isMimeDetectionAvailable() ? 'text/plain' : 'application/octet-stream'; - $uf = new UploadFile(''); - $mime = $uf->getMime($file_info); - $this->assertEquals($expectedMime, $mime); - } -} \ No newline at end of file diff --git a/include/SugarFields/Fields/Multienum/WirelessEditView.tpl b/tests/include/MVC/View/Bug56373Test.php old mode 100644 new mode 100755 similarity index 62% rename from include/SugarFields/Fields/Multienum/WirelessEditView.tpl rename to tests/include/MVC/View/Bug56373Test.php index 3b9e2f5c..7af2012e --- a/include/SugarFields/Fields/Multienum/WirelessEditView.tpl +++ b/tests/include/MVC/View/Bug56373Test.php @@ -1,4 +1,4 @@ -{* + - {html_options options=$vardef.options selected=$values} - +class Bug56373Test extends Sugar_PHPUnit_Framework_TestCase +{ + + + // Currently, getBreadCrumbList in BreadCrumbStack.php limits you to 10 + // Also, the Constructor in BreadCrumbStack.php limits it to 10 too. + /* + * @group bug56373 + */ + public function testProcessRecentRecordsForHTML() { + $view = new Bug56373TestSugarViewMock(); + + $history = array( + array('item_summary' => '<img src=x alert(true)', 'module_name'=>'Accounts'), + array('item_summary' => '<script>alert(hi)</script>', 'module_name'=>'Accounts'), + + + ); + $out = $view->processRecentRecords($history); + foreach($out as $key => $row) { + $this->assertEquals($row['item_summary'], $history[$key]['item_summary']); + $this->assertNotRegExp('/[<>]/',$row['item_summary_short']); + $this->assertContains($history[$key]['item_summary'], $row['image']); + } + + } + +} + +class Bug56373TestSugarViewMock extends SugarView +{ + public function processRecentRecords($history) + { + return parent::processRecentRecords($history); + } +} \ No newline at end of file diff --git a/tests/include/SearchForm/Bug48846Test.php b/tests/include/SearchForm/Bug48846Test.php deleted file mode 100755 index f36141bd..00000000 --- a/tests/include/SearchForm/Bug48846Test.php +++ /dev/null @@ -1,112 +0,0 @@ -module."/metadata/searchdefs.php"; - require "modules/".$this->module."/metadata/SearchFields.php"; - require "modules/".$this->module."/metadata/listviewdefs.php"; - - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); - $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); - - $this->seed = new $beanList[$this->module]; - $this->form = new SearchForm($this->seed, $this->module, $this->action); - $this->form->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', "advanced_search", $listViewDefs); - - $this->array = array( - 'module'=>$this->module, - 'action'=>$this->action, - 'searchFormTab'=>'advanced_search', - 'query'=>'true', - ); - } - - public function tearDown() { - unset($this->array); - unset($this->form); - unset($this->seed); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - unset($GLOBALS['current_user']); - } - - - /** - * testSearchInt - * - * tests where generation in search form - * - * @dataProvider searchIntProvider - */ - public function testSearchInt($exp, $val) { - $this->array['case_number_advanced'] = $val; - - $this->form->populateFromArray($this->array); - $query = $this->form->generateSearchWhere($this->seed, $this->module); - - $this->assertSame($exp, $query[0]); - } - - /** - * searchIntProvider - * - * @return Array values for testing - */ - public function searchIntProvider() { - return array( - array("cases.case_number in (123)", 123), - array("cases.case_number in (-1)", 'test'), - array("cases.case_number in (12,14,16)", '12,14,16'), - array("cases.case_number in (12,-1,16)", '12,junk,16'), - array("cases.case_number in (-1,12,-1,16,34,124,-1)", 'stuff,12,junk,16,34,124,morejunk'), - ); - } - -} diff --git a/tests/include/SugarFields/Fields/Currency/Bug55733Test.php b/tests/include/SugarFields/Fields/Currency/Bug55733CurrencyTest.php similarity index 100% rename from tests/include/SugarFields/Fields/Currency/Bug55733Test.php rename to tests/include/SugarFields/Fields/Currency/Bug55733CurrencyTest.php diff --git a/tests/include/SugarQueue/CronTest.php b/tests/include/SugarQueue/CronTest.php index 37bd3834..63d037e6 100755 --- a/tests/include/SugarQueue/CronTest.php +++ b/tests/include/SugarQueue/CronTest.php @@ -222,6 +222,7 @@ class CronTest extends Sugar_PHPUnit_Framework_TestCase { // job 1 - oldest, should be executed $job = new SchedulersJob(); + $job->update_date_modified = false; $job->status = SchedulersJob::JOB_STATUS_RUNNING; $job->scheduler_id = 'unittest'; $job->execute_time = TimeDate::getInstance()->nowDb(); diff --git a/tests/include/SugarQueue/JobQueueTest.php b/tests/include/SugarQueue/JobQueueTest.php index 34defcac..9582c05f 100755 --- a/tests/include/SugarQueue/JobQueueTest.php +++ b/tests/include/SugarQueue/JobQueueTest.php @@ -93,6 +93,7 @@ class JobQueueTest extends Sugar_PHPUnit_Framework_TestCase public function testCleanup() { $job = new SchedulersJob(); + $job->update_date_modified = false; $job->status = SchedulersJob::JOB_STATUS_RUNNING; $job->scheduler_id = 'unittest'; $job->execute_time = $GLOBALS['timedate']->nowDb(); @@ -207,4 +208,4 @@ class TestSugarJobQueue extends SugarJobQueue { return parent::getJob($jobId); } -} \ No newline at end of file +} diff --git a/include/SugarFields/Fields/Multienum/WirelessDetailView.tpl b/tests/include/database/Bug44291Test.php old mode 100644 new mode 100755 similarity index 84% rename from include/SugarFields/Fields/Multienum/WirelessDetailView.tpl rename to tests/include/database/Bug44291Test.php index 6d659b20..ddee00a9 --- a/include/SugarFields/Fields/Multienum/WirelessDetailView.tpl +++ b/tests/include/database/Bug44291Test.php @@ -1,4 +1,4 @@ -{* + - {multienum_to_array string=$vardef.value assign="vals"} - {foreach from=$vals item='item'} -
  • {$vardef.options.$item}
  • - {/foreach} -{/if} +class Bug44291Test extends Sugar_PHPUnit_Framework_TestCase +{ + public function testGetColumnType() + { + switch($GLOBALS['db']->dbType) + { + default : + $this->assertEquals("decimal(26,6)", $GLOBALS['db']->getColumnType("currency")); + } + $this->assertEquals("Unknown", $GLOBALS['db']->getColumnType("Unknown")); + } +} diff --git a/tests/include/generic/SugarWidgets/Bug45716.php b/tests/include/generic/SugarWidgets/Bug45716.php deleted file mode 100755 index e7df86ac..00000000 --- a/tests/include/generic/SugarWidgets/Bug45716.php +++ /dev/null @@ -1,934 +0,0 @@ - - array ( - 'name' => 'account_id', - 'vname' => 'LBL_ACCOUNT_ID', - 'type' => 'id', - 'source' => 'non-db', - 'audited' => true, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:account_id_c' => - array ( - 'required' => false, - 'source' => 'custom_fields', - 'name' => 'account_id_c', - 'vname' => 'LBL_LIST_RELATED_TO', - 'type' => 'id', - 'massupdate' => '0', - 'default' => NULL, - 'comments' => '', - 'help' => '', - 'importable' => 'true', - 'duplicate_merge' => 'disabled', - 'duplicate_merge_dom_value' => '0', - 'audited' => false, - 'reportable' => false, - 'unified_search' => false, - 'calculated' => false, - 'len' => '36', - 'size' => '20', - 'id' => 'Opportunitiesaccount_id_c', - 'custom_module' => 'Opportunities', - 'module' => 'Opportunities', - 'real_table' => 'opportunities_cstm', - ), - 'self:account_link_c' => - array ( - 'dependency' => '', - 'required' => false, - 'source' => 'non-db', - 'name' => 'account_link_c', - 'vname' => 'LBL_ACCOUNT_LINK', - 'type' => 'relate', - 'massupdate' => '0', - 'default' => NULL, - 'comments' => '', - 'help' => '', - 'importable' => 'true', - 'duplicate_merge' => 'disabled', - 'duplicate_merge_dom_value' => '0', - 'audited' => false, - 'reportable' => true, - 'unified_search' => false, - 'calculated' => false, - 'len' => '255', - 'size' => '20', - 'id_name' => 'account_id_c', - 'ext2' => 'Accounts', - 'module' => 'Opportunities', - 'rname' => 'name', - 'quicksearch' => 'enabled', - 'studio' => 'visible', - 'id' => 'Opportunitiesaccount_link_c', - 'custom_module' => 'Opportunities', - 'real_table' => 'opportunities_cstm', - 'secondary_table' => 'accounts', - ), - 'self:account_name' => - array ( - 'name' => 'account_name', - 'rname' => 'name', - 'id_name' => 'account_id', - 'vname' => 'LBL_ACCOUNT_NAME', - 'type' => 'relate', - 'table' => 'accounts', - 'join_name' => 'accounts', - 'isnull' => 'true', - 'module' => 'Opportunities', - 'dbType' => 'varchar', - 'link' => 'accounts', - 'len' => '255', - 'source' => 'non-db', - 'unified_search' => true, - 'required' => true, - 'importable' => 'required', - 'real_table' => 'opportunities', - ), - 'self:accounts' => - array ( - 'name' => 'accounts', - 'type' => 'link', - 'relationship' => 'accounts_opportunities', - 'source' => 'non-db', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'Account', - 'vname' => 'LBL_ACCOUNTS', - 'real_table' => 'opportunities', - ), - 'self:amount' => - array ( - 'name' => 'amount', - 'vname' => 'LBL_AMOUNT', - 'type' => 'currency', - 'dbType' => 'double', - 'comment' => 'Unconverted amount of the opportunity', - 'importable' => 'required', - 'duplicate_merge' => '1', - 'required' => true, - 'options' => 'numeric_range_search_dom', - 'enable_range_search' => true, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:amount_usdollar' => - array ( - 'name' => 'amount_usdollar', - 'vname' => 'LBL_AMOUNT_USDOLLAR', - 'type' => 'currency', - 'group' => 'amount', - 'dbType' => 'double', - 'disable_num_format' => true, - 'duplicate_merge' => '0', - 'audited' => true, - 'comment' => 'Formatted amount of the opportunity', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:assigned_user_id' => - array ( - 'name' => 'assigned_user_id', - 'rname' => 'user_name', - 'id_name' => 'assigned_user_id', - 'vname' => 'LBL_ASSIGNED_TO_ID', - 'group' => 'assigned_user_name', - 'type' => 'relate', - 'table' => 'users', - 'module' => 'Opportunities', - 'reportable' => true, - 'isnull' => 'false', - 'dbType' => 'id', - 'audited' => true, - 'comment' => 'User ID assigned to record', - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:assigned_user_link' => - array ( - 'name' => 'assigned_user_link', - 'type' => 'link', - 'relationship' => 'opportunities_assigned_user', - 'vname' => 'LBL_ASSIGNED_TO_USER', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'User', - 'source' => 'non-db', - 'duplicate_merge' => 'enabled', - 'rname' => 'user_name', - 'id_name' => 'assigned_user_id', - 'table' => 'users', - 'real_table' => 'opportunities', - ), - 'self:assigned_user_name' => - array ( - 'name' => 'assigned_user_name', - 'link' => 'assigned_user_link', - 'vname' => 'LBL_ASSIGNED_TO_NAME', - 'rname' => 'user_name', - 'type' => 'relate', - 'reportable' => false, - 'source' => 'non-db', - 'table' => 'users', - 'id_name' => 'assigned_user_id', - 'module' => 'Opportunities', - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:calls' => - array ( - 'name' => 'calls', - 'type' => 'link', - 'relationship' => 'opportunity_calls', - 'source' => 'non-db', - 'vname' => 'LBL_CALLS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:campaign_id' => - array ( - 'name' => 'campaign_id', - 'comment' => 'Campaign that generated lead', - 'vname' => 'LBL_CAMPAIGN_ID', - 'rname' => 'id', - 'type' => 'id', - 'dbType' => 'id', - 'table' => 'campaigns', - 'isnull' => 'true', - 'module' => 'Opportunities', - 'reportable' => false, - 'massupdate' => false, - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:campaign_link' => - array ( - 'name' => 'campaign_link', - 'type' => 'link', - 'relationship' => 'opportunities_campaign', - 'vname' => 'LBL_CAMPAIGNS', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'Campaign', - 'source' => 'non-db', - 'reportable' => false, - 'real_table' => 'opportunities', - ), - 'self:campaign_name' => - array ( - 'name' => 'campaign_name', - 'rname' => 'name', - 'id_name' => 'campaign_id', - 'vname' => 'LBL_CAMPAIGN', - 'type' => 'relate', - 'link' => 'campaign_opportunities', - 'isnull' => 'true', - 'table' => 'campaigns', - 'module' => 'Opportunities', - 'source' => 'non-db', - 'real_table' => 'opportunities', - ), - 'self:campaign_opportunities' => - array ( - 'name' => 'campaign_opportunities', - 'type' => 'link', - 'vname' => 'LBL_CAMPAIGN_OPPORTUNITY', - 'relationship' => 'campaign_opportunities', - 'source' => 'non-db', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:campaigns' => - array ( - 'name' => 'campaigns', - 'type' => 'link', - 'relationship' => 'opportunities_campaign', - 'module' => 'Opportunities', - 'bean_name' => 'CampaignLog', - 'source' => 'non-db', - 'vname' => 'LBL_CAMPAIGNS', - 'reportable' => false, - 'real_table' => 'opportunities', - ), - 'self:contacts' => - array ( - 'name' => 'contacts', - 'type' => 'link', - 'relationship' => 'opportunities_contacts', - 'source' => 'non-db', - 'module' => 'Opportunities', - 'bean_name' => 'Contact', - 'rel_fields' => - array ( - 'contact_role' => - array ( - 'type' => 'enum', - 'options' => 'opportunity_relationship_type_dom', - ), - ), - 'vname' => 'LBL_CONTACTS', - 'real_table' => 'opportunities', - ), - 'self:contracts' => - array ( - 'name' => 'contracts', - 'type' => 'link', - 'vname' => 'LBL_CONTRACTS', - 'relationship' => 'contracts_opportunities', - 'source' => 'non-db', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:created_by' => - array ( - 'name' => 'created_by', - 'rname' => 'user_name', - 'id_name' => 'modified_user_id', - 'vname' => 'LBL_CREATED', - 'type' => 'assigned_user_name', - 'table' => 'users', - 'isnull' => 'false', - 'dbType' => 'id', - 'group' => 'created_by_name', - 'comment' => 'User who created record', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:created_by_link' => - array ( - 'name' => 'created_by_link', - 'type' => 'link', - 'relationship' => 'opportunities_created_by', - 'vname' => 'LBL_CREATED_USER', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'User', - 'source' => 'non-db', - 'real_table' => 'opportunities', - ), - 'self:created_by_name' => - array ( - 'name' => 'created_by_name', - 'vname' => 'LBL_CREATED', - 'type' => 'relate', - 'reportable' => false, - 'link' => 'created_by_link', - 'rname' => 'user_name', - 'source' => 'non-db', - 'table' => 'users', - 'id_name' => 'created_by', - 'module' => 'Opportunities', - 'duplicate_merge' => 'disabled', - 'importable' => 'false', - 'real_table' => 'opportunities', - ), - 'self:currencies' => - array ( - 'name' => 'currencies', - 'type' => 'link', - 'relationship' => 'opportunity_currencies', - 'source' => 'non-db', - 'vname' => 'LBL_CURRENCIES', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:currency_id' => - array ( - 'name' => 'currency_id', - 'type' => 'id', - 'group' => 'currency_id', - 'vname' => 'LBL_CURRENCY', - 'function' => - array ( - 'name' => 'getCurrencyDropDown', - 'returns' => 'html', - ), - 'reportable' => false, - 'comment' => 'Currency used for display purposes', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:currency_name' => - array ( - 'name' => 'currency_name', - 'rname' => 'name', - 'id_name' => 'currency_id', - 'vname' => 'LBL_CURRENCY_NAME', - 'type' => 'relate', - 'isnull' => 'true', - 'table' => 'currencies', - 'module' => 'Opportunities', - 'source' => 'non-db', - 'function' => - array ( - 'name' => 'getCurrencyNameDropDown', - 'returns' => 'html', - ), - 'studio' => 'false', - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:currency_symbol' => - array ( - 'name' => 'currency_symbol', - 'rname' => 'symbol', - 'id_name' => 'currency_id', - 'vname' => 'LBL_CURRENCY_SYMBOL', - 'type' => 'relate', - 'isnull' => 'true', - 'table' => 'currencies', - 'module' => 'Opportunities', - 'source' => 'non-db', - 'function' => - array ( - 'name' => 'getCurrencySymbolDropDown', - 'returns' => 'html', - ), - 'studio' => 'false', - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:currency_target_c' => - array ( - 'required' => false, - 'source' => 'custom_fields', - 'name' => 'currency_target_c', - 'vname' => 'LBL_CURRENCY_TARGET', - 'type' => 'currency', - 'massupdate' => '0', - 'default' => NULL, - 'comments' => '', - 'help' => '', - 'importable' => 'false', - 'duplicate_merge' => 'disabled', - 'duplicate_merge_dom_value' => '0', - 'audited' => false, - 'reportable' => true, - 'unified_search' => false, - 'calculated' => false, - 'len' => '26', - 'size' => '20', - 'enable_range_search' => false, - 'id' => 'Opportunitiescurrency_target_c', - 'custom_module' => 'Opportunities', - 'module' => 'Opportunities', - 'real_table' => 'opportunities_cstm', - ), - 'self:date_closed' => - array ( - 'name' => 'date_closed', - 'vname' => 'LBL_DATE_CLOSED', - 'type' => 'date', - 'audited' => true, - 'comment' => 'Expected or actual date the oppportunity will close', - 'importable' => 'required', - 'required' => true, - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:date_entered' => - array ( - 'name' => 'date_entered', - 'vname' => 'LBL_DATE_ENTERED', - 'type' => 'datetime', - 'group' => 'created_by_name', - 'comment' => 'Date record created', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:date_modified' => - array ( - 'name' => 'date_modified', - 'vname' => 'LBL_DATE_MODIFIED', - 'type' => 'datetime', - 'group' => 'modified_by_name', - 'comment' => 'Date record last modified', - 'enable_range_search' => true, - 'options' => 'date_range_search_dom', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:deleted' => - array ( - 'name' => 'deleted', - 'vname' => 'LBL_DELETED', - 'type' => 'bool', - 'default' => '0', - 'reportable' => false, - 'comment' => 'Record deletion indicator', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:description' => - array ( - 'name' => 'description', - 'vname' => 'LBL_DESCRIPTION', - 'type' => 'text', - 'comment' => 'Full text of the note', - 'rows' => 6, - 'cols' => 80, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:documents' => - array ( - 'name' => 'documents', - 'type' => 'link', - 'relationship' => 'documents_opportunities', - 'source' => 'non-db', - 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:emails' => - array ( - 'name' => 'emails', - 'type' => 'link', - 'relationship' => 'emails_opportunities_rel', - 'source' => 'non-db', - 'vname' => 'LBL_EMAILS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:id' => - array ( - 'name' => 'id', - 'vname' => 'LBL_ID', - 'type' => 'id', - 'required' => true, - 'reportable' => true, - 'comment' => 'Unique identifier', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:lead_source' => - array ( - 'name' => 'lead_source', - 'vname' => 'LBL_LEAD_SOURCE', - 'type' => 'enum', - 'options' => 'lead_source_dom', - 'len' => '50', - 'comment' => 'Source of the opportunity', - 'merge_filter' => 'enabled', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:leads' => - array ( - 'name' => 'leads', - 'type' => 'link', - 'relationship' => 'opportunity_leads', - 'source' => 'non-db', - 'vname' => 'LBL_LEADS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:meetings' => - array ( - 'name' => 'meetings', - 'type' => 'link', - 'relationship' => 'opportunity_meetings', - 'source' => 'non-db', - 'vname' => 'LBL_MEETINGS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:modified_by_name' => - array ( - 'name' => 'modified_by_name', - 'vname' => 'LBL_MODIFIED_NAME', - 'type' => 'relate', - 'reportable' => false, - 'source' => 'non-db', - 'rname' => 'user_name', - 'table' => 'users', - 'id_name' => 'modified_user_id', - 'module' => 'Opportunities', - 'link' => 'modified_user_link', - 'duplicate_merge' => 'disabled', - 'real_table' => 'opportunities', - ), - 'self:modified_user_id' => - array ( - 'name' => 'modified_user_id', - 'rname' => 'user_name', - 'id_name' => 'modified_user_id', - 'vname' => 'LBL_MODIFIED', - 'type' => 'assigned_user_name', - 'table' => 'users', - 'isnull' => 'false', - 'group' => 'modified_by_name', - 'dbType' => 'id', - 'reportable' => true, - 'comment' => 'User who last modified record', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:modified_user_link' => - array ( - 'name' => 'modified_user_link', - 'type' => 'link', - 'relationship' => 'opportunities_modified_user', - 'vname' => 'LBL_MODIFIED_USER', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'User', - 'source' => 'non-db', - 'real_table' => 'opportunities', - ), - 'self:name' => - array ( - 'name' => 'name', - 'vname' => 'LBL_OPPORTUNITY_NAME', - 'type' => 'name', - 'dbType' => 'varchar', - 'len' => '50', - 'unified_search' => true, - 'comment' => 'Name of the opportunity', - 'merge_filter' => 'selected', - 'importable' => 'required', - 'required' => true, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:next_step' => - array ( - 'name' => 'next_step', - 'vname' => 'LBL_NEXT_STEP', - 'type' => 'varchar', - 'len' => '100', - 'comment' => 'The next step in the sales process', - 'merge_filter' => 'enabled', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:notes' => - array ( - 'name' => 'notes', - 'type' => 'link', - 'relationship' => 'opportunity_notes', - 'source' => 'non-db', - 'vname' => 'LBL_NOTES', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:opportunity_type' => - array ( - 'name' => 'opportunity_type', - 'vname' => 'LBL_TYPE', - 'type' => 'enum', - 'options' => 'opportunity_type_dom', - 'len' => '255', - 'audited' => true, - 'comment' => 'Type of opportunity (ex: Existing, New)', - 'merge_filter' => 'enabled', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:probability' => - array ( - 'name' => 'probability', - 'vname' => 'LBL_PROBABILITY', - 'type' => 'int', - 'dbType' => 'double', - 'audited' => true, - 'comment' => 'The probability of closure', - 'validation' => - array ( - 'type' => 'range', - 'min' => 0, - 'max' => 100, - ), - 'merge_filter' => 'enabled', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:project' => - array ( - 'name' => 'project', - 'type' => 'link', - 'relationship' => 'projects_opportunities', - 'source' => 'non-db', - 'vname' => 'LBL_PROJECTS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:quotes' => - array ( - 'name' => 'quotes', - 'type' => 'link', - 'relationship' => 'quotes_opportunities', - 'source' => 'non-db', - 'vname' => 'LBL_QUOTES', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:sales_stage' => - array ( - 'name' => 'sales_stage', - 'vname' => 'LBL_SALES_STAGE', - 'type' => 'enum', - 'options' => 'sales_stage_dom', - 'len' => '255', - 'audited' => true, - 'comment' => 'Indication of progression towards closure', - 'merge_filter' => 'enabled', - 'importable' => 'required', - 'required' => true, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:tasks' => - array ( - 'name' => 'tasks', - 'type' => 'link', - 'relationship' => 'opportunity_tasks', - 'source' => 'non-db', - 'vname' => 'LBL_TASKS', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:team_count' => - array ( - 'name' => 'team_count', - 'rname' => 'team_count', - 'id_name' => 'team_id', - 'vname' => 'LBL_TEAMS', - 'join_name' => 'ts1', - 'table' => 'teams', - 'type' => 'relate', - 'required' => 'true', - 'isnull' => 'true', - 'module' => 'Opportunities', - 'link' => 'team_count_link', - 'massupdate' => false, - 'dbType' => 'int', - 'source' => 'non-db', - 'importable' => 'false', - 'reportable' => false, - 'duplicate_merge' => 'disabled', - 'studio' => 'false', - 'hideacl' => true, - 'real_table' => 'opportunities', - ), - 'self:team_count_link' => - array ( - 'name' => 'team_count_link', - 'type' => 'link', - 'relationship' => 'opportunities_team_count_relationship', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'TeamSet', - 'source' => 'non-db', - 'duplicate_merge' => 'disabled', - 'reportable' => false, - 'studio' => 'false', - 'real_table' => 'opportunities', - ), - 'self:team_id' => - array ( - 'name' => 'team_id', - 'vname' => 'LBL_TEAM_ID', - 'group' => 'team_name', - 'reportable' => false, - 'dbType' => 'id', - 'type' => 'team_list', - 'audited' => true, - 'comment' => 'Team ID for the account', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:team_link' => - array ( - 'name' => 'team_link', - 'type' => 'link', - 'relationship' => 'opportunities_team', - 'vname' => 'LBL_TEAMS_LINK', - 'link_type' => 'one', - 'module' => 'Opportunities', - 'bean_name' => 'Team', - 'source' => 'non-db', - 'duplicate_merge' => 'disabled', - 'studio' => 'false', - 'real_table' => 'opportunities', - ), - 'self:team_name' => - array ( - 'name' => 'team_name', - 'db_concat_fields' => - array ( - 0 => 'name', - 1 => 'name_2', - ), - 'sort_on' => 'tj.name', - 'join_name' => 'tj', - 'rname' => 'name', - 'id_name' => 'team_id', - 'vname' => 'LBL_TEAMS', - 'type' => 'relate', - 'required' => 'true', - 'table' => 'teams', - 'isnull' => 'true', - 'module' => 'Opportunities', - 'link' => 'team_link', - 'massupdate' => false, - 'dbType' => 'varchar', - 'source' => 'non-db', - 'len' => 36, - 'custom_type' => 'teamset', - 'real_table' => 'opportunities', - ), - 'self:team_set_id' => - array ( - 'name' => 'team_set_id', - 'rname' => 'id', - 'id_name' => 'team_set_id', - 'vname' => 'LBL_TEAM_SET_ID', - 'type' => 'team_set_id', - 'audited' => true, - 'studio' => 'false', - 'dbType' => 'id', - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - 'self:teams' => - array ( - 'name' => 'teams', - 'type' => 'link', - 'relationship' => 'opportunities_teams', - 'bean_filter_field' => 'team_set_id', - 'rhs_key_override' => true, - 'source' => 'non-db', - 'vname' => 'LBL_TEAMS', - 'link_class' => 'TeamSetLink', - 'link_file' => 'modules/Teams/TeamSetLink.php', - 'studio' => 'false', - 'reportable' => false, - 'module' => 'Opportunities', - 'real_table' => 'opportunities', - ), - ); // END: all_fields - - - - - public $selected_loaded_custom_links = array ( - 'opportunities_cstm' => - array ( - 'join_table_alias' => 'opportunities_cstm', - 'base_table' => 'opportunities', - 'real_table' => 'opportunities_cstm', - ), - 'accounts_account_link_c' => - array ( - 'join_table_alias' => 'accounts1', - 'base_table' => 'accounts', - 'join_id' => 'opportunities_cstm.account_id_c', - ), - ); // END: selected_loaded_custom_links - - - - function getAttribute( $dontcare ) { - return $this; - } -} - -class Bug45716Test extends Sugar_PHPUnit_Framework_TestCase -{ - public function setUp() { - parent::setUp(); - - $GLOBALS['action'] = 'index'; - $GLOBALS['module'] = 'Reports'; - $GLOBALS['app_strings'] = return_application_language('en_us'); - $GLOBALS['app_list_strings'] = return_app_list_strings_language('en_us'); - $GLOBALS['mod_strings'] = return_module_language('en_us','Reports'); - $GLOBALS['db'] = DBManagerFactory::getInstance(); - $GLOBALS['current_user'] = new User(); - $GLOBALS['current_user']->retrieve('1'); - } - - public function tearDown() { - unset($GLOBALS['module']); - unset($GLOBALS['action']); - unset($GLOBALS['mod_strings']); - unset($GLOBALS['current_user']); - parent::tearDown(); - } - - public function testCustomRelatedLink() - { - $layout_def = array ( - 'name' => 'account_id_c', - 'label' => 'Account Link', - 'table_key' => 'self', - 'table_alias' => 'opportunities_cstm', - 'column_key' => 'self:account_link_c', - 'type' => 'relate', - 'fields' => - array ( - 'PRIMARYID' => '10765534-ff52-52ec-5840-4f16faec901f', - 'OPPORTUNITIES_NAME' => 'Trait Institute Inc - 1000 units', - 'OPPORTUNITIES_AMOUNT_UBC8F31' => '52183382.29', - 'OPPORTUNITIES_AMOUNT' => '52183382.29', - 'OPPORTUNITIES_AMOUNT_C9AC638' => '-99', - 'OPPORTUNITIES_CSTM_ACCE36316' => '13ce632e-605e-93ac-c209-4f16fa14e616', - 'ACCOUNTS1_NAME' => 'OTC Holdings', - ), - ); - $fakeLayoutManager = new Bug45716Helper(); - $sugarWidget = new SugarWidgetFieldrelate($fakeLayoutManager); - - $output = $sugarWidget->displayList($layout_def); - - $this->assertContains('record=13ce',$output, 'Missing the id in the output url'); - } -} \ No newline at end of file diff --git a/tests/include/javascript/Bug56694v2Test.php b/tests/include/javascript/Bug56694v2Test.php new file mode 100755 index 00000000..7f0a2ab2 --- /dev/null +++ b/tests/include/javascript/Bug56694v2Test.php @@ -0,0 +1,205 @@ +templateInt = new TemplateInt(); + $this->templateInt->importable = "true"; + $this->templateInt->label = "LBL_TEST"; + $this->templateInt->name = "bug_c"; + $this->templateInt->no_default = 1; + $this->templateInt->reportable = "1"; + $this->templateInt->supports_unified_search = true; + $this->templateInt->vname = $this->templateInt->label; + + $this->bean = new SugarBean(); + + $this->javascript = new javascript56694(); + $this->javascript->setSugarBean($this->bean); + } + + /** + * Test asserts that after addField call validator is not added + * + * @group 56694 + */ + public function testAddFieldForFieldWithoutValidator() + { + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertEmpty($this->javascript->getData(), 'Validator is added'); + } + + /** + * Test asserts that after addField call validator is added with empty values + * + * @group 56694 + */ + public function testAddFieldForFieldWithoutRealValidator() + { + $this->templateInt->min = 5; + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->bean->field_name_map[$this->templateInt->name]['validation']['min'] = null; + $this->bean->field_name_map[$this->templateInt->name]['validation']['max'] = null; + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertNotEmpty($this->javascript->getData(), 'Validator is not added'); + + $actual = $this->javascript->getData(); + $this->assertSame(array(false, false), $actual, 'Values are incorrect'); + } + + /** + * Test asserts that after addField call validator is added only for min value, max value should be false + * + * @group 56694 + */ + public function testAddFieldForFieldWithMinOnly() + { + $this->templateInt->min = 5; + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertNotEmpty($this->javascript->getData(), 'Validator is not added'); + + $actual = $this->javascript->getData(); + $this->assertSame(array($this->templateInt->min,false), $actual, 'Values are incorrect'); + } + + /** + * Test asserts that after addField call validator is added only to max value, min value should be false + * + * @group 56694 + */ + public function testAddFieldForFieldWithMaxOnly() + { + $this->templateInt->max = 5; + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertNotEmpty($this->javascript->getData(), 'Validator is not added'); + + $actual = $this->javascript->getData(); + $this->assertSame(array(false, $this->templateInt->max), $actual, 'Values are incorrect'); + } + + /** + * Test asserts that after addField call validator is added with both values + * + * @group 56694 + */ + public function testAddFieldForFieldWithMaxMin() + { + $this->templateInt->min = 5; + $this->templateInt->max = 6; + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertNotEmpty($this->javascript->getData(), 'Validator is not added'); + $actual = $this->javascript->getData(); + $this->assertEquals(array($this->templateInt->min, $this->templateInt->max), $actual, 'Values are incorrect'); + } + + /** + * Test asserts that after addField call validator added to both values and has min value, because of min value more than max + * + * @group 56694 + */ + public function testAddFieldForFieldWithInvertedMaxMin() + { + $this->templateInt->min = 6; + $this->templateInt->max = 5; + $this->bean->field_name_map[$this->templateInt->name] = $this->templateInt->get_field_def(); + $this->javascript->addField($this->templateInt->name, $this->templateInt->required); + + $this->assertNotEmpty($this->javascript->getData(), 'Validator is not added'); + $actual = $this->javascript->getData(); + $this->assertSame(array($this->templateInt->min, $this->templateInt->min), $actual, 'Min value is incorrect'); + } +} + +/** + * Mock of javascript class + */ +class javascript56694 extends javascript +{ + /** + * @var array + */ + protected $data = array(); + + /** + * @return array + */ + public function getData() + { + return $this->data; + } + + public function addFieldRange($field, $type, $displayName, $required, $prefix = '', $min, $max) + { + $this->data = array($min, $max); + } +} diff --git a/tests/include/utils/Bug46122Test.php b/tests/include/utils/Bug46122Test.php index 5795da40..c6a88b6f 100755 --- a/tests/include/utils/Bug46122Test.php +++ b/tests/include/utils/Bug46122Test.php @@ -38,7 +38,7 @@ require_once('include/utils/LogicHook.php'); require_once('include/MVC/View/SugarView.php'); -class Bu46122Test extends Sugar_PHPUnit_Framework_TestCase +class Bug46122Test extends Sugar_PHPUnit_Framework_TestCase { var $hasCustomModulesLogicHookFile = false; var $hasCustomContactLogicHookFile = false; @@ -93,7 +93,7 @@ class Bu46122Test extends Sugar_PHPUnit_Framework_TestCase { $GLOBALS['logic_hook'] = new LogicHookMock(); $hooks = $GLOBALS['logic_hook']->getHooks('Contacts'); - $sugarViewMock = new SugarViewMock(); + $sugarViewMock = new Bug46122TestSugarViewMock(); $sugarViewMock->module = 'Contacts'; $sugarViewMock->process(); $expectedHookCount = isset($hooks['after_ui_frame']) ? count($hooks['after_ui_frame']) : 0; @@ -105,7 +105,7 @@ class Bu46122Test extends Sugar_PHPUnit_Framework_TestCase { $GLOBALS['logic_hook'] = new LogicHookMock(); $hooks = $GLOBALS['logic_hook']->getHooks(''); - $sugarViewMock = new SugarViewMock(); + $sugarViewMock = new Bug46122TestSugarViewMock(); $sugarViewMock->module = ''; $sugarViewMock->process(); $expectedHookCount = isset($hooks['after_ui_frame']) ? count($hooks['after_ui_frame']) : 0; @@ -113,7 +113,7 @@ class Bu46122Test extends Sugar_PHPUnit_Framework_TestCase } } -class SugarViewMock extends SugarView +class Bug46122TestSugarViewMock extends SugarView { var $options = array(); //no-opt methods we override @@ -140,4 +140,4 @@ class LogicHookMock extends LogicHook } } -?> \ No newline at end of file +?> diff --git a/tests/include/utils/Bug46850Test.php b/tests/include/utils/Bug46850Test.php index 338209d9..49693c17 100755 --- a/tests/include/utils/Bug46850Test.php +++ b/tests/include/utils/Bug46850Test.php @@ -37,7 +37,7 @@ require_once('include/utils/LogicHook.php'); -class Bu46850Test extends Sugar_PHPUnit_Framework_TestCase +class Bug46850Test extends Sugar_PHPUnit_Framework_TestCase { protected $renames = array(); protected $deletes = array(); diff --git a/tests/include/utils/Bug48369Test.php b/tests/include/utils/Bug48369Test.php index f60f761e..8b214ea4 100755 --- a/tests/include/utils/Bug48369Test.php +++ b/tests/include/utils/Bug48369Test.php @@ -37,7 +37,7 @@ require_once('include/utils/LogicHook.php'); -class Bu48369Test extends Sugar_PHPUnit_Framework_TestCase +class Bug48369Test extends Sugar_PHPUnit_Framework_TestCase { var $backupContents; @@ -85,4 +85,4 @@ EOQ; $customWidget = new SugarWidgetFieldCustomName(null); $this->assertEquals("Bug48369Test", $customWidget->queryFilterIs(null)); } -} \ No newline at end of file +} diff --git a/tests/include/utils/Bug49397Test.php b/tests/include/utils/Bug49397Test.php index 1a6125f4..f65b5c0e 100755 --- a/tests/include/utils/Bug49397Test.php +++ b/tests/include/utils/Bug49397Test.php @@ -40,7 +40,7 @@ * @author Collin Lee * */ -class Bug49397est extends Sugar_PHPUnit_Framework_TestCase { +class Bug49397Test extends Sugar_PHPUnit_Framework_TestCase { var $user; var $user2; diff --git a/tests/jssource/bug54472.php b/tests/jssource/Bug54472Test.php similarity index 95% rename from tests/jssource/bug54472.php rename to tests/jssource/Bug54472Test.php index 305f649b..80a2bded 100755 --- a/tests/jssource/bug54472.php +++ b/tests/jssource/Bug54472Test.php @@ -53,9 +53,10 @@ class Bug54472Test extends Sugar_PHPUnit_Framework_TestCase public function setUp() { - //lets create the needed directories and js grouping files in the appropriate extensions directory - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, true); - $GLOBALS['current_user']->is_admin = true; + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); + SugarTestHelper::setUp('current_user', array(true, 1)); + SugarTestHelper::setUp('mod_strings', array('ModuleBuilder')); //lets retrieve the original jsgroupings file to populate the js_grouping array to compare against later on include('jssource/JSGroupings.php'); @@ -128,7 +129,7 @@ $js_groupings [\'testEntryMod\'] = array("include/javascript/calendar.js" => "in //run repair so the extension files are reset back to original state $trac = new RepairAndClear(); $trac->repairAndClearAll(array('rebuildExtensions'), array(), false, false); - + SugarTestHelper::tearDown(); } public function testGetJSGroupingCustomEntries() { diff --git a/tests/jssource/SugarJSMin.php b/tests/jssource/SugarJSMinTest.php similarity index 100% rename from tests/jssource/SugarJSMin.php rename to tests/jssource/SugarJSMinTest.php diff --git a/tests/modules/Administration/Bugs39819_39820.php b/tests/modules/Administration/Bugs39819_39820Test.php similarity index 98% rename from tests/modules/Administration/Bugs39819_39820.php rename to tests/modules/Administration/Bugs39819_39820Test.php index 0329f063..6ed2eeab 100755 --- a/tests/modules/Administration/Bugs39819_39820.php +++ b/tests/modules/Administration/Bugs39819_39820Test.php @@ -37,7 +37,7 @@ require_once 'PHPUnit/Extensions/OutputTestCase.php'; -class Bugs39819_39820 extends Sugar_PHPUnit_Framework_TestCase +class Bugs39819_39820Test extends Sugar_PHPUnit_Framework_TestCase { /** * @ticket 39819 diff --git a/tests/modules/CampaignLog/Bug12755.php b/tests/modules/CampaignLog/Bug12755Test.php similarity index 100% rename from tests/modules/CampaignLog/Bug12755.php rename to tests/modules/CampaignLog/Bug12755Test.php diff --git a/tests/modules/DynamicFields/DynamicFieldsCurrencyTests.php b/tests/modules/DynamicFields/DynamicFieldsCurrencyTest.php similarity index 78% rename from tests/modules/DynamicFields/DynamicFieldsCurrencyTests.php rename to tests/modules/DynamicFields/DynamicFieldsCurrencyTest.php index d27b0c1a..ccfc78e1 100755 --- a/tests/modules/DynamicFields/DynamicFieldsCurrencyTests.php +++ b/tests/modules/DynamicFields/DynamicFieldsCurrencyTest.php @@ -41,7 +41,7 @@ require_once('modules/DynamicFields/FieldCases.php'); * @group DynamicFieldsCurrencyTests */ -class DynamicFieldsCurrencyTests extends Sugar_PHPUnit_Framework_TestCase +class DynamicFieldsCurrencyTest extends Sugar_PHPUnit_Framework_TestCase { private $_modulename = 'Accounts'; private $_originaldbType = ''; @@ -85,31 +85,12 @@ class DynamicFieldsCurrencyTests extends Sugar_PHPUnit_Framework_TestCase public function testCurrencyDbType() { - // oci8 - number - $GLOBALS['db']->dbType = 'oci8'; + $type = 'decimal'; $this->field->len = NULL; $dbTypeString = $this->field->get_db_type(); - $this->assertRegExp('/number *\(/', $dbTypeString); + $this->assertRegExp('/' . $type . ' *\(/', $dbTypeString); $dbTypeString = $this->field->get_db_type(); $this->field->len = 20; - $this->assertRegExp('/number *\(/', $dbTypeString); - - // mssql - decimal - $GLOBALS['db']->dbType = 'mssql'; - $this->field->len = NULL; - $dbTypeString = $this->field->get_db_type(); - $this->assertRegExp('/decimal *\(/', $dbTypeString); - $this->field->len = 20; - $dbTypeString = $this->field->get_db_type(); - $this->assertRegExp('/decimal *\(/', $dbTypeString); - - // default - decimal - $GLOBALS['db']->dbType = 'mssql'; - $this->field->len = NULL; - $dbTypeString = $this->field->get_db_type(); - $this->assertRegExp('/decimal *\(/', $dbTypeString); - $this->field->len = 20; - $dbTypeString = $this->field->get_db_type(); - $this->assertRegExp('/decimal *\(/', $dbTypeString); + $this->assertRegExp('/' . $type . ' *\(/', $dbTypeString); } } diff --git a/tests/modules/DynamicFields/templates/Fields/Bug56694Test.php b/tests/modules/DynamicFields/templates/Fields/Bug56694Test.php new file mode 100755 index 00000000..3e6b4900 --- /dev/null +++ b/tests/modules/DynamicFields/templates/Fields/Bug56694Test.php @@ -0,0 +1,204 @@ +templateInt = new TemplateInt(); + $this->templateInt->importable = "true"; + $this->templateInt->label = "LBL_TEST"; + $this->templateInt->name = "bug_c"; + $this->templateInt->no_default = 1; + $this->templateInt->reportable = "1"; + $this->templateInt->supports_unified_search = true; + $this->templateInt->vname = $this->templateInt->label; + } + + /** + * Test asserts that min & max properties more important than ext1 & ext2 + * + * @group 53554 + */ + public function testMinMaxWinExt() + { + $this->templateInt->ext1 = 3; + $this->templateInt->ext2 = 4; + $vardef = $this->templateInt->get_field_def(); + + $this->assertArrayHasKey('validation', $vardef, 'Validation is not required'); + $this->assertEquals(3, $vardef['validation']['min'], 'Ext won'); + $this->assertEquals(4, $vardef['validation']['max'], 'Ext won'); + + $this->templateInt->min = 1; + $this->templateInt->max = 2; + $vardef = $this->templateInt->get_field_def(); + + $this->assertArrayHasKey('validation', $vardef, 'Validation is not required'); + $this->assertEquals(1, $vardef['validation']['min'], 'Min won'); + $this->assertEquals(2, $vardef['validation']['max'], 'Max won'); + } + + /** + * Method returns data for tests + * min value + * max value + * should validator be present + * should min value be present + * should max value be present + * + * @return array + */ + public function getMaxMin() + { + return array( + array(null, null, false, false, false), + array(0, null, true, true, false), + array(0, 0, true, true, true), + array('0', '0', true, true, true), + array(null, 0, true, false, true), + array(1, 5, true, true, true, true), + array('1', '5', true, true, true, true), + array('a', 'b', false, false, false), + array('a', 5, true, false, true), + array(5, 'a', true, true, false) + ); + } + + /** + * Test checks min & max range for validator for int field + * + * @param mixed $min value + * @param mixed $max max + * @param bool $isValidation is validation required + * @param bool $isMin is min value present + * @param bool $isMax is max value present + * + * @dataProvider getMaxMin + * @group 56694 + */ + public function testGetFieldDefByMinMax($min, $max, $isValidation, $isMin, $isMax) + { + $this->templateInt->min = $min; + $this->templateInt->max = $max; + $vardef = $this->templateInt->get_field_def(); + + if ($isValidation == false) + { + $this->assertArrayNotHasKey('validation', $vardef, 'Validation is required'); + } + else + { + $this->assertArrayHasKey('validation', $vardef, 'Validation is not required'); + if ($isMin == true) + { + $this->assertEquals($min, $vardef['validation']['min'], 'Min value is incorrect'); + } + else + { + $this->assertEquals(false, $vardef['validation']['min'], 'Min value is present'); + } + if ($isMax == true) + { + $this->assertEquals($max, $vardef['validation']['max'], 'Max value is incorrect'); + } + else + { + $this->assertEquals(false, $vardef['validation']['max'], 'Max value is present'); + } + } + } + + /** + * Test checks min & max range for validator for int field + * + * @param mixed $min value + * @param mixed $max max + * @param bool $isValidation is validation required + * @param bool $isMin is min value present + * @param bool $isMax is max value present + * + * @dataProvider getMaxMin + * @group 56694 + */ + public function testGetFieldDefByExt($min, $max, $isValidation, $isMin, $isMax) + { + $this->templateInt->ext1 = $min; + $this->templateInt->ext2 = $max; + $vardef = $this->templateInt->get_field_def(); + + if ($isValidation == false) + { + $this->assertArrayNotHasKey('validation', $vardef, 'Validation is required'); + } + else + { + $this->assertArrayHasKey('validation', $vardef, 'Validation is not required'); + if ($isMin == true) + { + $this->assertEquals($min, $vardef['validation']['min'], 'Min value is incorrect'); + } + else + { + $this->assertEquals(false, $vardef['validation']['min'], 'Min value is present'); + } + if ($isMax == true) + { + $this->assertEquals($max, $vardef['validation']['max'], 'Max value is incorrect'); + } + else + { + $this->assertEquals(false, $vardef['validation']['max'], 'Max value is present'); + } + } + } +} diff --git a/tests/modules/Emails/FindEmailFromBeanIdsTest.php b/tests/modules/Emails/FindEmailFromBeanIdsTest.php index 5720e0d3..b0b63f5c 100755 --- a/tests/modules/Emails/FindEmailFromBeanIdsTest.php +++ b/tests/modules/Emails/FindEmailFromBeanIdsTest.php @@ -40,7 +40,7 @@ require_once('modules/Emails/EmailUI.php'); /** * Test cases for Bug 9755 */ -class FindEmailFromBeanIdTest extends Sugar_PHPUnit_Framework_TestCase +class FindEmailFromBeanIdsTest extends Sugar_PHPUnit_Framework_TestCase { private $emailUI; private $beanIds, $beanType, $whereArr; @@ -77,5 +77,3 @@ EOQ; $this->assertEquals($this->expectedQuery, $this->resultQuery); } } - -?> \ No newline at end of file diff --git a/tests/modules/Emails/HandleBodyInHTMLformatTest.php b/tests/modules/Emails/HandleBodyInHTMLformatTest.php index 2298c2c8..d6d7f92e 100755 --- a/tests/modules/Emails/HandleBodyInHTMLformatTest.php +++ b/tests/modules/Emails/HandleBodyInHTMLformatTest.php @@ -41,7 +41,7 @@ require_once('include/SugarPHPMailer.php'); /** * Test cases for Bug 30591 */ -class handleBodyInHTMLformatTest extends Sugar_PHPUnit_Framework_TestCase +class HandleBodyInHTMLformatTest extends Sugar_PHPUnit_Framework_TestCase { private $sugarMailer; private $email; @@ -78,4 +78,3 @@ EOQ; $this->assertEquals($this->sugarMailer->Body, $emailBodyInHtmlResult); } } -?> \ No newline at end of file diff --git a/tests/modules/Home/QuickSearchTests.php b/tests/modules/Home/QuickSearchTests.php deleted file mode 100755 index 4eafbc58..00000000 --- a/tests/modules/Home/QuickSearchTests.php +++ /dev/null @@ -1,86 +0,0 @@ -query($q); - SugarTestHelper::tearDown(); - } - - public function testFormatResults() - { - $tempPT = new ProductTemplate(); - $tempPT->name = 'MasonUnitTest'; - $tempPT->description = "Unit'test"; - $tempPT->cost_price = 1000; - $tempPT->discount_price = 800; - $tempPT->list_price = 1100; - $tempPT->save(); - - $_REQUEST['data'] = '{"conditions":[{"end":"%","name":"name","op":"like_custom","value":""}],"field_list":["name","id","type_id","mft_part_num","cost_price","list_price","discount_price","pricing_factor","description","cost_usdollar","list_usdollar","discount_usdollar","tax_class_name"],"form":"EditView","group":"or","id":"EditView_product_name[1]","limit":"30","method":"query","modules":["ProductTemplates"],"no_match_text":"No Match","order":"name","populate_list":["name_1","product_template_id_1"],"post_onblur_function":"set_after_sqs"}'; - $_REQUEST['query'] = 'MasonUnitTest'; - require('modules/Home/quicksearchQuery.php'); - - $json = getJSONobj(); - $data = $json->decode(html_entity_decode($_REQUEST['data'])); - if(isset($_REQUEST['query']) && !empty($_REQUEST['query'])){ - foreach($data['conditions'] as $k=>$v){ - if(empty($data['conditions'][$k]['value'])){ - $data['conditions'][$k]['value']=$_REQUEST['query']; - } - } - } - $this->quickSearch = new quicksearchQuery(); - $result = $this->quickSearch->query($data); - $resultBean = $json->decodeReal($result); - $this->assertEquals($resultBean['fields'][0]['description'], $tempPT->description); - } -} diff --git a/tests/modules/Leads/ConvertLeadTests.php b/tests/modules/Leads/ConvertLeadTest.php similarity index 99% rename from tests/modules/Leads/ConvertLeadTests.php rename to tests/modules/Leads/ConvertLeadTest.php index 2ec4da31..de9280dc 100755 --- a/tests/modules/Leads/ConvertLeadTests.php +++ b/tests/modules/Leads/ConvertLeadTest.php @@ -40,7 +40,7 @@ require_once 'modules/Leads/views/view.convertlead.php'; require_once 'tests/SugarTestViewConvertLeadUtilities.php'; -class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase +class ConvertLeadTest extends Sugar_PHPUnit_Framework_TestCase { public function setUp() { @@ -251,6 +251,9 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase SugarTestLeadUtilities::removeAllCreatedLeads(); } + /** + * @outputBuffering enabled + */ public function testConversionAndMoveActivities() { global $sugar_config; @@ -325,6 +328,9 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase SugarTestLeadUtilities::removeAllCreatedLeads(); } + /** + * @outputBuffering enabled + */ public function testConversionAndCopyActivities() { global $sugar_config; @@ -411,6 +417,9 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase SugarTestLeadUtilities::removeAllCreatedLeads(); } + /** + * @outputBuffering enabled + */ public function testConversionAndDoNothing() { global $sugar_config; diff --git a/tests/modules/ModuleBuilder/Bug42085Test.php b/tests/modules/ModuleBuilder/Bug42085Test.php deleted file mode 100755 index e8aa1ba3..00000000 --- a/tests/modules/ModuleBuilder/Bug42085Test.php +++ /dev/null @@ -1,82 +0,0 @@ -meeting = SugarTestMeetingUtilities::createMeeting(); - //$this->listLayoutMetaDataParser = new ListLayoutMetaDataParser(MB_LISTVIEW, 'Meetings'); - } - - public function tearDown() - { - SugarTestMeetingUtilities::removeAllCreatedMeetings(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - unset($GLOBALS['current_user']); - } - - public function testHideMeetingType() - { - $validDef = $this->meeting->field_defs['type']; - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelesseditview')); - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelessdetailview')); - } - - public function testHideMeetingPassword() - { - $validDef = $this->meeting->field_defs['password']; - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelesseditview')); - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelessdetailview')); - } - - public function testHideMeetingDisplayedURL() - { - $validDef = $this->meeting->field_defs['displayed_url']; - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelesseditview')); - $this->assertFalse(AbstractMetaDataParser::validField($validDef, 'wirelessdetailview')); - } -} - -?> \ No newline at end of file diff --git a/tests/modules/ModuleBuilder/Bug45339Test.php b/tests/modules/ModuleBuilder/Bug45339Test.php new file mode 100755 index 00000000..c7bfebbb --- /dev/null +++ b/tests/modules/ModuleBuilder/Bug45339Test.php @@ -0,0 +1,304 @@ + "ModuleBuilder", + 'action' => "SaveRelationship", + 'remove_tables' => "true", + 'view_module' => "", + 'relationship_lang' => "en_us", + 'relationship_name' => "", + 'lhs_module' => "", + 'relationship_type' => "many-to-many", + 'rhs_module' => "", + 'lhs_label' => "", + 'rhs_label' => "", + 'lhs_subpanel' => "default", + 'rhs_subpanel' => "default", + ); + private $packName = 'test_package'; + + public function setUp() + { + SugarTestHelper::setUp('current_user', array(true, 1)); + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); + SugarTestHelper::setUp('app_list_strings'); + SugarTestHelper::setUp('app_strings'); + + $_REQUEST = $this->keys; + + $_REQUEST['view_module'] = "Accounts"; + $_REQUEST['lhs_module'] = "Accounts"; + $_REQUEST['rhs_module'] = "Contacts"; + $_REQUEST['lhs_label'] = "Accounts"; + $_REQUEST['rhs_label'] = "Contacts"; + + $relationAccountContact = new DeployedRelationships($_REQUEST['view_module']); + $this->relationAccountContact = $relationAccountContact->addFromPost(); + $relationAccountContact->save(); + $relationAccountContact->build(); + + $_REQUEST['view_module'] = "Contacts"; + $_REQUEST['lhs_module'] = "Contacts"; + $_REQUEST['rhs_module'] = "Accounts"; + $_REQUEST['lhs_label'] = "Contacts"; + $_REQUEST['rhs_label'] = "Accounts"; + + $relationContactAccount = new DeployedRelationships($_REQUEST['view_module']); + $this->relationContactAccount = $relationContactAccount->addFromPost(); + $relationContactAccount->save(); + $relationContactAccount->build(); + + $this->mbPackage = new Bug45339MBPackageMock($this->packName); + } + + public function tearDown() + { + $relationshipAccountContact = new DeployedRelationships($this->relationAccountContact->getLhsModule()); + $relationshipAccountContact->delete($this->relationAccountContact->getName()); + $relationshipAccountContact->save(); + + $relationshipContactAccount = new DeployedRelationships($this->relationContactAccount->getLhsModule()); + $relationshipContactAccount->delete($this->relationContactAccount->getName()); + $relationshipContactAccount->save(); + + SugarRelationshipFactory::deleteCache(); + + unset($_REQUEST); + + SugarTestHelper::tearDown(); + } + + /** + * @group 45339 + */ + public function testGetCustomRelationshipsByModuleName() + { + /* @var $this->mbPackage MBPackage */ + $accountsAllCustomRelationships = $this->mbPackage->getCustomRelationshipsByModuleNameTest('Accounts'); + // Created in the Account module. + $accountsLhsCustomRelationships = $this->mbPackage->getCustomRelationshipsByModuleNameTest('Accounts', true); + $wrongModuleName = $this->mbPackage->getCustomRelationshipsByModuleNameTest('Wrong_module_name'); + + $this->assertArrayHasKey($this->relationAccountContact->getName(), $accountsAllCustomRelationships); + $this->assertArrayHasKey($this->relationContactAccount->getName(), $accountsAllCustomRelationships); + + $this->assertArrayHasKey($this->relationAccountContact->getName(), $accountsLhsCustomRelationships); + $this->assertArrayNotHasKey($this->relationContactAccount->getName(), $accountsLhsCustomRelationships); + + $this->assertFalse($wrongModuleName); // check + } + + /** + * @group 45339 + */ + public function testGetCustomRelationshipsMetaFilesByModuleName() + { + $accountContactMetaPath = sprintf( + 'custom%1$smetadata%1$s' . $this->relationAccountContact->getName() . 'MetaData.php', + DIRECTORY_SEPARATOR + ); + $accountContactTablePath = sprintf( + 'custom%1$sExtension%1$sapplication%1$sExt%1$sTableDictionary%1$s' . $this->relationAccountContact->getName() . '.php', + DIRECTORY_SEPARATOR + ); + $contactAccountMetaPath = sprintf( + 'custom%1$smetadata%1$s' . $this->relationContactAccount->getName() . 'MetaData.php', + DIRECTORY_SEPARATOR + ); + + /* @var $this->mbPackage MBPackage */ + $accountsAllFiles = $this->mbPackage->getCustomRelationshipsMetaFilesByModuleNameTest('Accounts'); + $accountsOnlyMetaFile = $this->mbPackage->getCustomRelationshipsMetaFilesByModuleNameTest('Accounts', true, true); + $wrongModuleName = $this->mbPackage->getCustomRelationshipsMetaFilesByModuleNameTest('Wrong_module_name'); + + $this->assertContains($accountContactMetaPath, $accountsAllFiles); + $this->assertContains($accountContactTablePath, $accountsAllFiles); + $this->assertContains($contactAccountMetaPath, $accountsAllFiles); + + $this->assertContains($accountContactMetaPath, $accountsOnlyMetaFile); + $this->assertNotContains($contactAccountMetaPath, $accountsOnlyMetaFile); + + $this->assertInternalType('array', $wrongModuleName); + $this->assertEmpty($wrongModuleName); + } + + /** + * @group 45339 + */ + public function testGetExtensionsList() + { + // Create new relationship between Leads and Accounts + $_REQUEST['view_module'] = "Leads"; + $_REQUEST['lhs_module'] = "Leads"; + $_REQUEST['rhs_module'] = "Accounts"; + $_REQUEST['lhs_label'] = "Leads"; + $_REQUEST['rhs_label'] = "Accounts"; + + $deployedRelation = new DeployedRelationships($_REQUEST['view_module']); + $relationLeadAccount = $deployedRelation->addFromPost(); + $deployedRelation->save(); + $deployedRelation->build(); + + $accountContactRelInAccountVardefExtensions = sprintf( + 'custom%1$sExtension%1$smodules%1$sAccounts%1$sExt%1$sVardefs%1$s' . $this->relationAccountContact->getName() . '_Accounts.php', + DIRECTORY_SEPARATOR + ); + $contactAccountRelInAccountVardefExtensions = sprintf( + 'custom%1$sExtension%1$smodules%1$sAccounts%1$sExt%1$sVardefs%1$s' . $this->relationContactAccount->getName() . '_Accounts.php', + DIRECTORY_SEPARATOR + ); + $leadAccountRelInAccountVardefExtensions = sprintf( + 'custom%1$sExtension%1$smodules%1$sAccounts%1$sExt%1$sVardefs%1$s' . $relationLeadAccount->getName() . '_Accounts.php', + DIRECTORY_SEPARATOR + ); + + /* @var $this->mbPackage MBPackage */ + $accountAllExtensions = $this->mbPackage->getExtensionsListTest('Accounts'); + $accountExtContacts = $this->mbPackage->getExtensionsListTest('Accounts', array('Contacts')); + $accountExtWithWrongRelationship = $this->mbPackage->getExtensionsListTest('Accounts', array('')); + $wrongModuleName = $this->mbPackage->getExtensionsListTest('Wrong_module_name'); + + // Remove relationship + $deployedRelation->delete($relationLeadAccount->getName()); + $deployedRelation->save(); + SugarRelationshipFactory::deleteCache(); + + $this->assertContains($accountContactRelInAccountVardefExtensions, $accountAllExtensions); + $this->assertContains($contactAccountRelInAccountVardefExtensions, $accountAllExtensions); + $this->assertContains($leadAccountRelInAccountVardefExtensions, $accountAllExtensions); + + $this->assertContains($accountContactRelInAccountVardefExtensions, $accountExtContacts); + $this->assertContains($contactAccountRelInAccountVardefExtensions, $accountExtContacts); + $this->assertNotContains($leadAccountRelInAccountVardefExtensions, $accountExtContacts); + + $this->assertEmpty($accountExtWithWrongRelationship); + + $this->assertInternalType('array', $wrongModuleName); + $this->assertEmpty($wrongModuleName); + } + + /** + * @group 45339 + */ + public function testGetExtensionsManifestForPackage() + { + /* @var $this->mbPackage MBPackage */ + $this->mbPackage->exportCustom(array('Accounts'), false, false); + $installDefs = array(); + $packExtentionsPath = $this->mbPackage->getBuildDir() . DIRECTORY_SEPARATOR . 'Extension' . DIRECTORY_SEPARATOR . 'modules'; + $expected = 0; + + $this->mbPackage->getExtensionsManifestForPackageTest($this->mbPackage->getBuildDir(), $installDefs); + + $recursiveIterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($packExtentionsPath), + RecursiveIteratorIterator::SELF_FIRST + ); + + /* @var $fInfo SplFileInfo */ + foreach (new RegexIterator($recursiveIterator, "/\.php$/i") as $fInfo) + { + if ($fInfo->isFile()) + { + ++$expected; + } + } + + $this->mbPackage->delete(); + $this->mbPackage->deleteBuild(); + + $this->assertEquals($expected, count($installDefs['copy'])); + } + + /** + * @group 45339 + */ + public function testCustomBuildInstall() + { + /* @var $this->mbPackage MBPackage */ + $this->mbPackage->exportCustom(array('Accounts'), false, false); + $installDefString = $this->mbPackage->customBuildInstall(array('Accounts'), $this->mbPackage->getBuildDir()); + + eval($installDefString); + + $this->mbPackage->delete(); + $this->mbPackage->deleteBuild(); + + $this->assertArrayHasKey('relationships', $installdefs); + } + +} + +class Bug45339MBPackageMock extends MBPackage +{ + + public function getExtensionsManifestForPackageTest($path, &$installdefs) + { + return $this->getExtensionsManifestForPackage($path, $installdefs); + } + + public function getExtensionsListTest($module, $includeRelationships = true) + { + return $this->getExtensionsList($module, $includeRelationships); + } + + public function getCustomRelationshipsMetaFilesByModuleNameTest($moduleName, $lhs = false, $metadataOnly = false) + { + return $this->getCustomRelationshipsMetaFilesByModuleName($moduleName, $lhs, $metadataOnly); + } + + public function getCustomRelationshipsByModuleNameTest($moduleName, $lhs = false) + { + return $this->getCustomRelationshipsByModuleName($moduleName, $lhs); + } + +} diff --git a/tests/modules/ModuleBuilder/Bug48826Test.php b/tests/modules/ModuleBuilder/Bug48826Test.php deleted file mode 100755 index 892bb251..00000000 --- a/tests/modules/ModuleBuilder/Bug48826Test.php +++ /dev/null @@ -1,95 +0,0 @@ -markTestSkipped('Skipping a broken unit test, dev will work on fixing this.'); - } - - public function tearDown() - { - } - - public function provider() - { - $types = array( - 'char','varchar','varchar2','text','textarea','double','float','decimal','int','date','bool','relate', - 'enum','multienum','radioenum','email','url','iframe','html','phone','currency','parent','parent_type', - 'currency_id','address','encrypt','id','datetimecombo','datetime','image','_other_' - ); - $provider_array = array(); - foreach ( $types as $type ) - { - $provider_array[] = array($type, array('name' => 'equal($dd1_c,"Analyst")'), 'equal($dd1_c,"Analyst")'); - $provider_array[] = array($type, array('dependency' => 'equal($dd1_c,"Analyst")'), 'equal($dd1_c,"Analyst")'); - $provider_array[] = array($type, array('dependency' => 'equal($dd1_c,"Analyst")'), 'equal($dd1_c,"Analyst")'); - $provider_array[] = array($type, array('formula' => 'equal($dd1_c,"Analyst")'), 'equal($dd1_c,"Analyst")'); - $provider_array[] = array($type, array('formula' => 'equal($dd1_c,"Analyst")'), 'equal($dd1_c,"Analyst")'); - } - - return $provider_array; - } - - /** - * @dataProvider provider - */ - public function testPopulateFromPost($type, $request_data, $expected) - { - $tested_key = null; - foreach ( $request_data as $_key => $_data ) - { - $_REQUEST[$_key] = $_data; - $tested_key = $_key; - } - - $field = get_widget($type) ; - $field->populateFromPost(); - - if ( isset($field->$tested_key) ) - { - $this->assertEquals($expected, $field->$tested_key); - } - else - { - $this->markTestSkipped(); - } - } -} -?> diff --git a/tests/include/database/Bug44291.php b/tests/modules/ModuleBuilder/parsers/Bug39729Test.php similarity index 67% rename from tests/include/database/Bug44291.php rename to tests/modules/ModuleBuilder/parsers/Bug39729Test.php index 7c5fd1d8..0f011315 100755 --- a/tests/include/database/Bug44291.php +++ b/tests/modules/ModuleBuilder/parsers/Bug39729Test.php @@ -34,44 +34,49 @@ * "Powered by SugarCRM". ********************************************************************************/ - -require_once 'include/database/MysqlHelper.php'; -require_once 'include/database/MssqlHelper.php'; -require_once 'include/database/FreeTDSHelper.php'; -class Bug44291 extends Sugar_PHPUnit_Framework_TestCase +require_once "modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php"; + +/** + * Bug #39729 + * "Email Address field is not avialable in the ToolBox if removed from Leeds > Convert Leeds > Contacts Layout" + * + * @author Mikhail Yarotsky + * @ticket 39729 + */ +class Bug39729Test extends Sugar_PHPUnit_Framework_TestCase { - public function setUp() - { - } + /** + * @var $_view; + */ + private $_view; - public function tearDown() - { - } + /** + * @var $def; + */ + private $def; - public function testGetColumnTypeMySql() + public function setUp() { - $_helper = new MysqlHelper(); - $this->assertEquals("decimal(26,6)", $_helper->getColumnType("currency")); - $this->assertEquals("Unknown", $_helper->getColumnType("Unknown")); - unset($_helper); + global $dictionary; + $this->_view = 'editview'; + VardefManager::loadVardef('Contacts', 'Contact'); + $this->def = $dictionary['Contact']['fields']['email1']; + } - public function testGetColumnTypeMSSql() + public function tearDown() { - $_helper = new MssqlHelper(); - $this->assertEquals("decimal(26,6)", $_helper->getColumnType("currency")); - $this->assertEquals("Unknown", $_helper->getColumnType("Unknown")); - unset($_helper); + unset($this->_view); + unset($this->def); } - public function testGetColumnTypeFreeTDS() + /** + * Relate to email1 should be true + * @group 39729 + */ + public function testEmail1FieldOnTrue() { - $_helper = new FreeTDSHelper(); - $this->assertEquals("decimal(26,6)", $_helper->getColumnType("currency")); - $this->assertEquals("Unknown", $_helper->getColumnType("Unknown")); - unset($_helper); + $this->assertTrue(AbstractMetaDataParser::validField ( $this->def, $this->_view )); } - - } diff --git a/tests/modules/Opportunities/Bug42727.php b/tests/modules/Opportunities/Bug42727Test.php similarity index 95% rename from tests/modules/Opportunities/Bug42727.php rename to tests/modules/Opportunities/Bug42727Test.php index f24ee796..7918e041 100755 --- a/tests/modules/Opportunities/Bug42727.php +++ b/tests/modules/Opportunities/Bug42727Test.php @@ -55,6 +55,9 @@ class Bug42727Test extends Sugar_PHPUnit_Framework_TestCase public function setUp() { + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); + SugarTestHelper::setUp('current_user'); $this->_opportunity = new MockOpportunity(); } @@ -62,6 +65,7 @@ class Bug42727Test extends Sugar_PHPUnit_Framework_TestCase { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); $GLOBALS['db']->query('DELETE FROM opportunities WHERE id IN (\'' . implode("', '", $this->_opportunityIds) . '\')'); + SugarTestHelper::tearDown(); } @@ -81,4 +85,4 @@ class Bug42727Test extends Sugar_PHPUnit_Framework_TestCase $this->assertFalse($this->_opportunity->isOwner($this->_opportunity->created_by)); $this->assertTrue($this->_opportunity->mailWasSent); } -} \ No newline at end of file +} diff --git a/tests/modules/ProductTemplates/Bug44515-WithoutCustom.php b/tests/modules/Schedulers/Bug44819Test.php similarity index 71% rename from tests/modules/ProductTemplates/Bug44515-WithoutCustom.php rename to tests/modules/Schedulers/Bug44819Test.php index c0aa5aa8..eff2b7e4 100755 --- a/tests/modules/ProductTemplates/Bug44515-WithoutCustom.php +++ b/tests/modules/Schedulers/Bug44819Test.php @@ -35,29 +35,35 @@ ********************************************************************************/ -class Bug44515 extends Sugar_PHPUnit_Framework_TestCase +require_once 'modules/Schedulers/Scheduler.php'; + +/** + * Bug44819Test + * Test Scheduler static function initUser() which returns a valid admin user + * + * @author avucinic@sugarcrm.com + */ +class Bug44819Test extends Sugar_PHPUnit_Framework_TestCase { - - /** - * @group Bug44515 - */ - public function setUp() + + public function setUp() { - + // Create admin user + SugarTestUserUtilities::createAnonymousUser(true, 1); } - public function tearDown() { + // Clear the admin user created + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } - public function testLoadCustomFormulas() - { - require_once "modules/ProductTemplates/Formulas.php"; + public function testInitUser() { + // Check if the initUser() function returns an Admin user + $user = Scheduler::initUser(); + $this->assertNotEquals(false, $user, "No admnin users found in the system."); + $this->assertEquals(1, $user->is_admin, "User returned is not admin."); + $this->assertEquals("Active", $user->status, "User returned is not active."); + } - // At this point I expect to have only the 5 standard formulas - $expectedIndexes = 5; - $this->assertEquals($expectedIndexes, count($GLOBALS['price_formulas'])); - } } - diff --git a/tests/modules/Schedulers/SchedulerTest.php b/tests/modules/Schedulers/SchedulerTest.php index dc6b81aa..f58c60ee 100755 --- a/tests/modules/Schedulers/SchedulerTest.php +++ b/tests/modules/Schedulers/SchedulerTest.php @@ -37,7 +37,7 @@ require_once 'include/SugarQueue/SugarJobQueue.php'; require_once 'modules/Schedulers/Scheduler.php'; -class SchedulersTest extends Sugar_PHPUnit_Framework_TestCase +class SchedulerTest extends Sugar_PHPUnit_Framework_TestCase { static protected $old_timedate; @@ -296,6 +296,7 @@ class SchedulersTest extends Sugar_PHPUnit_Framework_TestCase $this->scheduler->save(); $job = new SchedulersJob(); + $job->update_date_modified = false; $job->status = SchedulersJob::JOB_STATUS_RUNNING; $job->scheduler_id = $this->scheduler->id; $job->execute_time = $GLOBALS['timedate']->nowDb(); @@ -359,4 +360,4 @@ class TestScheduler extends Scheduler public function fire() { $this->fired = true; } -} \ No newline at end of file +} diff --git a/tests/modules/UpgradeWizard/SugarMerge/Bug43226TestPartB.php b/tests/modules/UpgradeWizard/SugarMerge/Bug43226PartBTest.php similarity index 98% rename from tests/modules/UpgradeWizard/SugarMerge/Bug43226TestPartB.php rename to tests/modules/UpgradeWizard/SugarMerge/Bug43226PartBTest.php index 990ab3ed..51b2e4d2 100755 --- a/tests/modules/UpgradeWizard/SugarMerge/Bug43226TestPartB.php +++ b/tests/modules/UpgradeWizard/SugarMerge/Bug43226PartBTest.php @@ -36,7 +36,7 @@ require_once 'include/dir_inc.php'; -class Bug43226TestPartB extends Sugar_PHPUnit_Framework_TestCase { +class Bug43226PartBTest extends Sugar_PHPUnit_Framework_TestCase { var $merge; @@ -122,4 +122,4 @@ function test_uploadfile_convert_merge_600() { } } -} \ No newline at end of file +} diff --git a/tests/modules/ProductTemplates/Bug44515.php b/tests/modules/Users/Bug54858Test.php similarity index 51% rename from tests/modules/ProductTemplates/Bug44515.php rename to tests/modules/Users/Bug54858Test.php index 82549079..84bb3cd0 100755 --- a/tests/modules/ProductTemplates/Bug44515.php +++ b/tests/modules/Users/Bug54858Test.php @@ -35,55 +35,70 @@ ********************************************************************************/ -class Bug44515 extends Sugar_PHPUnit_Framework_TestCase +/** + * @group 54858 + * + */ +class Bug54858Test extends Sugar_PHPUnit_Framework_TestCase { - - /** - * @group Bug44515 - */ - var $customDir = "custom/modules/ProductTemplates/formulas"; public function setUp() { - - if (!is_dir($this->customDir)) - mkdir($this->customDir, 0700, TRUE); // Creating nested directories at a glance - - file_put_contents($this->customDir . "/customformula1.php", ""); - file_put_contents($this->customDir . "/customformula2.php", ""); + $this->user = SugarTestUserUtilities::createAnonymousUser(); + $this->user->email1 = $email = 'test'.uniqid().'@test.com'; + $this->user->save(); + $GLOBALS['current_user'] = $this->user; + $this->vcal_url = "{$GLOBALS['sugar_config']['site_url']}/vcal_server.php/type=vfb&source=outlook&email=" . urlencode($email); + $GLOBALS['db']->commit(); } - public function tearDown() { - unset($GLOBALS['price_formulas']['Customformula1']); - unset($GLOBALS['price_formulas']['Customformula2']); - unlink($this->customDir . "/customformula1.php"); - unlink($this->customDir . "/customformula2.php"); - rmdir($this->customDir); + unset($GLOBALS['current_user']); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } - public function testLoadCustomFormulas() + /** + * Test that new user gets ical key + */ + public function testCreateNewUser() { - require_once "modules/ProductTemplates/Formulas.php"; + $this->assertNotEmpty($this->user->getPreference('calendar_publish_key'), "Publish key is not set"); + } - // At this point I expect to have 7 formulas (5 standard and 2 custom). - $expectedIndexes = 7; - $this->assertEquals($expectedIndexes, count($GLOBALS['price_formulas'])); + protected function callVcal($key) + { + $ch = curl_init($this->vcal_url."&key=" . urlencode($key)); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $return = curl_exec($ch); + $info = curl_getinfo($ch); + $info['return'] = $return; + return $info; + } - // Check if standard formulas are still in the array - $this->assertArrayHasKey("Fixed", $GLOBALS['price_formulas']); - $this->assertArrayHasKey("ProfitMargin", $GLOBALS['price_formulas']); - $this->assertArrayHasKey("PercentageMarkup", $GLOBALS['price_formulas']); - $this->assertArrayHasKey("PercentageDiscount", $GLOBALS['price_formulas']); - $this->assertArrayHasKey("IsList", $GLOBALS['price_formulas']); - // Check if custom formulas are in the array - $this->assertArrayHasKey("Customformula1", $GLOBALS['price_formulas']); - $this->assertArrayHasKey("Customformula2", $GLOBALS['price_formulas']); + // test vcal service + public function testPublishKey() + { + $res = $this->callVcal(''); + $this->assertEquals('401', $res['http_code']); - // Check if CustomFormula1 point to the right file (/custom/modules/ProductTemplates/formulas/customformula1.php) - $_customFormula1FileName = "custom/modules/ProductTemplates/formulas/customformula1.php"; - $this->assertEquals($_customFormula1FileName, $GLOBALS['price_formulas']['Customformula1']); - } -} + $res = $this->callVcal('blah'); + $this->assertEquals('401', $res['http_code']); + $key = $this->user->getPreference('calendar_publish_key'); + $res = $this->callVcal($key); + $this->assertEquals('200', $res['http_code']); + $this->assertContains('BEGIN:VCALENDAR', $res['return']); + + // now reset the key + $this->user->setPreference('calendar_publish_key', ''); + $this->user->savePreferencesToDB(); + $GLOBALS['db']->commit(); + + $res = $this->callVcal(''); + $this->assertEquals('401', $res['http_code']); + $res = $this->callVcal($key); + $this->assertEquals('401', $res['http_code']); + } +} diff --git a/tests/service/Bug48748Test.php b/tests/service/Bug48748Test.php deleted file mode 100755 index 586eefa7..00000000 --- a/tests/service/Bug48748Test.php +++ /dev/null @@ -1,126 +0,0 @@ -package)) - { - $this->packageExists = true; - mkdir_recursive('custom/modules/' . $this->package . '_bak'); - copy_recursive('custom/modules/' . $this->package, 'custom/modules/' . $this->package . '_bak'); - } - - //Make the custom package directory and simulate copying the file in - mkdir_recursive('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs'); - - $theArray = array ($this->package => array('subpanel_setup' => array ( $this->package.'_accounts' => array( - 'order' => 100, - 'module' => 'Contacts', - 'subpanel_name' => 'default', - 'title_key' => 'LBL_BUG48784TEST', - 'get_subpanel_data' => 'Bug48748Test', - )))); - $theFile = 'custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php'; - write_array_to_file('layout_defs', $theArray, $theFile); - - sugar_chmod('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php', 0655); - - global $beanList, $beanFiles, $current_user; - //$beanList['Contacts'] = 'Contact'; - //$beanFiles['Bug48784Mock'] = 'modules/Contacts/Contact.php'; - - //Create an anonymous user for login purposes/ - $current_user = SugarTestUserUtilities::createAnonymousUser(); - $current_user->status = 'Active'; - $current_user->is_admin = 1; - $current_user->save(); - $GLOBALS['db']->commit(); // Making sure we commit any changes before continuing - - $_SESSION['avail_modules'][$this->package] = 'write'; - } - - public function tearDown() - { - parent::tearDown(); - if($this->packageExists) - { - //Copy original contents back in - copy_recursive('custom/modules/' . $this->package . '_bak', 'custom/modules/' . $this->package); - rmdir_recursive('custom/modules/' . $this->package . '_bak'); - } else { - rmdir_recursive('custom/modules/' . $this->package); - } - - unset($_SESSION['avail_modules'][$this->package]); - } - - public function testWirelessModuleLayoutForCustomModule() - { - - $this->assertTrue(file_exists('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php')); - //$contents = file_get_contents('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php'); - include('custom/modules/' . $this->package . '/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php'); - - global $current_user; - $result = $this->_login($current_user); - $session = $result['id']; - $results = $this->_makeRESTCall('get_module_layout', - array( - 'session' => $session, - 'module' => array($this->package), - 'type' => array('wireless'), - 'view' => array('subpanel'), - ) - ); - - $this->assertEquals('Bug48748Test', $results[$this->package]['wireless']['subpanel']["{$this->package}_accounts"]['get_subpanel_data'], 'Cannot load custom wireless.subpaneldefs.ext.php file'); - } -} diff --git a/tests/service/RESTAPI3Test.php b/tests/service/RESTAPI3Test.php index 831ad67e..60f40fe3 100755 --- a/tests/service/RESTAPI3Test.php +++ b/tests/service/RESTAPI3Test.php @@ -418,11 +418,6 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase $sh = new SugarWebServiceUtilv3(); - $mobileResult = $this->_makeRESTCall('get_available_modules', array('session' => $session, 'filter' => 'mobile' )); - $mobileResultExpected = $sh->get_visible_mobile_modules($fullResult['modules']); - $mobileResultExpected = md5(serialize(array('modules' => $mobileResultExpected))); - $mobileResult = md5(serialize($mobileResult)); - $this->assertEquals($mobileResultExpected, $mobileResult, "Unable to get all visible mobile modules"); $defaultResult = $this->_makeRESTCall('get_available_modules', array('session' => $session, 'filter' => 'default' )); $defaultResult = md5(serialize($defaultResult['modules'])); @@ -723,11 +718,6 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase 'type' => 'default', 'view' => 'subpanel', ), - array( - 'module' => 'Leads', - 'type' => 'wireless', - 'view' => 'subpanel', - ), ); } diff --git a/themes/Sugar5/css/style.css b/themes/Sugar5/css/style.css index 7d89ec78..a01dc1bc 100644 --- a/themes/Sugar5/css/style.css +++ b/themes/Sugar5/css/style.css @@ -233,7 +233,6 @@ th, td margin-bottom: 1px; margin-left:2px; cursor: pointer; - cursor: hand; } #globalLinks ul li:hover ul, #globalLinks ul a:hover ul @@ -318,8 +317,7 @@ cursor:pointer; { list-style-type: none; display: inline; - padding: 0px; - cursor: hand; + padding: 0px; cursor: pointer; margin: 0; } @@ -363,7 +361,6 @@ div#content noLeftColumn { padding-top: 5px; cursor: pointer; - cursor: hand; } #HideMenu { @@ -388,7 +385,6 @@ div#content noLeftColumn margin-bottom: 4px; margin-top: 2px; max-width: 140px; - *width: expression(this.clientWidth > 140 ? '140px':true); } #newRecord form button, #newRecord form input[type=button], @@ -496,7 +492,7 @@ background:transparent none repeat scroll 0% 0%; } #subModuleList li.subTabMore ul.cssmenu{ -visibility:none; +visibility:hidden; } #subModuleList li.subTabMore:hover ul.cssmenu{ @@ -1100,7 +1096,7 @@ div.indent_right { } #horizWrapper {position:relative; margin-left:60px;width:218px;float:left;} -#horizBGDiv {position:relative; top:60px; background:url(../../../../index.php?entryPoint=getImage&imageName=horizBg.png) no-repeat; height:26px; width:218px;zindex:5 } +#horizBGDiv {position:relative; top:60px; background:url('../../../../index.php?entryPoint=getImage&imageName=horizBg.png') no-repeat; height:26px; width:218px;z-index:5 } #horizHandleDiv { position:absolute; left: 100px; /* the default position is the center of the bg */ @@ -1123,7 +1119,7 @@ div.indent_right { width:99%; margin: 0 0 3px; padding-right:0 !important; - padding-left:10 !important; + padding-left:10px !important; padding-top:10px !important; } /* sitemap */ @@ -1569,8 +1565,8 @@ table.reportlistView{ padding: 4px 5px 4px 5px; border-left: none; border-right: none; - border-top: 1px solid Blackccc; - border-bottom: 1px solid Blackccc; + border-top: 1px solid black; + border-bottom: 1px solid black; background:Gainsboro; } @@ -1831,8 +1827,7 @@ margin-bottom: 10px; } /* for subpanels */ #MorePanelHandle -{ - cursor: hand; +{ cursor: pointer; display: inline; margin-left: 2px; @@ -1861,7 +1856,6 @@ font-size:11px; padding: 2px 5px 2px 5px; margin: 0; cursor: pointer; -cursor: hand; } .sqsSelectedSmartInputItem { @@ -2095,7 +2089,6 @@ td.edit.view td[align=right] .login .login_more { text-align:right; - *padding-right: 18px !important; /* only needed in IE7 and earlier */ } #lastviewicon, #newrecordicon, #shortcuts_img,#lastviewicon_1, #newrecordicon_1, #shortcuts_img_1 { @@ -2160,7 +2153,6 @@ td.edit.view td[align=right] { overflow:auto; max-height:375px; - height:expression(this.scrollHeight>375?'375px':'auto'); } .sugarFeedDashlet td.list th, .sugarFeedDashlet td.list td[scope=col] @@ -2173,22 +2165,11 @@ td.edit.view td[align=right] height:auto; } -/* -Bug 33193 - Fixed several items in the sugarfeeds not correctly scrolling on IE7; -added the *position:static CSS property on the following two rules, which will only -be used on IE7 and IE6 -*/ .sugarFeedDashlet .byLineBox { width:100%; position:relative; - *position:static; - overflow: none; -} - -.sugarFeedDashlet .yui-ac-input -{ - *position:static !important; + overflow: hidden; } .sugarFeedDashlet .byLineBox .byLineLeft @@ -2213,7 +2194,7 @@ iframe.teamNoticeBox .loading-indicator { font-size:11px; - background-image:url(../default/ext/resources/images/default/grid/loading.gif); + background-image:url('../default/ext/resources/images/default/grid/loading.gif'); background-repeat:no-repeat; background-position:left; padding-left:20px; @@ -2357,7 +2338,7 @@ a:link, a:visited, a:hover } .buttonSlide.yui-module .yui-hd .toggle em { - background-image: url(../../../../index.php?entryPoint=getImage&imageName=slider_button_more.png); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=slider_button_more.png'); background-repeat: no-repeat; display: inline; /* prevent IE margin doubling */ overflow:hidden; @@ -2370,7 +2351,7 @@ a:link, a:visited, a:hover } .buttonSlide.yui-module.yui-closed .yui-hd .toggle em { - background-image: url(../../../../index.php?entryPoint=getImage&imageName=slider_button_less.png); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=slider_button_less.png'); } .buttonSlide .yui-bd { @@ -2772,7 +2753,7 @@ ul.subpanelTablist li a.current, ul.subpanelTablist li a.current:hover border-color: #c1c1c1; background-color: #f0f0f0; color: #000; - background-image: url(../../../../index.php?entryPoint=getImage&imageName=bgBtnGray.gif); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bgBtnGray.gif'); } .pagination button [title="Return to List"]:hover{ @@ -3057,7 +3038,7 @@ h1, h2, h3 } .h3Row { - background-image: url(../../../../index.php?entryPoint=getImage&imageName=bg.gif); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bg.gif'); } h4, h5 { @@ -3076,7 +3057,7 @@ button, input[type=submit], input[type=reset], input[type=button], .button border-color: #abc3d7; background-color: #ecf1f4; color: #000; - background-image: url(../../../../index.php?entryPoint=getImage&imageName=bgBtn.gif); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bgBtn.gif'); } button:hover, input[type=submit]:hover, input[type=reset]:hover, input[type=button]:hover, button:focus, input[type=submit]:focus, input[type=reset]:focus, input[type=button]:focus, @@ -3090,7 +3071,7 @@ button[disabled], input[type=submit][disabled], input[type=reset][disabled], inp border-color: #c1c1c1; background-color: #f0f0f0; color: #000; - background-image: url(../../../../index.php?entryPoint=getImage&imageName=bgBtnGray.gif); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bgBtnGray.gif'); } input,select { @@ -3126,13 +3107,13 @@ textarea /* for the main screen navigation tabs */ #moduleList { - background-image : url(../../../../index.php?entryPoint=getImage&imageName=tabRowBg.gif); + background-image : url('../../../../index.php?entryPoint=getImage&imageName=tabRowBg.gif'); background-repeat: repeat-x; border-bottom-color: #0046ad; } #moduleList > ul > li { - background-image:url(../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=otherTab.gif); + background-image:url('../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=otherTab.gif'); } #moduleList ul li span.currentTab a:link, #moduleList ul li span.currentTab a:visited, @@ -3153,7 +3134,7 @@ textarea #moduleList ul li span.currentTabRight, #moduleList ul li span.currentTab { - background-image : url(../../../../index.php?entryPoint=getImage&imageName=currentTab.gif); + background-image : url('../../../../index.php?entryPoint=getImage&imageName=currentTab.gif'); background-repeat: no-repeat; border-bottom-color: #4e8ccf; } @@ -3458,7 +3439,7 @@ h5.calSharedUser color: #444; background-color: #fff; border-color: #abc3d7; - background-image: url(../../../../index.php?entryPoint=getImage&imageName=bg.gif); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bg.gif'); } /* for subpanel tabs */ @@ -3558,7 +3539,7 @@ ul.tablist li a.current:link, ul.tablist li a.current:visited, ul.tablist li a.c } .yui-layout .yui-layout-clip-right .collapse { - background: transparent url('../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=sugar-yui-sprites.png') no-repeat -0 -110px; + background: transparent url('../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=sugar-yui-sprites.png') no-repeat 0 -110px; } .yui-layout .yui-layout-unit-top div.yui-layout-hd .collapse { @@ -3587,7 +3568,7 @@ ul.tablist li a.current:link, ul.tablist li a.current:visited, ul.tablist li a.c } .yuimenuitem-hassubmenu > a{ - background-image: url(../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=sugar-yui-sprites.png); + background-image: url('../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=sugar-yui-sprites.png'); } .yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a, .yui-navset-bottom .yui-nav li a, @@ -3620,8 +3601,6 @@ ul.tablist li a.current:link, ul.tablist li a.current:visited, ul.tablist li a.c float:right; zoom: 1; display: inline; - *float: none; - *width: 18px; } .moduleTitle .star { @@ -3674,9 +3653,6 @@ ul.clickMenu { padding: 0px 0px 0px 0px; margin: 0 !important; vertical-align: bottom; - background-color: #ECF1F4; - background-image: url("../../../../index.php?entryPoint=getImage&imageName=bgBtn.gif"); - border: 1px solid #ABC3D7; color: #000000; display: inline-block; } @@ -3705,7 +3681,10 @@ ul.clickMenu:hover > li > span > a, ul.clickMenu:hover > li > a { ul.clickMenu li span.ab:hover { background-position: 6px 0px; } -ul.clickMenu li, ul.SugarActionMenuIESub li { +ul.clickMenu>li, ul.SugarActionMenuIESub li { + background-color: #ECF1F4; + background-image: url('../../../../index.php?entryPoint=getImage&imageName=bgBtn.gif'); + border: 1px solid #ABC3D7; float: left; margin: 0; padding: 0 0 0 0; @@ -3739,7 +3718,7 @@ ul.clickMenu li span { /*--Drop down trigger styles--*/ width: 22px; height: 16px; float: left; - background: url(../../../../index.php?entryPoint=getImage&imageName=actionMenuArrow.png) no-repeat 6px -28px; + background: url('../../../../index.php?entryPoint=getImage&imageName=actionMenuArrow.png') no-repeat 6px -28px; cursor: pointer; } @@ -3933,7 +3912,7 @@ ul#globalLinks.clickMenu { ul#globalLinks.clickMenu li > span { height: 43px; - background-image: url(../../../../index.php?entryPoint=getImage&imageName=tabDownArrowOff.png); + background-image: url('../../../../index.php?entryPoint=getImage&imageName=tabDownArrowOff.png'); background-position: right center; width: auto; margin-right: 10px; @@ -3977,9 +3956,6 @@ ul#selectLink.clickMenu #massall{ ul.clickMenu.show { display:inline-block; - /*css hack for IE*/ - *display:inline; - *zoom:1; } ul#selectLink.clickMenu > li > a{ @@ -4017,7 +3993,7 @@ ul#detailViewActions.clickMenu { width: 17px; height: 17px; float: left; - background: url(../../../../index.php?entryPoint=getImage&imageName=actionMenuArrow.png) no-repeat 6px -28px; + background: url('../../../../index.php?entryPoint=getImage&imageName=actionMenuArrow.png') no-repeat 6px -28px; opacity: .5; } @@ -4056,7 +4032,7 @@ ul#detailViewActions.clickMenu { } #quickCreate ul.clickMenu li > span { - background: url(../../../../index.php?entryPoint=getImage&imageName=quick-create.png) no-repeat center center; + background: url('../../../../index.php?entryPoint=getImage&imageName=quick-create.png') no-repeat center center; height: 43px; width: 50px; } -- 2.42.0
    - {sugar_getimage name='basic_search' attr='border="0 align="absmiddle""' ext='.gif' alt=$APP.LBL_HIDE } + {sugar_getimage name='basic_search' attr='border="0" align="absmiddle"' ext='.gif' alt=$APP.LBL_HIDE }
    - {MOD.LBL_SSL}:   + {MOD.LBL_SSL}: {TIPS.LBL_SSL_DESC} @@ -192,19 +192,19 @@
    - {MOD.LBL_ENABLE_AUTO_IMPORT}:    + {MOD.LBL_ENABLE_AUTO_IMPORT}: {TIPS.LBL_ASSIGN_TO_GROUP_FOLDER_DESC}  - {MOD.LBL_FROM_ADDR}:{APP.LBL_REQUIRED_SYMBOL} 
    - {MOD.LBL_CREATE_CASE}:   @@ -226,7 +226,7 @@
    - {MOD.LBL_CREATE_CASE_REPLY_TEMPLATE}:   @@ -253,9 +253,7 @@   - {MOD.LBL_ALLOW_OUTBOUND_GROUP_USAGE}:  -   - + {MOD.LBL_ALLOW_OUTBOUND_GROUP_USAGE}: {TIPS.LBL_ALLOW_OUTBOUND_GROUP_USAGE_DESC} @@ -263,7 +261,7 @@
    - {MOD.LBL_AUTOREPLY}:   @@ -274,11 +272,11 @@
    - {MOD.LBL_FILTER_DOMAIN}:   - {MOD.LBL_MAX_AUTO_REPLIES}:  
    {$MOD.LBL_YOUR_PUBLISH_URL|strip_semicolon}:{$CALENDAR_PUBLISH_URL}{if $CALENDAR_PUBLISH_KEY}{$CALENDAR_PUBLISH_URL}{else}{$MOD.LBL_NO_KEY}{/if}
    {$MOD.LBL_SEARCH_URL|strip_semicolon}:{$CALENDAR_SEARCH_URL}{if $CALENDAR_PUBLISH_KEY}{$CALENDAR_SEARCH_URL}{else}{$MOD.LBL_NO_KEY}{/if}
    {$MOD.LBL_ICAL_PUB_URL|strip_semicolon}: {sugar_help text=$MOD.LBL_ICAL_PUB_URL_HELP}{$CALENDAR_ICAL_URL}{if $CALENDAR_PUBLISH_KEY}{$CALENDAR_ICAL_URL}{else}{$MOD.LBL_NO_KEY}{/if}
    {$MOD.LBL_FDOW|strip_semicolon}: {$FDOWDISPLAY}  {$MOD.LBL_FDOW_TEXT} 
    {$MOD.LBL_YOUR_PUBLISH_URL|strip_semicolon}:{$CALENDAR_PUBLISH_URL}{$CALENDAR_PUBLISH_URL}
    {$MOD.LBL_SEARCH_URL|strip_semicolon}:{$CALENDAR_SEARCH_URL}{$CALENDAR_SEARCH_URL}
    {$MOD.LBL_ICAL_PUB_URL|strip_semicolon}: {sugar_help text=$MOD.LBL_ICAL_PUB_URL_HELP}{$CALENDAR_ICAL_URL}{$CALENDAR_ICAL_URL}
    {$MOD.LBL_FDOW}: {sugar_help text=$MOD.LBL_FDOW_TEXT}