From 2aa6fba8d796863eaac0859428d1ca179702a51f Mon Sep 17 00:00:00 2001 From: Paul Huang Date: Tue, 16 Apr 2013 16:05:42 -0700 Subject: [PATCH] Release 6.5.12 --- Zend/Oauth/Provider.php | 4 +- cache/include/javascript/sugar_grp1.js | 21 +- cache/include/javascript/sugar_grp1_yui.js | 11 +- cache/include/javascript/sugar_grp_emails.js | 17 +- data/SugarBean.php | 8 +- files.md5 | 196 ++--- include/Dashlets/DashletGeneric.php | 8 +- include/ListView/ListView.php | 18 +- include/Localization/Localization.php | 2 +- include/MVC/View/views/view.popup.php | 18 +- include/MassUpdate.php | 7 +- include/SearchForm/SearchForm2.php | 5 +- include/SubPanel/SubPanel.php | 3 + include/SugarCharts/Jit/JitReports.php | 2 +- .../SugarFields/Fields/Parent/EditView.tpl | 24 +- .../templates/company/Company.php | 6 + .../templates/company/vardefs.php | 2 +- .../SugarObjects/templates/person/Person.php | 15 +- .../SugarObjects/templates/person/vardefs.php | 2 +- include/SugarPHPMailer.php | 27 +- include/TemplateHandler/TemplateHandler.php | 2 +- include/database/MssqlManager.php | 77 +- include/database/MysqlManager.php | 2 +- include/formbase.php | 11 +- .../SugarWidgets/SugarWidgetFieldrelate.php | 35 +- .../SugarWidgetSubPanelEditButton.php | 32 +- include/javascript/ajaxUI.js | 5 +- include/javascript/jsAlerts.php | 31 +- include/javascript/quicksearch.js | 11 +- include/javascript/report_additionals.js | 4 +- include/javascript/sugar_3.js | 16 +- .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 2 +- include/language/en_us.lang.php | 4 +- include/utils.php | 15 +- include/vCard.php | 10 +- install/checkDBSettings.php | 4 +- .../src_files/include/javascript/ajaxUI.js | 3 + .../include/javascript/quicksearch.js | 16 +- .../include/javascript/report_additionals.js | 18 +- .../src_files/include/javascript/sugar_3.js | 46 +- .../src_files/modules/Users/UserEditView.js | 2 - modules/ACL/ACLController.php | 1 - modules/Accounts/Account.php | 12 +- modules/Activities/SubPanelView.html | 4 +- modules/Activities/SubPanelViewContacts.html | 4 +- modules/Activities/language/en_us.lang.php | 1 + modules/Administration/PasswordManager.php | 4 + modules/Administration/PasswordManager.tpl | 10 + .../Administration/language/en_us.lang.php | 2 + modules/Calendar/Calendar.php | 9 +- modules/Calendar/language/en_us.lang.php | 4 +- modules/Calendar/tpls/shared_users.tpl | 4 +- modules/Calls/Call.php | 6 + .../TopCampaignsDashlet.meta.php | 2 +- modules/Campaigns/QueueCampaign.php | 21 +- modules/Campaigns/Schedule.php | 7 +- modules/Campaigns/language/en_us.lang.php | 2 + modules/Campaigns/tpls/campaign-inactive.tpl | 2 +- modules/Charts/chartdefs.php | 20 +- modules/Charts/code/predefined_charts.php | 13 +- modules/Charts/language/en_us.lang.php | 12 + modules/Configurator/tpls/adminwizard.tpl | 6 +- modules/Contacts/Contact.php | 12 +- .../DocumentRevisions/DocumentRevision.php | 2 +- modules/Documents/Document.php | 2 +- modules/EmailMan/EmailMan.php | 18 +- modules/EmailMan/tpls/config.tpl | 6 +- modules/Emails/javascript/EmailUI.js | 6 +- modules/Employees/Employee.php | 12 +- modules/Home/About.php | 7 +- .../Dashlets/ChartsDashlet/ChartsDashlet.php | 2 +- modules/Home/QuickSearch.php | 1 + modules/Home/language/en_us.lang.php | 5 + modules/Import/views/view.dupcheck.php | 2 +- modules/InboundEmail/InboundEmail.php | 44 +- modules/Leads/Lead.php | 17 +- modules/Leads/views/view.convertlead.php | 4 +- modules/MailMerge/Step1.html | 6 +- modules/MailMerge/Step2.html | 6 +- modules/MailMerge/Step3.html | 2 +- modules/MailMerge/language/en_us.lang.php | 11 +- modules/Meetings/Meeting.php | 6 + .../ModuleBuilder/Module/DropDownBrowser.php | 1 + .../ModuleBuilder/javascript/ModuleBuilder.js | 2 +- .../ModuleBuilder/javascript/SimpleList.js | 2 +- modules/ModuleBuilder/javascript/studio2.js | 2 +- modules/ModuleBuilder/language/en_us.lang.php | 3 + .../relationships/ActivitiesRelationship.php | 31 +- modules/Prospects/Prospect.php | 13 - modules/Studio/wizards/RenameModules.php | 72 +- modules/Users/User.php | 8 +- modules/Users/UserEditView.js | 2 +- .../LDAPAuthenticate/LDAPAuthenticateUser.php | 38 +- modules/Users/reassignUserRecords.php | 4 +- robots.txt | 3 + soap/SoapHelperFunctions.php | 4 + sugar_version.php | 8 +- tests/data/Bug60442Test.php | 41 + tests/include/Dashlets/Bug52173Test.php | 183 ++++ tests/include/SugarCharts/Bug52901Test.php | 262 ------ tests/include/database/DBManagerTest.php | 796 +++++++++--------- tests/include/database/MssqlManagerTest.php | 82 ++ .../generic/SugarWidgets/Bug59126Test.php | 18 + tests/modules/Documents/Bug61144Test.php | 98 +++ tests/modules/MassUpdate/Bug51596Test.php | 2 + .../parsers/relationships/Bug42169Test.php | 81 -- .../parsers/relationships/Bug56425Test.php | 141 ++++ tests/service/Bug43196Test.php | 139 --- 109 files changed, 1758 insertions(+), 1339 deletions(-) create mode 100755 tests/data/Bug60442Test.php create mode 100755 tests/include/Dashlets/Bug52173Test.php delete mode 100755 tests/include/SugarCharts/Bug52901Test.php create mode 100755 tests/modules/Documents/Bug61144Test.php delete mode 100755 tests/modules/ModuleBuilder/parsers/relationships/Bug42169Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/relationships/Bug56425Test.php delete mode 100755 tests/service/Bug43196Test.php diff --git a/Zend/Oauth/Provider.php b/Zend/Oauth/Provider.php index 220db809..01248c10 100644 --- a/Zend/Oauth/Provider.php +++ b/Zend/Oauth/Provider.php @@ -256,7 +256,7 @@ class Zend_Oauth_Provider if(empty($_SERVER['SERVER_PORT']) || empty($_SERVER['HTTP_HOST']) || empty($_SERVER['REQUEST_URI'])) { return Zend_Uri_Http::fromString("http://localhost/"); } - if($_SERVER['SERVER_PORT'] == 443 || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (!empty($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] == 'on')) { + if($_SERVER['SERVER_PORT'] == 443 || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (!empty($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] == 'on') || (!empty($_SERVER['HTTP_X_FORWARDED_PORT']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == 443)) { $proto = 'https'; } return Zend_Uri_Http::fromString("$proto://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); @@ -365,4 +365,4 @@ class Zend_Oauth_Provider } return substr($str, 0, $size); } -} \ No newline at end of file +} diff --git a/cache/include/javascript/sugar_grp1.js b/cache/include/javascript/sugar_grp1.js index 7da02e01..f304994f 100644 --- a/cache/include/javascript/sugar_grp1.js +++ b/cache/include/javascript/sugar_grp1.js @@ -6,7 +6,7 @@ function checkMinSupported(c,s){var current=c.split(".");var supported=s.split(" return true;} function checkMaxSupported(c,s){var current=c.split(".");var supported=s.split(".");for(var i in supported){if(current[i]&&parseInt(current[i])>parseInt(supported[i]))return false;else if(current[i]&&parseInt(current[i])0){optionList[0].selected="selected";} -for(var ii=0;ii0){optionList[selectedIndex].selected="selected";}}else if(elemType=='select-multiple'){var optionList=elem.options;for(var ii=0;ii0&&selected_values.indexOf('')==selected_values.length-1){selected_values.pop();} var final_arr=new Array();for(idx in selected_values){for(o_idx in opts){if(selected_values[idx]==o_idx){final_arr.push(opts[o_idx]);}}} -return final_arr;}/* End of File include/javascript/sugar_3.js */ +return final_arr;} +function convertReportDateTimeToDB(dateValue,timeValue) +{var date_match=dateValue.match(date_reg_format);var time_match=timeValue.match(/([0-9]{1,2})\:([0-9]{1,2})([ap]m)/);if(date_match!=null&&time_match!=null){time_match[1]=parseInt(time_match[1]);if(time_match[3]=='pm'){time_match[1]=time_match[1]+12;if(time_match[1]>=24){time_match[1]=time_match[1]-24;}}else if(time_match[3]=='am'&&time_match[1]==12){time_match[1]=0;} +if(time_match[1]<10){time_match[1]='0'+time_match[1];} +return date_match[date_reg_positions['Y']]+"-"+date_match[date_reg_positions['m']]+"-"+date_match[date_reg_positions['d']]+' '+time_match[1]+':'+time_match[2]+':00';} +return'';}/* End of File include/javascript/sugar_3.js */ SUGAR.ajaxUI={loadingWindow:false,callback:function(o) @@ -688,7 +692,8 @@ var c=document.getElementById("content");c.style.visibility='hidden';c.innerHTML {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});}} -SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) +SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);} +SUGAR_callsInProgress--;},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;} @@ -714,7 +719,7 @@ var mRegex=/module=([^&]*)/.exec(url);var module=mRegex?mRegex[1]:false;if(!ui.c ui.lastURL=url;ui.cleanGlobals();var loadLanguageJS='';if(module&&typeof(SUGAR.language.languages[module])=='undefined'){loadLanguageJS='&loadLanguageJS=1';} if(!inAjaxUI){if(!SUGAR.isIE) window.location.replace("index.php?action=ajaxui#ajaxUILoc="+encodeURIComponent(url));else{window.location.hash="#";window.location.assign("index.php?action=ajaxui#ajaxUILoc="+encodeURIComponent(url));}} -else{SUGAR.ajaxUI.showLoadingPanel();ui.lastCall=YAHOO.util.Connect.asyncRequest('GET',url+'&ajax_load=1'+loadLanguageJS,{success:SUGAR.ajaxUI.callback,failure:function(){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FAILURE'));}});}}},submitForm:function(formname,params) +else{SUGAR_callsInProgress++;SUGAR.ajaxUI.showLoadingPanel();ui.lastCall=YAHOO.util.Connect.asyncRequest('GET',url+'&ajax_load=1'+loadLanguageJS,{success:SUGAR.ajaxUI.callback,failure:function(){SUGAR_callsInProgress--;SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FAILURE'));}});}}},submitForm:function(formname,params) {var con=YAHOO.util.Connect,SA=SUGAR.ajaxUI;if(SA.lastCall&&con.isCallInProgress(SA.lastCall)){con.abort(SA.lastCall);} SA.cleanGlobals();var form=YAHOO.util.Dom.get(formname)||document.forms[formname];if(SA.canAjaxLoadModule(form.module.value)&&typeof(YAHOO.util.Selector.query("input[type=file]",form)[0])=="undefined"&&/action=ajaxui/.exec(window.location)) {var string=con.setForm(form);var baseUrl="index.php?action=ajaxui#ajaxUILoc=";SA.lastURL="";if(string.length>200) diff --git a/cache/include/javascript/sugar_grp1_yui.js b/cache/include/javascript/sugar_grp1_yui.js index 0c286559..e49b5f5c 100644 --- a/cache/include/javascript/sugar_grp1_yui.js +++ b/cache/include/javascript/sugar_grp1_yui.js @@ -263,8 +263,8 @@ var qs_index_id=form_id+'_'+qsFields[qsField].name;if(typeof sqs_objects[qs_inde if(QSProcessedFieldsArray[qs_index_id]){skipSTR='collection_0';if(qs_index_id.lastIndexOf(skipSTR)!=(qs_index_id.length-skipSTR.length)){continue;}} var qs_obj=sqs_objects[qs_index_id];var loaded=false;if(!document.forms[qs_obj.form]){continue;} if(!document.forms[qs_obj.form].elements[qsFields[qsField].id].readOnly&&qs_obj['disable']!=true){var combo_id=qs_obj.form+'_'+qsFields[qsField].id;if(Dom.get(combo_id+"_results")){loaded=true} -if(!loaded){QSProcessedFieldsArray[qs_index_id]=true;qsFields[qsField].form_id=form_id;var sqs=sqs_objects[qs_index_id];var resultDiv=document.createElement('div');resultDiv.id=combo_id+"_results";Dom.insertAfter(resultDiv,qsFields[qsField]);var fields=qs_obj.field_list.slice();fields[fields.length]="module";var ds=new YAHOO.util.DataSource("index.php?",{responseType:YAHOO.util.XHRDataSource.TYPE_JSON,responseSchema:{resultsList:'fields',total:'totalCount',fields:fields,metaNode:"fields",metaFields:{total:'totalCount',fields:"fields"}},connMethodPost:true});var forceSelect=!((qsFields[qsField].form&&typeof(qsFields[qsField].form)=='object'&&qsFields[qsField].form.name=='search_form')||qsFields[qsField].className.match('sqsNoAutofill')!=null);var search=new YAHOO.widget.AutoComplete(qsFields[qsField],resultDiv,ds,{typeAhead:forceSelect,forceSelection:forceSelect,fields:fields,sqs:sqs,animSpeed:0.25,qs_obj:qs_obj,inputElement:qsFields[qsField],generateRequest:function(sQuery){var item_id=this.inputElement.form_id+'_'+this.inputElement.name;if(QSCallbacksArray[item_id]){QSCallbacksArray[item_id](this.sqs);} -var out=SUGAR.util.paramsToUrl({to_pdf:'true',module:'Home',action:'quicksearchQuery',data:YAHOO.lang.JSON.stringify(this.sqs),query:sQuery});return out;},setFields:function(data,filter){this.updateFields(data,filter);},updateFields:function(data,filter){for(var i in this.fields){for(var key in this.qs_obj.field_list){if(this.fields[i]==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]&&this.qs_obj.populate_list[key].match(filter)){var displayValue=data[i].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} +if(!loaded){QSProcessedFieldsArray[qs_index_id]=true;qsFields[qsField].form_id=form_id;var sqs=sqs_objects[qs_index_id];var resultDiv=document.createElement('div');resultDiv.id=combo_id+"_results";Dom.insertAfter(resultDiv,qsFields[qsField]);var fields=qs_obj.field_list.slice();fields[fields.length]="module";var ds=new YAHOO.util.DataSource("index.php?",{responseType:YAHOO.util.XHRDataSource.TYPE_JSON,responseSchema:{resultsList:'fields',total:'totalCount',fields:fields,metaNode:"fields",metaFields:{total:'totalCount',fields:"fields"}},connMethodPost:true});var forceSelect=!((qsFields[qsField].form&&typeof(qsFields[qsField].form)=='object'&&qsFields[qsField].form.name=='search_form')||qsFields[qsField].className.match('sqsNoAutofill')!=null);var search=new YAHOO.widget.AutoComplete(qsFields[qsField],resultDiv,ds,{typeAhead:forceSelect,forceSelection:forceSelect,fields:fields,sqs:sqs,animSpeed:0.25,qs_obj:qs_obj,inputElement:qsFields[qsField],generateRequest:function(sQuery){sQuery=decodeURIComponent(sQuery);var item_id=this.inputElement.form_id+'_'+this.inputElement.name;this.sqs=updateSqsFromQSFieldsArray(item_id,this.sqs);if(QSCallbacksArray[item_id]){QSCallbacksArray[item_id](this.sqs);} +var out=SUGAR.util.paramsToUrl({to_pdf:'true',module:'Home',action:'quicksearchQuery',data:YAHOO.lang.JSON.stringify(this.sqs),query:decodeURIComponent(sQuery)});return out;},setFields:function(data,filter){this.updateFields(data,filter);},updateFields:function(data,filter){for(var i in this.fields){for(var key in this.qs_obj.field_list){if(this.fields[i]==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]&&this.qs_obj.populate_list[key].match(filter)){var displayValue=data[i].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} SUGAR.util.callOnChangeListers(this._elTextbox);},clearFields:function(){for(var key in this.qs_obj.field_list){if(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]){document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value="";SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}} this.oldValue="";}});if(/^(billing_|shipping_)?account_name$/.exec(qsFields[qsField].name)) {search.clearFields=function(){for(var i in{name:0,id:1}){for(var key in this.qs_obj.field_list){if(i==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]) @@ -281,7 +281,12 @@ search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=th eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} function registerSingleSmartInputListener(input){if((c=input.className)&&(c.indexOf("sqsEnabled")!=-1)){enableQS(true);}} -if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();}/* End of File include/javascript/quicksearch.js */ +if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();} +function updateSqsFromQSFieldsArray(sqsId,sqsToUpdate) +{if(typeof(QSFieldsArray[sqsId])!='undefined'&&sqsToUpdate!=QSFieldsArray[sqsId].sqs) +{return QSFieldsArray[sqsId].sqs;} +else +{return sqsToUpdate;}}/* End of File include/javascript/quicksearch.js */ (function(){var K=YAHOO.env.ua,C=YAHOO.util.Dom,Z=YAHOO.util.Event,H=YAHOO.lang,T="DIV",P="hd",M="bd",O="ft",X="LI",A="disabled",D="mouseover",F="mouseout",U="mousedown",G="mouseup",V="click",B="keydown",N="keyup",I="keypress",L="clicktohide",S="position",Q="dynamic",Y="showdelay",J="selected",E="visible",W="UL",R="MenuManager";YAHOO.widget.MenuManager=function(){var l=false,d={},o={},h={},c={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent","focus":"focusEvent","focusin":"focusEvent","blur":"blurEvent","focusout":"blurEvent"},i=null;function b(r){var p,q;if(r&&r.tagName){switch(r.tagName.toUpperCase()){case T:p=r.parentNode;if((C.hasClass(r,P)||C.hasClass(r,M)||C.hasClass(r,O))&&p&&p.tagName&&p.tagName.toUpperCase()==T){q=p;}else{q=r;}break;case X:q=r;break;default:p=r.parentNode;if(p){q=b(p);}break;}}return q;}function e(t){var p=Z.getTarget(t),q=b(p),u=true,w=t.type,x,r,s,z,y;if(q){r=q.tagName.toUpperCase();if(r==X){s=q.id;if(s&&h[s]){z=h[s];y=z.parent;}}else{if(r==T){if(q.id){y=d[q.id];}}}}if(y){x=c[w];if(w=="click"&&(K.gecko&&y.platform!="mac")&&t.button>0){u=false;}if(u&&z&&!z.cfg.getProperty(A)){z[x].fire(t);}if(u){y[x].fire(t,z);}}else{if(w==U){for(var v in o){if(H.hasOwnProperty(o,v)){y=o[v];if(y.cfg.getProperty(L)&&!(y instanceof YAHOO.widget.MenuBar)&&y.cfg.getProperty(S)==Q){y.hide();if(K.ie&&p.focus&&(K.ie<9)){p.setActive();}}else{if(y.cfg.getProperty(Y)>0){y._cancelShowDelay();}if(y.activeItem){y.activeItem.blur();y.activeItem.cfg.setProperty(J,false);y.activeItem=null;}}}}}}}function n(q,p,r){if(d[r.id]){this.removeMenu(r);}}function k(q,p){var r=p[1];if(r){i=r;}}function f(q,p){i=null;}function a(r,q){var p=q[0],s=this.id;if(p){o[s]=this;}else{if(o[s]){delete o[s];}}}function j(q,p){m(this);}function m(q){var p=q.id;if(p&&h[p]){if(i==q){i=null;}delete h[p];q.destroyEvent.unsubscribe(j);}}function g(q,p){var s=p[0],r;if(s instanceof YAHOO.widget.MenuItem){r=s.id;if(!h[r]){h[r]=s;s.destroyEvent.subscribe(j);}}}return{addMenu:function(q){var p;if(q instanceof YAHOO.widget.Menu&&q.id&&!d[q.id]){d[q.id]=q;if(!l){p=document;Z.on(p,D,e,this,true);Z.on(p,F,e,this,true);Z.on(p,U,e,this,true);Z.on(p,G,e,this,true);Z.on(p,V,e,this,true);Z.on(p,B,e,this,true);Z.on(p,N,e,this,true);Z.on(p,I,e,this,true);Z.onFocus(p,e,this,true);Z.onBlur(p,e,this,true);l=true;}q.cfg.subscribeToConfigEvent(E,a);q.destroyEvent.subscribe(n,q,this);q.itemAddedEvent.subscribe(g);q.focusEvent.subscribe(k);q.blurEvent.subscribe(f);}},removeMenu:function(s){var q,p,r;if(s){q=s.id;if((q in d)&&(d[q]==s)){p=s.getItems();if(p&&p.length>0){r=p.length-1;do{m(p[r]);}while(r--);}delete d[q];if((q in o)&&(o[q]==s)){delete o[q];}if(s.cfg){s.cfg.unsubscribeFromConfigEvent(E,a);}s.destroyEvent.unsubscribe(n,s);s.itemAddedEvent.unsubscribe(g);s.focusEvent.unsubscribe(k);s.blurEvent.unsubscribe(f);}}},hideVisible:function(){var p;for(var q in o){if(H.hasOwnProperty(o,q)){p=o[q];if(!(p instanceof YAHOO.widget.MenuBar)&&p.cfg.getProperty(S)==Q){p.hide();}}}},getVisible:function(){return o;},getMenus:function(){return d;},getMenu:function(q){var p;if(q in d){p=d[q];}return p;},getMenuItem:function(q){var p;if(q in h){p=h[q];}return p;},getMenuItemGroup:function(t){var q=C.get(t),p,v,u,r,s;if(q&&q.tagName&&q.tagName.toUpperCase()==W){v=q.firstChild;if(v){p=[];do{r=v.id;if(r){u=this.getMenuItem(r);if(u){p[p.length]=u;}}}while((v=v.nextSibling));if(p.length>0){s=p;}}}return s;},getFocusedMenuItem:function(){return i;},getFocusedMenu:function(){var p;if(i){p=i.parent.getRoot();}return p;},toString:function(){return R;}};}();})();(function(){var AM=YAHOO.lang,Aq="Menu",G="DIV",K="div",Am="id",AH="SELECT",e="xy",R="y",Ax="UL",L="ul",AJ="first-of-type",k="LI",h="OPTGROUP",Az="OPTION",Ah="disabled",AY="none",y="selected",At="groupindex",i="index",O="submenu",Au="visible",AX="hidedelay",Ac="position",AD="dynamic",C="static",An=AD+","+C,Q="url",M="#",V="target",AU="maxheight",T="topscrollbar",x="bottomscrollbar",d="_",P=T+d+Ah,E=x+d+Ah,b="mousemove",Av="showdelay",c="submenuhidedelay",AF="iframe",w="constraintoviewport",A4="preventcontextoverlap",AO="submenualignment",Z="autosubmenudisplay",AC="clicktohide",g="container",j="scrollincrement",Aj="minscrollheight",A2="classname",Ag="shadow",Ar="keepopen",A0="hd",D="hastitle",p="context",u="",Ak="mousedown",Ae="keydown",Ao="height",U="width",AQ="px",Ay="effect",AE="monitorresize",AW="display",AV="block",J="visibility",z="absolute",AS="zindex",l="yui-menu-body-scrolled",AK=" ",A1=" ",Ai="mouseover",H="mouseout",AR="itemAdded",n="itemRemoved",AL="hidden",s="yui-menu-shadow",AG=s+"-visible",m=s+A1+AG;YAHOO.widget.Menu=function(A6,A5){if(A5){this.parent=A5.parent;this.lazyLoad=A5.lazyLoad||A5.lazyload;this.itemData=A5.itemData||A5.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,A6,A5);};function B(A6){var A5=false;if(AM.isString(A6)){A5=(An.indexOf((A6.toLowerCase()))!=-1);}return A5;}var f=YAHOO.util.Dom,AA=YAHOO.util.Event,Aw=YAHOO.widget.Module,AB=YAHOO.widget.Overlay,r=YAHOO.widget.Menu,A3=YAHOO.widget.MenuManager,F=YAHOO.util.CustomEvent,As=YAHOO.env.ua,Ap,AT=false,Ad,Ab=[["mouseOverEvent",Ai],["mouseOutEvent",H],["mouseDownEvent",Ak],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",Ae],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",AR],["itemRemovedEvent",n]],AZ={key:Au,value:false,validator:AM.isBoolean},AP={key:w,value:true,validator:AM.isBoolean,supercedes:[AF,"x",R,e]},AI={key:A4,value:true,validator:AM.isBoolean,supercedes:[w]},S={key:Ac,value:AD,validator:B,supercedes:[Au,AF]},A={key:AO,value:["tl","tr"]},t={key:Z,value:true,validator:AM.isBoolean,suppressEvent:true},Y={key:Av,value:250,validator:AM.isNumber,suppressEvent:true},q={key:AX,value:0,validator:AM.isNumber,suppressEvent:true},v={key:c,value:250,validator:AM.isNumber,suppressEvent:true},o={key:AC,value:true,validator:AM.isBoolean,suppressEvent:true},AN={key:g,suppressEvent:true},Af={key:j,value:1,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},N={key:Aj,value:90,validator:AM.isNumber,supercedes:[AU],suppressEvent:true},X={key:AU,value:0,validator:AM.isNumber,supercedes:[AF],suppressEvent:true},W={key:A2,value:null,validator:AM.isString,suppressEvent:true},a={key:Ah,value:false,validator:AM.isBoolean,suppressEvent:true},I={key:Ag,value:true,validator:AM.isBoolean,suppressEvent:true,supercedes:[Au]},Al={key:Ar,value:false,validator:AM.isBoolean};function Aa(A5){Ad=AA.getTarget(A5);}YAHOO.lang.extend(r,AB,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_useHideDelay:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(A7,A6){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var A5;if(AM.isString(A7)){A5=f.get(A7);}else{if(A7.tagName){A5=A7;}}if(A5&&A5.tagName){switch(A5.tagName.toUpperCase()){case G:this.srcElement=A5;if(!A5.id){A5.setAttribute(Am,f.generateId());}r.superclass.init.call(this,A5);this.beforeInitEvent.fire(r);break;case AH:this.srcElement=A5;r.superclass.init.call(this,f.generateId());this.beforeInitEvent.fire(r);break;}}else{r.superclass.init.call(this,A7);this.beforeInitEvent.fire(r);}if(this.element){f.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if(!AT){AA.onFocus(document,Aa);AT=true;}if((As.gecko&&As.gecko<1.9)||(As.webkit&&As.webkit<523)){this.cfg.subscribeToConfigEvent(R,this._onYChange);}if(A6){this.cfg.applyConfig(A6,true);}A3.addMenu(this);this.initEvent.fire(r);}},_initSubTree:function(){var A6=this.srcElement,A5,A8,BB,BC,BA,A9,A7;if(A6){A5=(A6.tagName&&A6.tagName.toUpperCase());if(A5==G){BC=this.body.firstChild;if(BC){A8=0;BB=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case BB:this._aGroupTitleElements[A8]=BC;break;case Ax:this._aListElements[A8]=BC;this._aItemGroups[A8]=[];A8++;break;}}}while((BC=BC.nextSibling));if(this._aListElements[0]){f.addClass(this._aListElements[0],AJ);}}}BC=null;if(A5){switch(A5){case G:BA=this._aListElements;A9=BA.length;if(A9>0){A7=A9-1;do{BC=BA[A7].firstChild;if(BC){do{if(BC&&BC.tagName&&BC.tagName.toUpperCase()==k){this.addItem(new this.ITEM_TYPE(BC,{parent:this}),A7);}}while((BC=BC.nextSibling));}}while(A7--);}break;case AH:BC=A6.firstChild;do{if(BC&&BC.tagName){switch(BC.tagName.toUpperCase()){case h:case Az:this.addItem(new this.ITEM_TYPE(BC,{parent:this}));break;}}}while((BC=BC.nextSibling));break;}}}},_getFirstEnabledItem:function(){var A5=this.getItems(),A9=A5.length,A8,A7;for(var A6=0;A6=A8.length);if(A8[BF]){A8.splice(BF,0,BD);}else{A8[BF]=BD;}BE=A8[BF];if(BE){if(A9&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].appendChild(BE.element);}else{A6=A5(A8,(BF+1));if(A6&&(!BE.element.parentNode||BE.element.parentNode.nodeType==11)){this._aListElements[BG].insertBefore(BE.element,A6.element);}}BE.parent=this;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);this._updateItemProperties(BG);this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}else{A7=A8.length;A8[A7]=BD;BE=A8[A7];if(BE){if(!f.isAncestor(this._aListElements[BG],BE.element)){this._aListElements[BG].appendChild(BE.element);}BE.element.setAttribute(At,BG);BE.element.setAttribute(i,A7);BE.parent=this;BE.index=A7;BE.groupIndex=BG;this._subscribeToItemEvents(BE);this._configureSubmenu(BE);if(A7===0){f.addClass(BE.element,AJ);}this.itemAddedEvent.fire(BE);this.changeContentEvent.fire();BC=BE;}}}return BC;},_removeItemFromGroupByIndex:function(A8,A6){var A7=AM.isNumber(A8)?A8:0,A9=this._getItemGroup(A7),BB,BA,A5;if(A9){BB=A9.splice(A6,1);BA=BB[0];if(BA){this._updateItemProperties(A7);if(A9.length===0){A5=this._aListElements[A7];if(A5&&A5.parentNode){A5.parentNode.removeChild(A5);}this._aItemGroups.splice(A7,1);this._aListElements.splice(A7,1);A5=this._aListElements[0];if(A5){f.addClass(A5,AJ);}}this.itemRemovedEvent.fire(BA);this.changeContentEvent.fire();}}return BA;},_removeItemFromGroupByValue:function(A8,A5){var BA=this._getItemGroup(A8),BB,A9,A7,A6;if(BA){BB=BA.length;A9=-1;if(BB>0){A6=BB-1;do{if(BA[A6]==A5){A9=A6;break;}}while(A6--);if(A9>-1){A7=this._removeItemFromGroupByIndex(A8,A9);}}}return A7;},_updateItemProperties:function(A6){var A7=this._getItemGroup(A6),BA=A7.length,A9,A8,A5;if(BA>0){A5=BA-1;do{A9=A7[A5];if(A9){A8=A9.element;A9.index=A5;A9.groupIndex=A6;A8.setAttribute(At,A6);A8.setAttribute(i,A5);f.removeClass(A8,AJ);}}while(A5--);if(A8){f.addClass(A8,AJ);}}},_createItemGroup:function(A7){var A5,A6;if(!this._aItemGroups[A7]){this._aItemGroups[A7]=[];A5=document.createElement(L);this._aListElements[A7]=A5;A6=this._aItemGroups[A7];}return A6;},_getItemGroup:function(A7){var A5=AM.isNumber(A7)?A7:0,A8=this._aItemGroups,A6;if(A5 in A8){A6=A8[A5];}return A6;},_configureSubmenu:function(A5){var A6=A5.cfg.getProperty(O);if(A6){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,A6,true);this.renderEvent.subscribe(this._onParentMenuRender,A6,true);}},_subscribeToItemEvents:function(A5){A5.destroyEvent.subscribe(this._onMenuItemDestroy,A5,this);A5.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,A5,this);},_onVisibleChange:function(A7,A6){var A5=A6[0];if(A5){f.addClass(this.element,Au);}else{f.removeClass(this.element,Au);}},_cancelHideDelay:function(){var A5=this.getRoot()._hideDelayTimer;if(A5){A5.cancel();}},_execHideDelay:function(){this._cancelHideDelay();var A5=this.getRoot();A5._hideDelayTimer=AM.later(A5.cfg.getProperty(AX),this,function(){if(A5.activeItem){if(A5.hasFocus()){A5.activeItem.focus();}A5.clearActiveItem();}if(A5==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(Ac)==AD){this.hide();}});},_cancelShowDelay:function(){var A5=this.getRoot()._showDelayTimer;if(A5){A5.cancel();}},_execSubmenuHideDelay:function(A7,A6,A5){A7._submenuHideDelayTimer=AM.later(50,this,function(){if(this._nCurrentMouseX>(A6+10)){A7._submenuHideDelayTimer=AM.later(A5,A7,function(){this.hide();});}else{A7.hide();}});},_disableScrollHeader:function(){if(!this._bHeaderDisabled){f.addClass(this.header,P);this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){f.addClass(this.footer,E);this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){f.removeClass(this.header,P);this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){f.removeClass(this.footer,E);this._bFooterDisabled=false;}},_onMouseOver:function(BH,BA){var BI=BA[0],BE=BA[1],A5=AA.getTarget(BI),A9=this.getRoot(),BG=this._submenuHideDelayTimer,A6,A8,BD,A7,BC,BB;var BF=function(){if(this.parent.cfg.getProperty(y)){this.show();}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(A5==this.element||f.isAncestor(this.element,A5))){if(this._useHideDelay){this._cancelHideDelay();}this._nCurrentMouseX=0;AA.on(this.element,b,this._onMouseMove,this,true);if(!(BE&&f.isAncestor(BE.element,AA.getRelatedTarget(BI)))){this.clearActiveItem();}if(this.parent&&BG){BG.cancel();this.parent.cfg.setProperty(y,true);A6=this.parent.parent;A6._bHandledMouseOutEvent=true;A6._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(BE&&!BE.handledMouseOverEvent&&!BE.cfg.getProperty(Ah)&&(A5==BE.element||f.isAncestor(BE.element,A5))){A8=this.cfg.getProperty(Av);BD=(A8>0);if(BD){this._cancelShowDelay();}A7=this.activeItem;if(A7){A7.cfg.setProperty(y,false);}BC=BE.cfg;BC.setProperty(y,true);if(this.hasFocus()||A9._hasFocus){BE.focus();A9._hasFocus=false;}if(this.cfg.getProperty(Z)){BB=BC.getProperty(O);if(BB){if(BD){A9._showDelayTimer=AM.later(A9.cfg.getProperty(Av),BB,BF);}else{BB.show();}}}BE.handledMouseOverEvent=true;BE.handledMouseOutEvent=false;}}},_onMouseOut:function(BD,A7){var BE=A7[0],BB=A7[1],A8=AA.getRelatedTarget(BE),BC=false,BA,A9,A5,A6;if(!this._bStopMouseEventHandlers){if(BB&&!BB.cfg.getProperty(Ah)){BA=BB.cfg;A9=BA.getProperty(O);if(A9&&(A8==A9.element||f.isAncestor(A9.element,A8))){BC=true;}if(!BB.handledMouseOutEvent&&((A8!=BB.element&&!f.isAncestor(BB.element,A8))||BC)){if(!BC){BB.cfg.setProperty(y,false);if(A9){A5=this.cfg.getProperty(c);A6=this.cfg.getProperty(Av);if(!(this instanceof YAHOO.widget.MenuBar)&&A5>0&&A5>=A6){this._execSubmenuHideDelay(A9,AA.getPageX(BE),A5);}else{A9.hide();}}}BB.handledMouseOutEvent=true;BB.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent){if(this._didMouseLeave(A8)||BC){if(this._useHideDelay){this._execHideDelay();}AA.removeListener(this.element,b,this._onMouseMove);this._nCurrentMouseX=AA.getPageX(BE);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}}}},_didMouseLeave:function(A5){return(A5===this._shadow||(A5!=this.element&&!f.isAncestor(this.element,A5)));},_onMouseMove:function(A6,A5){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=AA.getPageX(A6);}},_onClick:function(BG,A7){var BH=A7[0],BB=A7[1],BD=false,A9,BE,A6,A5,BA,BC,BF;var A8=function(){A6=this.getRoot();if(A6 instanceof YAHOO.widget.MenuBar||A6.cfg.getProperty(Ac)==C){A6.clearActiveItem();}else{A6.hide();}};if(BB){if(BB.cfg.getProperty(Ah)){AA.preventDefault(BH);A8.call(this);}else{A9=BB.cfg.getProperty(O);BA=BB.cfg.getProperty(Q);if(BA){BC=BA.indexOf(M);BF=BA.length;if(BC!=-1){BA=BA.substr(BC,BF);BF=BA.length;if(BF>1){A5=BA.substr(1,BF);BE=YAHOO.widget.MenuManager.getMenu(A5);if(BE){BD=(this.getRoot()===BE.getRoot());}}else{if(BF===1){BD=true;}}}}if(BD&&!BB.cfg.getProperty(V)){AA.preventDefault(BH);if(As.webkit){BB.focus();}else{BB.focusEvent.fire();}}if(!A9&&!this.cfg.getProperty(Ar)){A8.call(this);}}}},_stopMouseEventHandlers:function(){this._bStopMouseEventHandlers=true;AM.later(10,this,function(){this._bStopMouseEventHandlers=false;});},_onKeyDown:function(BJ,BD){var BG=BD[0],BF=BD[1],BC,BH,A6,A9,BK,A5,BN,A8,BI,A7,BE,BM,BA,BB;if(this._useHideDelay){this._cancelHideDelay();}if(BF&&!BF.cfg.getProperty(Ah)){BH=BF.cfg;A6=this.parent;switch(BG.keyCode){case 38:case 40:BK=(BG.keyCode==38)?BF.getPreviousEnabledSibling():BF.getNextEnabledSibling();if(BK){this.clearActiveItem();BK.cfg.setProperty(y,true);BK.focus();if(this.cfg.getProperty(AU)>0||f.hasClass(this.body,l)){A5=this.body;BN=A5.scrollTop;A8=A5.offsetHeight;BI=this.getItems();A7=BI.length-1;BE=BK.element.offsetTop;if(BG.keyCode==40){if(BE>=(A8+BN)){A5.scrollTop=BE-A8;}else{if(BE<=BN){A5.scrollTop=0;}}if(BK==BI[A7]){A5.scrollTop=BK.element.offsetTop;}}else{if(BE<=BN){A5.scrollTop=BE-BK.element.offsetHeight;}else{if(BE>=(BN+A8)){A5.scrollTop=BE;}}if(BK==BI[0]){A5.scrollTop=0;}}BN=A5.scrollTop;BM=A5.scrollHeight-A5.offsetHeight;if(BN===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(BN==BM){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 39:BC=BH.getProperty(O);if(BC){if(!BH.getProperty(y)){BH.setProperty(y,true);}BC.show();BC.setInitialFocus();BC.setInitialSelection();}else{A9=this.getRoot();if(A9 instanceof YAHOO.widget.MenuBar){BK=A9.activeItem.getNextEnabledSibling();if(BK){A9.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;case 37:if(A6){BA=A6.parent;if(BA instanceof YAHOO.widget.MenuBar){BK=BA.activeItem.getPreviousEnabledSibling();if(BK){BA.clearActiveItem();BK.cfg.setProperty(y,true);BC=BK.cfg.getProperty(O);if(BC){BC.show();BC.setInitialFocus();}else{BK.focus();}}}else{this.hide();A6.focus();}}AA.preventDefault(BG);this._stopMouseEventHandlers();break;}}if(BG.keyCode==27){if(this.cfg.getProperty(Ac)==AD){this.hide();if(this.parent){this.parent.focus();}else{BB=this._focusedElement;if(BB&&BB.focus){try{BB.focus();}catch(BL){}}}}else{if(this.activeItem){BC=this.activeItem.cfg.getProperty(O);if(BC&&BC.cfg.getProperty(Au)){BC.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty(y,false);}}}AA.preventDefault(BG);}},_onKeyPress:function(A7,A6){var A5=A6[0];if(A5.keyCode==40||A5.keyCode==38){AA.preventDefault(A5);}},_onBlur:function(A6,A5){if(this._hasFocus){this._hasFocus=false;}},_onYChange:function(A6,A5){var A8=this.parent,BA,A7,A9;if(A8){BA=A8.parent.body.scrollTop;if(BA>0){A9=(this.cfg.getProperty(R)-BA);f.setY(this.element,A9);A7=this.iframe;if(A7){f.setY(A7,A9);}this.cfg.setProperty(R,A9,true);}}},_onScrollTargetMouseOver:function(BB,BE){var BD=this._bodyScrollTimer;if(BD){BD.cancel();}this._cancelHideDelay();var A7=AA.getTarget(BB),A9=this.body,A8=this.cfg.getProperty(j),A5,A6;function BC(){var BF=A9.scrollTop;if(BF0){A9.scrollTop=(BF-A8);this._enableScrollFooter();}else{A9.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader();}}if(f.hasClass(A7,A0)){A6=BA;}else{A5=A9.scrollHeight-A9.offsetHeight;A6=BC;}this._bodyScrollTimer=AM.later(10,this,A6,null,true);},_onScrollTargetMouseOut:function(A7,A5){var A6=this._bodyScrollTimer;if(A6){A6.cancel();}this._cancelHideDelay();},_onInit:function(A6,A5){this.cfg.subscribeToConfigEvent(Au,this._onVisibleChange);var A7=!this.parent,A8=this.lazyLoad;if(((A7&&!A8)||(A7&&(this.cfg.getProperty(Au)||this.cfg.getProperty(Ac)==C))||(!A7&&!A8))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(A8){this.cfg.fireQueue();}}},_onBeforeRender:function(A8,A7){var A9=this.element,BC=this._aListElements.length,A6=true,BB=0,A5,BA;if(BC>0){do{A5=this._aListElements[BB];if(A5){if(A6){f.addClass(A5,AJ);A6=false;}if(!f.isAncestor(A9,A5)){this.appendToBody(A5);}BA=this._aGroupTitleElements[BB];if(BA){if(!f.isAncestor(A9,BA)){A5.parentNode.insertBefore(BA,A5);}f.addClass(A5,D);}}BB++;}while(BBBJ){BX=(BJ-BW);}else{BX=(BJ+BK);}BS.cfg.setProperty(R,(BX+BP),true);return BX;};var A8=function(){if(BS.cfg.getProperty(R)==0||(BS.cfg.getProperty(R)-BP)>BJ){return(A7-BQ);}else{return(BE-BQ);}};var BN=function(){var BX;if((BS.cfg.getProperty(R)-BP)>BJ){BX=(BJ+BK);}else{BX=(BJ-BC.offsetHeight);}BS.cfg.setProperty(R,(BX+BP),true);};var A6=function(){BS._setScrollHeight(this.cfg.getProperty(AU));BS.hideEvent.unsubscribe(A6);};var BT=function(){var Ba=A8(),BX=(BS.getItems().length>0),BZ,BY;if(BW>Ba){BZ=BX?BS.cfg.getProperty(Aj):BW;if((Ba>BZ)&&BX){BR=Ba;}else{BR=BV;}BS._setScrollHeight(BR);BS.hideEvent.subscribe(A6);BN();if(BaA9){if(BM){if(BS.cfg.getProperty(A4)&&BA){BD=BO[0];BK=BD.offsetHeight;BJ=(f.getY(BD)-BP);BE=BJ;A7=(BL-(BJ+BK));BT();A5=BS.cfg.getProperty(R);}else{if(!(BS instanceof YAHOO.widget.MenuBar)&&BW>=BL){BU=(BL-(BQ*2));if(BU>BS.cfg.getProperty(Aj)){BS._setScrollHeight(BU);BS.hideEvent.subscribe(A6);BN();A5=BS.cfg.getProperty(R);}}else{if(BHA9){A5=A9;}}}}}else{A5=BQ+BP;}}return A5;},_onHide:function(A6,A5){if(this.cfg.getProperty(Ac)===AD){this.positionOffScreen();}},_onShow:function(BD,BB){var A5=this.parent,A7,A8,BA,A6;function A9(BF){var BE;if(BF.type==Ak||(BF.type==Ae&&BF.keyCode==27)){BE=AA.getTarget(BF);if(BE!=A7.element||!f.isAncestor(A7.element,BE)){A7.cfg.setProperty(Z,false);AA.removeListener(document,Ak,A9);AA.removeListener(document,Ae,A9);}}}function BC(BF,BE,BG){this.cfg.setProperty(U,u);this.hideEvent.unsubscribe(BC,BG);}if(A5){A7=A5.parent;if(!A7.cfg.getProperty(Z)&&(A7 instanceof YAHOO.widget.MenuBar||A7.cfg.getProperty(Ac)==C)){A7.cfg.setProperty(Z,true);AA.on(document,Ak,A9);AA.on(document,Ae,A9);}if((this.cfg.getProperty("x")0);},configContainer:function(A6,A5,A8){var A7=A5[0];if(AM.isString(A7)){this.cfg.setProperty(g,f.get(A7),true);}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);},_subscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.on(A6,Ai,A8,this,true);AA.on(A6,H,A7,this,true);AA.on(A5,Ai,A8,this,true);AA.on(A5,H,A7,this,true);},_unsubscribeScrollHandlers:function(A6,A5){var A8=this._onScrollTargetMouseOver;var A7=this._onScrollTargetMouseOut;AA.removeListener(A6,Ai,A8);AA.removeListener(A6,H,A7);AA.removeListener(A5,Ai,A8);AA.removeListener(A5,H,A7);},_setScrollHeight:function(BF){var BC=BF,BB=false,BG=false,A8,A9,BE,A6,A5,BD,BA,A7;if(this.getItems().length>0){A8=this.element;A9=this.body;BE=this.header;A6=this.footer;A5=this.cfg.getProperty(Aj);if(BC>0&&BC0&&BG&&!this.cfg.getProperty(U)){BA=A8.offsetWidth;A8.style.width=BA+AQ;A7=(BA-(A8.offsetWidth-BA))+AQ;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,A7);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(U,this._clearSetWidthFlag);}if(BC>0&&(!BE&&!A6)){this.setHeader(AK);this.setFooter(AK);BE=this.header;A6=this.footer;f.addClass(BE,T);f.addClass(A6,x);A8.insertBefore(BE,A9);A8.appendChild(A6);}BD=BC;if(BE&&A6){BD=(BD-(BE.offsetHeight+A6.offsetHeight));}if((BD>0)&&(A9.offsetHeight>BC)){f.addClass(A9,l);f.setStyle(A9,Ao,(BD+AQ));if(!this._hasScrollEventHandlers){this._subscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=true;}this._disableScrollHeader();this._enableScrollFooter();BB=true;}else{if(BE&&A6){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,u);}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){this._unsubscribeScrollHandlers(BE,A6);this._hasScrollEventHandlers=false;}A8.removeChild(BE);A8.removeChild(A6);this.header=null;this.footer=null;BB=true;}}if(BB){this.cfg.refireEvent(AF);this.cfg.refireEvent(Ag);}}},_setMaxHeight:function(A6,A5,A7){this._setScrollHeight(A7);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(A6,A5,A7){var A8=A5[0];if(this.lazyLoad&&!this.body&&A8>0){this.renderEvent.subscribe(this._setMaxHeight,A8,this);}else{this._setScrollHeight(A8);}},configClassName:function(A7,A6,A8){var A5=A6[0];if(this._sClassName){f.removeClass(this.element,this._sClassName);}f.addClass(this.element,A5);this._sClassName=A5;},_onItemAdded:function(A6,A5){var A7=A5[0];if(A7){A7.cfg.setProperty(Ah,true);}},configDisabled:function(A7,A6,BA){var A9=A6[0],A5=this.getItems(),BB,A8;if(AM.isArray(A5)){BB=A5.length;if(BB>0){A8=BB-1;do{A5[A8].cfg.setProperty(Ah,A9);}while(A8--);}if(A9){this.clearActiveItem(true);f.addClass(this.element,Ah);this.itemAddedEvent.subscribe(this._onItemAdded);}else{f.removeClass(this.element,Ah);this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},_sizeShadow:function(){var A6=this.element,A5=this._shadow;if(A5&&A6){if(A5.style.width&&A5.style.height){A5.style.width=u;A5.style.height=u;}A5.style.width=(A6.offsetWidth+6)+AQ;A5.style.height=(A6.offsetHeight+1)+AQ;}},_replaceShadow:function(){this.element.appendChild(this._shadow);},_addShadowVisibleClass:function(){f.addClass(this._shadow,AG);},_removeShadowVisibleClass:function(){f.removeClass(this._shadow,AG);},_removeShadow:function(){var A5=(this._shadow&&this._shadow.parentNode);if(A5){A5.removeChild(this._shadow);}this.beforeShowEvent.unsubscribe(this._addShadowVisibleClass);this.beforeHideEvent.unsubscribe(this._removeShadowVisibleClass);this.cfg.unsubscribeFromConfigEvent(U,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(Ao,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._sizeShadow);this.cfg.unsubscribeFromConfigEvent(AU,this._replaceShadow);this.changeContentEvent.unsubscribe(this._sizeShadow);Aw.textResizeEvent.unsubscribe(this._sizeShadow);},_createShadow:function(){var A6=this._shadow,A5;if(!A6){A5=this.element;if(!Ap){Ap=document.createElement(K);Ap.className=m;}A6=Ap.cloneNode(false);A5.appendChild(A6);this._shadow=A6;this.beforeShowEvent.subscribe(this._addShadowVisibleClass);this.beforeHideEvent.subscribe(this._removeShadowVisibleClass);if(As.ie){AM.later(0,this,function(){this._sizeShadow();this.syncIframe();});this.cfg.subscribeToConfigEvent(U,this._sizeShadow);this.cfg.subscribeToConfigEvent(Ao,this._sizeShadow);this.cfg.subscribeToConfigEvent(AU,this._sizeShadow);this.changeContentEvent.subscribe(this._sizeShadow);Aw.textResizeEvent.subscribe(this._sizeShadow,this,true);this.destroyEvent.subscribe(function(){Aw.textResizeEvent.unsubscribe(this._sizeShadow,this);});}this.cfg.subscribeToConfigEvent(AU,this._replaceShadow);}},_shadowBeforeShow:function(){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);},configShadow:function(A6,A5,A7){var A8=A5[0];if(A8&&this.cfg.getProperty(Ac)==AD){if(this.cfg.getProperty(Au)){if(this._shadow){this._replaceShadow();if(As.ie){this._sizeShadow();}}else{this._createShadow();}}else{this.beforeShowEvent.subscribe(this._shadowBeforeShow);}}else{if(!A8){this.beforeShowEvent.unsubscribe(this._shadowBeforeShow);this._removeShadow();}}},initEvents:function(){r.superclass.initEvents.call(this);var A6=Ab.length-1,A7,A5;do{A7=Ab[A6];A5=this.createEvent(A7[1]);A5.signature=F.LIST;this[A7[0]]=A5;}while(A6--);},positionOffScreen:function(){var A6=this.iframe,A7=this.element,A5=this.OFF_SCREEN_POSITION;A7.style.top=u;A7.style.left=u;if(A6){A6.style.top=A5;A6.style.left=A5;}},getRoot:function(){var A7=this.parent,A6,A5;if(A7){A6=A7.parent;A5=A6?A6.getRoot():this;}else{A5=this;}return A5;},toString:function(){var A6=Aq,A5=this.id;if(A5){A6+=(A1+A5);}return A6;},setItemGroupTitle:function(BA,A9){var A8,A7,A6,A5;if(AM.isString(BA)&&BA.length>0){A8=AM.isNumber(A9)?A9:0;A7=this._aGroupTitleElements[A8];if(A7){A7.innerHTML=BA;}else{A7=document.createElement(this.GROUP_TITLE_TAG_NAME);A7.innerHTML=BA;this._aGroupTitleElements[A8]=A7;}A6=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[A6]){f.removeClass(this._aGroupTitleElements[A6],AJ);A5=A6;}}while(A6--);if(A5!==null){f.addClass(this._aGroupTitleElements[A5],AJ);}this.changeContentEvent.fire();}},addItem:function(A5,A6){return this._addItemToGroup(A6,A5);},addItems:function(A9,A8){var BB,A5,BA,A6,A7;if(AM.isArray(A9)){BB=A9.length;A5=[];for(A6=0;A60){A5=[];for(A8=0;A80){BA=A6-1;do{BC=A9[BA];if(BC){BB=BC.cfg.getProperty(O);if(BB){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,BB);this.renderEvent.unsubscribe(this._onParentMenuRender,BB);}this.removeItem(BC,BC.groupIndex);}}while(BA--);}if(BD){AA.purgeElement(BD);A7.removeChild(BD);}if(A5){AA.purgeElement(A5);A7.removeChild(A5);}if(A8){AA.purgeElement(A8);A8.innerHTML=u;}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(U,null);},destroy:function(A5){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;r.superclass.destroy.call(this,A5);},setInitialFocus:function(){var A5=this._getFirstEnabledItem();if(A5){A5.focus();}},setInitialSelection:function(){var A5=this._getFirstEnabledItem();if(A5){A5.cfg.setProperty(y,true);}},clearActiveItem:function(A7){if(this.cfg.getProperty(Av)>0){this._cancelShowDelay();}var A5=this.activeItem,A8,A6;if(A5){A8=A5.cfg;if(A7){A5.blur();this.getRoot()._hasFocus=true;}A8.setProperty(y,false);A6=A8.getProperty(O);if(A6){A6.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var A5;if(this.hasFocus()){A5=A3.getFocusedMenuItem();if(A5){A5.blur();}}},hasFocus:function(){return(A3.getFocusedMenu()==this.getRoot());},_doItemSubmenuSubscribe:function(A6,A5,A8){var A9=A5[0],A7=A9.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},_doSubmenuSubscribe:function(A6,A5,A8){var A7=this.cfg.getProperty(O);if(A7){A7.subscribe.apply(A7,A8);}},subscribe:function(){r.superclass.subscribe.apply(this,arguments);r.superclass.subscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.subscribe.apply(A6,arguments);}else{A8.cfg.subscribeToConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},unsubscribe:function(){r.superclass.unsubscribe.apply(this,arguments);r.superclass.unsubscribe.call(this,AR,this._doItemSubmenuSubscribe,arguments);var A5=this.getItems(),A9,A8,A6,A7;if(A5){A9=A5.length;if(A9>0){A7=A9-1;do{A8=A5[A7];A6=A8.cfg.getProperty(O);if(A6){A6.unsubscribe.apply(A6,arguments);}else{A8.cfg.unsubscribeFromConfigEvent(O,this._doSubmenuSubscribe,arguments);}}while(A7--);}}},initDefaultConfig:function(){r.superclass.initDefaultConfig.call(this);var A5=this.cfg;A5.addProperty(AZ.key,{handler:this.configVisible,value:AZ.value,validator:AZ.validator});A5.addProperty(AP.key,{handler:this.configConstrainToViewport,value:AP.value,validator:AP.validator,supercedes:AP.supercedes});A5.addProperty(AI.key,{value:AI.value,validator:AI.validator,supercedes:AI.supercedes});A5.addProperty(S.key,{handler:this.configPosition,value:S.value,validator:S.validator,supercedes:S.supercedes});A5.addProperty(A.key,{value:A.value,suppressEvent:A.suppressEvent});A5.addProperty(t.key,{value:t.value,validator:t.validator,suppressEvent:t.suppressEvent});A5.addProperty(Y.key,{value:Y.value,validator:Y.validator,suppressEvent:Y.suppressEvent});A5.addProperty(q.key,{handler:this.configHideDelay,value:q.value,validator:q.validator,suppressEvent:q.suppressEvent});A5.addProperty(v.key,{value:v.value,validator:v.validator,suppressEvent:v.suppressEvent});A5.addProperty(o.key,{value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});A5.addProperty(AN.key,{handler:this.configContainer,value:document.body,suppressEvent:AN.suppressEvent});A5.addProperty(Af.key,{value:Af.value,validator:Af.validator,supercedes:Af.supercedes,suppressEvent:Af.suppressEvent});A5.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A5.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A5.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A5.addProperty(a.key,{handler:this.configDisabled,value:a.value,validator:a.validator,suppressEvent:a.suppressEvent});A5.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A5.addProperty(Al.key,{value:Al.value,validator:Al.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AS,AR){if(AS){if(AR){this.parent=AR.parent;this.value=AR.value;this.id=AR.id;}this.init(AS,AR);}};var x=YAHOO.util.Dom,j=YAHOO.widget.Module,AB=YAHOO.widget.Menu,c=YAHOO.widget.MenuItem,AK=YAHOO.util.CustomEvent,k=YAHOO.env.ua,AQ=YAHOO.lang,AL="text",O="#",Q="-",L="helptext",n="url",AH="target",A="emphasis",N="strongemphasis",b="checked",w="submenu",H="disabled",B="selected",P="hassubmenu",U="checked-disabled",AI="hassubmenu-disabled",AD="hassubmenu-selected",T="checked-selected",q="onclick",J="classname",AJ="",i="OPTION",v="OPTGROUP",K="LI",AE="href",r="SELECT",X="DIV",AN='',a="",I="",W="",y="",Y="preventcontextoverlap",h="obj",AG="scope",t="none",V="visible",E=" ",m="MenuItem",AA="click",D="show",M="hide",S="li",AF='',p=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent",AA],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],o={key:AL,value:AJ,validator:AQ.isString,suppressEvent:true},s={key:L,supercedes:[AL],suppressEvent:true},G={key:n,value:O,suppressEvent:true},AO={key:AH,suppressEvent:true},AP={key:A,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},d={key:N,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL]},l={key:b,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[H,B]},F={key:w,suppressEvent:true,supercedes:[H,B]},AM={key:H,value:false,validator:AQ.isBoolean,suppressEvent:true,supercedes:[AL,B]},f={key:B,value:false,validator:AQ.isBoolean,suppressEvent:true},u={key:q,suppressEvent:true},AC={key:J,value:null,validator:AQ.isString,suppressEvent:true},z={key:"keylistener",value:null,suppressEvent:true},C=null,e={};var Z=function(AU,AT){var AR=e[AU];if(!AR){e[AU]={};AR=e[AU];}var AS=AR[AT];if(!AS){AS=AU+Q+AT;AR[AT]=AS;}return AS;};var g=function(AR){x.addClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.addClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};var R=function(AR){x.removeClass(this.element,Z(this.CSS_CLASS_NAME,AR));x.removeClass(this._oAnchor,Z(this.CSS_LABEL_CLASS_NAME,AR));};c.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:c,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:j.prototype.browser,id:null,init:function(AR,Ab){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=AB;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AX=this.cfg,AY=O,AT,Aa,AZ,AS,AV,AU,AW;if(AQ.isString(AR)){this._createRootNodeStructure();AX.queueProperty(AL,AR);}else{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case i:this._createRootNodeStructure();AX.queueProperty(AL,AR.text);AX.queueProperty(H,AR.disabled);this.value=AR.value;this.srcElement=AR;break;case v:this._createRootNodeStructure();AX.queueProperty(AL,AR.label);AX.queueProperty(H,AR.disabled);this.srcElement=AR;this._initSubTree();break;case K:AZ=x.getFirstChild(AR);if(AZ){AY=AZ.getAttribute(AE,2);AS=AZ.getAttribute(AH);AV=AZ.innerHTML;}this.srcElement=AR;this.element=AR;this._oAnchor=AZ;AX.setProperty(AL,AV,true);AX.setProperty(n,AY,true);AX.setProperty(AH,AS,true);this._initSubTree();break;}}}if(this.element){AU=(this.srcElement||this.element).id;if(!AU){AU=this.id||x.generateId();this.element.id=AU;}this.id=AU;x.addClass(this.element,this.CSS_CLASS_NAME);x.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AW=p.length-1;do{Aa=p[AW];AT=this.createEvent(Aa[1]);AT.signature=AK.LIST;this[Aa[0]]=AT;}while(AW--);if(Ab){AX.applyConfig(Ab);}AX.fireQueue();}},_createRootNodeStructure:function(){var AR,AS;if(!C){C=document.createElement(S);C.innerHTML=AF;}AR=C.cloneNode(true);AR.className=this.CSS_CLASS_NAME;AS=AR.firstChild;AS.className=this.CSS_LABEL_CLASS_NAME;this.element=AR;this._oAnchor=AS;},_initSubTree:function(){var AX=this.srcElement,AT=this.cfg,AV,AU,AS,AR,AW;if(AX.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==r){AT.setProperty(w,{id:x.generateId(),itemdata:AX.childNodes});}else{AV=AX.firstChild;AU=[];do{if(AV&&AV.tagName){switch(AV.tagName.toUpperCase()){case X:AT.setProperty(w,AV);break;case i:AU[AU.length]=AV;break;}}}while((AV=AV.nextSibling));AS=AU.length;if(AS>0){AR=new this.SUBMENU_TYPE(x.generateId());AT.setProperty(w,AR);for(AW=0;AW0){AV.setAttribute(AH,AR);}else{AV.removeAttribute(AH);}},configEmphasis:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV&&AU.getProperty(N)){AU.setProperty(N,false);}AU.refireEvent(AL);},configStrongEmphasis:function(AU,AT,AS){var AR=AT[0],AV=this.cfg;if(AR&&AV.getProperty(A)){AV.setProperty(A,false);}AV.refireEvent(AL);},configChecked:function(AT,AS,AR){var AV=AS[0],AU=this.cfg;if(AV){g.call(this,b);}else{R.call(this,b);}AU.refireEvent(AL);if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configDisabled:function(AT,AS,AR){var AV=AS[0],AW=this.cfg,AU=AW.getProperty(w),AX=AW.getProperty(b);if(AV){if(AW.getProperty(B)){AW.setProperty(B,false);}g.call(this,H);if(AU){g.call(this,AI);}if(AX){g.call(this,U);}}else{R.call(this,H);if(AU){R.call(this,AI);}if(AX){R.call(this,U);}}},configSelected:function(AT,AS,AR){var AX=this.cfg,AW=this._oAnchor,AV=AS[0],AY=AX.getProperty(b),AU=AX.getProperty(w);if(k.opera){AW.blur();}if(AV&&!AX.getProperty(H)){g.call(this,B);if(AU){g.call(this,AD);}if(AY){g.call(this,T);}}else{R.call(this,B);if(AU){R.call(this,AD);}if(AY){R.call(this,T);}}if(this.hasFocus()&&k.opera){AW.focus();}},_onSubmenuBeforeHide:function(AU,AT){var AV=this.parent,AR;function AS(){AV._oAnchor.blur();AR.beforeHideEvent.unsubscribe(AS);}if(AV.hasFocus()){AR=AV.parent;AR.beforeHideEvent.subscribe(AS);}},configSubmenu:function(AY,AT,AW){var AV=AT[0],AU=this.cfg,AS=this.parent&&this.parent.lazyLoad,AX,AZ,AR;if(AV){if(AV instanceof AB){AX=AV;AX.parent=this;AX.lazyLoad=AS;}else{if(AQ.isObject(AV)&&AV.id&&!AV.nodeType){AZ=AV.id;AR=AV;AR.lazyload=AS;AR.parent=this;AX=new this.SUBMENU_TYPE(AZ,AR);AU.setProperty(w,AX,true);}else{AX=new this.SUBMENU_TYPE(AV,{lazyload:AS,parent:this});AU.setProperty(w,AX,true);}}if(AX){AX.cfg.setProperty(Y,true);g.call(this,P);if(AU.getProperty(n)===O){AU.setProperty(n,(O+AX.id));}this._oSubmenu=AX;if(k.opera){AX.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{R.call(this,P);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AU.getProperty(H)){AU.refireEvent(H);}if(AU.getProperty(B)){AU.refireEvent(B);}},configOnClick:function(AT,AS,AR){var AU=AS[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AU)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AQ.isObject(AU)&&AQ.isFunction(AU.fn)){this.clickEvent.subscribe(AU.fn,((h in AU)?AU.obj:this),((AG in AU)?AU.scope:null));this._oOnclickAttributeValue=AU;}},configClassName:function(AU,AT,AS){var AR=AT[0];if(this._sClassName){x.removeClass(this.element,this._sClassName);}x.addClass(this.element,AR);this._sClassName=AR;},_dispatchClickEvent:function(){var AS=this,AR;if(!AS.cfg.getProperty(H)){AR=x.getFirstChild(AS.element);this._dispatchDOMClick(AR);}},_dispatchDOMClick:function(AS){var AR;if(k.ie&&k.ie<9){AS.fireEvent(q);}else{if((k.gecko&&k.gecko>=1.9)||k.opera||k.webkit){AR=document.createEvent("HTMLEvents");AR.initEvent(AA,true,true);}else{AR=document.createEvent("MouseEvents");AR.initMouseEvent(AA,true,true,window,0,0,0,0,0,false,false,false,false,0,null);}AS.dispatchEvent(AR);}},_createKeyListener:function(AU,AT,AW){var AV=this,AS=AV.parent;var AR=new YAHOO.util.KeyListener(AS.element.ownerDocument,AW,{fn:AV._dispatchClickEvent,scope:AV,correctScope:true});if(AS.cfg.getProperty(V)){AR.enable();}AS.subscribe(D,AR.enable,null,AR);AS.subscribe(M,AR.disable,null,AR);AV._keyListener=AR;AS.unsubscribe(D,AV._createKeyListener,AW);},configKeyListener:function(AT,AS){var AV=AS[0],AU=this,AR=AU.parent;if(AU._keyData){AR.unsubscribe(D,AU._createKeyListener,AU._keyData);AU._keyData=null;}if(AU._keyListener){AR.unsubscribe(D,AU._keyListener.enable);AR.unsubscribe(M,AU._keyListener.disable);AU._keyListener.disable();AU._keyListener=null;}if(AV){AU._keyData=AV;AR.subscribe(D,AU._createKeyListener,AV,AU);}},initDefaultConfig:function(){var AR=this.cfg;AR.addProperty(o.key,{handler:this.configText,value:o.value,validator:o.validator,suppressEvent:o.suppressEvent});AR.addProperty(s.key,{handler:this.configHelpText,supercedes:s.supercedes,suppressEvent:s.suppressEvent});AR.addProperty(G.key,{handler:this.configURL,value:G.value,suppressEvent:G.suppressEvent});AR.addProperty(AO.key,{handler:this.configTarget,suppressEvent:AO.suppressEvent});AR.addProperty(AP.key,{handler:this.configEmphasis,value:AP.value,validator:AP.validator,suppressEvent:AP.suppressEvent,supercedes:AP.supercedes});AR.addProperty(d.key,{handler:this.configStrongEmphasis,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent,supercedes:d.supercedes});AR.addProperty(l.key,{handler:this.configChecked,value:l.value,validator:l.validator,suppressEvent:l.suppressEvent,supercedes:l.supercedes});AR.addProperty(AM.key,{handler:this.configDisabled,value:AM.value,validator:AM.validator,suppressEvent:AM.suppressEvent});AR.addProperty(f.key,{handler:this.configSelected,value:f.value,validator:f.validator,suppressEvent:f.suppressEvent});AR.addProperty(F.key,{handler:this.configSubmenu,supercedes:F.supercedes,suppressEvent:F.suppressEvent});AR.addProperty(u.key,{handler:this.configOnClick,suppressEvent:u.suppressEvent});AR.addProperty(AC.key,{handler:this.configClassName,value:AC.value,validator:AC.validator,suppressEvent:AC.suppressEvent});AR.addProperty(z.key,{handler:this.configKeyListener,value:z.value,suppressEvent:z.suppressEvent});},getNextSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getNextSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getNextSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getFirstChildBy(AT.parentNode,AR);}AU=x.getFirstChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getNextEnabledSibling:function(){var AR=this.getNextSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getNextEnabledSibling():AR;},getPreviousSibling:function(){var AR=function(AX){return(AX.nodeName.toLowerCase()==="ul");},AV=this.element,AU=x.getPreviousSibling(AV),AT,AS,AW;if(!AU){AT=AV.parentNode;AS=x.getPreviousSiblingBy(AT,AR);if(AS){AW=AS;}else{AW=x.getLastChildBy(AT.parentNode,AR);}AU=x.getLastChild(AW);}return YAHOO.widget.MenuManager.getMenuItem(AU.id);},getPreviousEnabledSibling:function(){var AR=this.getPreviousSibling();return(AR.cfg.getProperty(H)||AR.element.style.display==t)?AR.getPreviousEnabledSibling():AR;},focus:function(){var AU=this.parent,AT=this._oAnchor,AR=AU.activeItem;function AS(){try{if(!(k.ie&&!document.hasFocus())){if(AR){AR.blurEvent.fire();}AT.focus();this.focusEvent.fire();}}catch(AV){}}if(!this.cfg.getProperty(H)&&AU&&AU.cfg.getProperty(V)&&this.element.style.display!=t){AQ.later(0,this,AS);}},blur:function(){var AR=this.parent;if(!this.cfg.getProperty(H)&&AR&&AR.cfg.getProperty(V)){AQ.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AS){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AT=this.element,AS,AR,AV,AU;if(AT){AS=this.cfg.getProperty(w);if(AS){AS.destroy();}AR=AT.parentNode;if(AR){AR.removeChild(AT);this.destroyEvent.fire();}AU=p.length-1;do{AV=p[AU];this[AV[0]].unsubscribeAll();}while(AU--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AS=m,AR=this.id;if(AR){AS+=(E+AR);}return AS;}};AQ.augmentProto(c,YAHOO.util.EventProvider);})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);if(!this._bCancelled){I.stopEvent(M);YAHOO.widget.MenuManager.hideVisible();L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(K){this._removeEventHandlers();G.superclass.destroy.call(this,K);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.9.0",build:"2800"});/* End of File include/javascript/yui/build/menu/menu-min.js */ diff --git a/cache/include/javascript/sugar_grp_emails.js b/cache/include/javascript/sugar_grp_emails.js index ec362a88..a70a462c 100644 --- a/cache/include/javascript/sugar_grp_emails.js +++ b/cache/include/javascript/sugar_grp_emails.js @@ -385,9 +385,9 @@ if(!SUGAR.smtpButtonGroup){SUGAR.smtpButtonGroup=new YAHOO.widget.ButtonGroup("s {SUGAR.email2.accounts.changeEmailScreenDisplay(e.newValue.get('value'));document.getElementById('smtp_settings').style.display='';form.mail_smtptype.value=e.newValue.get('value');});YAHOO.widget.Button.addHiddenFieldsToForm(form);} SUGAR.email2.accounts.smtp_authenticate_field_display();SUGAR.email2.accounts.toggleOutboundAccountDisabledFields(false);SUGAR.email2.accounts.changeEmailScreenDisplay('other');this.outboundDialog.render();this.outboundDialog.show();},toggleAdv:function(){var adv=document.getElementById("ie_adv");if(adv.style.display=='none'){adv.style.display="";}else{adv.style.display='none';}},smtp_authenticate_field_display:function(){var smtpauth_req=document.getElementById("mail_smtpauth_req");document.getElementById("smtp_auth1").style.display=smtpauth_req.checked?"":"none";document.getElementById("smtp_auth2").style.display=smtpauth_req.checked?"":"none";},smtp_setDefaultSMTPPort:function(){useSSLPort=!document.getElementById("mail_smtpssl").options[0].selected;if(useSSLPort&&document.getElementById("mail_smtpport").value=='25'){document.getElementById("mail_smtpport").value='465';} if(!useSSLPort&&document.getElementById("mail_smtpport").value=='465'){document.getElementById("mail_smtpport").value='25';}},changeEmailScreenDisplay:function(smtptype,isSystemAccount) -{document.getElementById("smtpButtonGroupTD").style.display='';document.getElementById("chooseEmailProviderTD").style.display='';document.getElementById("mailsettings1").style.display='';document.getElementById("mailsettings2").style.display='';document.getElementById("mail_smtppass_label").innerHTML=mod_strings.LBL_MAIL_SMTPPASS;document.getElementById("mail_smtpport_label").innerHTML=mod_strings.LBL_MAIL_SMTPPORT;document.getElementById("mail_smtpserver_label").innerHTML=mod_strings.LBL_MAIL_SMTPSERVER;document.getElementById("mail_smtpuser_label").innerHTML=mod_strings.LBL_MAIL_SMTPUSER;switch(smtptype){case"yahoomail":document.getElementById("mail_smtpserver").value='plus.smtp.mail.yahoo.com';document.getElementById("mail_smtpport").value='465';document.getElementById("mail_smtpauth_req").checked=true;var ssl=document.getElementById("mail_smtpssl");for(var j=0;j').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} +if(!loaded){QSProcessedFieldsArray[qs_index_id]=true;qsFields[qsField].form_id=form_id;var sqs=sqs_objects[qs_index_id];var resultDiv=document.createElement('div');resultDiv.id=combo_id+"_results";Dom.insertAfter(resultDiv,qsFields[qsField]);var fields=qs_obj.field_list.slice();fields[fields.length]="module";var ds=new YAHOO.util.DataSource("index.php?",{responseType:YAHOO.util.XHRDataSource.TYPE_JSON,responseSchema:{resultsList:'fields',total:'totalCount',fields:fields,metaNode:"fields",metaFields:{total:'totalCount',fields:"fields"}},connMethodPost:true});var forceSelect=!((qsFields[qsField].form&&typeof(qsFields[qsField].form)=='object'&&qsFields[qsField].form.name=='search_form')||qsFields[qsField].className.match('sqsNoAutofill')!=null);var search=new YAHOO.widget.AutoComplete(qsFields[qsField],resultDiv,ds,{typeAhead:forceSelect,forceSelection:forceSelect,fields:fields,sqs:sqs,animSpeed:0.25,qs_obj:qs_obj,inputElement:qsFields[qsField],generateRequest:function(sQuery){sQuery=decodeURIComponent(sQuery);var item_id=this.inputElement.form_id+'_'+this.inputElement.name;this.sqs=updateSqsFromQSFieldsArray(item_id,this.sqs);if(QSCallbacksArray[item_id]){QSCallbacksArray[item_id](this.sqs);} +var out=SUGAR.util.paramsToUrl({to_pdf:'true',module:'Home',action:'quicksearchQuery',data:YAHOO.lang.JSON.stringify(this.sqs),query:decodeURIComponent(sQuery)});return out;},setFields:function(data,filter){this.updateFields(data,filter);},updateFields:function(data,filter){for(var i in this.fields){for(var key in this.qs_obj.field_list){if(this.fields[i]==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]&&this.qs_obj.populate_list[key].match(filter)){var displayValue=data[i].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} SUGAR.util.callOnChangeListers(this._elTextbox);},clearFields:function(){for(var key in this.qs_obj.field_list){if(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]){document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value="";SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}} this.oldValue="";}});if(/^(billing_|shipping_)?account_name$/.exec(qsFields[qsField].name)) {search.clearFields=function(){for(var i in{name:0,id:1}){for(var key in this.qs_obj.field_list){if(i==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]) @@ -1059,5 +1059,10 @@ search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=th eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} function registerSingleSmartInputListener(input){if((c=input.className)&&(c.indexOf("sqsEnabled")!=-1)){enableQS(true);}} -if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();}/* End of File include/javascript/quicksearch.js */ +if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();} +function updateSqsFromQSFieldsArray(sqsId,sqsToUpdate) +{if(typeof(QSFieldsArray[sqsId])!='undefined'&&sqsToUpdate!=QSFieldsArray[sqsId].sqs) +{return QSFieldsArray[sqsId].sqs;} +else +{return sqsToUpdate;}}/* End of File include/javascript/quicksearch.js */ diff --git a/data/SugarBean.php b/data/SugarBean.php index dc47fd13..c2659845 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -5112,8 +5112,12 @@ class SugarBean return true; } //if there is an assigned_user that is the owner - if(isset($this->assigned_user_id)) - { + if (!empty($this->fetched_row['assigned_user_id'])) { + if ($this->fetched_row['assigned_user_id'] == $user_id) { + return true; + } + return false; + } elseif (isset($this->assigned_user_id)) { if($this->assigned_user_id == $user_id) return true; return false; } diff --git a/files.md5 b/files.md5 index 32af4fe1..8e3902cb 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -49,11 +49,11 @@ $md5_string = array ( './include/SugarObjects/templates/issue/language/en_us.lang.php' => '423fbc270837ef89e4b985ded703127d', './include/SugarObjects/templates/issue/language/application/en_us.lang.php' => '1c551b8f2eee4e971eb581ea0b76526f', './include/SugarObjects/templates/company/config.php' => '652e3decfabddf7e041bd044d0fb4d7a', - './include/SugarObjects/templates/company/vardefs.php' => '4d97b61da4936f9f7280b1d4f0df6319', + './include/SugarObjects/templates/company/vardefs.php' => '578783b7dc3c02c6622c2ee210ff4ad6', './include/SugarObjects/templates/company/icons/company_32.gif' => 'eb850fc1863a46987cdafca12693c789', './include/SugarObjects/templates/company/icons/company.gif' => '7890367dfe0e337a2f5f2839b3e6dac7', './include/SugarObjects/templates/company/icons/Createcompany.gif' => '3978b32e01cbeb974d86b1da0617dae9', - './include/SugarObjects/templates/company/Company.php' => 'b5c0b6507f3401ff013d84ec173ef1b3', + './include/SugarObjects/templates/company/Company.php' => 'af6eb0ea1fa377b5c22ab991162b14c0', './include/SugarObjects/templates/company/metadata/searchdefs.php' => '653b4ad4d0271118ed731efc2d06e46b', './include/SugarObjects/templates/company/metadata/metafiles.php' => '2df20612d32ba42d04f035a5f44df31c', './include/SugarObjects/templates/company/metadata/quickcreatedefs.php' => 'bec05436178a6ee815cb0a038bb222dd', @@ -67,7 +67,7 @@ $md5_string = array ( './include/SugarObjects/templates/company/language/en_us.lang.php' => '7dc56934b16cfd74bf61128491775a42', './include/SugarObjects/templates/company/language/application/en_us.lang.php' => '7edad0ae72bfc57914785fc0d8eab212', './include/SugarObjects/templates/person/config.php' => '97cd8f77525d81d46c6ec9a2c22369b3', - './include/SugarObjects/templates/person/vardefs.php' => '4cc3490819f1fb3d0309bfc8163d47bd', + './include/SugarObjects/templates/person/vardefs.php' => '5738b49361e79c8e653b83e7484d50b7', './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', @@ -82,7 +82,7 @@ $md5_string = array ( './include/SugarObjects/templates/person/metadata/listviewdefs.php' => '13eda65e640b51b67e4a6a41fc6e6184', './include/SugarObjects/templates/person/metadata/detailviewdefs.php' => '32695d3e0ea0fb54178196f307a3ecb5', './include/SugarObjects/templates/person/language/en_us.lang.php' => '8dea39c77bd829ae37cf8a782bdd3ab1', - './include/SugarObjects/templates/person/Person.php' => 'e0238ca0c1a3df11fb7150197a046557', + './include/SugarObjects/templates/person/Person.php' => '843f3a9e6d1b36c25f903cbaad41e05e', './include/SugarObjects/templates/basic/vardefs.php' => '596da3d5209c4f776a61dee13b731abf', './include/SugarObjects/templates/basic/icons/Createbasic.gif' => 'e25889cd660d838655f5e213fe565f0d', './include/SugarObjects/templates/basic/icons/basic_32.gif' => 'd92dc1c8a1ef6e0351b6948d78bf1436', @@ -280,7 +280,7 @@ $md5_string = array ( './include/SubPanel/SubPanelTiles.php' => 'dadb7f55f8f51dbe1b1933c04f0679fc', './include/SubPanel/registered_layout_defs.php' => '25547e1f080d3613cff6899d6793276f', './include/SubPanel/SubPanelViewer.php' => '4df8664bef4db2f5e29dca5b61cde965', - './include/SubPanel/SubPanel.php' => '0005ce70f465036bd1b14a87dd5bb771', + './include/SubPanel/SubPanel.php' => 'fc94246c071b9c25f4fe5899cec6d011', './include/SubPanel/SubPanelTilesTabs.php' => 'baa825e72669dc9426c45284e9e947f0', './include/SubPanel/subpanels.txt' => '8c7e26b8b809e9786da779689fbeb79b', './include/SugarXHprof/SugarXHprof.php' => 'cdaf3960afb33e3d36bf8cde6dd0ba57', @@ -332,7 +332,7 @@ $md5_string = array ( './include/SugarFields/Fields/Username/DetailView.tpl' => '018e1eda1ad32bd3a2287c6fe34ca89c', './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '7a963fd1aaefa0f5e2fa76826871bc64', './include/SugarFields/Fields/Parent/DetailView.tpl' => 'a9220b1c8a9556e1e60dbab92ada0326', - './include/SugarFields/Fields/Parent/EditView.tpl' => 'e394c2937e807c4d6e6f57622fa94e2b', + './include/SugarFields/Fields/Parent/EditView.tpl' => '2dc0af664d48f67b172bf94e0bfcb279', './include/SugarFields/Fields/Parent/SearchView.tpl' => '9dc128181d6777144e42cc399ad0b1e8', './include/SugarFields/Fields/Fullname/SugarFieldFullname.php' => '010ad0f76bf9ea4dda2e3a911ad1a479', './include/SugarFields/Fields/Fullname/DetailView.tpl' => '486041629011221cd094cb5e1b0762e0', @@ -487,7 +487,7 @@ $md5_string = array ( './include/SugarCharts/Jit/js/Jit/jit.js' => 'de9a71d630e97395d4bae316c5995fca', './include/SugarCharts/Jit/tpls/chart.tpl' => '338a00c4b18e676050f866b1ce836336', './include/SugarCharts/Jit/tpls/DashletGenericChartScript.tpl' => '81ec53a43eca08c5cb93fd0a5293bc90', - './include/SugarCharts/Jit/JitReports.php' => '4a84c631957991da42d4d803398b2d16', + './include/SugarCharts/Jit/JitReports.php' => '2583a52a4bdb5891c653e150c9a4713e', './include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => 'c2300996439f4a33c849f40afc5da8ae', './include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '71a23466955e17ab3094233fee8db708', './include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf' => '528d82bb81799f23d4def3425badf913', @@ -582,7 +582,7 @@ $md5_string = array ( './include/nusoap/license.txt' => '25823f4a2e463ab2c6b5873f07e428e1', './include/nusoap/class.wsdl.php' => 'cd7f1a43ca08891ac1ce04d4d1282c49', './include/nusoap/class.soap_val.php' => '084a898ecf261c201427fd41d4ee40e0', - './include/utils.php' => '605813274c807d0b9b805587dba6e2fc', + './include/utils.php' => 'daf76a71e448931a3f8059b9c9784070', './include/SugarHttpClient.php' => '44857baa23778fb3b8346aca15e15491', './include/Sugar_Smarty.php' => '2df55eb0c0e85f5c757680cb4c022d74', './include/phpmailer/extras/htmlfilter.php' => '4d5143899340a690d41a4959428ea674', @@ -619,14 +619,14 @@ $md5_string = array ( './include/database/DBManager.php' => 'f4325e203f70e6deb751aea31c4624ef', './include/database/MysqlHelper.php' => '35eefb1723b8c6d45a2363db21bd1cc6', './include/database/DBHelper.php' => '3417b96005ef6bdc856281e27a946055', - './include/database/MysqlManager.php' => '7be00c681e69e7a0593d198ed3c2fb58', + './include/database/MysqlManager.php' => '39c1a31df25aff638c4086107ee27761', './include/database/MysqliManager.php' => '2cf0353bd21ff7da24f1b590242e54d0', './include/database/FreeTDSHelper.php' => '95831bff97cb49e604ddb49968328ddb', './include/database/FreeTDSManager.php' => 'ffd969e6fd435be5066b10e2cc5ff822', './include/database/MssqlHelper.php' => '7c8aa2aef60b4c4942c2a5c6036458d2', './include/database/DBManagerFactory.php' => '2f289ec46c05233945edf3ca315795fc', './include/database/SqlsrvManager.php' => '55e10495f062f596ab7e78ccb89ff100', - './include/database/MssqlManager.php' => '9f027e9e48ac752444f22b5913359f7b', + './include/database/MssqlManager.php' => 'd03a7e7afd6bb8326965d2ccd5965cd6', './include/timezone/timezones.php' => '49790b86a0d55cf04f5629e08b30291b', './include/SugarSQLValidate.php' => '9d2e48001ac24297fb8cf3dc84b78612', './include/connectors/ConnectorFactory.php' => '89807b6eeb2d2dc1f75f53231b90e0dc', @@ -656,7 +656,7 @@ $md5_string = array ( './include/templates/TemplateDragDropChooser.php' => '7ea8b4e854412716a49842e0ec20925b', './include/templates/Template.php' => 'e66cbf4c2a382db7a578224a398bbd8b', './include/templates/TemplateGroupChooser.php' => 'ba629abf65ae5785d67d169bae39f96c', - './include/TemplateHandler/TemplateHandler.php' => '9e84649e05441d8d9f4bfeac80640bd7', + './include/TemplateHandler/TemplateHandler.php' => '4009d698e9b16f661f1b917934199662', './include/SugarTheme/SugarTheme.php' => '9baf03a3e45c53b3387031a9cbea32bd', './include/SugarTheme/getImage.php' => '17c2f2c2096bca2dd15d4e02480086e0', './include/SugarTheme/SugarSprites.php' => 'c167e5ab5576162a1e9706ff2fd4add7', @@ -793,18 +793,18 @@ $md5_string = array ( './include/tcpdf/CHANGELOG.TXT' => 'b41664d05748e067b3d52ba1eba1e9c3', './include/tcpdf/tcpdf.php' => 'e1032f914233be45b287bbb29bdfb452', './include/tcpdf/README.TXT' => 'f64835b5e9149a89515a9eb589d13a38', - './include/javascript/ajaxUI.js' => '8b507205a61924ed316397e3083ecb08', + './include/javascript/ajaxUI.js' => '7d1f05513e3a3b52ed4f144a719dd055', './include/javascript/calendar.js' => '55dd4ce6c0448f1ffe57be5746877a87', './include/javascript/iscroll.js' => 'f6b1477d2416ee1c40578d56c89220c1', './include/javascript/include.js' => 'f3ef613992bd21dcb9a6033c03675b90', './include/javascript/dashlets.js' => 'f3154b0f2bff9641df358ed967e9eb5d', './include/javascript/popup_helper.js' => '96c9afa646fed96bd44c158b65b123ab', - './include/javascript/report_additionals.js' => '6d891005bb43fbbfd42da839db7b9986', - './include/javascript/quicksearch.js' => 'a4fe01d74dec1b175f3f1f30cf7f2f9e', + './include/javascript/report_additionals.js' => 'b368977a0256850a04b2f3fcde32f3b7', + './include/javascript/quicksearch.js' => '849d4d8327cafe683b7bae26d1c0186a', './include/javascript/sugar_yui_overrides.js' => '8f58b85d735143b06883b06246e39170', './include/javascript/cookie.js' => 'fca904047ebf36d4eee53df902debb4f', './include/javascript/popup_parent_helper.js' => '2589c529444f256450a92957e38c3785', - './include/javascript/sugar_3.js' => '30eb1d422a9a240e61e8eeca09934186', + './include/javascript/sugar_3.js' => '52d4297ff56283ae7d236d183bf2cf74', './include/javascript/jquery.js' => '819fb9d29c24f79d34343e9f182aaf24', './include/javascript/sugar_connection_event_listener.js' => '382b26c2895d7921378688996c93d090', './include/javascript/jsclass_async.js' => 'c09187c0aeaee9f7771b8d9dbde402c4', @@ -2233,7 +2233,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' => '3a5ec2d0da9cedc869495523c050436a', + './include/javascript/jsAlerts.php' => 'fdc75ea56415165481d5334b949a2188', './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', @@ -2341,8 +2341,8 @@ $md5_string = array ( './include/javascript/tiny_mce/plugins/paste/js/pasteword.js' => '10f73efbf570633989e2801d0b10de4f', './include/javascript/tiny_mce/plugins/paste/pasteword.htm' => '152c6cb86eb58abecb6c9e4ba099cfc1', './include/javascript/tiny_mce/plugins/paste/pastetext.htm' => '9b66a9a84428df3ebe11f5755b2420a1', - './include/javascript/tiny_mce/plugins/paste/editor_plugin.js' => '93a17a989ee7f9ae5bfa23a8f62a95b0', - './include/javascript/tiny_mce/plugins/paste/editor_plugin_src.js' => '3cf41fadde401a7a83de95dec5f3238f', + './include/javascript/tiny_mce/plugins/paste/editor_plugin.js' => '60a9e0dde5aa62226d0aee6bb5499120', + './include/javascript/tiny_mce/plugins/paste/editor_plugin_src.js' => '9610a23c807af2de5a4756500751671d', './include/javascript/tiny_mce/plugins/paste/langs/en_dlg.js' => 'e5cf25d2ec374f911c7d009a19fa5474', './include/javascript/tiny_mce/plugins/autoresize/editor_plugin.js' => 'ed6fd391a8b5ecedd913c263da2136b8', './include/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js' => '05046c505c39c3d1d827dc6b5ff13c7c', @@ -2566,7 +2566,7 @@ $md5_string = array ( './include/MVC/View/views/view.vcard.php' => '179462d5a2bd63cc947514bc5b4d5f0d', './include/MVC/View/views/view.multiedit.php' => '6304a43da7a60cd7e10e45e9b70a752b', './include/MVC/View/views/view.list.php' => '9f03520865fc8f21df3b8ff7a832a8b2', - './include/MVC/View/views/view.popup.php' => '6cdca4eead408e52c991dee6b7889081', + './include/MVC/View/views/view.popup.php' => '9b14b0bf5413919adeb2eaf3a27e904c', './include/MVC/View/views/view.quick.php' => '903361c65cb2a303512f4c1b61907114', './include/MVC/View/views/view.xml.php' => '915fb80385c6357b3368891dfdd4dcb6', './include/MVC/View/views/view.sugarpdf.config.php' => 'a8b5a369c54618e94065de2527866cd8', @@ -2602,18 +2602,18 @@ $md5_string = array ( './include/SearchForm/tpls/SearchFormGeneric.tpl' => '1c8f265316debc2716ae820fe3d606fe', './include/SearchForm/SugarSpot.php' => 'd8449360de3e2907dae694c8c984f40b', './include/SearchForm/SearchForm.php' => 'bb489966e170ef2b9782cdeffaf8f2eb', - './include/SearchForm/SearchForm2.php' => '8e83bd871576fccc41b1f688f3bea16a', + './include/SearchForm/SearchForm2.php' => '91f4fb8d78650200ea7e69d97349bfba', './include/Dashlets/DashletRssFeedTitle.php' => 'a47b01bb0712af9ed5c9cf86de254252', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => '2dafbe3aeb4faac8dda04fdc7153ac45', './include/Dashlets/DashletCacheBuilder.php' => '0c919c1e633ce4d3c8782f36c7a23642', './include/Dashlets/DashletGenericConfigure.tpl' => 'ceba10c6938ee0374075dd502918e872', - './include/Dashlets/DashletGeneric.php' => 'b006dd6cd41e780fb3c873dc521194c0', + './include/Dashlets/DashletGeneric.php' => '9195a87ef908f57901fa8e1f85e9b062', './include/Dashlets/DashletGenericDisplay.tpl' => 'ce701e32b929bd46239d1c8476f6d6be', './include/Dashlets/DashletGenericChart.php' => 'a9bc81aecd3095b4d084fbeaf6391168', './include/Dashlets/Dashlet.php' => '550b9c8a853aae6ac1f60e7244a179b5', './include/Dashlets/DashletGenericAutoRefresh.tpl' => '076b5009caaa5cd0efd8b79fa04d1d06', './include/Dashlets/DashletGenericChartConfigure.tpl' => '0c368b877a526abe873484da26f2383f', - './include/MassUpdate.php' => '8c2f5e162f75cf51d99cc6f763fbc1e6', + './include/MassUpdate.php' => '61ac29c8db346d29eec89e3e13a03853', './include/Pear/Crypt_Blowfish/Blowfish.php' => 'b391980575340d0fe5bf2df72bc13932', './include/Pear/Crypt_Blowfish/Blowfish/DefaultKey.php' => '8274b556662cc178342ea96940b36514', './include/Pear/Crypt_Blowfish/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', @@ -2624,24 +2624,24 @@ $md5_string = array ( './include/ListView/ListViewSmarty.php' => '03c7294fc4d2339083e4b229cfd3c868', './include/ListView/ListViewData.php' => 'fa26469a4d9e5a2c51f2bd94afade8ec', './include/ListView/ListViewGeneric.tpl' => '53f9d79cd21bc746afe2bf11224bc3c9', - './include/ListView/ListView.php' => 'eb416b36c60ebdbf2b141329551e92d5', + './include/ListView/ListView.php' => '2df6b8c274dd20abc21b1cbeceecdec9', './include/ListView/ListViewFacade.php' => '564aa280b419dde1a8133570ab091a4d', './include/ListView/ListViewDCMenu.tpl' => 'b8fc691b5015320ea9ff8d56c26da377', './include/ListView/ListViewXTPL.php' => '13b61371300ea84868bfecd1625d5be1', './include/ListView/ListViewPagination.tpl' => '8192c397efea1a40b0be1e3eec43d281', './include/ListView/ListViewDisplay.php' => '80ecf9f1e96267d2c2367289ced4e434', './include/ListView/ListViewNoMassUpdate.tpl' => '64ccd25b685c8e0de7219711c8308ec1', - './include/vCard.php' => '34e8f0e9f927efbcbf6c133bf55bbf15', + './include/vCard.php' => '287c0cdf573d46b3fd10243835af64be', './include/upload_file.php' => '815ab6552e85b01dbde662c362528e13', './include/controller/Controller.php' => 'a8eeb941b5d10c61040811d9a20903ec', - './include/formbase.php' => 'c1c3fe1836d99e6e4b88b6cacd1fa740', + './include/formbase.php' => '5361e93e6a97e0599c887f6c6e337903', './include/SugarOauth.php' => '5ee5bb506e3df35b1e732c88994f5eb9', './include/resource/ResourceManager.php' => '956bfe88a1d9e80e13ce23da10d25f34', './include/resource/Observers/WebResourceObserver.php' => '3e1806f0279051aa9d408ff94e4d55ac', './include/resource/Observers/ResourceObserver.php' => '77d273ea39b8e2abe026f1f8c515408b', './include/resource/Observers/SoapResourceObserver.php' => '8966a226d081e396d109d1e13dd6e6e0', './include/language/jsLanguage.php' => 'c5d5b59aa6c5c5a52e96c8758fc5a14e', - './include/language/en_us.lang.php' => '4a8cc81471aba0b7a57baf2f3b8a1315', + './include/language/en_us.lang.php' => '17aeb03a0168572cdd126b936382e5e2', './include/language/en_us.notify_template.html' => 'b885a3d87060bee2226369fa918e77f3', './include/pclzip/readme.txt' => '2265cad9ccb84cfcd4093ce26b22dc97', './include/pclzip/gnu-lgpl.txt' => '7fbc338309ac38fefcd64b04bb903e34', @@ -2652,7 +2652,7 @@ $md5_string = array ( './include/SugarEmailAddress/templates/forDetailView.tpl' => 'fbd22ebc21473210a526ba90d7be252d', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => 'c65d0ddad3491a66475b54b628a634ec', './include/SugarEmailAddress/templates/forEditView.tpl' => '0e22a1cb4c72ce37d9d29a555e5d04ad', - './include/SugarPHPMailer.php' => 'a0f2aa1a1cec6c0af9889fb1b3848e7d', + './include/SugarPHPMailer.php' => '32c3cbbac7f872b687873ed59672cd8e', './include/tabConfig.php' => '80f49b612c65111ab7485dde31d86281', './include/Smarty/debug.tpl' => '048f29488fb3da08b3fcc5a746489696', './include/Smarty/internals/core.write_compiled_include.php' => '93584e495a0bfb25f946f20f459889fb', @@ -2831,13 +2831,13 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldemail.php' => 'f7797603facad508c10ca1e09a726507', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectButton.php' => 'b76277347d722f7a14a1810bdee62247', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '24f2871da5dc8c415e485a405b79a75a', - './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => '299d88cdeed157ffb93a88e2a4708c0c', + './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => 'd66ecb30b75f0a22fa2652cc93e76a48', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'ad4f6ef8810e8d0aae49d30d2151c5a0', './include/generic/SugarWidgets/SugarWidgetReportField.php' => '11f8e781b0b2dcc11912a70153fe5089', './include/generic/SugarWidgets/SugarWidgetSubPanelCloseButton.php' => 'dc4aeab45c4536d847d098096e606519', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php' => '737000e60b4f1d2089311ce1a49f7a50', './include/generic/SugarWidgets/SugarWidgetFieldnum.php' => 'a38a9d4090dd5e904dfaf450a89951ac', - './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => '45f6712456b961051d76cc8b8384cf76', + './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => 'f9def77bd6b2653daf259d911791a4fb', './include/generic/SugarWidgets/SugarWidgetSubPanelTopSelectAccountButton.php' => 'e7948f3a338cf8535134e4ad53335785', './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => 'c75f73d354d4b65a718bbe0703b342e0', './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => 'd6279c8abe809bc070309a8c71e9c4c0', @@ -2848,7 +2848,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldfullname.php' => '0833f9edf7091575e23b26fb5d67dc10', './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => 'f88bf9e9b28cb50754ae90d19dcc9c9d', './include/TimeDate.php' => '337d3f46d93fbb3ad2f66d83cb614c6c', - './include/Localization/Localization.php' => 'e4abfbb01b04cd0628a6853f208f4be8', + './include/Localization/Localization.php' => '82bca3fff2970f0104b41d869fbbb4f5', './include/SugarLogger/SugarLogger.php' => '749c5daac2243ba4e236f63021682056', './include/SugarLogger/LoggerManager.php' => '2af5d6d49a63056d0c18882027b7602b', './include/SugarLogger/LoggerTemplate.php' => 'a26171e000dc96e41467315c146408af', @@ -2882,7 +2882,7 @@ $md5_string = array ( './examples/SoapTestPortal.php' => 'f108645222cae814d634c268628edd88', './examples/ExampleLeadCapture.php' => '53a6797fe2fb273717a4194d105a79d6', './maintenance.php' => '6248e8e9b22dc6f189fb9754b77fbfd0', - './robots.txt' => 'f71d20196d4caf35b6a670db8c70b03d', + './robots.txt' => 'fce2c714b591aa9b36ed1e1b1d8ef900', './vcal_server.php' => '0d1f1c666b29e64b038809516b8e0c1c', './dictionary.php' => '2c944c4e9de0ad7ee323dbbfb2388764', './HandleAjaxCall.php' => '52ec9af41f1f3b3787c02fafa4ba4da1', @@ -2924,7 +2924,7 @@ $md5_string = array ( './Zend/Oauth/Signature/SignatureAbstract.php' => 'd44f7c92c85ba7915a6774e78f426b1c', './Zend/Oauth/Config/ConfigInterface.php' => '6830164ea9812294fc750da1337098f5', './Zend/Oauth/Config.php' => '80ff096d8cec0c5bb7d1388a480c8803', - './Zend/Oauth/Provider.php' => '73f517e54fb85ae62dd524342adb9a04', + './Zend/Oauth/Provider.php' => 'def281fc9dafd0c93ccb966ab93b5a81', './Zend/Oauth.php' => 'a194292fb9c2439c2909d2b0fe17a2bd', './Zend/Gdata/Spreadsheets.php' => 'd6987183f1b327ccc11c9613fef7e474', './Zend/Gdata/MimeBodyString.php' => '8cc543fe62bfee59fd60edfa1755f1de', @@ -3309,7 +3309,7 @@ $md5_string = array ( './SugarSecurity.php' => 'f49c2b65fbdc18e2e6d8c6d92a989c6e', './export.php' => 'f43c308ca088581660606fe23fd30ef7', './data/BeanFactory.php' => '66eb7cf0ed822114e12c7eee7ec3137b', - './data/SugarBean.php' => '49a1c5b608f223e5503a75ff97a9550f', + './data/SugarBean.php' => '634551bb885b7960916ffe539a325e24', './data/Link.php' => '667ba00ff4e368a8de7c696729d6a5db', './data/Relationships/One2OneRelationship.php' => '31e10349d8cac5b63008a8f57dee70d6', './data/Relationships/EmailAddressRelationship.php' => '43154ff588da21f1d33af3d8c5cfb9fa', @@ -3407,10 +3407,10 @@ $md5_string = array ( './modules/Leads/views/view.list.php' => 'c48c873cc327566d9f2f52c16105aef6', './modules/Leads/views/view.edit.php' => '1e52112d67afec904f3ac40d24b86784', './modules/Leads/views/view.detail.php' => '5f56eedf44fbea3e82b9fc6fdf1f39c2', - './modules/Leads/views/view.convertlead.php' => 'f9dfe6f9b50c2be9139b0ded04f36a3c', + './modules/Leads/views/view.convertlead.php' => '73a42ecd6bd8a9b02f297b12bd4c9695', './modules/Leads/controller.php' => '47f4244b5f82b69170b4c625008363a4', './modules/Leads/field_arrays.php' => '016d6e6bca464637c25b1c156832490f', - './modules/Leads/Lead.php' => '683715da3573db7a5f0a88f1ecd854e9', + './modules/Leads/Lead.php' => 'a704cb519bf9e9e6811494f7b6e02a2e', './modules/Leads/SubPanelView.php' => '60b0451943b1c2fcb1b6380c768b4805', './modules/Leads/MyLeads.php' => '725e72e72172dd52185e7cf1024d6a07', './modules/Leads/MyLeads.html' => 'e183e95c7dd51a6edceba0cb45e875bd', @@ -3524,7 +3524,7 @@ $md5_string = array ( './modules/Documents/views/view.extdoc.php' => '48558c04b05f4afa606da15613983278', './modules/Documents/views/view.detail.php' => '6fa727b255e2fdb4b94524e8a19de146', './modules/Documents/field_arrays.php' => '9bffb74139eacd834503cb43f16a86f3', - './modules/Documents/Document.php' => '6eafb9624d9b964f4354b7a9de2df782', + './modules/Documents/Document.php' => 'c84906953345a2626e093d5362f19bac', './modules/Documents/Delete.php' => '000bf00916cefaab769eaaa8e3c826cd', './modules/Documents/metadata/searchdefs.php' => '156e0422c5cfed8df08c85ca9bd8ed10', './modules/Documents/metadata/subpaneldefs.php' => 'e56dd152f9d3ab7d0c3656a8db5691e0', @@ -3651,11 +3651,11 @@ $md5_string = array ( './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl' => 'fa4945c811e90db69a4dddbdb7e37f77', './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.meta.php' => '812fd7b80f5aed2d22cfc70fc91e5a02', './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php' => '3ac0786a5860b0b57ce2320518d0b82d', - './modules/Charts/chartdefs.php' => '70146768b66521ef74868b620b77e054', - './modules/Charts/language/en_us.lang.php' => '6ce3bdf637ec9e464eae88d833b0f635', + './modules/Charts/chartdefs.php' => '40ab8a3ac439447b19d9936a31d66593', + './modules/Charts/language/en_us.lang.php' => 'e2681307ad1f085bb5c90388cb47f924', './modules/Charts/code/Chart_lead_source_by_outcome.php' => '207c6b4f4fd14d7768da64c6532d4b89', './modules/Charts/code/Chart_outcome_by_month.php' => 'f30b50871a84ea164e55b9d6db71741a', - './modules/Charts/code/predefined_charts.php' => '49caf8e6ed6465c2607bd35cc00480b4', + './modules/Charts/code/predefined_charts.php' => '07b1ff5ad2240f6b6696e652d290e41f', './modules/Charts/code/Chart_my_pipeline_by_sales_stage.php' => 'c41499f00ad4972d301860652534d092', './modules/Charts/code/Chart_pipeline_by_sales_stage.php' => '9340a4fbb70f21b8db3fff7597e07c77', './modules/Charts/code/Chart_pipeline_by_lead_source.php' => 'bd590e02517abdd01455e1ae75814768', @@ -3664,7 +3664,7 @@ $md5_string = array ( './modules/Calendar/Cal.css' => '7a99a6900f7e66b42d5a322030d7161d', './modules/Calendar/tpls/footer.tpl' => '1796c56cc9d34cb6b18a46b18ba1aea5', './modules/Calendar/tpls/repeat.tpl' => '4deebb66bcce2d5711e9ee36fadef778', - './modules/Calendar/tpls/shared_users.tpl' => '60345b943d788ad14d2d596ffd886aae', + './modules/Calendar/tpls/shared_users.tpl' => '0da48385a8b049d426355eea3956be43', './modules/Calendar/tpls/settings.tpl' => 'e0932666573eed20cb7c7e1969494b16', './modules/Calendar/tpls/main.tpl' => 'aec304ba36ac0c4694c399474ec2faf0', './modules/Calendar/tpls/header.tpl' => '3ec9c52bfea23df61e3089310512642e', @@ -3680,7 +3680,7 @@ $md5_string = array ( './modules/Calendar/views/view.json.php' => 'ab258d319e99bbc04e46f1fbbaedd464', './modules/Calendar/views/view.createinvitee.php' => '23d3de8c274a611d24060543b3e5a3ec', './modules/Calendar/controller.php' => '9012bbec7f34948388ed10d2c298c547', - './modules/Calendar/Calendar.php' => '3769d617bd399fd709ccba95e1d507e8', + './modules/Calendar/Calendar.php' => '9e77091dc4503f337c9cc3b32529b9e8', './modules/Calendar/CalendarActivity.php' => '0615ccbb2551809a789dbd207d8dceab', './modules/Calendar/action_view_map.php' => '569fe57460745baccc0ae58918cfeb7c', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl' => 'e443d1e2748d0b960559e0c15eb89495', @@ -3688,7 +3688,7 @@ $md5_string = array ( './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.en_us.lang.php' => '2fd143e1022dfedc6c0560bc5324af24', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php' => '0e0cd3b17c749d61be445386c719bcda', './modules/Calendar/index.php' => 'c0b96130738ebc209a63c7c090cf33a1', - './modules/Calendar/language/en_us.lang.php' => '848ac6e0972cc2e26a18e7e1a57add6d', + './modules/Calendar/language/en_us.lang.php' => '8f18200589ec4f75414b0c54f92cbabc', './modules/Calendar/CalendarDisplay.php' => '941880eb4790c8e37f0d5bd2aa0aef2a', './modules/ACLRoles/ACLRoles.js' => '73e3540bf65b30c1a8ddef8b3dbddaaa', './modules/ACLRoles/DetailViewBody.tpl' => '731d86fbff18b1d912c2d7033f6dbc70', @@ -3806,7 +3806,7 @@ $md5_string = array ( './modules/Emails/javascript/displayOneEmailTemplate.js' => '1c08074715773e437d3645fcc26cfc37', './modules/Emails/javascript/ajax.js' => '34cd3a8d8d7c4adc0148ee9e4659ccd0', './modules/Emails/javascript/EmailUICompose.js' => '943b2bac2f5e9a1cb815bbc411e06898', - './modules/Emails/javascript/EmailUI.js' => 'e5eb7eab927b9a9f6209dec74c938ed9', + './modules/Emails/javascript/EmailUI.js' => 'c2443d1f1910154109006eefb98124d0', './modules/Emails/javascript/grid.js' => 'e9322c6364864d7d4a5ab18640e3f0aa', './modules/Emails/javascript/viewPrintable.js' => 'f6607dbb693a458a99b4291eb8deb203', './modules/Emails/javascript/vars.js' => 'f20d35e82dd087149f0005e2b8dadbd6', @@ -3838,7 +3838,7 @@ $md5_string = array ( './modules/Help/language/en_us.lang.php' => '5b8cb16b2c1f20e4f4b249dc2c0f1973', './modules/Configurator/tpls/addFontView.tpl' => '8e9b148f817c72d9144cf5825b23c212', './modules/Configurator/tpls/SugarpdfSettings.tpl' => '5e4639771379541010481d613f46a8b7', - './modules/Configurator/tpls/adminwizard.tpl' => '3f602bcd907908ddd2f12a2c25a42b42', + './modules/Configurator/tpls/adminwizard.tpl' => '57f27ac0c33a68f0840094ff637b78c6', './modules/Configurator/tpls/fontmanager.tpl' => '18c6ea0aa49b9897abc5ec15b5c32c8f', './modules/Configurator/tpls/EditView.tpl' => '6c2e8a13c69d8df1e40b75f352176aed', './modules/Configurator/tpls/SugarpdfSettingsFields.tpl' => 'aacc98039fbb19bac6de9c142cf7b50e', @@ -3925,7 +3925,7 @@ $md5_string = array ( './modules/InboundEmail/DetailView.php' => '72ae5bf17bed26d97aa9df7ac0e25416', './modules/InboundEmail/Delete.php' => '208c424262be980d2f4f3ae5db1b5516', './modules/InboundEmail/Popup.php' => '4fb3ff4b79aa040392b7d796eb6a4999', - './modules/InboundEmail/InboundEmail.php' => '3daa313feaee3b37ec95869cfff22f8c', + './modules/InboundEmail/InboundEmail.php' => '7e21b31c38063f84a98db81776cb1c16', './modules/InboundEmail/ListView.html' => 'b7b06c6dbe6d7dc4e48b3eb1edb63535', './modules/InboundEmail/index.php' => '464b33bf25e4b937637c915647939755', './modules/InboundEmail/language/en_us.lang.php' => 'df406781a9409bcf003ff03e9024b2ff', @@ -3979,7 +3979,7 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '1f0db9c7dec1eaa57d64988e0be54524', './modules/ModuleBuilder/parsers/relationships/RelationshipsInterface.php' => '5daa8a0d4631e0f111e820e68c188e57', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => '4cea8980fde1bdc3dffe00698d5f4134', - './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => '715d3c48b30f01594184bec46d2ed270', + './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => '5d27fcd9fa7f7a4df87a3435113a90a5', './modules/ModuleBuilder/parsers/relationships/OneToOneRelationship.php' => '8aa9e6c0405285628c0f42f0922b9fb8', './modules/ModuleBuilder/parsers/relationships/ManyToOneRelationship.php' => '9ae3146fa4870932b5f56815fa56a392', './modules/ModuleBuilder/parsers/relationships/OneToManyRelationship.php' => 'd4a44d3f67d41dce9e575a9686896e24', @@ -4012,7 +4012,7 @@ $md5_string = array ( './modules/ModuleBuilder/Module/StudioBrowser.php' => 'eb24a55521d327786a13200ee7eff68a', './modules/ModuleBuilder/Module/StudioModule.php' => 'd0fa3048e6833b58cee80a9eacd8d3fb', './modules/ModuleBuilder/Module/DropDownTree.php' => '747c045392371171a02cff09c35a5dc3', - './modules/ModuleBuilder/Module/DropDownBrowser.php' => '9438530bca6de7cf95dbeb27be7cf3b2', + './modules/ModuleBuilder/Module/DropDownBrowser.php' => '12aa1fe77ef1a0ec12c16223988e1baf', './modules/ModuleBuilder/views/view.modulefield.php' => 'feaabf452efd02bff77d510c47c91dc2', './modules/ModuleBuilder/views/view.relationship.php' => '646cd0326d3d7e02d092642dc08a693f', './modules/ModuleBuilder/views/view.history.php' => '3bbe70c9811550fa25dd6701629d8ecd', @@ -4043,13 +4043,13 @@ $md5_string = array ( './modules/ModuleBuilder/controller.php' => '241c3ff853bb905f4ca4186f2dcc852b', './modules/ModuleBuilder/action_view_map.php' => '2ac59503c6ee92f8d4e7467c4fbb193a', './modules/ModuleBuilder/javascript/studio2RowDD.js' => '94681bdb6f0d376b4879bb7d0529ede2', - './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '9c904d65f49a8a1c16b5f5ec69184048', + './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '9ff0ab506cdfe1bc321d0e0abf636771', './modules/ModuleBuilder/javascript/studio2FieldDD.js' => 'fc71395e473c62fab1670dcec4231d45', './modules/ModuleBuilder/javascript/JSTransaction.js' => 'b5fa4bf2bf177dd60d1f71dd97a311b5', './modules/ModuleBuilder/javascript/studiotabgroups.js' => 'afad88c23d4c6feb67fe7563268f77af', './modules/ModuleBuilder/javascript/studio2ListDD.js' => 'e337d0e92d32fa34b0e66123b4f3769c', - './modules/ModuleBuilder/javascript/studio2.js' => '69b327baefab205e0ed8588d82f8964b', - './modules/ModuleBuilder/javascript/SimpleList.js' => 'bae82a1768f52c0774d0c585eb4e6eba', + './modules/ModuleBuilder/javascript/studio2.js' => '1fea897e694c3806ac4d89bd3b8bc064', + './modules/ModuleBuilder/javascript/SimpleList.js' => '539de9f66c7327e89f0b68c09af1d5f1', './modules/ModuleBuilder/javascript/wizardTemplate.js' => 'd7fbc6c89c7b00d783f9a88607b38014', './modules/ModuleBuilder/javascript/studio2PanelDD.js' => '75aba41c0c344995d79ab307deff06ac', './modules/ModuleBuilder/MB/header.php' => '7a0f15ace21352763ed67771cc4d2773', @@ -4062,14 +4062,14 @@ $md5_string = array ( './modules/ModuleBuilder/MB/MBLanguage.php' => '91ca569f0c08619e10f0c20c08e5dcc5', './modules/ModuleBuilder/MB/ModuleBuilder.php' => '28c6a5c8a48e2a1b1c15028778f03043', './modules/ModuleBuilder/MB/MBRelationship.php' => '54f98e03309f1bcb9641a20e490352da', - './modules/ModuleBuilder/language/en_us.lang.php' => 'bde4a38f9207f0f13d6a8fa9d7fc6270', + './modules/ModuleBuilder/language/en_us.lang.php' => 'd4510b0108d832fcf84d8dd8ffd5544d', './modules/ModuleBuilder/Forms.php' => '385d62115fd9616fda262306689c4d85', './modules/BeanDictionary.php' => '3a90299dfaa9c2e0bbdc5d26b5c19947', './modules/ACL/Save.php' => '9b09eb945baf5dea3290c2888aa2cfca', './modules/ACL/Menu.php' => 'e6c7c6e44af8c7ecb06f22c4a1f1e598', './modules/ACL/vardefs.php' => '27ef0d59b66fb55201a0f6d3763362f6', './modules/ACL/List.php' => '26636ad4a20c6bb0f5e258924bdad838', - './modules/ACL/ACLController.php' => 'b81d0f029f754d3e6bf2a99f4a3482fe', + './modules/ACL/ACLController.php' => 'cff88d7b268024569ec36be7e286cebe', './modules/ACL/metadata/subpaneldefs.php' => 'b2b43e9328bdc190b184355287a404ef', './modules/ACL/install_actions.php' => '4a2f101cbd13d11d0e35f82ab2c13f9f', './modules/ACL/language/en_us.lang.php' => 'b8c978333ab7c014af868a3e83700eec', @@ -4249,9 +4249,9 @@ $md5_string = array ( './modules/Versions/index.html' => '688140bad753b22c15c42bf343d0f39f', './modules/Versions/ExpectedVersions.php' => 'a930bc1b1952454c6f97eac8c6cf19e0', './modules/EmailMan/EmailManDelivery.php' => 'dc5f470646a07fab014257b71085d1e1', - './modules/EmailMan/tpls/config.tpl' => 'e56ef47eae7c4a111a2fd5fd153ca0b0', + './modules/EmailMan/tpls/config.tpl' => 'f317b2e0f2c8e336ad3ffef1587a51c6', './modules/EmailMan/tpls/campaignconfig.tpl' => '7480ca4f1b481496f77d70ba348da27b', - './modules/EmailMan/EmailMan.php' => '3d2a83cd084227601a2b03581e719f17', + './modules/EmailMan/EmailMan.php' => 'e37bb37371aaa25746f255ff58e5a953', './modules/EmailMan/Menu.php' => '0f61581cebd90cd06095a9cf0ee047b7', './modules/EmailMan/vardefs.php' => 'be13b5c833013ca35385f0c6a5fa0ff7', './modules/EmailMan/views/view.campaignconfig.php' => '80e5f128173d2f933a89d120c255c1c9', @@ -4273,7 +4273,7 @@ $md5_string = array ( './modules/Users/DetailView.js' => '6e18e1757ae6e7b4c3eb84c613a21e34', './modules/Users/PasswordRequirementBox.js' => 'e5f1c675867c6a9a6392a16fc4eb0f68', './modules/Users/User.js' => 'c2485a29a064d001eea9d04c9ebe490f', - './modules/Users/UserEditView.js' => '808708b7e638aa1dc42dbed7662fd625', + './modules/Users/UserEditView.js' => 'e4ba67786233d6e9dd7fd5964dd1d47a', './modules/Users/UserViewHelper.php' => 'd0f4254fea2da580081b80528c0e5f98', './modules/Users/Error.php' => '1eb611fec9972b8cfcab430cb0dcd42f', './modules/Users/Save.php' => '662f8d84b1c460223b99c74e9e3ac9ef', @@ -4305,11 +4305,11 @@ $md5_string = array ( './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/response.php' => 'fe50684dde6449668ec090969855ed59', './modules/Users/authentication/SAMLAuthenticate/index.php' => 'c576340598c48831d9f63bd10a650bf7', './modules/Users/authentication/AuthenticationController.php' => 'c1e0fa8c48500833620965b6a126144e', - './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php' => 'f9e66525822856c7febc5f3a5a38d63b', + './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php' => 'b124f77831a3c9c1e6b4c88df74e9791', './modules/Users/authentication/LDAPAuthenticate/LDAPConfigs/default.php' => '35b840464b0f18d1b3353184d3c02f0c', './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticate.php' => '6c1ed6d78d1f828d841f51c6328bfa80', './modules/Users/login.css' => '16bbc155311f2cc183677a5cf2805301', - './modules/Users/reassignUserRecords.php' => '0c393338ca58f80d10c9772ed8974ae9', + './modules/Users/reassignUserRecords.php' => '523c8e69047933e051b13a82698682d1', './modules/Users/views/view.quickedit.php' => 'c7a0cc5f9e269df6ba2aa8a1f81de971', './modules/Users/views/view.wizard.php' => 'be0f6e472dfeea5ef9c23e03631efab6', './modules/Users/views/view.list.php' => 'dc89714c25d94be09a62f13f0580bec6', @@ -4317,7 +4317,7 @@ $md5_string = array ( './modules/Users/views/view.detail.php' => '5a79a0bed6a7e1066b8dd2d0c183c7ff', './modules/Users/controller.php' => '0feea87ffe98d3254d02c15346518a2a', './modules/Users/SaveSignature.php' => '0dc93f44171b3a7ff29d363820f4ead7', - './modules/Users/User.php' => 'b48bc5033d087673ddf3c86d60dce820', + './modules/Users/User.php' => 'b0834205699ddb053f78eb94607c31de', './modules/Users/login.tpl' => '04ab214e72811e566efb5fddb3f7dc20', './modules/Users/LoggedOut.tpl' => '61fb28e18a396a2b4e7f7b73edf610d2', './modules/Users/SaveTimezone.php' => 'da6ea699f04af08645fb90561985da4f', @@ -4426,7 +4426,7 @@ $md5_string = array ( './modules/Studio/wizards/RenameModules.tpl' => '478a48907c033285f9954539c9310399', './modules/Studio/wizards/StudioWizard.php' => '03dbcf41408c8e5dc73eb9f83e0826f2', './modules/Studio/wizards/EditDropDownWizard.php' => '11e9f49a21603f55dbe126aa237bdb55', - './modules/Studio/wizards/RenameModules.php' => 'bc26bd9450e558ecd60114c203f6f289', + './modules/Studio/wizards/RenameModules.php' => 'e18221fcb25464a8739b32431daac662', './modules/Studio/Forms.php' => '12d0ef30d33694309c8923be5e114e8a', './modules/UpgradeWizard/upgradeWizard.js' => 'c948078cf3cdba14f349066ec7bfa8cd', './modules/UpgradeWizard/deleteCache.php' => '0e333fed04c28d8952fd71d173049bf4', @@ -4493,7 +4493,7 @@ $md5_string = array ( './modules/Calls/CallFormBase.php' => '0d1267e6eb4266afb39c36a6a55c3d24', './modules/Calls/views/view.list.php' => 'd29bcbfa22fa2929927d8186a41f1498', './modules/Calls/views/view.edit.php' => '49b18e0274b5bc0fd0609bc8ebc7749b', - './modules/Calls/Call.php' => '59fbfd78d17d4029575dd72d74214cb0', + './modules/Calls/Call.php' => 'b5b74a2c234b4c8ae4f6bea32c565138', './modules/Calls/field_arrays.php' => '78cdca4a4633cec31eb3ab1ead4a57ef', './modules/Calls/SubPanelViewInvitees.php' => '7e79695bec3006266d99fa32cc664c7e', './modules/Calls/metadata/searchdefs.php' => '2a03354f08467b02f54285b34a09bd91', @@ -4577,18 +4577,18 @@ $md5_string = array ( './modules/MailMerge/Menu.php' => '86fc5dbc263bde17ea4960d79c3eab35', './modules/MailMerge/Step3.php' => '2355dddb460e99aeaa01d90af82b66ae', './modules/MailMerge/Step1.php' => '5554d58cd8394ad943f62214d7f82830', - './modules/MailMerge/Step1.html' => 'e43336ab42d181f6aae8a797418e7769', + './modules/MailMerge/Step1.html' => '45a99482130995bea21e00d499de5a80', './modules/MailMerge/Step5.php' => '29e3dc7238e61030a0661963531252c6', './modules/MailMerge/controller.php' => 'd613a6727419caa786a7c2e4beae085e', './modules/MailMerge/EditView.php' => '487ae1733a3d0912231bcfda0a952dab', './modules/MailMerge/Step4.html' => '2021eee351b1ae71df1a92b0724303e3', - './modules/MailMerge/Step2.html' => '370f2e7b5f97edcc32ec9ecfb9315773', + './modules/MailMerge/Step2.html' => '633251f9b69bb4baf6b8f22e6c252351', './modules/MailMerge/DetailView.php' => '378f9056a7d109098f9499a4e2ea828f', - './modules/MailMerge/Step3.html' => '12c05ec43ec58d9c64164e81641f9fc3', + './modules/MailMerge/Step3.html' => '8c366646a8b1ef1607eb088fc8ad84ec', './modules/MailMerge/modules_array.php' => '1e1247a4d6b7e12b7a5380e856796d78', './modules/MailMerge/Step2.php' => '0335df4ea07421b301f88a1a7c5c95d7', './modules/MailMerge/index.php' => 'b1cbcad722c6a7044097206bf0d91c4f', - './modules/MailMerge/language/en_us.lang.php' => '49ebfe2208b1096ac8c30e556d823f16', + './modules/MailMerge/language/en_us.lang.php' => '2b00842c37c9c345c945a57cdd50fb9f', './modules/MailMerge/Step4.php' => '0e0eb598d6373f7c748630c7fe00eb3e', './modules/MailMerge/Merge.html' => '4a2bfd48687f2ae7eba5f504dd9e3753', './modules/MailMerge/MailMerge.php' => '4d91feba54409995131889ff01b96b4d', @@ -4604,7 +4604,7 @@ $md5_string = array ( './modules/Accounts/views/view.edit.php' => 'c218fadfcf03615ffabbe122bc68fd85', './modules/Accounts/views/view.detail.php' => '4285c8a454f12fb9790fa3a97bce8d21', './modules/Accounts/field_arrays.php' => 'ff94a2454b5dec219fae92c743c8a590', - './modules/Accounts/Account.php' => '12bc4e0939d382b6cc4d3fcf5dafaf8c', + './modules/Accounts/Account.php' => '79a4968bd02fb4aae7e569de7199df1b', './modules/Accounts/ShowDuplicates.php' => '6eb62df94c2d1328c33d3faec8dd116a', './modules/Accounts/metadata/searchdefs.php' => 'd220a2b9ef4a377825675e0f3db3d820', './modules/Accounts/metadata/fieldGroups.php' => '385d62115fd9616fda262306689c4d85', @@ -4655,7 +4655,7 @@ $md5_string = array ( './modules/Campaigns/tpls/WizardCampaignTracker.tpl' => 'aa185e8e96c6f45279aa0c213256d465', './modules/Campaigns/tpls/WizardNewsletter.tpl' => 'd61ab8585cd4187a3c4f46e2bf0e15c9', './modules/Campaigns/tpls/WizardCampaignTargetListForNonNewsLetter.tpl' => '0a26b10b313e0ba2c1885663ec03fb05', - './modules/Campaigns/tpls/campaign-inactive.tpl' => 'd054a4a9935c6e506c78752f0f6e21f8', + './modules/Campaigns/tpls/campaign-inactive.tpl' => 'a1bc096f12f6b06f3ea39b380bd9e515', './modules/Campaigns/tpls/WizardCampaignTargetList.tpl' => 'a19490bc9ed1046165c6b2064290f298', './modules/Campaigns/Campaign.php' => '942223e62e4d7554b7cfd93b06f5e324', './modules/Campaigns/Menu.php' => 'fc977cc551437041a1b7080cfcce744b', @@ -4679,10 +4679,10 @@ $md5_string = array ( './modules/Campaigns/views/view.classic.php' => 'e865b32c9a9bfde75b606f16c323c3b2', './modules/Campaigns/views/view.detail.php' => '29700715b21df1d64942110430315d71', './modules/Campaigns/controller.php' => '0aa40c79fb79b387c54656680705b964', - './modules/Campaigns/QueueCampaign.php' => 'fd9bc29f6435e96e51172e1f69c79030', + './modules/Campaigns/QueueCampaign.php' => 'b249d7d1d0ae3abc49a424ec9ea27e9d', './modules/Campaigns/WebToLeadDownloadForm.html' => '3b29b1928f78c1d8e87db9082a9b4daa', './modules/Campaigns/field_arrays.php' => 'f5c21f33185fe07de1a26951e37d19d7', - './modules/Campaigns/Schedule.php' => 'f2df40dc0f49813d6f9b06acaffabbbf', + './modules/Campaigns/Schedule.php' => '4d3f81bbad566f001ae2760b9a22442d', './modules/Campaigns/action_file_map.php' => 'c4df1c0e264cd3c1fbd8a8a0191c910b', './modules/Campaigns/PopupCampaignRoi.html' => 'bc4a550fcbc2af148064dee58e15447a', './modules/Campaigns/CampaignDiagnostic.html' => 'd5cf83a22286c271f04576661645d302', @@ -4707,14 +4707,14 @@ $md5_string = array ( './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl' => '33c5b81daa7534db96e94d47718ddb5f', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php' => '1dcc45f2ef35ab0821e02537d05ea309', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => '139ce68fd59bd063b918be9dd45d1de7', - './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php' => '662babd4c2707e2a012ed1fa772520a3', + './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php' => '319e4548f611e3e1d4b8d0323c7a639a', './modules/Campaigns/Popup_picker.html' => '2c558d222c2d7867601db072875ec26f', './modules/Campaigns/RemoveMe.php' => 'e9940955dcf1b1f23c94b4dee51d43bd', './modules/Campaigns/CampaignDiagnostic.php' => '8b5491d57ffa7089846202110954fe85', './modules/Campaigns/WebToLeadCapture.php' => '788da32605c6e36343c9b79de04b470e', './modules/Campaigns/WebToLeadCreation.html' => 'd82824520586213d642303c3bc1b92d9', './modules/Campaigns/Popup_picker.php' => 'ef57809a77e655ed96121a01bc05bff4', - './modules/Campaigns/language/en_us.lang.php' => '29618e113d045369804cc3378fa5dede', + './modules/Campaigns/language/en_us.lang.php' => '8bccf0f69fd58c3043d167c7d3f6cb8e', './modules/Campaigns/ProcessBouncedEmails.php' => 'd90ea85b7c89c08d7433c72ed9273305', './modules/Campaigns/MailMerge.php' => 'd782b79c03602b02c0beda1260acb011', './modules/Campaigns/TrackDetailView.tpl' => '20bf286a1767e29d9e752442c98df639', @@ -4739,7 +4739,7 @@ $md5_string = array ( './modules/Employees/metadata/listviewdefs.php' => 'b181beb17cc10c10fe8df7c71245e288', './modules/Employees/metadata/studio.php' => '9cd17066a8a9484dc1055cf396a31281', './modules/Employees/metadata/detailviewdefs.php' => '27acc1920b7f8cc3f19726dfff6aeee6', - './modules/Employees/Employee.php' => 'dae412a177f08bc969d6d06ecc84b015', + './modules/Employees/Employee.php' => '75b408272d9310e53542af38195869de', './modules/Employees/Popup_picker.html' => '27fb7bf9b6c5e4236a1a50d39ab934bc', './modules/Employees/EmployeesStudioModule.php' => '169c34e708b9bc61fcb60e1123eb09a0', './modules/Employees/Popup_picker.php' => 'b49067cba7c969455b64ae209c345c63', @@ -4758,11 +4758,11 @@ $md5_string = array ( './modules/Activities/EmailReminder.php' => '5a3e969af54d79890e09ba86672de4b2', './modules/Activities/metadata/subpaneldefs.php' => 'e624875c0277178a9f18edaa32ed3467', './modules/Activities/Popup_picker.html' => '8844035c5e6e94a3dd751a3db16dee82', - './modules/Activities/SubPanelViewContacts.html' => '90cc37537bd84dd2aa93b9100985a82f', + './modules/Activities/SubPanelViewContacts.html' => 'c3445933286d77d4d78722077cee194a', './modules/Activities/Popup_picker.php' => '4b4846de196d8c749f942ed281dd5f32', - './modules/Activities/language/en_us.lang.php' => '6ec67f36fbdee851d4df7b2bad96f8d7', + './modules/Activities/language/en_us.lang.php' => '03ffa6e2f455e84b4a1ed1986dd20dc1', './modules/Activities/Forms.php' => 'dfc38ea6d73d341004972e1521b54a96', - './modules/Activities/SubPanelView.html' => '3a6e9bbdb7b5ccf9b92f61b87a05723c', + './modules/Activities/SubPanelView.html' => '5b547ea9f9bf785319d83d630b04f75d', './modules/Trackers/config.php' => '79c05b8640d2a31d2a49923f5cbcc87f', './modules/Trackers/vardefs.php' => 'b7744cbc338b4f43e5712ee1aff7562a', './modules/Trackers/Tracker.php' => '46158749063c7d887bb2146e926cd64c', @@ -4862,7 +4862,7 @@ $md5_string = array ( './modules/Contacts/metadata/studio.php' => '1b06ac3676acfcb82fe54dd24ca8acf0', './modules/Contacts/metadata/detailviewdefs.php' => 'b049d6751df0d3a04570974c224e51cb', './modules/Contacts/MailMergePicker.html' => 'e9a260a3492e11eb443e1576f2e83d71', - './modules/Contacts/Contact.php' => '575392f33dd91506360c252ab9c78333', + './modules/Contacts/Contact.php' => '745cee97eba74f33fe3b83eb08ee8a2c', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php' => 'bd84338f0b1ec004574ccfc7b7c21ba4', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.php' => '2e4677150339ce979003d5a1cf4e29ff', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php' => '751db4dc81b422c5915a2ec2bf04bc51', @@ -4917,7 +4917,7 @@ $md5_string = array ( './modules/Import/ImportDuplicateCheck.php' => '6e2cb33e2ea1a80bf2bedeab6338e5b9', './modules/Import/ImportFieldSanitize.php' => '468862d9509d2ac1d917ebb9e49dcc83', './modules/Import/Importer.php' => '900dfb64a8c79a9d5f49ae21d255efe6', - './modules/Import/views/view.dupcheck.php' => 'af5b6f1ffd42594def16ee695d721303', + './modules/Import/views/view.dupcheck.php' => 'd1588b852edde80df43eadce33d14281', './modules/Import/views/view.confirm.php' => 'cd33fa7607ff42d4806c96581f9d5b9b', './modules/Import/views/view.step2.php' => '96f70a8f4dc944989362a3bb3cdac223', './modules/Import/views/ImportListView.php' => '270bac20f35896e1e15d8c3164b3835d', @@ -4949,7 +4949,7 @@ $md5_string = array ( './modules/DocumentRevisions/Menu.php' => '4f0a44b44afe851ec231bab60e487105', './modules/DocumentRevisions/vardefs.php' => '9e1f8040172eba2d599466ab0c40766a', './modules/DocumentRevisions/field_arrays.php' => 'f2822471f77fb4b3c49b65e90d824c2b', - './modules/DocumentRevisions/DocumentRevision.php' => '8a92ac8cd629cefa96f73879cbce566e', + './modules/DocumentRevisions/DocumentRevision.php' => 'fffac7e37f052b00e8ba2324662b4a1f', './modules/DocumentRevisions/metadata/editviewdefs.php' => '7d676a44cd6d6d5ddb454a0f3fb5ad63', './modules/DocumentRevisions/metadata/subpanels/default.php' => '7ea0ef3f336aa6ce810cdc8648c3d986', './modules/DocumentRevisions/metadata/detailviewdefs.php' => 'd023761326d24fc4ff7604b1b5d783d7', @@ -5004,7 +5004,7 @@ $md5_string = array ( './modules/Meetings/Menu.php' => 'c545665ddf52f3dd8603fe2515991e7f', './modules/Meetings/vardefs.php' => '0dfa48faff441555111686838f50f14c', './modules/Meetings/JoinExternalMeeting.php' => '031ad4a6f50c52416b17e32706d0b2a2', - './modules/Meetings/Meeting.php' => 'd831d7659809ff945f166027cab90213', + './modules/Meetings/Meeting.php' => '26367177142ba5ab8dc8690fd3887737', './modules/Meetings/views/view.listbytype.php' => '7d3ca746cfe19c705459af1829e2292e', './modules/Meetings/views/view.list.php' => '180939eeb10e830e4d6415304f6e0518', './modules/Meetings/views/view.edit.php' => '159eba26bf81f0ff7eab21b9e6670315', @@ -5037,7 +5037,7 @@ $md5_string = array ( './modules/Administration/Locale.php' => '5a2df4f22dda49705132156f052be21a', './modules/Administration/repairDatabase.php' => 'c3be1e1ee71060f97c447ddcdd1b6dfc', './modules/Administration/RepairFieldCasing.php' => '9b7c16a90e8b18b1f20ba99a7034b1db', - './modules/Administration/PasswordManager.tpl' => '569849dbf43fb3b7a7511366d29580c5', + './modules/Administration/PasswordManager.tpl' => '1fd9d710af28a92349f47e0f1cd2a38f', './modules/Administration/repairSelectModule.php' => '0ae031310cd02806b07de954672b8bd0', './modules/Administration/UpgradeWizard_prepare.php' => '4473057bf23ddc6bde82ee74b513f48d', './modules/Administration/QuickRepairAndRebuild.php' => 'eb44553463e1171cedb778806b7b077e', @@ -5104,10 +5104,10 @@ $md5_string = array ( './modules/Administration/updateclass.php' => '7d940bf4d2c8e8cb32e37bf685dc8d3e', './modules/Administration/index.php' => 'a0dd76b4f71471625c718181150bf6c6', './modules/Administration/SupportPortal.tpl' => '681fdcc6d2767c98632c15278acd22da', - './modules/Administration/PasswordManager.php' => '2447a25b8e9da840f4f0f531c8af89d5', + './modules/Administration/PasswordManager.php' => 'f2751751749321a063aa24d38ce24c2f', './modules/Administration/Locale.tpl' => 'e922cc662c1df97d13bc8e62e3333e20', './modules/Administration/RebuildExpressionPlugins.php' => '0a36201d0496d43b09aba4f50a4ccdac', - './modules/Administration/language/en_us.lang.php' => '5cb9e1754aef5414adc5801790eea38d', + './modules/Administration/language/en_us.lang.php' => '7eed43d63057166f81b121886a0099cd', './modules/Administration/UpgradeHistory.php' => '32542b41029818c2ad89053c7d6dfaad', './modules/Administration/upgrade_custom_relationships.php' => '49cd673c257d91d5e7d6d38f05139dd9', './modules/Administration/ImportCustomFieldStructure.php' => 'ae698c924ae4f2ba29d6198746ca0977', @@ -5205,7 +5205,7 @@ $md5_string = array ( './modules/Prospects/metadata/detailviewdefs.php' => 'acf8f7ceb1f386420cca540d5949b961', './modules/Prospects/Popup_picker.html' => 'b80a372c66dde91dd4aa5ec520ac503b', './modules/Prospects/language/en_us.lang.php' => 'f4e19a795d701fea7bf48a7f9a27e48e', - './modules/Prospects/Prospect.php' => 'dd160428d832022861e70de38b3cfa74', + './modules/Prospects/Prospect.php' => '229aeb9d72a0e371340961ce408cf568', './modules/Prospects/Import.php' => 'b24768d7ffc92ea67503284939554adb', './modules/Home/about.js' => '3919d61c35a340efac9087fede5743de', './modules/Home/tour.js' => '5a2eeb4c938f8a290170228f9561fe07', @@ -5213,7 +5213,7 @@ $md5_string = array ( './modules/Home/Home.html' => 'f789126371ac084ea2f781b2eea451ae', './modules/Home/tour.tpl' => '1a606eb93b2472f8233f0b7a1cb507a5', './modules/Home/SubpanelEdits.php' => '8003a398dbdc2a525989f49e12559cf8', - './modules/Home/QuickSearch.php' => '2786cb6b64f5868befa1c5981f717b98', + './modules/Home/QuickSearch.php' => 'cf42e16f603d693b43275044219fe179', './modules/Home/Home.tpl' => '4fbc5fb55b88c4606a197845e1a373dc', './modules/Home/Menu.php' => '200a35ab153fa3a07a09bff501806791', './modules/Home/sitemap.tpl' => '7a6cda6c9e13b72f54ce13528a775047', @@ -5223,13 +5223,13 @@ $md5_string = array ( './modules/Home/views/view.modulelistmenu.php' => '7ded5c69eb2f0ca1d3fabbdd48558724', './modules/Home/SubpanelCreates.php' => '79c5b5e303bc2c0b0d3175fda1c540bd', './modules/Home/PopupSugar.php' => '260363a8b5f91771989ec689f6a17ef7', - './modules/Home/About.php' => 'a892722d6c3fb20650e336b6d4a500eb', + './modules/Home/About.php' => 'bb57d18391000bf5f98d9a2e1d0dc861', './modules/Home/UnifiedSearch.php' => '7835685ee31e0f1c764b92d3b914884c', './modules/Home/DynamicAction.php' => '1fc76db09da39b51eb26d7e50985e8a0', './modules/Home/UnifiedSearchAdvanced.tpl' => '5ace9d3df8a137025cb8305ec70d2691', './modules/Home/action_view_map.php' => '0df3bbc778c6dacd04a188b9df3078c5', './modules/Home/TrainingPortal.tpl' => 'cb5f3edf0ee2ec12328af0aa0fb564d8', - './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => '270d4cf938da900fec10eec2acd1a000', + './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => 'd656e8db5cbbd59d340364714612e32c', './modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl' => 'c3284ffafbe6c2676636e390abc90bc7', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => '0cbef92ff95eb5761e8e04a936ddac3d', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.meta.php' => 'f0cbbba3e293756e474b487b45dbcc99', @@ -5264,7 +5264,7 @@ $md5_string = array ( './modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl' => '66bb697583e1f5c36c2258d2d45dfbd7', './modules/Home/dashlets.php' => '4d60591fdf4c2fb2aad780c1770940a0', './modules/Home/index.php' => 'c12a9b5dea8415166c887b94b57277dc', - './modules/Home/language/en_us.lang.php' => '4adf541a555d2594f1eb0c937ce81df6', + './modules/Home/language/en_us.lang.php' => 'a9b8421b9e3e0a40316ea7aa76927897', './modules/Home/SaveSubpanelLayout.php' => '1e8830cbb0ef9cabf80fc2e4b66645a2', './modules/Home/UnifiedSearchAdvancedForm.tpl' => 'c8e060e0d120e52a80cdd60cbe08967e', './modules/Home/UnifiedSearchAdvanced.php' => 'c85e625c7e42df65ce61edd8653aef1d', @@ -5276,14 +5276,14 @@ $md5_string = array ( './modules/Home/TrainingPortal.php' => '8f0c1226166a7a5d6935d09e874812a1', './cache/include/javascript/sugar_grp_jsolait.js' => 'bf76c7f2a747c29058fdd36ffc8bf69e', './cache/include/javascript/sugar_grp_quickcomp.js' => 'f44849492cb1684a8769f4050e496fa0', - './cache/include/javascript/sugar_grp_emails.js' => 'b2fe210ba147dab53267c88d4dbc8a76', + './cache/include/javascript/sugar_grp_emails.js' => '2f2c16ed14121d070691ac6ddfed7206', './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' => 'c334f9e1ce11855d3e6298be9d7a4b84', + './cache/include/javascript/sugar_grp1_yui.js' => 'c0fb7b39843ce10112da766a5c3fcdbd', './cache/include/javascript/sugar_field_grp.js' => '339b3b1d92f554dbac7fad410360c8f1', './cache/include/javascript/sugar_grp1_jquery.js' => '9c164fdc669d8af0c3e11559154a214c', - './cache/include/javascript/sugar_grp1.js' => '4e44e19382ca8cbeaefbc83910bc0c7f', + './cache/include/javascript/sugar_grp1.js' => 'e3cfdc5083a5daf9755b34219257ee12', './cache/layout/index.html' => '9cd784063d39b18d308932c28c385853', './cache/images/index.html' => '9cd784063d39b18d308932c28c385853', './cache/xml/index.html' => '9cd784063d39b18d308932c28c385853', @@ -5354,7 +5354,7 @@ $md5_string = array ( './metadata/prospect_lists_prospectsMetaData.php' => '7e3faa998b4fab3e2235775744413cc9', './metadata/inboundEmail_autoreplyMetaData.php' => 'a48873b7d72942a2ce8c75519e210ebd', './metadata/acl_roles_actionsMetaData.php' => '4d6ecdbf5b06104a468ec955616121e3', - './sugar_version.php' => '61da0cc567ce37ced40e4c9e9b38803f', + './sugar_version.php' => '9fdb5e816c50f7c674f1b4ec0e2c5fef', './cron.php' => '06bf0cf2c00fb23553772c1db40c1a73', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './TreeData.php' => '261ed723f457b1fabd1c33ae230120e4', @@ -6643,7 +6643,7 @@ $md5_string = array ( './jssource/src_files/modules/Users/DetailView.js' => 'b791d76a8b6eaa7f454a4a47575ee483', './jssource/src_files/modules/Users/PasswordRequirementBox.js' => '0765b5cf060c6a8f54f901d1c84b01f2', './jssource/src_files/modules/Users/User.js' => '018fe38ec0054a587b4eb83725ed9abf', - './jssource/src_files/modules/Users/UserEditView.js' => 'f8b11074eb0f28212251a2c4869b174b', + './jssource/src_files/modules/Users/UserEditView.js' => '66b3dc9af96eb5c2f198a93362473eeb', './jssource/src_files/modules/ProjectTask/ProjectTask.js' => '91c4557a4b21ecb04f23ef341e07334b', './jssource/src_files/modules/InboundEmail/InboundEmail.js' => 'a93eb2a08d16ea2e3ac28311f2668b9b', './jssource/src_files/modules/EAPM/EAPMEdit.js' => '634ef9f3449f30c3379b6e5f60d8ccbe', @@ -6656,7 +6656,7 @@ $md5_string = array ( './jssource/src_files/service/utils/SugarRest.js' => '2a1b1d1c37e7099d8fcca3d6ca2d25b6', './jssource/src_files/include/MySugar/javascript/MySugar.js' => 'ad7106e3708be29aea9d329d25de5706', './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '8eae5539fd2f1b910ed5406c326e8a12', - './jssource/src_files/include/javascript/ajaxUI.js' => '2ff525e880a9b3cab3cf289a68f33698', + './jssource/src_files/include/javascript/ajaxUI.js' => 'a7966ff79d22ff0c0a152ab6c834fa0a', './jssource/src_files/include/javascript/calendar.js' => 'fcc1123b5f1b867c26439d86bc95a8f8', './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', './jssource/src_files/include/javascript/include.js' => 'b120bd1c521be781c2dee60e719fb15d', @@ -7427,12 +7427,12 @@ $md5_string = array ( './jssource/src_files/include/javascript/phpjs/html_entity_decode.js' => '022ed687a9c7c55a21b4a2aaa848921d', './jssource/src_files/include/javascript/phpjs/license.js' => '8d1e879645acd34b64c2270879203213', './jssource/src_files/include/javascript/phpjs/htmlentities.js' => 'a4369a51c1d8d1670f78b68c28330424', - './jssource/src_files/include/javascript/report_additionals.js' => '136e21a3dc65730f16be39e49e04284c', - './jssource/src_files/include/javascript/quicksearch.js' => '42fae39d97ad0de74d532e850bbb0cf1', + './jssource/src_files/include/javascript/report_additionals.js' => 'e8510477a9e00102c31b697473384652', + './jssource/src_files/include/javascript/quicksearch.js' => 'd3c046c6921e4cbc35a895ee9f879e48', './jssource/src_files/include/javascript/sugar_yui_overrides.js' => '0de3b58c8897f035f1f577234f9f8c57', './jssource/src_files/include/javascript/cookie.js' => '98c35f5fdf24e9af504b83f99560f610', './jssource/src_files/include/javascript/popup_parent_helper.js' => '9ab9a2b26a22cdd4ead193b54e223063', - './jssource/src_files/include/javascript/sugar_3.js' => 'fbcc4f90b9637e45ef076a8ba9eb95b3', + './jssource/src_files/include/javascript/sugar_3.js' => '9557984f3358657b3711c75bccc4e901', './jssource/src_files/include/javascript/jquery.js' => '219073097031d9c1a95a1291d66f3a10', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => 'a4b04fb7d5aabfd45de233ce4ba7459d', './jssource/src_files/include/javascript/jsclass_async.js' => 'da4b79bcd6fcc9eb3bb1c694707d9e09', @@ -7504,7 +7504,7 @@ $md5_string = array ( './install/installHelp.php' => 'f0e5963ab3fe8f571287c7d84569dbe6', './install/dbConfig_a.php' => 'b24d52b48eb7cec8f390fcd1adf99560', './install/confirmSettings.php' => '175abac3086d4fa68e9853fd74af34ea', - './install/checkDBSettings.php' => '704eef09120d4bf8f46418270e2b4039', + './install/checkDBSettings.php' => 'a11906499f554518a01f1cf9ea5c9456', './install/installSystemCheck.php' => '236bc69ca153ce7aba1a872d26326c4a', './install/register.php' => '52f73d3313d3bb3e8108f43ed2d3d44d', './install/TeamDemoData.php' => '05f380071c5c1170d3b0c5ff6ac27da6', @@ -7520,7 +7520,7 @@ $md5_string = array ( './install.php' => '306206a8fb3c31df5ddc127228518b2c', './soap/SoapDeprecated.php' => '86f3389296647c7ef722e02c48b610aa', './soap/SoapError.php' => '07510ab768a147717e69512ec92d183e', - './soap/SoapHelperFunctions.php' => 'ef75a267affcce43062013e94b2949e8', + './soap/SoapHelperFunctions.php' => '3495757d1de85f705593ae5a71d2a11b', './soap/SoapPortalHelper.php' => 'a49b70deba464a81beaccdccb70e336e', './soap/SoapSugarUsers.php' => '6a65ae67130d4c8d2a389e35ac2c15c1', './soap/SoapStudio.php' => 'a526d5ff3a9c0f32b1c37a909c4c52e1', diff --git a/include/Dashlets/DashletGeneric.php b/include/Dashlets/DashletGeneric.php index 7fa56fbc..158edea5 100644 --- a/include/Dashlets/DashletGeneric.php +++ b/include/Dashlets/DashletGeneric.php @@ -284,7 +284,7 @@ class DashletGeneric extends Dashlet { $widgetClass = $this->layoutManager->getClassFromWidgetDef($widgetDef, true); $widgetDef['table'] = $this->seedBean->table_name; $widgetDef['table_alias'] = $this->seedBean->table_name; - if(!empty($widgetDef['source']) && $widgetDef['source'] == 'custom_fields'){ + if(!empty($widgetDef['source']) && $widgetDef['source'] == 'custom_fields') { $widgetDef['table'] = $this->seedBean->table_name."_cstm"; $widgetDef['table_alias'] = $widgetDef['table']; } @@ -308,6 +308,12 @@ class DashletGeneric extends Dashlet { $widgetDef['column_key'] = $name; } // No break here, we want to run through the default handler + case 'relate': + if (isset($widgetDef['link']) && $this->seedBean->load_relationship($widgetDef['link'])) { + $widgetDef['module'] = $this->seedBean->$widgetDef['link']->focus->module_name; + $widgetDef['link'] = $this->seedBean->$widgetDef['link']->getRelationshipObject()->name; + } + // No break - run through the default handler default: $widgetDef['input_name0'] = $params; if(is_array($params) && !empty($params)) { // handle array query diff --git a/include/ListView/ListView.php b/include/ListView/ListView.php index f95c18d6..c63150f4 100644 --- a/include/ListView/ListView.php +++ b/include/ListView/ListView.php @@ -379,7 +379,17 @@ function process_dynamic_listview($source_module, $sugarbean,$subpanel_def) $list_field['linked_field_set']=$linked_field_set; $usage = empty($list_field['usage']) ? '' : $list_field['usage']; - if($usage != 'query_only') + if($usage == 'query_only' && !empty($list_field['force_query_only_display'])){ + //if you are here you have column that is query only but needs to be displayed as blank. This is helpful + //for collections such as Activities where you have a field in only one object and wish to show it in the subpanel list + $count++; + $widget_contents = ' '; + $this->xTemplate->assign('CLASS', ""); + $this->xTemplate->assign('CELL_COUNT', $count); + $this->xTemplate->assign('CELL', $widget_contents); + $this->xTemplate->parse($xtemplateSection.".row.cell"); + + }else if($usage != 'query_only') { $list_field['name']=$field_name; @@ -1044,7 +1054,7 @@ function getUserVariable($localVarName, $varName) { $response =& $this->response; echo 'cached'; }else{ - $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1,-1,$this->query_limit,$subpanel_def); + $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, $this->records_per_page,$this->query_limit,$subpanel_def); $this->response =& $response; } $list = $response['list']; @@ -1398,7 +1408,7 @@ $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'bor if(!empty($this->response)){ $response =& $this->response; }else{ - $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1,-1,$this->query_limit,$subpanel_def); + $response = SugarBean::get_union_related_list($sugarbean,$this->sortby, $this->sort_order, $this->query_where, $current_offset, -1, $this->records_per_page,$this->query_limit,$subpanel_def); $this->response = $response; } //if query is present, then pass it in as parameter @@ -1703,7 +1713,7 @@ $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'bor foreach($subpanel_def->get_list_fields() as $column_name=>$widget_args) { $usage = empty($widget_args['usage']) ? '' : $widget_args['usage']; - if($usage != 'query_only') + if($usage != 'query_only' || !empty($widget_args['force_query_only_display'])) { $imgArrow = ''; diff --git a/include/Localization/Localization.php b/include/Localization/Localization.php index f8a8d768..1cb81d1d 100644 --- a/include/Localization/Localization.php +++ b/include/Localization/Localization.php @@ -389,7 +389,7 @@ class Localization { */ function translateCharsetMIME($string, $fromCharset, $toCharset='UTF-8', $encoding="Q") { $previousEncoding = mb_internal_encoding(); - mb_internal_encoding($toCharset); + mb_internal_encoding($fromCharset); $result = mb_encode_mimeheader($string, $toCharset, $encoding); mb_internal_encoding($previousEncoding); return $result; diff --git a/include/MVC/View/views/view.popup.php b/include/MVC/View/views/view.popup.php index de6bbcc1..67316af4 100644 --- a/include/MVC/View/views/view.popup.php +++ b/include/MVC/View/views/view.popup.php @@ -51,13 +51,17 @@ class ViewPopup extends SugarView{ if(isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) die("Directory navigation attack denied."); - if(!empty($_REQUEST['metadata']) && $_REQUEST['metadata'] != 'undefined' - && file_exists('modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php')) // if custom metadata is requested - require_once('modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php'); - elseif(file_exists('custom/modules/' . $this->module . '/metadata/popupdefs.php')) - require_once('custom/modules/' . $this->module . '/metadata/popupdefs.php'); - elseif(file_exists('modules/' . $this->module . '/metadata/popupdefs.php')) - require_once('modules/' . $this->module . '/metadata/popupdefs.php'); + if (!empty($_REQUEST['metadata']) && $_REQUEST['metadata'] != 'undefined' + && file_exists('custom/modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php')) { + require 'custom/modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php'; + } elseif (!empty($_REQUEST['metadata']) && $_REQUEST['metadata'] != 'undefined' + && file_exists('modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php')) { + require 'modules/' . $this->module . '/metadata/' . $_REQUEST['metadata'] . '.php'; + } elseif (file_exists('custom/modules/' . $this->module . '/metadata/popupdefs.php')) { + require 'custom/modules/' . $this->module . '/metadata/popupdefs.php'; + } elseif (file_exists('modules/' . $this->module . '/metadata/popupdefs.php')) { + require 'modules/' . $this->module . '/metadata/popupdefs.php'; + } if(!empty($popupMeta) && !empty($popupMeta['listviewdefs'])){ if(is_array($popupMeta['listviewdefs'])){ diff --git a/include/MassUpdate.php b/include/MassUpdate.php index 6a67da7d..95565dc2 100644 --- a/include/MassUpdate.php +++ b/include/MassUpdate.php @@ -975,7 +975,12 @@ EOQ; } $options = $new_options; } - $options = get_select_options_with_id_separate_key($options, $options, '', true);; + $options = get_select_options_with_id_separate_key( + $options, + $options, + '__SugarMassUpdateClearField__', + true + ); $html .= ''; }else{ $html .= $options; diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index e22e34f1..8c15404f 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -405,7 +405,10 @@ require_once('include/EditView/EditView2.php'); //53131 - add blank option for SearchField options with def 'options_add_blank' set to true if ($this->fieldDefs[$fvName]['type'] == "parent_type" || $this->fieldDefs[$fvName]['type'] == "parent" || (isset($this->searchFields[$name]['options_add_blank']) && $this->searchFields[$name]['options_add_blank']) ) { - $this->fieldDefs[$fvName]['options'] = array_merge(array(""=>""), $this->fieldDefs[$fvName]['options']); + if (!array_key_exists('', $this->fieldDefs[$fvName]['options'])) { + $this->fieldDefs[$fvName]['options'] = + array('' => '') + $this->fieldDefs[$fvName]['options']; + } } } diff --git a/include/SubPanel/SubPanel.php b/include/SubPanel/SubPanel.php index 83c7051c..5357f59d 100644 --- a/include/SubPanel/SubPanel.php +++ b/include/SubPanel/SubPanel.php @@ -184,6 +184,9 @@ class SubPanel $ListView->is_dynamic = true; $ListView->records_per_page = $sugar_config['list_max_entries_per_subpanel'] + 0; + if (isset($this->subpanel_defs->_instance_properties['records_per_page'])) { + $ListView->records_per_page = $this->subpanel_defs->_instance_properties['records_per_page'] + 0; + } $ListView->start_link_wrapper = "javascript:showSubPanel('".$this->subpanel_id."','"; $ListView->subpanel_id = $this->subpanel_id; $ListView->end_link_wrapper = "',true);"; diff --git a/include/SugarCharts/Jit/JitReports.php b/include/SugarCharts/Jit/JitReports.php index 1f6ff8c3..fb457384 100644 --- a/include/SugarCharts/Jit/JitReports.php +++ b/include/SugarCharts/Jit/JitReports.php @@ -184,7 +184,7 @@ class JitReports extends Jit { $data .= $this->tab('', 3); - if (count($this->group_by) > 1){ + if ((isset($dataset[$total]) && $total != $dataset[$total]['numerical_value']) || !array_key_exists($key, $dataset)){ $data .= $this->processReportData($dataset, 4, $first); } else if(count($this->data_set) == 1 && $first){ diff --git a/include/SugarFields/Fields/Parent/EditView.tpl b/include/SugarFields/Fields/Parent/EditView.tpl index f3f1038a..90d43e83 100644 --- a/include/SugarFields/Fields/Parent/EditView.tpl +++ b/include/SugarFields/Fields/Parent/EditView.tpl @@ -68,20 +68,9 @@ function changeParentQS(field) { field = YAHOO.util.Dom.get(field); var form = field.form; var sqsId = form.id + "_" + field.id; - if(sqs_objects[sqsId] == undefined){ - return; - } var typeField = form.elements.parent_type; var new_module = typeField.value; - if(typeof(disabledModules) != 'undefined' && typeof(disabledModules[new_module]) != 'undefined') { - sqs_objects[sqsId]["disable"] = true; - field.readOnly = true; - } else { - sqs_objects[sqsId]["disable"] = false; - field.readOnly = false; - } - //Update the SQS globals to reflect the new module choice - sqs_objects[sqsId]["modules"] = new Array(new_module); + //Update the SQS globals to reflect the new module choice if (typeof(QSFieldsArray[sqsId]) != 'undefined') { QSFieldsArray[sqsId].sqs.modules = new Array(new_module); @@ -90,6 +79,17 @@ function changeParentQS(field) { { QSProcessedFieldsArray[sqsId] = false; } + if(sqs_objects[sqsId] == undefined){ + return; + } + sqs_objects[sqsId]["modules"] = new Array(new_module); + if(typeof(disabledModules) != 'undefined' && typeof(disabledModules[new_module]) != 'undefined') { + sqs_objects[sqsId]["disable"] = true; + field.readOnly = true; + } else { + sqs_objects[sqsId]["disable"] = false; + field.readOnly = false; + } enableQS(false); }} //change this in case it wasn't the default on editing existing items. diff --git a/include/SugarObjects/templates/company/Company.php b/include/SugarObjects/templates/company/Company.php index 1ff8a1da..5fac6700 100644 --- a/include/SugarObjects/templates/company/Company.php +++ b/include/SugarObjects/templates/company/Company.php @@ -95,9 +95,15 @@ class Company extends Basic { global $system_config; global $current_user; + $temp_array = $this->get_list_view_array(); + $temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); + + $this->email1 = $temp_array['EMAIL1']; + $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); + return $temp_array; } } diff --git a/include/SugarObjects/templates/company/vardefs.php b/include/SugarObjects/templates/company/vardefs.php index 96b0955b..7668d874 100644 --- a/include/SugarObjects/templates/company/vardefs.php +++ b/include/SugarObjects/templates/company/vardefs.php @@ -322,7 +322,7 @@ $vardefs= array ( ), 'source' => 'non-db', 'studio' => array('editField' => true, 'searchview' => false), - 'full_text_search' => array('boost' => 3, 'index' => 'not_analyzed'), //bug 54567 + 'full_text_search' => array('boost' => 3, 'index' => 'whitespace'), //bug 54567 ), 'email_addresses_primary' => diff --git a/include/SugarObjects/templates/person/Person.php b/include/SugarObjects/templates/person/Person.php index 6a150ff7..411665d7 100644 --- a/include/SugarObjects/templates/person/Person.php +++ b/include/SugarObjects/templates/person/Person.php @@ -178,12 +178,19 @@ class Person extends Basic { global $system_config; global $current_user; + $this->_create_proper_name_field(); $temp_array = $this->get_list_view_array(); - $temp_array['NAME'] = $this->name; - $temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); - $this->email1 = $temp_array['EMAIL1']; - $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); + + $temp_array['NAME'] = $this->name; + $temp_array["ENCODED_NAME"] = $this->full_name; + $temp_array["FULL_NAME"] = $this->full_name; + + $temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); + + $this->email1 = $temp_array['EMAIL1']; + $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); + return $temp_array; } diff --git a/include/SugarObjects/templates/person/vardefs.php b/include/SugarObjects/templates/person/vardefs.php index 5490a514..2304b863 100644 --- a/include/SugarObjects/templates/person/vardefs.php +++ b/include/SugarObjects/templates/person/vardefs.php @@ -213,7 +213,7 @@ $vardefs =array( 'group'=>'email1', 'merge_filter' => 'enabled', 'studio' => array('editview' => true, 'editField' => true, 'searchview' => false, 'popupsearch' => false), // bug 46859 - 'full_text_search' => array('boost' => 3, 'index' => 'not_analyzed'), //bug 54567 + 'full_text_search' => array('boost' => 3, 'index' => 'whitespace'), //bug 54567 ), 'email2' => array( diff --git a/include/SugarPHPMailer.php b/include/SugarPHPMailer.php index 69a81428..4fe056a8 100644 --- a/include/SugarPHPMailer.php +++ b/include/SugarPHPMailer.php @@ -320,7 +320,9 @@ eoq; } else { $mime_type = "image/".strtolower(pathinfo($filename, PATHINFO_EXTENSION)); } - $this->AddEmbeddedImage($file_location, $cid, $filename, 'base64', $mime_type); + if (!$this->embeddedAttachmentExists($cid)) { + $this->AddEmbeddedImage($file_location, $cid, $filename, 'base64', $mime_type); + } $i++; } //replace references to cache with cid tag @@ -328,7 +330,7 @@ eoq; // remove bad img line from outbound email $this->Body = preg_replace('#]+src[^=]*=\"\/([^>]*?[^>]*)>#sim', '', $this->Body); } - + /** * @param notes array of note beans */ @@ -412,4 +414,25 @@ eoq; return parent::PreSend(); } + /** + * Checks if the embedded file is already attached. + * @access protected + * @param string $filename Name of the file to check. + * @return boolean + */ + protected function embeddedAttachmentExists($filename) + { + $result = false; + for ($i = 0; $i < count($this->attachment); $i++) + { + if ($this->attachment[$i][1] == $filename) + { + $result = true; + break; + } + } + + return $result; + } + } // end class definition diff --git a/include/TemplateHandler/TemplateHandler.php b/include/TemplateHandler/TemplateHandler.php index a8dcec9b..0bbc6cf8 100644 --- a/include/TemplateHandler/TemplateHandler.php +++ b/include/TemplateHandler/TemplateHandler.php @@ -407,7 +407,7 @@ class TemplateHandler { } else { if (!empty($field['id_name'])) - $field['id_name'] = $field['name'] . "_" . $field['id_name']; + $field['id_name'] = $module.$field['id_name']; } } $name = $qsd->form_name . '_' . $field['name']; diff --git a/include/database/MssqlManager.php b/include/database/MssqlManager.php index 084b636a..e429197d 100644 --- a/include/database/MssqlManager.php +++ b/include/database/MssqlManager.php @@ -497,23 +497,30 @@ class MssqlManager extends DBManager //for paging, AFTER the distinct clause $grpByStr = ''; $hasDistinct = strpos(strtolower($matches[0]), "distinct"); + + require_once('include/php-sql-parser.php'); + $parser = new PHPSQLParser(); + $sqlArray = $parser->parse($sql); + if ($hasDistinct) { $matches_sql = strtolower($matches[0]); //remove reference to distinct and select keywords, as we will use a group by instead //we need to use group by because we are introducing rownumber column which would make every row unique //take out the select and distinct from string so we can reuse in group by - $dist_str = ' distinct '; - $distinct_pos = strpos($matches_sql, $dist_str); - $matches_sql = substr($matches_sql,$distinct_pos+ strlen($dist_str)); + $dist_str = 'distinct'; + preg_match('/\b' . $dist_str . '\b/simU', $matches_sql, $matchesPartSQL, PREG_OFFSET_CAPTURE); + $matches_sql = trim(substr($matches_sql,$matchesPartSQL[0][1] + strlen($dist_str))); //get the position of where and from for further processing - $from_pos = strpos($matches_sql , " from "); - $where_pos = strpos($matches_sql, "where"); + preg_match('/\bfrom\b/simU', $matches_sql, $matchesPartSQL, PREG_OFFSET_CAPTURE); + $from_pos = $matchesPartSQL[0][1]; + preg_match('/\where\b/simU', $matches_sql, $matchesPartSQL, PREG_OFFSET_CAPTURE); + $where_pos = $matchesPartSQL[0][1]; //split the sql into a string before and after the from clause //we will use the columns being selected to construct the group by clause if ($from_pos>0 ) { - $distinctSQLARRAY[0] = substr($matches_sql,0, $from_pos+1); - $distinctSQLARRAY[1] = substr($matches_sql,$from_pos+1); + $distinctSQLARRAY[0] = substr($matches_sql, 0, $from_pos); + $distinctSQLARRAY[1] = substr($matches_sql, $from_pos); //get position of order by (if it exists) so we can strip it from the string $ob_pos = strpos($distinctSQLARRAY[1], "order by"); if ($ob_pos) { @@ -524,37 +531,14 @@ class MssqlManager extends DBManager $distinctSQLARRAY[1] = preg_replace('/\)\s$/',' ',$distinctSQLARRAY[1]); } - //place group by string into array - $grpByArr = explode(',', $distinctSQLARRAY[0]); - $first = true; - //remove the aliases for each group by element, sql server doesnt like these in group by. - foreach ($grpByArr as $gb) { - $gb = trim($gb); - - //clean out the extra stuff added if we are concatenating first_name and last_name together - //this way both fields are added in correctly to the group by - $gb = str_replace("isnull(","",$gb); - $gb = str_replace("'') + ' ' + ","",$gb); - - //remove outer reference if they exist - if (strpos($gb,"'")!==false){ + $grpByStr = array(); + foreach ($sqlArray['SELECT'] as $record) { + if ($record['expr_type'] == 'const') { continue; } - //if there is a space, then an alias exists, remove alias - if (strpos($gb,' ')){ - $gb = substr( $gb, 0,strpos($gb,' ')); - } - - //if resulting string is not empty then add to new group by string - if (!empty($gb)) { - if ($first) { - $grpByStr .= " $gb"; - $first = false; - } else { - $grpByStr .= ", $gb"; - } - } + $grpByStr[] = trim($record['base_expr']); } + $grpByStr = implode(', ', $grpByStr); } if (!empty($orderByMatch[3])) { @@ -563,7 +547,7 @@ class MssqlManager extends DBManager $newSQL = "SELECT TOP $count * FROM ( SELECT ROW_NUMBER() - OVER (ORDER BY " . preg_replace('/^' . ltrim($dist_str) . '/', '', $this->returnOrderBy($sql, $orderByMatch[3])) . ") AS row_number, + OVER (ORDER BY " . preg_replace('/^' . $dist_str . '\s+/', '', $this->returnOrderBy($sql, $orderByMatch[3])) . ") AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " " . $distinctSQLARRAY[1] . " group by " . $grpByStr . " @@ -580,28 +564,11 @@ class MssqlManager extends DBManager WHERE row_number > $start"; } }else{ - //bug: 22231 Records in campaigns' subpanel may not come from - //table of $_REQUEST['module']. Get it directly from query - $upperQuery = strtoupper($matches[2]); - if (!strpos($upperQuery,"JOIN")){ - $from_pos = strpos($upperQuery , "FROM") + 4; - $where_pos = strpos($upperQuery, "WHERE"); - $tablename = trim(substr($upperQuery,$from_pos, $where_pos - $from_pos)); - }else{ - // FIXME: this looks really bad. Probably source for tons of bug - // needs to be removed - $tablename = $this->getTableNameFromModuleName($_REQUEST['module'],$sql); - } - $orderBy = $tablename; - if (preg_match("/from\s+".$tablename."\s+([^\s]+)\s+(where|inner|left|join|outer|right)\s+/i", $sql, $table_alias)) - { - $orderBy = $table_alias[1]; - } //if there is a distinct clause, form query with rownumber after distinct if ($hasDistinct) { $newSQL = "SELECT TOP $count * FROM ( - SELECT ROW_NUMBER() OVER (ORDER BY ".$orderBy.".id) AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " + SELECT ROW_NUMBER() OVER (ORDER BY ".$grpByStr.") AS row_number, count(*) counter, " . $distinctSQLARRAY[0] . " " . $distinctSQLARRAY[1] . " group by " . $grpByStr . " ) @@ -611,7 +578,7 @@ class MssqlManager extends DBManager else { $newSQL = "SELECT TOP $count * FROM ( - " . $matches[1] . " ROW_NUMBER() OVER (ORDER BY ".$orderBy.".id) AS row_number, " . $matches[2] . $matches[3]. " + " . $matches[1] . " ROW_NUMBER() OVER (ORDER BY " . $sqlArray['FROM'][0]['alias'] . ".id) AS row_number, " . $matches[2] . $matches[3]. " ) AS a WHERE row_number > $start"; diff --git a/include/database/MysqlManager.php b/include/database/MysqlManager.php index 9ee0fd0f..fd0b2a1c 100644 --- a/include/database/MysqlManager.php +++ b/include/database/MysqlManager.php @@ -1044,7 +1044,7 @@ class MysqlManager extends DBManager } } if (!empty($sql)) { - $sql = "ALTER TABLE $tablename ".join(",", $sql); + $sql = "ALTER TABLE $tablename " . join(",", $sql) . ";"; if($execute) $this->query($sql); } else { diff --git a/include/formbase.php b/include/formbase.php index 96333497..7b23a24b 100644 --- a/include/formbase.php +++ b/include/formbase.php @@ -439,10 +439,8 @@ function save_from_report($report_id,$parent_id, $module_name, $relationship_att $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(); + $GLOBALS['log']->debug("Save2:Bean Name=" . $module_name); + $focus = BeanFactory::newBean($module_name); $focus->retrieve($parent_id); $focus->load_relationship($relationship_attr_name); @@ -465,9 +463,12 @@ function save_from_report($report_id,$parent_id, $module_name, $relationship_att $sql = $report->query_list[0]; $GLOBALS['log']->debug("Save2:Report Query=".$sql); $result = $report->db->query($sql); + + $reportBean = BeanFactory::newBean($saved->module); while($row = $report->db->fetchByAssoc($result)) { - $focus->$relationship_attr_name->add($row['primaryid']); + $reportBean->id = $row['primaryid']; + $focus->$relationship_attr_name->add($reportBean); } } diff --git a/include/generic/SugarWidgets/SugarWidgetFieldrelate.php b/include/generic/SugarWidgets/SugarWidgetFieldrelate.php index fd39ead9..cda44742 100644 --- a/include/generic/SugarWidgets/SugarWidgetFieldrelate.php +++ b/include/generic/SugarWidgets/SugarWidgetFieldrelate.php @@ -82,6 +82,13 @@ class SugarWidgetFieldRelate extends SugarWidgetReportField private function displayInputQuery($layout_def) { $title = $layout_def['rname']; + if (isset($layout_def['custom_module']) || isset($layout_def['ext2'])) { + $bean = BeanFactory::getBean($layout_def['module']); + $layout_def['table'] = $bean->table_name; + if (isset($bean->field_defs[$title]['db_concat_fields'])){ + $layout_def['db_concat_fields'] = $bean->field_defs[$title]['db_concat_fields']; + } + } if (isset($layout_def['db_concat_fields'])) { $title = $this->reporter->db->concat($layout_def['table'], $layout_def['db_concat_fields']); } @@ -135,23 +142,25 @@ class SugarWidgetFieldRelate extends SugarWidgetReportField public function queryFilterone_of($layout_def, $rename_columns = true) { $ids = array(); - - $relation = new Relationship(); - $relation->retrieve_by_name($layout_def['link']); - - global $beanList; - $beanClass = $beanList[$relation->lhs_module]; - $seed = new $beanClass(); + if (isset($layout_def['link'])) { + $relation = new Relationship(); + $relation->retrieve_by_name($layout_def['link']); + } + $module = isset($layout_def['custom_module']) ? $layout_def['custom_module'] : $layout_def['module']; + $seed = BeanFactory::getBean($module); foreach($layout_def['input_name0'] as $beanId) { - $seed->retrieve($beanId); - - $link = new Link2($layout_def['link'], $seed); - $sql = $link->getQuery(); + if (!empty($relation->lhs_module) && !empty($relation->rhs_module) + && $relation->lhs_module == $relation->rhs_module) { + $filter = array('id'); + } else { + $filter = array('id', $layout_def['name']); + } + $where = $layout_def['id_name']."='$beanId' "; + $sql = $seed->create_new_list_query('', $where, $filter, array(), 0, '', false, $seed, true); $result = $this->reporter->db->query($sql); - while ($row = $this->reporter->db->fetchByAssoc($result)) - { + while ($row = $this->reporter->db->fetchByAssoc($result)) { $ids[] = $row['id']; } } diff --git a/include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php b/include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php index f91bbee3..85b76aae 100644 --- a/include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php +++ b/include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php @@ -55,18 +55,32 @@ class SugarWidgetSubPanelEditButton extends SugarWidgetField global $app_strings; global $subpanel_item_count; $unique_id = $layout_def['subpanel_id']."_edit_".$subpanel_item_count; //bug 51512 - $onclick =''; - if($layout_def['EditView']) { - return "". $app_strings['LNK_EDIT'] .''; - } + + if ($layout_def['EditView']) { + + // @see SugarWidgetSubPanelTopButtonQuickCreate::get_subpanel_relationship_name() + $relationship_name = ''; + if (!empty($layout_def['linked_field'])) { + $relationship_name = $layout_def['linked_field']; + $bean = BeanFactory::getBean($layout_def['module']); + if (!empty($bean->field_defs[$relationship_name]['relationship'])) { + $relationship_name = $bean->field_defs[$relationship_name]['relationship']; + } + } + + $handler = 'subp_nav(\'' . $layout_def['module'] . '\', \'' . $layout_def['fields']['ID'] . '\', \'e\', this'; + if (!empty($relationship_name)) { + $handler .= ', \'' . $relationship_name . '\''; + } + $handler .= ');'; + + return '' . $app_strings['LNK_EDIT'] . ''; + } return ''; } } -?> \ No newline at end of file +?> diff --git a/include/javascript/ajaxUI.js b/include/javascript/ajaxUI.js index 24d65cc1..c409bc9d 100644 --- a/include/javascript/ajaxUI.js +++ b/include/javascript/ajaxUI.js @@ -44,7 +44,8 @@ var c=document.getElementById("content");c.style.visibility='hidden';c.innerHTML {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});}} -SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) +SUGAR.ajaxUI.hideLoadingPanel();}catch(e){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(o.responseText);} +SUGAR_callsInProgress--;},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;} @@ -70,7 +71,7 @@ var mRegex=/module=([^&]*)/.exec(url);var module=mRegex?mRegex[1]:false;if(!ui.c ui.lastURL=url;ui.cleanGlobals();var loadLanguageJS='';if(module&&typeof(SUGAR.language.languages[module])=='undefined'){loadLanguageJS='&loadLanguageJS=1';} if(!inAjaxUI){if(!SUGAR.isIE) window.location.replace("index.php?action=ajaxui#ajaxUILoc="+encodeURIComponent(url));else{window.location.hash="#";window.location.assign("index.php?action=ajaxui#ajaxUILoc="+encodeURIComponent(url));}} -else{SUGAR.ajaxUI.showLoadingPanel();ui.lastCall=YAHOO.util.Connect.asyncRequest('GET',url+'&ajax_load=1'+loadLanguageJS,{success:SUGAR.ajaxUI.callback,failure:function(){SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FAILURE'));}});}}},submitForm:function(formname,params) +else{SUGAR_callsInProgress++;SUGAR.ajaxUI.showLoadingPanel();ui.lastCall=YAHOO.util.Connect.asyncRequest('GET',url+'&ajax_load=1'+loadLanguageJS,{success:SUGAR.ajaxUI.callback,failure:function(){SUGAR_callsInProgress--;SUGAR.ajaxUI.hideLoadingPanel();SUGAR.ajaxUI.showErrorMessage(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FAILURE'));}});}}},submitForm:function(formname,params) {var con=YAHOO.util.Connect,SA=SUGAR.ajaxUI;if(SA.lastCall&&con.isCallInProgress(SA.lastCall)){con.abort(SA.lastCall);} SA.cleanGlobals();var form=YAHOO.util.Dom.get(formname)||document.forms[formname];if(SA.canAjaxLoadModule(form.module.value)&&typeof(YAHOO.util.Selector.query("input[type=file]",form)[0])=="undefined"&&/action=ajaxui/.exec(window.location)) {var string=con.setForm(form);var baseUrl="index.php?action=ajaxui#ajaxUILoc=";SA.lastURL="";if(string.length>200) diff --git a/include/javascript/jsAlerts.php b/include/javascript/jsAlerts.php index e4dd8ce1..2fbef0a4 100644 --- a/include/javascript/jsAlerts.php +++ b/include/javascript/jsAlerts.php @@ -64,7 +64,23 @@ EOQ; return ""; } - function addActivities(){ + /* + * To return the name of parent bean. + * @param $parentType string parent type + * @param $parentId string parent id + */ + function getRelatedName($parentType, $parentId) + { + if (!empty($parentType) && !empty($parentId)) { + $parentBean = BeanFactory::getBean($parentType, $parentId); + if (($parentBean instanceof SugarBean) && isset($parentBean->name)) { + return $parentBean->name; + } + } + return ''; + } + + function addActivities(){ global $app_list_strings, $timedate, $current_user, $app_strings; global $sugar_config; @@ -88,7 +104,7 @@ EOQ; } // Prep Meetings Query - $selectMeetings = "SELECT meetings.id, name,reminder_time, $desc,location, date_start, assigned_user_id + $selectMeetings = "SELECT meetings.id, name,reminder_time, $desc,location, status, parent_type, parent_id, date_start, assigned_user_id FROM meetings LEFT JOIN meetings_users ON meetings.id = meetings_users.meeting_id WHERE meetings_users.user_id ='".$current_user->id."' AND meetings_users.accept_status != 'decline' @@ -145,7 +161,10 @@ EOQ; //$desc = str_replace('"', '\"', $desc); } + $relatedToMeeting = $this->getRelatedName($row['parent_type'], $row['parent_id']); + $description = empty($desc1) ? '' : $app_strings['MSG_JS_ALERT_MTG_REMINDER_AGENDA'].$desc1."\n"; + $description = $description ."\n" .$app_strings['MSG_JS_ALERT_MTG_REMINDER_STATUS'] . $row['status'] ."\n". $app_strings['MSG_JS_ALERT_MTG_REMINDER_RELATED_TO']. $relatedToMeeting; // standard functionality @@ -161,7 +180,7 @@ EOQ; // Prep Calls Query $selectCalls = " - SELECT calls.id, name, reminder_time, $desc, date_start + SELECT calls.id, name, reminder_time, $desc, date_start, status, parent_type, parent_id FROM calls LEFT JOIN calls_users ON calls.id = calls_users.call_id WHERE calls_users.user_id ='".$current_user->id."' AND calls_users.accept_status != 'decline' @@ -180,8 +199,12 @@ EOQ; $timeStart -= $timeRemind; $row['description'] = (isset($row['description'])) ? $row['description'] : ''; + $relatedToCall = $this->getRelatedName($row['parent_type'], $row['parent_id']); + + $callDescription = $row['description'] ."\n" .$app_strings['MSG_JS_ALERT_MTG_REMINDER_STATUS'] . $row['status'] ."\n". $app_strings['MSG_JS_ALERT_MTG_REMINDER_RELATED_TO']. $relatedToCall; + - $this->addAlert($app_strings['MSG_JS_ALERT_MTG_REMINDER_CALL'], $row['name'], $app_strings['MSG_JS_ALERT_MTG_REMINDER_TIME'].$timedate->to_display_date_time($db->fromConvert($row['date_start'], 'datetime')) , $app_strings['MSG_JS_ALERT_MTG_REMINDER_DESC'].$row['description']. $app_strings['MSG_JS_ALERT_MTG_REMINDER_CALL_MSG'] , $timeStart - strtotime($alertDateTimeNow), 'index.php?action=DetailView&module=Calls&record=' . $row['id']); + $this->addAlert($app_strings['MSG_JS_ALERT_MTG_REMINDER_CALL'], $row['name'], $app_strings['MSG_JS_ALERT_MTG_REMINDER_TIME'].$timedate->to_display_date_time($db->fromConvert($row['date_start'], 'datetime')) , $app_strings['MSG_JS_ALERT_MTG_REMINDER_DESC'].$callDescription. $app_strings['MSG_JS_ALERT_MTG_REMINDER_CALL_MSG'] , $timeStart - strtotime($alertDateTimeNow), 'index.php?action=DetailView&module=Calls&record=' . $row['id']); } } diff --git a/include/javascript/quicksearch.js b/include/javascript/quicksearch.js index cf1e219d..1ffcc301 100644 --- a/include/javascript/quicksearch.js +++ b/include/javascript/quicksearch.js @@ -39,8 +39,8 @@ var qs_index_id=form_id+'_'+qsFields[qsField].name;if(typeof sqs_objects[qs_inde if(QSProcessedFieldsArray[qs_index_id]){skipSTR='collection_0';if(qs_index_id.lastIndexOf(skipSTR)!=(qs_index_id.length-skipSTR.length)){continue;}} var qs_obj=sqs_objects[qs_index_id];var loaded=false;if(!document.forms[qs_obj.form]){continue;} if(!document.forms[qs_obj.form].elements[qsFields[qsField].id].readOnly&&qs_obj['disable']!=true){var combo_id=qs_obj.form+'_'+qsFields[qsField].id;if(Dom.get(combo_id+"_results")){loaded=true} -if(!loaded){QSProcessedFieldsArray[qs_index_id]=true;qsFields[qsField].form_id=form_id;var sqs=sqs_objects[qs_index_id];var resultDiv=document.createElement('div');resultDiv.id=combo_id+"_results";Dom.insertAfter(resultDiv,qsFields[qsField]);var fields=qs_obj.field_list.slice();fields[fields.length]="module";var ds=new YAHOO.util.DataSource("index.php?",{responseType:YAHOO.util.XHRDataSource.TYPE_JSON,responseSchema:{resultsList:'fields',total:'totalCount',fields:fields,metaNode:"fields",metaFields:{total:'totalCount',fields:"fields"}},connMethodPost:true});var forceSelect=!((qsFields[qsField].form&&typeof(qsFields[qsField].form)=='object'&&qsFields[qsField].form.name=='search_form')||qsFields[qsField].className.match('sqsNoAutofill')!=null);var search=new YAHOO.widget.AutoComplete(qsFields[qsField],resultDiv,ds,{typeAhead:forceSelect,forceSelection:forceSelect,fields:fields,sqs:sqs,animSpeed:0.25,qs_obj:qs_obj,inputElement:qsFields[qsField],generateRequest:function(sQuery){var item_id=this.inputElement.form_id+'_'+this.inputElement.name;if(QSCallbacksArray[item_id]){QSCallbacksArray[item_id](this.sqs);} -var out=SUGAR.util.paramsToUrl({to_pdf:'true',module:'Home',action:'quicksearchQuery',data:YAHOO.lang.JSON.stringify(this.sqs),query:sQuery});return out;},setFields:function(data,filter){this.updateFields(data,filter);},updateFields:function(data,filter){for(var i in this.fields){for(var key in this.qs_obj.field_list){if(this.fields[i]==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]&&this.qs_obj.populate_list[key].match(filter)){var displayValue=data[i].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} +if(!loaded){QSProcessedFieldsArray[qs_index_id]=true;qsFields[qsField].form_id=form_id;var sqs=sqs_objects[qs_index_id];var resultDiv=document.createElement('div');resultDiv.id=combo_id+"_results";Dom.insertAfter(resultDiv,qsFields[qsField]);var fields=qs_obj.field_list.slice();fields[fields.length]="module";var ds=new YAHOO.util.DataSource("index.php?",{responseType:YAHOO.util.XHRDataSource.TYPE_JSON,responseSchema:{resultsList:'fields',total:'totalCount',fields:fields,metaNode:"fields",metaFields:{total:'totalCount',fields:"fields"}},connMethodPost:true});var forceSelect=!((qsFields[qsField].form&&typeof(qsFields[qsField].form)=='object'&&qsFields[qsField].form.name=='search_form')||qsFields[qsField].className.match('sqsNoAutofill')!=null);var search=new YAHOO.widget.AutoComplete(qsFields[qsField],resultDiv,ds,{typeAhead:forceSelect,forceSelection:forceSelect,fields:fields,sqs:sqs,animSpeed:0.25,qs_obj:qs_obj,inputElement:qsFields[qsField],generateRequest:function(sQuery){sQuery=decodeURIComponent(sQuery);var item_id=this.inputElement.form_id+'_'+this.inputElement.name;this.sqs=updateSqsFromQSFieldsArray(item_id,this.sqs);if(QSCallbacksArray[item_id]){QSCallbacksArray[item_id](this.sqs);} +var out=SUGAR.util.paramsToUrl({to_pdf:'true',module:'Home',action:'quicksearchQuery',data:YAHOO.lang.JSON.stringify(this.sqs),query:decodeURIComponent(sQuery)});return out;},setFields:function(data,filter){this.updateFields(data,filter);},updateFields:function(data,filter){for(var i in this.fields){for(var key in this.qs_obj.field_list){if(this.fields[i]==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]&&this.qs_obj.populate_list[key].match(filter)){var displayValue=data[i].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value=displayValue;SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}}} SUGAR.util.callOnChangeListers(this._elTextbox);},clearFields:function(){for(var key in this.qs_obj.field_list){if(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]){document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]].value="";SUGAR.util.callOnChangeListers(document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]);}} this.oldValue="";}});if(/^(billing_|shipping_)?account_name$/.exec(qsFields[qsField].name)) {search.clearFields=function(){for(var i in{name:0,id:1}){for(var key in this.qs_obj.field_list){if(i==this.qs_obj.field_list[key]&&document.forms[this.qs_obj.form].elements[this.qs_obj.populate_list[key]]) @@ -57,4 +57,9 @@ search.itemSelectEvent.subscribe(function(e,args){var data=args[2];var fields=th eval(this.qs_obj['post_onblur_function']+'(collection_extended, this.qs_obj.id)');}});search.textboxFocusEvent.subscribe(function(){this.oldValue=this.getInputEl().value;});search.selectionEnforceEvent.subscribe(function(e,args){if(this.oldValue!=args[1]){this.clearFields();}else{this.getInputEl().value=this.oldValue;}});search.dataReturnEvent.subscribe(function(e,args){if(this.getInputEl().value.length==0&&args[2].length>0){var data=[];for(var key in this.qs_obj.field_list){data[data.length]=args[2][0][this.qs_obj.field_list[key]];} this.getInputEl().value=data[this.key];this.itemSelectEvent.fire(this,"",data);}});search.typeAheadEvent.subscribe(function(e,args){this.getInputEl().value=this.getInputEl().value.replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');});if(typeof QSFieldsArray[combo_id]=='undefined'&&qsFields[qsField].id){QSFieldsArray[combo_id]=search;}}}}});} function registerSingleSmartInputListener(input){if((c=input.className)&&(c.indexOf("sqsEnabled")!=-1)){enableQS(true);}} -if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();} \ No newline at end of file +if(typeof QSFieldsArray=='undefined'){QSFieldsArray=new Array();QSProcessedFieldsArray=new Array();QSCallbacksArray=new Array();} +function updateSqsFromQSFieldsArray(sqsId,sqsToUpdate) +{if(typeof(QSFieldsArray[sqsId])!='undefined'&&sqsToUpdate!=QSFieldsArray[sqsId].sqs) +{return QSFieldsArray[sqsId].sqs;} +else +{return sqsToUpdate;}} \ No newline at end of file diff --git a/include/javascript/report_additionals.js b/include/javascript/report_additionals.js index cdbcab6f..8703591b 100644 --- a/include/javascript/report_additionals.js +++ b/include/javascript/report_additionals.js @@ -225,8 +225,8 @@ if(typeof(input_arr[4])!='undefined'){filter_def.input_name4=input_arr[4].value; else{var got_selected=0;var select_input=cell2.getElementsByTagName('select')[0];filter_def.input_name0=new Array();for(j=0;jparseInt(supported[i]))return false;else if(current[i]&&parseInt(current[i])0){optionList[0].selected="selected";} -for(var ii=0;ii0){optionList[selectedIndex].selected="selected";}}else if(elemType=='select-multiple'){var optionList=elem.options;for(var ii=0;ii0&&selected_values.indexOf('')==selected_values.length-1){selected_values.pop();} var final_arr=new Array();for(idx in selected_values){for(o_idx in opts){if(selected_values[idx]==o_idx){final_arr.push(opts[o_idx]);}}} -return final_arr;} \ No newline at end of file +return final_arr;} +function convertReportDateTimeToDB(dateValue,timeValue) +{var date_match=dateValue.match(date_reg_format);var time_match=timeValue.match(/([0-9]{1,2})\:([0-9]{1,2})([ap]m)/);if(date_match!=null&&time_match!=null){time_match[1]=parseInt(time_match[1]);if(time_match[3]=='pm'){time_match[1]=time_match[1]+12;if(time_match[1]>=24){time_match[1]=time_match[1]-24;}}else if(time_match[3]=='am'&&time_match[1]==12){time_match[1]=0;} +if(time_match[1]<10){time_match[1]='0'+time_match[1];} +return date_match[date_reg_positions['Y']]+"-"+date_match[date_reg_positions['m']]+"-"+date_match[date_reg_positions['d']]+' '+time_match[1]+':'+time_match[2]+':00';} +return'';} \ No newline at end of file diff --git a/include/javascript/tiny_mce/plugins/paste/editor_plugin.js b/include/javascript/tiny_mce/plugins/paste/editor_plugin.js index 9ebc2b2b..c8ec2106 100644 --- a/include/javascript/tiny_mce/plugins/paste/editor_plugin.js +++ b/include/javascript/tiny_mce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(d,k,l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:r.replace(/\r?\n/g,"
")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

"+o.encode(r).replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
")+"

"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
 [\s\r\n]+|
)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
 [\s\r\n]+|
)*/g,"$1"]]);d([[/

/g,"

"],[/
/g," "],[/

/g,"
"],])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

$1

")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

"],[/<\/h[1-6][^>]*>/gi,"

"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(d){c(d,function(h){if(h.constructor==RegExp){v=v.replace(h,"")}else{v=v.replace(h[0],h[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.decode(tinymce.html.Entities.encodeRaw(v));if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

"],[/\n/g,"
"]])}}if((l=v.indexOf("

"))!=-1){k=v.lastIndexOf("

");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var d=x.get("_plain_text_marker"),A,h,w,i;s.select(d,false);z.execCommand("Delete",false,null);d=null;A=s.getStart();h=x.getViewPort(n);w=x.getPos(A).y;i=A.clientHeight;if((wh.y+h.h)){z.body.scrollTop=w")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

"+o.encode(r).replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
")+"

"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
 [\s\r\n]+|
)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
 [\s\r\n]+|
)*/g,"$1"]]);d([[/

/g,"

"],[/
/g," "],[/

/g,"
"],])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

$1

")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

"],[/<\/h[1-6][^>]*>/gi,"

"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(d){c(d,function(h){if(h.constructor==RegExp){v=v.replace(h,"")}else{v=v.replace(h[0],h[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.decode(tinymce.html.Entities.encodeRaw(v));if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

"],[/\n/g,"
"]])}}if((l=v.indexOf("

"))!=-1){k=v.lastIndexOf("

");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var d=x.get("_plain_text_marker"),A,h,w,i;s.select(d,false);z.execCommand("Delete",false,null);d=null;A=s.getStart();h=x.getViewPort(n);w=x.getPos(A).y;i=A.clientHeight;if((wh.y+h.h)){z.body.scrollTop=w "Your company's license for SugarCRM has expired for more than 7 days and needs to be brought up to date. Only admins may login.", 'ERROR_LICENSE_EXPIRED'=> "Your company's license for SugarCRM needs to be updated. Only admins may login", 'ERROR_LICENSE_VALIDATION'=> "Your company's license for SugarCRM needs to be validated. Only admins may login", - 'WARN_BROWSER_VERSION_WARNING' => "Warning: Your browser version is no longer supported or you are using an unsupported browser.

The following browser versions are recommended:

  • Internet Explorer 8 (compatibility view not supported)
  • Firefox 17
  • Safari 5.1
  • Chrome 24
", + 'WARN_BROWSER_VERSION_WARNING' => "Warning: Your browser version is no longer supported or you are using an unsupported browser.

The following browser versions are recommended:

  • Internet Explorer 8 (compatibility view not supported)
  • Firefox 19
  • Safari 5.1
  • Chrome 25
", 'WARN_BROWSER_IE_COMPATIBILITY_MODE_WARNING' => "Warning: Your browser is in IE compatibility view which is not supported.", 'WARN_LICENSE_SEATS'=> "Warning: The number of active users is already the maximum number of licenses allowed.", 'WARN_LICENSE_SEATS_MAXED'=> "Warning: The number of active users exceeds the maximum number of licenses allowed.", @@ -2157,6 +2157,8 @@ $app_strings = array ( 'MSG_JS_ALERT_MTG_REMINDER_TIME' => 'Time: ', 'MSG_JS_ALERT_MTG_REMINDER_LOC' => 'Location: ', 'MSG_JS_ALERT_MTG_REMINDER_DESC' => 'Description: ', + 'MSG_JS_ALERT_MTG_REMINDER_STATUS' => 'Status: ', + 'MSG_JS_ALERT_MTG_REMINDER_RELATED_TO' => 'Related To: ', 'MSG_JS_ALERT_MTG_REMINDER_CALL_MSG' => "\nClick OK to view this call or click Cancel to dismiss this message.", 'MSG_JS_ALERT_MTG_REMINDER_MEETING_MSG' => "\nClick OK to view this meeting or click Cancel to dismiss this message.", 'MSG_LIST_VIEW_NO_RESULTS_BASIC' => "No results found.", diff --git a/include/utils.php b/include/utils.php index ad01de86..a3e24a67 100644 --- a/include/utils.php +++ b/include/utils.php @@ -1532,8 +1532,14 @@ function get_select_options_with_id_separate_key ($label_list, $key_list, $selec $selected_string = ''; // the system is evaluating $selected_key == 0 || '' to true. Be very careful when changing this. Test all cases. // The bug was only happening with one of the users in the drop down. It was being replaced by none. - if (($option_key != '' && $selected_key == $option_key) || ($selected_key == '' && $option_key == '' && !$massupdate) || (is_array($selected_key) && in_array($option_key, $selected_key))) - { + if ( + ($option_key != '' && $selected_key == $option_key) + || ( + $option_key == '' + && (($selected_key == '' && !$massupdate) || $selected_key == '__SugarMassUpdateClearField__') + ) + || (is_array($selected_key) && in_array($option_key, $selected_key)) + ) { $selected_string = 'selected '; } @@ -2098,6 +2104,11 @@ function preprocess_param($value){ $value = securexss($value); } + else if (is_array($value)){ + foreach ($value as $key => $element) { + $value[$key] = preprocess_param($element); + } + } return $value; } diff --git a/include/vCard.php b/include/vCard.php index 5d46b45a..148ee9a6 100644 --- a/include/vCard.php +++ b/include/vCard.php @@ -178,7 +178,15 @@ class vCard // check the encoding and change it if needed $locale = new Localization(); - $encoding = $locale->detectCharset($line); + $encoding = false; + //detect charset + if (preg_match("/CHARSET=([A-Z]+([A-Z0-9]-?)*):/", $line, $matches)) { + //found charset hint in vcard + $encoding = $matches[1]; + } else { + //use locale to detect charset automatically + $encoding = $locale->detectCharset($line); + } if ( $encoding != $GLOBALS['sugar_config']['default_charset'] ) { $line = $locale->translateCharset($line, $encoding); diff --git a/install/checkDBSettings.php b/install/checkDBSettings.php index 270a6b4b..d6234ff4 100644 --- a/install/checkDBSettings.php +++ b/install/checkDBSettings.php @@ -155,10 +155,10 @@ function checkDBSettings($silent=false) { } else { if($db_selected) { installLog("DB Selected, will reuse {$_SESSION['setup_db_database_name']}"); - if($db->tableExists('config') && !$_SESSION['setup_db_drop_tables']) { + if($db->tableExists('config')) { include('sugar_version.php'); $versions = $db->getOne("SELECT COUNT(*) FROM config WHERE category='info' AND name='sugar_version' AND VALUE LIKE '$sugar_db_version'"); - if($versions != 1 && $silent==false) { + if($versions > 0 && $silent==false) { $errors['ERR_DB_EXISTS_WITH_CONFIG'] = $mod_strings['ERR_DB_EXISTS_WITH_CONFIG']; installLog("ERROR:: {$errors['ERR_DB_EXISTS_WITH_CONFIG']}"); } diff --git a/jssource/src_files/include/javascript/ajaxUI.js b/jssource/src_files/include/javascript/ajaxUI.js index 57772e0d..dae31f41 100644 --- a/jssource/src_files/include/javascript/ajaxUI.js +++ b/jssource/src_files/include/javascript/ajaxUI.js @@ -96,6 +96,7 @@ SUGAR.ajaxUI = { SUGAR.ajaxUI.hideLoadingPanel(); SUGAR.ajaxUI.showErrorMessage(o.responseText); } + SUGAR_callsInProgress--; }, showErrorMessage : function(errorMessage) { @@ -227,10 +228,12 @@ SUGAR.ajaxUI = { } } else { + SUGAR_callsInProgress++; SUGAR.ajaxUI.showLoadingPanel(); ui.lastCall = YAHOO.util.Connect.asyncRequest('GET', url + '&ajax_load=1' + loadLanguageJS, { success: SUGAR.ajaxUI.callback, failure: function(){ + SUGAR_callsInProgress--; SUGAR.ajaxUI.hideLoadingPanel(); SUGAR.ajaxUI.showErrorMessage(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FAILURE')); } diff --git a/jssource/src_files/include/javascript/quicksearch.js b/jssource/src_files/include/javascript/quicksearch.js index 7aafa191..1ae5902a 100644 --- a/jssource/src_files/include/javascript/quicksearch.js +++ b/jssource/src_files/include/javascript/quicksearch.js @@ -151,8 +151,10 @@ function enableQS(noReload){ inputElement: qsFields[qsField], //YUI requires the data, even POST, to be URL encoded generateRequest : function(sQuery) { + sQuery = decodeURIComponent(sQuery); //preprocess values var item_id = this.inputElement.form_id + '_' + this.inputElement.name; + this.sqs = updateSqsFromQSFieldsArray(item_id, this.sqs); if (QSCallbacksArray[item_id]) { QSCallbacksArray[item_id](this.sqs); } @@ -161,7 +163,7 @@ function enableQS(noReload){ module: 'Home', action: 'quicksearchQuery', data: YAHOO.lang.JSON.stringify(this.sqs), - query: sQuery + query: decodeURIComponent(sQuery) }); return out; }, @@ -358,3 +360,15 @@ if(typeof QSFieldsArray == 'undefined') { QSProcessedFieldsArray = new Array(); QSCallbacksArray = new Array(); } +// Updates this.sqs of the Autocomplete instance with actual value from QSFieldsArray +function updateSqsFromQSFieldsArray(sqsId, sqsToUpdate) +{ + if (typeof(QSFieldsArray[sqsId]) != 'undefined' && sqsToUpdate != QSFieldsArray[sqsId].sqs) + { + return QSFieldsArray[sqsId].sqs; + } + else + { + return sqsToUpdate; + } +} diff --git a/jssource/src_files/include/javascript/report_additionals.js b/jssource/src_files/include/javascript/report_additionals.js index 9a6658d8..31921272 100644 --- a/jssource/src_files/include/javascript/report_additionals.js +++ b/jssource/src_files/include/javascript/report_additionals.js @@ -1600,18 +1600,16 @@ function fill_form(type) { } }else if ( field.type == 'datetimecombo') { if ( (typeof(filter_def.input_name0) != 'undefined' && typeof(filter_def.input_name0) != 'array') && (typeof(filter_def.input_name1) != 'undefined' && typeof(filter_def.input_name1) != 'array')) { - var date_match = filter_def.input_name0.match(date_reg_format); - var time_match = filter_def.input_name1.match(time_reg_format); - if ( date_match != null && time_match != null) { - filter_def.input_name0 = date_match[date_reg_positions['Y']] + "-"+date_match[date_reg_positions['m']] + "-"+date_match[date_reg_positions['d']] + ' '+ filter_def.input_name1; - } + var dbValue = convertReportDateTimeToDB(filter_def.input_name0, filter_def.input_name1); + if (dbValue != '') { + filter_def.input_name0 = dbValue; + } } if ( typeof(filter_def.input_name2) != 'undefined' && typeof(filter_def.input_name2) != 'array' && typeof(filter_def.input_name3) != 'undefined' && typeof(filter_def.input_name3) != 'array') { - var date_match = filter_def.input_name2.match(date_reg_format); - var time_match = filter_def.input_name3.match(time_reg_format); - if ( date_match != null && time_match != null) { - filter_def.input_name2 = date_match[date_reg_positions['Y']] + "-"+date_match[date_reg_positions['m']] + "-"+date_match[date_reg_positions['d']] + ' '+ filter_def.input_name3; - } + var dbValue = convertReportDateTimeToDB(filter_def.input_name2, filter_def.input_name3); + if (dbValue != '') { + filter_def.input_name2 = dbValue; + } } } filters_def.push(filter_def); diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js index 9cf1f822..13cf7c0b 100644 --- a/jssource/src_files/include/javascript/sugar_3.js +++ b/jssource/src_files/include/javascript/sugar_3.js @@ -186,8 +186,8 @@ SUGAR.isSupportedBrowser = function(){ var supportedBrowsers = { msie : {min:8, max:10}, // IE 8, 9, 10 safari : {min:534}, // Safari 5.1 - mozilla : {min:17}, // Firefox 17 - chrome : {min:537.13} // Chrome 24 + mozilla : {min:19}, // Firefox 19 + chrome : {min:537.22} // Chrome 25 }; var current = String($.browser.version); var supported; @@ -3151,7 +3151,7 @@ SUGAR.util = function () { try { if (typeof appendMode != 'undefined' && appendMode) { - theDiv.innerHTML += data.responseText; + theDiv.insertAdjacentHTML('beforeend', data.responseText); } else { @@ -3817,15 +3817,21 @@ SUGAR.searchForm = function() { if ( elemType == 'text' || elemType == 'textarea' || elemType == 'password' ) { elem.value = ''; - } - else if ( elemType == 'select' || elemType == 'select-one' || elemType == 'select-multiple' ) { + } else if (elemType == 'select-one') { // We have, what I hope, is a select box, time to unselect all options - var optionList = elem.options; - + var optionList = elem.options, + selectedIndex = 0; + for (var ii = 0; ii < optionList.length; ii++) { + if (optionList[ii].value == '') { + selectedIndex = ii; + break; + } + } if (optionList.length > 0) { - optionList[0].selected = "selected"; + optionList[selectedIndex].selected = "selected"; } - + } else if (elemType == 'select-multiple') { + var optionList = elem.options; for ( var ii = 0 ; ii < optionList.length ; ii++ ) { optionList[ii].selected = false; } @@ -4989,3 +4995,25 @@ SUGAR.MultiEnumAutoComplete.getMultiSelectValuesFromKeys = function(options_inde } return final_arr; } + +function convertReportDateTimeToDB(dateValue, timeValue) +{ + var date_match = dateValue.match(date_reg_format); + var time_match = timeValue.match(/([0-9]{1,2})\:([0-9]{1,2})([ap]m)/); + if ( date_match != null && time_match != null) { + time_match[1] = parseInt(time_match[1]); + if (time_match[3] == 'pm') { + time_match[1] = time_match[1] + 12; + if (time_match[1] >= 24) { + time_match[1] = time_match[1] - 24; + } + } else if (time_match[3] == 'am' && time_match[1] == 12) { + time_match[1] = 0; + } + if (time_match[1] < 10) { + time_match[1] = '0' + time_match[1]; + } + return date_match[date_reg_positions['Y']] + "-"+date_match[date_reg_positions['m']] + "-"+date_match[date_reg_positions['d']] + ' '+ time_match[1] + ':' + time_match[2] + ':00'; + } + return ''; +} diff --git a/jssource/src_files/modules/Users/UserEditView.js b/jssource/src_files/modules/Users/UserEditView.js index c5cd5829..1339966b 100644 --- a/jssource/src_files/modules/Users/UserEditView.js +++ b/jssource/src_files/modules/Users/UserEditView.js @@ -317,8 +317,6 @@ function set_chooser() document.EditView.display_tabs_def.value = display_tabs_def; document.EditView.hide_tabs_def.value = hide_tabs_def; document.EditView.remove_tabs_def.value = remove_tabs_def; - //sets a cookie to reload menu on ajax load so new menu shows up - Set_Cookie('sugar_theme_menu_load','true',30,'/','',''); } diff --git a/modules/ACL/ACLController.php b/modules/ACL/ACLController.php index 6e40f84d..5d48c8f0 100644 --- a/modules/ACL/ACLController.php +++ b/modules/ACL/ACLController.php @@ -58,7 +58,6 @@ class ACLController { function requireOwner($category, $value, $type='module'){ global $current_user; if(is_admin($current_user))return false; - if($current_user->isAdminForModule($category))return false; return ACLAction::userNeedsOwnership($current_user->id, $category, $value,$type); } diff --git a/modules/Accounts/Account.php b/modules/Accounts/Account.php index f8e16aba..7d23f256 100644 --- a/modules/Accounts/Account.php +++ b/modules/Accounts/Account.php @@ -232,10 +232,11 @@ class Account extends Company { } function get_list_view_data(){ - global $system_config,$current_user; - $temp_array = $this->get_list_view_array(); - $temp_array["ENCODED_NAME"]=$this->name; -// $temp_array["ENCODED_NAME"]=htmlspecialchars($this->name, ENT_QUOTES); + + $temp_array = parent::get_list_view_data(); + + $temp_array["ENCODED_NAME"] = $this->name; + if(!empty($this->billing_address_state)) { $temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state; @@ -247,9 +248,6 @@ class Account extends Company { $temp_array["BILLING_ADDRESS_STREET"] = $this->billing_address_street; $temp_array["SHIPPING_ADDRESS_STREET"] = $this->shipping_address_street; - $temp_array["EMAIL1"] = $this->emailAddress->getPrimaryAddress($this); - $this->email1 = $temp_array['EMAIL1']; - $temp_array["EMAIL1_LINK"] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); return $temp_array; } /** diff --git a/modules/Activities/SubPanelView.html b/modules/Activities/SubPanelView.html index 14703aba..d5c57b4b 100644 --- a/modules/Activities/SubPanelView.html +++ b/modules/Activities/SubPanelView.html @@ -59,7 +59,7 @@ {ACTIVITY.CONTACT_NAME} {ACTIVITY.PARENT_NAME} {ACTIVITY.DATE} - {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} + {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} @@ -86,7 +86,7 @@ {ACTIVITY.CONTACT_NAME} {ACTIVITY.PARENT_NAME} {ACTIVITY.DATE} - {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} + {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} diff --git a/modules/Activities/SubPanelViewContacts.html b/modules/Activities/SubPanelViewContacts.html index e0003982..4544f6f0 100644 --- a/modules/Activities/SubPanelViewContacts.html +++ b/modules/Activities/SubPanelViewContacts.html @@ -61,7 +61,7 @@ {ACTIVITY.PARENT_NAME} {ACTIVITY.DATE} - {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} + {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} @@ -91,7 +91,7 @@ {ACTIVITY.PARENT_NAME} {ACTIVITY.DATE} - {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} + {EDIT_INLINE_PNG} {APP.LNK_EDIT}  {DELETE_INLINE_PNG} {APP.LNK_DELETE} diff --git a/modules/Activities/language/en_us.lang.php b/modules/Activities/language/en_us.lang.php index c30c1203..fd60c04d 100644 --- a/modules/Activities/language/en_us.lang.php +++ b/modules/Activities/language/en_us.lang.php @@ -78,6 +78,7 @@ $mod_strings = array ( 'LNK_TASK_LIST' => 'View Tasks', 'LNK_NOTE_LIST' => 'View Notes', 'LNK_EMAIL_LIST' => 'View Emails', + 'LBL_DELETE_ACTIVITY' => 'Are you sure you want to delete this activity?', 'ERR_DELETE_RECORD' => 'You must specify a record number to delete the account.', 'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this invitee from the meeting?', 'LBL_INVITEE' => 'Invitees', diff --git a/modules/Administration/PasswordManager.php b/modules/Administration/PasswordManager.php index 2a5b00bc..42ee9195 100644 --- a/modules/Administration/PasswordManager.php +++ b/modules/Administration/PasswordManager.php @@ -105,6 +105,10 @@ if(!empty($_POST['saveConfig'])){ $_POST['authenticationClass'] = ''; } + if (isset($_REQUEST['ldap_group_attr_req_dn']) && $_REQUEST['ldap_group_attr_req_dn'] == 'on') + $_POST['ldap_group_attr_req_dn'] = 1; + else + $_POST['ldap_group_attr_req_dn'] = 0; if (isset($_REQUEST['ldap_group_checkbox']) && $_REQUEST['ldap_group_checkbox'] == 'on') $_POST['ldap_group'] = 1; diff --git a/modules/Administration/PasswordManager.tpl b/modules/Administration/PasswordManager.tpl index 9aeb9605..41cda8fe 100644 --- a/modules/Administration/PasswordManager.tpl +++ b/modules/Administration/PasswordManager.tpl @@ -357,6 +357,16 @@ {$MOD.LBL_LDAP_GROUP_ATTR} {sugar_help text=$MOD.LBL_LDAP_GROUP_ATTR_DESC} + + {$MOD.LBL_LDAP_GROUP_ATTR_REQ_DN} {sugar_help text=$MOD.LBL_LDAP_GROUP_ATTR_REQ_DN_DESC} + + {if !empty($settings.ldap_group_attr_req_dn)} + {assign var='ldap_group_attr_req_dn' value='CHECKED'} + {else} + {assign var='ldap_group_attr_req_dn' value='none'} + {/if} + +
diff --git a/modules/Administration/language/en_us.lang.php b/modules/Administration/language/en_us.lang.php index 323958cf..845573e0 100644 --- a/modules/Administration/language/en_us.lang.php +++ b/modules/Administration/language/en_us.lang.php @@ -391,6 +391,8 @@ $mod_strings = array ( 'LBL_LDAP_GROUP_USER_ATTR_DESC'=>'The unique identifier of the person that will be used to check if they are a member of the group Example: uid', 'LBL_LDAP_GROUP_ATTR_DESC'=>'The attribute of the Group that will be used to filter against the User Attribute Example: memberUid', 'LBL_LDAP_GROUP_ATTR'=>'Group Attribute:', + 'LBL_LDAP_GROUP_ATTR_REQ_DN' => 'With User DN:', + 'LBL_LDAP_GROUP_ATTR_REQ_DN_DESC' => 'Include the User DN with the User Attribute when checking group membership', 'LBL_LDAP_USER_FILTER_DESC'=>'Any additional filter params to apply when authenticating users e.g.\nis_sugar_user=1 or (is_sugar_user=1)(is_sales=1)', 'LBL_LDAP_LOGIN_ATTRIBUTE'=>'Login Attribute:', 'LBL_LDAP_BIND_ATTRIBUTE'=>'Bind Attribute:', diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index ab38ef84..029a59b3 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -82,7 +82,7 @@ class Calendar { * @param array $time_arr */ function __construct($view = "day", $time_arr = array()){ - global $current_user, $timedate; + global $current_user, $timedate, $current_language; $this->view = $view; @@ -104,8 +104,8 @@ class Calendar { if (!empty($_REQUEST['year'])){ if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970){ - print("Sorry, calendar cannot handle the year you requested"); - print("
Year must be between 1970 and 2037"); + $calendarStrings = return_module_language($current_language, 'Calendar'); + print($calendarStrings['ERR_YEAR_BETWEEN']); exit; } $date_arr['year'] = $_REQUEST['year']; @@ -358,7 +358,8 @@ class Calendar { }else if($this->view == 'year'){ $day = $this->date_time->get($sign."1 year")->get_day_begin(); }else{ - return "get_neighbor_date_str: notdefined for this view"; + $calendarStrings = return_module_language($GLOBALS['current_language'], 'Calendar'); + return $calendarStrings['ERR_NEIGHBOR_DATE']; } return $day->get_date_str(); } diff --git a/modules/Calendar/language/en_us.lang.php b/modules/Calendar/language/en_us.lang.php index afd02089..17ae94fc 100644 --- a/modules/Calendar/language/en_us.lang.php +++ b/modules/Calendar/language/en_us.lang.php @@ -150,8 +150,10 @@ $mod_strings = array ( 'LBL_EDIT_ALL_RECURRENCES' => 'Edit All Recurrences', 'LBL_REMOVE_ALL_RECURRENCES' => 'Delete All Recurrences', - + 'LBL_DATE_END_ERROR' => 'End date is before start date', + 'ERR_YEAR_BETWEEN' => 'Sorry, calendar cannot handle the year you requested
Year must be between 1970 and 2037', + 'ERR_NEIGHBOR_DATE' => 'get_neighbor_date_str: not defined for this view', ); diff --git a/modules/Calendar/tpls/shared_users.tpl b/modules/Calendar/tpls/shared_users.tpl index 3a4226f4..e119b1f2 100644 --- a/modules/Calendar/tpls/shared_users.tpl +++ b/modules/Calendar/tpls/shared_users.tpl @@ -128,8 +128,8 @@
- - + +
diff --git a/modules/Calls/Call.php b/modules/Calls/Call.php index a55c16b7..79ee393a 100644 --- a/modules/Calls/Call.php +++ b/modules/Calls/Call.php @@ -632,6 +632,12 @@ class Call extends SugarBean { $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name"); $list[$notify_user->id] = $notify_user; } + global $sugar_config; + if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) { + global $current_user; + if(isset($list[$current_user->id])) + unset($list[$current_user->id]); + } // $GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true)); return $list; } diff --git a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php index 14154fd8..43e044f7 100644 --- a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php +++ b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php @@ -42,6 +42,6 @@ global $app_strings; $dashletMeta['TopCampaignsDashlet'] = array('module' => 'Campaigns', 'title' => translate('LBL_TOP_CAMPAIGNS', 'Campaigns'), - 'description' => 'Top Performing Campaigns by Revenue', + 'description' => translate('LBL_TOP_CAMPAIGNS_DESCRIPTION', 'Campaigns'), 'category' => 'Module Views'); ?> diff --git a/modules/Campaigns/QueueCampaign.php b/modules/Campaigns/QueueCampaign.php index 8400f105..6df81204 100644 --- a/modules/Campaigns/QueueCampaign.php +++ b/modules/Campaigns/QueueCampaign.php @@ -160,12 +160,21 @@ foreach ($_POST['mass'] as $message_id) { //delete all entries from the emailman table that belong to the exempt list. //TODO:SM: may want to move this to query clause above instead if (!$test) { - $delete_query = "DELETE FROM emailman WHERE emailman.campaign_id='{$campaign->id}' AND (emailman.related_id, emailman.related_type) IN - (SELECT plp.related_id, plp.related_type FROM prospect_lists_prospects plp - INNER JOIN prospect_lists pl ON pl.id = plp.prospect_list_id - INNER JOIN prospect_list_campaigns plc ON plp.prospect_list_id = plc.prospect_list_id - WHERE plp.deleted = 0 AND plc.deleted = 0 AND pl.deleted = 0 AND pl.list_type = 'exempt' AND plc.campaign_id = '{$campaign->id}') - "; + $delete_query = " + DELETE FROM emailman WHERE id IN ( + SELECT em.id FROM ( + SELECT emailman.id id + FROM emailman + INNER JOIN prospect_lists_prospects plp + ON emailman.related_id = plp.related_id AND emailman.related_type = plp.related_type + INNER JOIN prospect_lists pl + ON pl.id = plp.prospect_list_id + INNER JOIN prospect_list_campaigns plc + ON plp.prospect_list_id = plc.prospect_list_id + WHERE plp.deleted = 0 AND plc.deleted = 0 + AND pl.deleted = 0 AND pl.list_type = 'exempt' + AND plc.campaign_id = '{$campaign->id}') em + )"; $campaign->db->query($delete_query); } diff --git a/modules/Campaigns/Schedule.php b/modules/Campaigns/Schedule.php index 7a7bfd79..6baa756d 100644 --- a/modules/Campaigns/Schedule.php +++ b/modules/Campaigns/Schedule.php @@ -87,7 +87,10 @@ if (!empty($campaign_id)) { if ($campaign_id && isset($campaign) && $campaign->status == 'Inactive') { $ss = new Sugar_Smarty(); - $ss->assign('campaignName', $campaign->name); + + $data = array($campaign->name); + $ss->assign('campaignInactive', string_format(translate('LBL_CAMPAIGN_INACTIVE_SCHEDULE', 'Campaigns'), $data)); + $ss->display('modules/Campaigns/tpls/campaign-inactive.tpl'); } else { $focus = new EmailMarketing(); @@ -130,7 +133,7 @@ if ($campaign_id && isset($campaign) && $campaign->status == 'Inactive') { $ListView->xTemplateAssign("RETURN_ACTION",$_POST['return_action']); $ListView->xTemplateAssign("RETURN_ID",$_POST['record']); $ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']); - $ListView->setQuery($where, "", "name", "EMAILMARKETING"); + $ListView->setQuery($where, "", "date_modified desc", "EMAILMARKETING", false); if ($test) { $ListView->xTemplateAssign("MODE",$_POST['mode']); diff --git a/modules/Campaigns/language/en_us.lang.php b/modules/Campaigns/language/en_us.lang.php index 509e5997..8676d4d3 100644 --- a/modules/Campaigns/language/en_us.lang.php +++ b/modules/Campaigns/language/en_us.lang.php @@ -86,6 +86,7 @@ $mod_strings = array ( 'LBL_CAMPAIGN_OBJECTIVE' => 'Objective: ', 'LBL_CAMPAIGN_CONTENT' => 'Description: ', 'LBL_CAMPAIGN_DAYS_REMAIN' => 'Days Remaining', + 'LBL_CAMPAIGN_INACTIVE_SCHEDULE' => "Campaign '{0}' has status 'Inactive'. You have to set campaign status to 'Active'.", 'LNK_NEW_CAMPAIGN' => 'Create Campaign (Classic)', 'LNL_NEW_CAMPAIGN_WIZARD' => 'Create Campaign (Wizard)', 'LNK_CAMPAIGN_LIST' => 'View Campaigns', @@ -396,6 +397,7 @@ $mod_strings = array ( 'LBL_TOP_CAMPAIGNS' => 'Top Campaigns', 'LBL_TOP_CAMPAIGNS_NAME' => 'Campaign Name', 'LBL_TOP_CAMPAIGNS_REVENUE' => 'Revenue', + 'LBL_TOP_CAMPAIGNS_DESCRIPTION' => 'Top Performing Campaigns by Revenue', 'LBL_LEADS' => 'Leads', 'LBL_CONTACTS' => 'Contacts', 'LBL_ACCOUNTS' => 'Accounts', diff --git a/modules/Campaigns/tpls/campaign-inactive.tpl b/modules/Campaigns/tpls/campaign-inactive.tpl index 974cb77e..022602bb 100644 --- a/modules/Campaigns/tpls/campaign-inactive.tpl +++ b/modules/Campaigns/tpls/campaign-inactive.tpl @@ -36,4 +36,4 @@ *} -Campaign '{$campaignName}' has status 'Inactive'. You have to set campaign status to 'Active'. \ No newline at end of file +{$campaignInactive} diff --git a/modules/Charts/chartdefs.php b/modules/Charts/chartdefs.php index 9d19de00..8b3983ea 100644 --- a/modules/Charts/chartdefs.php +++ b/modules/Charts/chartdefs.php @@ -36,12 +36,14 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ +$chartsStrings = return_module_language($GLOBALS['current_language'], 'Charts'); + $chartDefs = array( 'pipeline_by_sales_stage'=> array( 'type' => 'code', 'id' => 'Chart_pipeline_by_sales_stage', - 'label' => 'Pipeline by Sales Stage', - 'chartUnits' => 'Opportunity Size in $1K', + 'label' => $chartsStrings['LBL_CHART_PIPELINE_BY_SALES_STAGE'], + 'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'], 'chartType' => 'horizontal group by chart', 'groupBy' => array( 'sales_stage', 'user_name' ), 'base_url'=> @@ -55,7 +57,7 @@ $chartDefs = array( 'lead_source_by_outcome'=> array( 'type' => 'code', 'id' => 'Chart_lead_source_by_outcome', - 'label' => 'Lead Source By Outcome', + 'label' => $chartsStrings['LBL_CHART_LEAD_SOURCE_BY_OUTCOME'], 'chartUnits' => '', 'chartType' => 'horizontal group by chart', 'groupBy' => array( 'lead_source', 'sales_stage' ), @@ -70,8 +72,8 @@ $chartDefs = array( 'outcome_by_month'=> array( 'type' => 'code', 'id' => 'Chart_outcome_by_month', - 'label' => 'Outcome by Month', - 'chartUnits' => 'Opportunity Size in $1K', + 'label' => $chartsStrings['LBL_CHART_OUTCOME_BY_MONTH'], + 'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'], 'chartType' => 'stacked group by chart', 'groupBy' => array( 'm', 'sales_stage', ), 'base_url'=> @@ -85,8 +87,8 @@ $chartDefs = array( 'pipeline_by_lead_source'=> array( 'type' => 'code', 'id' => 'Chart_pipeline_by_lead_source', - 'label' => 'Pipeline By Lead Source', - 'chartUnits' => 'Opportunity Size in $1K', + 'label' => $chartsStrings['LBL_CHART_PIPELINE_BY_LEAD_SOURCE'], + 'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'], 'chartType' => 'pie chart', 'groupBy' => array( 'lead_source', ), 'base_url'=> @@ -101,9 +103,9 @@ $chartDefs = array( 'my_modules_used_last_30_days' => array( 'type' => 'code', 'id' => 'my_modules_used_last_30_days', - 'label' => 'My Modules Used (Last 30 Days)', + 'label' => $chartsStrings['LBL_CHART_MY_MODULES_USED_30_DAYS'], 'chartType' => 'horizontal bar chart', - 'chartUnits' => 'Access Count', + 'chartUnits' => $chartsStrings['LBL_MY_MODULES_USED_SIZE'], 'groupBy' => array( 'module_name'), 'base_url'=> array( 'module' => 'Trackers', diff --git a/modules/Charts/code/predefined_charts.php b/modules/Charts/code/predefined_charts.php index 06093933..fb284b88 100644 --- a/modules/Charts/code/predefined_charts.php +++ b/modules/Charts/code/predefined_charts.php @@ -35,15 +35,18 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ + +$chartsStrings = return_module_language($GLOBALS['current_language'], 'Charts'); + $predefined_charts = array( 'Chart_pipeline_by_sales_stage'=> - array('type'=>'code','id'=>'Chart_pipeline_by_sales_stage','label'=>'Pipeline by Sales Stage','chartType'=>'horizontal group by chart',), + array('type'=>'code','id'=>'Chart_pipeline_by_sales_stage','label'=>$chartsStrings['LBL_CHART_PIPELINE_BY_SALES_STAGE'],'chartType'=>'horizontal group by chart',), 'Chart_lead_source_by_outcome'=> - array('type'=>'code','id'=>'Chart_lead_source_by_outcome','label'=>'Lead Source By Outcome','chartType'=>'horizontal group by chart',), + array('type'=>'code','id'=>'Chart_lead_source_by_outcome','label'=>$chartsStrings['LBL_CHART_LEAD_SOURCE_BY_OUTCOME'],'chartType'=>'horizontal group by chart',), 'Chart_outcome_by_month'=> - array('type'=>'code','id'=>'Chart_outcome_by_month','label'=>'Outcome by Month','chartType'=>'stacked group by chart',), + array('type'=>'code','id'=>'Chart_outcome_by_month','label'=>$chartsStrings['LBL_CHART_OUTCOME_BY_MONTH'],'chartType'=>'stacked group by chart',), 'Chart_pipeline_by_lead_source'=> - array('type'=>'code','id'=>'Chart_pipeline_by_lead_source','label'=>'Pipeline By Lead Source','chartType'=>'pie chart',), + array('type'=>'code','id'=>'Chart_pipeline_by_lead_source','label'=>$chartsStrings['LBL_CHART_PIPELINE_BY_LEAD_SOURCE'],'chartType'=>'pie chart',), 'Chart_my_pipeline_by_sales_stage'=> - array('type'=>'code','id'=>'Chart_pipeline_by_sales_stage','label'=>'My Pipeline by Sales Stage','chartType'=>'funnel chart',), + array('type'=>'code','id'=>'Chart_pipeline_by_sales_stage','label'=>$chartsStrings['LBL_CHART_MY_PIPELINE_BY_SALES_STAGE'],'chartType'=>'funnel chart',), ); \ No newline at end of file diff --git a/modules/Charts/language/en_us.lang.php b/modules/Charts/language/en_us.lang.php index a32d1e13..bf29d474 100644 --- a/modules/Charts/language/en_us.lang.php +++ b/modules/Charts/language/en_us.lang.php @@ -98,6 +98,18 @@ $mod_strings = array ( 'LBL_TITLE' => 'Title: ', 'LBL_MY_MODULES_USED_SIZE' => 'Access Count', + + 'LBL_CHART_ACTION' => 'Action', + 'LBL_CHART_PIPELINE_BY_SALES_STAGE' => 'Pipeline by Sales Stage', + 'LBL_CHART_LEAD_SOURCE_BY_OUTCOME' => 'Lead Source By Outcome', + 'LBL_CHART_OUTCOME_BY_MONTH' => 'Outcome by Month', + 'LBL_CHART_PIPELINE_BY_LEAD_SOURCE' => 'Pipeline By Lead Source', + 'LBL_CHART_MY_PIPELINE_BY_SALES_STAGE' => 'My Pipeline by Sales Stage', + 'LBL_CHART_PIPELINE_BY_SALES_STAGE_FUNNEL' => 'Pipeline by Sales Stage Funnel', + 'LBL_CHART_OPPORTUNITIES_THIS_QUARTER' => 'Opportunities this Quarter', + 'LBL_CHART_MY_MODULES_USED_30_DAYS' => 'My Modules Used (Last 30 Days)', + 'LBL_CHART_MODULES_USED_DIRECT_REPORTS_30_DAYS' => 'Modules Used By My Direct Reports (Last 30 Days)', + 'LBL_CHART_DCE_ACTIONS_MONTH' => 'DCE Actions By Types (Current Month)', ); diff --git a/modules/Configurator/tpls/adminwizard.tpl b/modules/Configurator/tpls/adminwizard.tpl index 1e3d8fc3..7a3277e8 100644 --- a/modules/Configurator/tpls/adminwizard.tpl +++ b/modules/Configurator/tpls/adminwizard.tpl @@ -528,7 +528,7 @@ function adjustEmailSettings(){ addToValidate("AdminWizard", 'mail_smtpuser', 'email', false, SUGAR.language.get('Configurator','LBL_GMAIL_SMTPUSER')); } - else if (server.value == "plus.smtp.mail.yahoo.com" && !isValidEmail(user.value)) { + else if (server.value == "smtp.mail.yahoo.com" && !isValidEmail(user.value)) { addToValidate("AdminWizard", 'mail_smtpuser', 'email', false, SUGAR.language.get('Configurator','LBL_YAHOOMAIL_SMTPUSER')); } @@ -559,7 +559,7 @@ function changeEmailScreenDisplay(smtptype) switch (smtptype) { case "yahoomail": - document.getElementById("mail_smtpserver").value = 'plus.smtp.mail.yahoo.com'; + document.getElementById("mail_smtpserver").value = 'smtp.mail.yahoo.com'; document.getElementById("mail_smtpport").value = '465'; document.getElementById("mail_smtpauth_req").checked = true; var ssl = document.getElementById("mail_smtpssl"); @@ -575,7 +575,7 @@ function changeEmailScreenDisplay(smtptype) document.getElementById("mail_smtpuser_label").innerHTML = '{/literal}{$MOD.LBL_YAHOOMAIL_SMTPUSER}{literal}'; break; case "gmail": - if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'plus.smtp.mail.yahoo.com') { + if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'smtp.mail.yahoo.com') { document.getElementById("mail_smtpserver").value = 'smtp.gmail.com'; document.getElementById("mail_smtpport").value = '587'; document.getElementById("mail_smtpauth_req").checked = true; diff --git a/modules/Contacts/Contact.php b/modules/Contacts/Contact.php index 3f5a68e6..fa4b0ee3 100644 --- a/modules/Contacts/Contact.php +++ b/modules/Contacts/Contact.php @@ -402,22 +402,14 @@ class Contact extends Person { } function get_list_view_data($filter_fields = array()) { - global $system_config; - global $current_user; - $this->_create_proper_name_field(); - $temp_array = $this->get_list_view_array(); - $temp_array['NAME'] = $this->name; - $temp_array['ENCODED_NAME'] = $this->name; + $temp_array = parent::get_list_view_data(); if($filter_fields && !empty($filter_fields['sync_contact'])){ $this->load_contacts_users_relationship(); $temp_array['SYNC_CONTACT'] = !empty($this->contacts_users_id) ? 1 : 0; } - $temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); - $this->email1 = $temp_array['EMAIL1']; - $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); - $temp_array['EMAIL_AND_NAME1'] = "{$this->full_name} <".$temp_array['EMAIL1'].">"; + return $temp_array; } diff --git a/modules/DocumentRevisions/DocumentRevision.php b/modules/DocumentRevisions/DocumentRevision.php index 7b8aaaf9..bea13f6d 100644 --- a/modules/DocumentRevisions/DocumentRevision.php +++ b/modules/DocumentRevisions/DocumentRevision.php @@ -272,7 +272,7 @@ class DocumentRevision extends SugarBean { if (empty($doc_revision_id)) return null; $db = DBManagerFactory::getInstance(); - $query="select revision from document_revisions where id='$doc_revision_id'"; + $query="select revision from document_revisions where id='$doc_revision_id' AND deleted=0"; $result=$db->query($query); if (!empty($result)) { $row=$db->fetchByAssoc($result); diff --git a/modules/Documents/Document.php b/modules/Documents/Document.php index 71e614a7..6fb98e10 100644 --- a/modules/Documents/Document.php +++ b/modules/Documents/Document.php @@ -374,7 +374,7 @@ class Document extends SugarBean { if (empty($doc_id)) return null; $db = DBManagerFactory::getInstance(); - $query="select document_name from documents where id='$doc_id'"; + $query="select document_name from documents where id='$doc_id' and deleted=0"; $result=$db->query($query); if (!empty($result)) { $row=$db->fetchByAssoc($result); diff --git a/modules/EmailMan/EmailMan.php b/modules/EmailMan/EmailMan.php index 7d4bc741..03f764cb 100644 --- a/modules/EmailMan/EmailMan.php +++ b/modules/EmailMan/EmailMan.php @@ -354,10 +354,8 @@ class EmailMan extends SugarBean{ $this->ref_email->parent_type = ''; $this->ref_email->parent_id = ''; } - - // Bug 59726 - Campaigns' Emails are sometime freezed - $this->ref_email->date_start = $timedate->nowDbDate(); - $this->ref_email->time_start = $timedate->asDbTime($timedate->getNow()); + $this->ref_email->date_start = $timedate->nowDate(); + $this->ref_email->time_start = $timedate->asUserTime($timedate->getNow(true)); $this->ref_email->status='sent'; $retId = $this->ref_email->save(); @@ -594,7 +592,10 @@ class EmailMan extends SugarBean{ } - $module = new $class(); + //prepare variables for 'set_as_sent' function + $this->target_tracker_key = create_guid(); + + $module = new $class(); $module->retrieve($this->related_id); $module->emailAddress->handleLegacyRetrieve($module); @@ -651,7 +652,6 @@ class EmailMan extends SugarBean{ return true; } - $this->target_tracker_key=create_guid(); //fetch email marketing. if (empty($this->current_emailmarketing) or !isset($this->current_emailmarketing)) { @@ -740,14 +740,16 @@ class EmailMan extends SugarBean{ $mail->ClearReplyTos(); $mail->Sender = $this->mailbox_from_addr; $mail->From = $this->mailbox_from_addr; - $mail->FromName = $this->current_emailmarketing->from_name; + $mail->FromName = $locale->translateCharsetMIME(trim($this->current_emailmarketing->from_name), 'UTF-8', $OBCharset); $mail->ClearCustomHeaders(); $mail->AddCustomHeader('X-CampTrackID:'.$this->target_tracker_key); //CL - Bug 25256 Check if we have a reply_to_name/reply_to_addr value from the email marketing table. If so use email marketing entry; otherwise current mailbox (inbound email) entry $replyToName = empty($this->current_emailmarketing->reply_to_name) ? $this->current_mailbox->get_stored_options('reply_to_name',$mail->FromName,null) : $this->current_emailmarketing->reply_to_name; $replyToAddr = empty($this->current_emailmarketing->reply_to_addr) ? $this->current_mailbox->get_stored_options('reply_to_addr',$mail->From,null) : $this->current_emailmarketing->reply_to_addr; - $mail->AddReplyTo($replyToAddr,$locale->translateCharsetMIME(trim($replyToName), 'UTF-8', $OBCharset)); + if (!empty($replyToAddr)) { + $mail->AddReplyTo($replyToAddr,$locale->translateCharsetMIME(trim($replyToName), 'UTF-8', $OBCharset)); + } //parse and replace bean variables. $macro_nv=array(); diff --git a/modules/EmailMan/tpls/config.tpl b/modules/EmailMan/tpls/config.tpl index 34d4774a..893b9953 100644 --- a/modules/EmailMan/tpls/config.tpl +++ b/modules/EmailMan/tpls/config.tpl @@ -650,7 +650,7 @@ function changeEmailScreenDisplay(smtptype, clear) switch (smtptype) { case "yahoomail": - document.getElementById("mail_smtpserver").value = 'plus.smtp.mail.yahoo.com'; + document.getElementById("mail_smtpserver").value = 'smtp.mail.yahoo.com'; document.getElementById("mail_smtpport").value = '465'; document.getElementById("mail_smtpauth_req").checked = true; var ssl = document.getElementById("mail_smtpssl"); @@ -667,7 +667,7 @@ function changeEmailScreenDisplay(smtptype, clear) document.getElementById("mail_smtpuser_label").innerHTML = '{/literal}{$MOD.LBL_YAHOOMAIL_SMTPUSER}{literal}'; break; case "gmail": - if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'plus.smtp.mail.yahoo.com') { + if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'smtp.mail.yahoo.com') { document.getElementById("mail_smtpserver").value = 'smtp.gmail.com'; document.getElementById("mail_smtpport").value = '587'; document.getElementById("mail_smtpauth_req").checked = true; @@ -685,7 +685,7 @@ function changeEmailScreenDisplay(smtptype, clear) document.getElementById("mail_smtpuser_label").innerHTML = '{/literal}{$MOD.LBL_GMAIL_SMTPUSER}{literal}'; break; case "exchange": - if ( document.getElementById("mail_smtpserver").value == 'plus.smtp.mail.yahoo.com' + if ( document.getElementById("mail_smtpserver").value == 'smtp.mail.yahoo.com' || document.getElementById("mail_smtpserver").value == 'smtp.gmail.com' ) { document.getElementById("mail_smtpserver").value = ''; } diff --git a/modules/Emails/javascript/EmailUI.js b/modules/Emails/javascript/EmailUI.js index f0f105df..13883989 100644 --- a/modules/Emails/javascript/EmailUI.js +++ b/modules/Emails/javascript/EmailUI.js @@ -466,7 +466,7 @@ SE.accounts = { switch (smtptype) { case "yahoomail": - document.getElementById("mail_smtpserver").value = 'plus.smtp.mail.yahoo.com'; + document.getElementById("mail_smtpserver").value = 'smtp.mail.yahoo.com'; document.getElementById("mail_smtpport").value = '465'; document.getElementById("mail_smtpauth_req").checked = true; var ssl = document.getElementById("mail_smtpssl"); @@ -483,7 +483,7 @@ SE.accounts = { document.getElementById("mail_smtpuser_label").innerHTML = mod_strings.LBL_YAHOOMAIL_SMTPUSER; break; case "gmail": - if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'plus.smtp.mail.yahoo.com') { + if(document.getElementById("mail_smtpserver").value == "" || document.getElementById("mail_smtpserver").value == 'smtp.mail.yahoo.com') { document.getElementById("mail_smtpserver").value = 'smtp.gmail.com'; document.getElementById("mail_smtpport").value = '587'; document.getElementById("mail_smtpauth_req").checked = true; @@ -501,7 +501,7 @@ SE.accounts = { document.getElementById("mail_smtpuser_label").innerHTML = mod_strings.LBL_GMAIL_SMTPUSER; break; case "exchange": - if ( document.getElementById("mail_smtpserver").value == 'plus.smtp.mail.yahoo.com' + if ( document.getElementById("mail_smtpserver").value == 'smtp.mail.yahoo.com' || document.getElementById("mail_smtpserver").value == 'smtp.gmail.com' ) { document.getElementById("mail_smtpserver").value = ''; } diff --git a/modules/Employees/Employee.php b/modules/Employees/Employee.php index 31a93ead..b0f33c31 100644 --- a/modules/Employees/Employee.php +++ b/modules/Employees/Employee.php @@ -160,20 +160,16 @@ class Employee extends Person { function get_list_view_data(){ - global $current_user; - $this->_create_proper_name_field(); // create proper NAME (by combining first + last) - $user_fields = $this->get_list_view_array(); + $user_fields = parent::get_list_view_data(); + // Copy over the reports_to_name if ( isset($GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]) ) $user_fields['MESSENGER_TYPE'] = $GLOBALS['app_list_strings']['messenger_type_dom'][$this->messenger_type]; if ( isset($GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]) ) $user_fields['EMPLOYEE_STATUS'] = $GLOBALS['app_list_strings']['employee_status_dom'][$this->employee_status]; $user_fields['REPORTS_TO_NAME'] = $this->reports_to_name; - $user_fields['NAME'] = empty($this->name) ? '' : $this->name; - $user_fields['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this,$this->id,'Users'); - $this->email1 = $user_fields['EMAIL1']; - $user_fields['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); - return $user_fields; + + return $user_fields; } function list_view_parse_additional_sections(&$list_form, $xTemplateSection){ diff --git a/modules/Home/About.php b/modules/Home/About.php index 2405f4b6..bc2d17b8 100644 --- a/modules/Home/About.php +++ b/modules/Home/About.php @@ -161,8 +161,6 @@ echo $theProductName."™ ".$mod_strings['LBL_AND']." Sugar™ ".$mod_st
  • (http://www.sugarcrm.com)
  • (http://sourceforge.net/projects/xtpl)
  • (http://sourceforge.net/projects/nusoap/)
  • -
  • (http://www.dynarch.com/mishoo/calendar.epl)
  • -
  • (http://ros.co.nz/pdf/)
  • (http://pear.php.net/package/HTTP_WebDAV_Server)
  • (http://www.phpconcept.net/pclzip/)
  • (http://www.smarty.net/)
  • @@ -187,6 +185,11 @@ echo $theProductName."™ ".$mod_strings['LBL_AND']." Sugar™ ".$mod_st
  • (http://code.google.com/p/php-sql-parser/)
  • (http://htmlpurifier.org/)
  • (https://github.com/facebook/xhprof)
  • +
  • (https://github.com/ruflin/Elastica)
  • +
  • (https://developers.facebook.com/web/)
  • +
  • (http://jquery.com)
  • +
  • (http://jqueryui.com)
  • +
  • (http://www.macridesweb.com/oltest)
  • diff --git a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php index a112fe72..679514ea 100644 --- a/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php +++ b/modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php @@ -176,7 +176,7 @@ class ChartsDashlet extends Dashlet { $additionalTitle = ''; if($this->isRefreshable) $additionalTitle .= '' . translate('LBL_DASHLET_REFRESH', 'Home') . '' . translate('LBL_DASHLET_REFRESH', 'Home') . ''; return $additionalTitle; diff --git a/modules/Home/QuickSearch.php b/modules/Home/QuickSearch.php index 5f2d5120..1aaae494 100644 --- a/modules/Home/QuickSearch.php +++ b/modules/Home/QuickSearch.php @@ -367,6 +367,7 @@ class quicksearchQuery } } + return $data; } diff --git a/modules/Home/language/en_us.lang.php b/modules/Home/language/en_us.lang.php index 089ef103..cea54605 100644 --- a/modules/Home/language/en_us.lang.php +++ b/modules/Home/language/en_us.lang.php @@ -234,6 +234,11 @@ $mod_strings = array ( 'LBL_SOURCE_PHPSQL' => 'PHP SQL Parser', 'LBL_SOURCE_HTMLPURIFIER' => 'HTML Purifier - A standards-compliant HTML filtering library.', 'LBL_SOURCE_XHPROF' => 'XHProf - A function-level hierarchical profiler for PHP.', + 'LBL_SOURCE_ELASTICA' => 'Elastica - PHP client for the distributed search engine elasticsearch ', + 'LBL_SOURCE_FACEBOOK' => 'FacebookLib - Provides access to the Facebook Platform.', + 'LBL_SOURCE_JQUERY' => 'jQuery - jQuery is a fast, small, and feature-rich JavaScript library.', + 'LBL_SOURCE_JQUERY_UI' => 'jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.', + 'LBL_SOURCE_OVERLIB' => 'OverlibMWS - The overlibmws library uses javascript for DHTML popups that serve as informational and navigational aids for websites.', 'LBL_DASHLET_TITLE' => 'My Sites', 'LBL_DASHLET_OPT_TITLE' => 'Title', diff --git a/modules/Import/views/view.dupcheck.php b/modules/Import/views/view.dupcheck.php index 0d082e2f..9b1cee5d 100644 --- a/modules/Import/views/view.dupcheck.php +++ b/modules/Import/views/view.dupcheck.php @@ -136,7 +136,7 @@ class ImportViewDupcheck extends ImportView $ik_field = explode('::', $ik); //field is not a custom field and was not included in the key, or was not in mapped fields, so skip - if(strpos($ik_field[0],'ustomfield::')>0 && (empty($ik_field[1]) || !in_array($ik_field[1], $mapped_fields))){ + if(strpos($ik_field[0],'ustomfield::')>0 || (empty($ik_field[1]) || !in_array($ik_field[1], $mapped_fields))){ //skip indexed fields that are not defined in user mapping or continue; } diff --git a/modules/InboundEmail/InboundEmail.php b/modules/InboundEmail/InboundEmail.php index f79605a9..e46fb522 100644 --- a/modules/InboundEmail/InboundEmail.php +++ b/modules/InboundEmail/InboundEmail.php @@ -2423,8 +2423,8 @@ class InboundEmail extends SugarBean { $alerts = ''; $GLOBALS['log']->debug($l.': I-E testing string: '.$serviceTest); - // open the connection and try the test string - $this->conn = imap_open($serviceTest, $login, $passw); + // open the connection and try the test string + $this->conn = $this->getImapConnection($serviceTest, $login, $passw); if(($errors = imap_last_error()) || ($alerts = imap_alerts())) { if($errors == 'Too many login failures' || $errors == '[CLOSED] IMAP connection broken (server response)') { // login failure means don't bother trying the rest @@ -4648,12 +4648,12 @@ eoq; // final test if(!is_resource($this->conn) && !$test) { - $this->conn = imap_open($connectString, $this->email_user, $this->email_password, CL_EXPUNGE); + $this->conn = $this->getImapConnection($connectString, $this->email_user, $this->email_password, CL_EXPUNGE); } if($test) { if ($opts == false && !is_resource($this->conn)) { - $this->conn = imap_open($connectString, $this->email_user, $this->email_password, CL_EXPUNGE); + $this->conn = $this->getImapConnection($connectString, $this->email_user, $this->email_password, CL_EXPUNGE); } $errors = ''; $alerts = ''; @@ -4740,6 +4740,42 @@ eoq; } } + /** + * Attempt to create an IMAP connection using passed in parameters + * return either the connection resource or false if unable to connect + * + * @param string $mailbox Mailbox to be used to create imap connection + * @param string $username The user name + * @param string $password The password associated with the username + * @param integer $options Bitmask for options parameter to the imap_open function + * + * @return resource|boolean Connection resource on success, FALSE on failure + */ + protected function getImapConnection($mailbox, $username, $password, $options = 0) + { + // if php is prior to 5.3.2, then return call without disable parameters as they are not supported yet + if (version_compare(phpversion(), '5.3.2', '<')) { + return imap_open($mailbox, $username, $password, $options); + } + + $connection = null; + $authenticators = array('', 'GSSAPI', 'NTLM'); + + while (!$connection && ($authenticator = array_shift($authenticators)) !== null) { + if ($authenticator) { + $params = array( + 'DISABLE_AUTHENTICATOR' => $authenticator, + ); + } else { + $params = array(); + } + + $connection = imap_open($mailbox, $username, $password, $options, 0, $params); + } + + return $connection; + } + /** * retrieves an array of I-E beans based on the group_id * @param string $groupId GUID of the group user or Individual diff --git a/modules/Leads/Lead.php b/modules/Leads/Lead.php index 754e8467..61bddded 100644 --- a/modules/Leads/Lead.php +++ b/modules/Leads/Lead.php @@ -316,22 +316,11 @@ class Lead extends Person { } function get_list_view_data(){ - /*global $app_list_strings; - global $current_user; - - $temp_array = $this->get_list_view_array(); - $temp_array['STATUS'] = (empty($temp_array['STATUS'])) ? '' : $temp_array['STATUS']; - $temp_array['ENCODED_NAME']=$this->name; - $temp_array['NAME']=$this->name; - $temp_array['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); - $this->email1 = $temp_array['EMAIL1']; - $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); - $temp_array['ACC_NAME_FROM_ACCOUNTS'] = empty($temp_array['ACC_NAME_FROM_ACCOUNTS']) ? ($temp_array['ACCOUNT_NAME']) : ($temp_array['ACC_NAME_FROM_ACCOUNTS']); - return $temp_array; - */ - $this->_create_proper_name_field(); + $temp_array = parent::get_list_view_data(); + $temp_array['ACC_NAME_FROM_ACCOUNTS'] = empty($temp_array['ACC_NAME_FROM_ACCOUNTS']) ? ($temp_array['ACCOUNT_NAME']) : ($temp_array['ACC_NAME_FROM_ACCOUNTS']); + return $temp_array; } diff --git a/modules/Leads/views/view.convertlead.php b/modules/Leads/views/view.convertlead.php index c00128b0..5085da7f 100644 --- a/modules/Leads/views/view.convertlead.php +++ b/modules/Leads/views/view.convertlead.php @@ -446,7 +446,6 @@ class ViewConvertLead extends SugarView $beans[$module] = new $bean(); $this->populateNewBean($module, $beans[$module], $beans['Contacts'], $lead); - // when creating a new contact, create the id for linking with other modules // and do not populate it with lead's old account_id if ($module == 'Contacts') @@ -847,8 +846,6 @@ class ViewConvertLead extends SugarView $lead ) { - populateFromPost($module, $bean, true); - //Copy data from the contact to new bean foreach($bean->field_defs as $field => $def) { @@ -858,6 +855,7 @@ class ViewConvertLead extends SugarView if($field == 'date_entered') $bean->$field = gmdate($GLOBALS['timedate']->get_db_date_time_format()); //bug 41030 } } + populateFromPost($module, $bean, true); //Try to link to the new contact $contactRel = ""; if (!empty($vdef['ConvertLead']['select'])) diff --git a/modules/MailMerge/Step1.html b/modules/MailMerge/Step1.html index 5bc90162..75a0e95d 100644 --- a/modules/MailMerge/Step1.html +++ b/modules/MailMerge/Step1.html @@ -112,13 +112,13 @@ function browserCheck() { button = document.getElementById("btnNext"); button.disabled = true; - alert("This requires IE 6.0 or greater for Windows."); + alert(SUGAR.language.get('MailMerge', 'LBL_BROWSER_REQUIREMENT')); } else if(document.layers || (!document.all && document.getElementById)) { button = document.getElementById("btnNext"); button.disabled = true; - alert("This requires IE 6.0 or greater for Windows."); + alert(SUGAR.language.get('MailMerge', 'LBL_BROWSER_REQUIREMENT')); } } function clearSpan() @@ -141,7 +141,7 @@ function validateForm() } } } - alert("Please select a template."); + alert(SUGAR.language.get('MailMerge', 'LBL_FORM_SELECT_TEMPLATE')); return false; } diff --git a/modules/MailMerge/Step2.html b/modules/MailMerge/Step2.html index 62bfeef2..0f09dec6 100644 --- a/modules/MailMerge/Step2.html +++ b/modules/MailMerge/Step2.html @@ -80,7 +80,7 @@ -
    Available + {MOD.LBL_AVAILABLE} @@ -99,7 +99,7 @@
    -
    Selected + {MOD.LBL_SELECTED} @@ -396,7 +396,7 @@ function validateForm() } else { - alert("Please select at least one item."); + alert(SUGAR.language.get('MailMerge', 'LBL_SELECT_ONE')); return false; } } diff --git a/modules/MailMerge/Step3.html b/modules/MailMerge/Step3.html index e21f52a4..20c3c73f 100644 --- a/modules/MailMerge/Step3.html +++ b/modules/MailMerge/Step3.html @@ -57,7 +57,7 @@
    -Use the selections below to identify the related information you would like to display in your merged document. Skip this step if your template document contains no related information. +{MOD.LBL_RELATED_INFO_SELECTION}
    diff --git a/modules/MailMerge/language/en_us.lang.php b/modules/MailMerge/language/en_us.lang.php index 1e4c2a62..c031c798 100644 --- a/modules/MailMerge/language/en_us.lang.php +++ b/modules/MailMerge/language/en_us.lang.php @@ -73,8 +73,15 @@ $mod_strings = array ( 'LBL_CONTAINS_CONTACT_INFO' => 'Selected template contains related ', 'LBL_ADDIN_NOTICE' => 'This requires the installation of Sugar Mail Merge add-in to Microsoft Word.', 'LBL_BROWSER_NOTICE' => 'You must be running IE 6.0 or greater to perform the actual merge.', - 'LBL_REMOVE' => 'Remove Item(s)' /*for 508 compliance fix*/, - 'LBL_ADD' => 'Add Item(s)' /*for 508 compliance fix*/, + 'LBL_REMOVE' => 'Remove Item(s)' /*for 508 compliance fix*/, + 'LBL_ADD' => 'Add Item(s)' /*for 508 compliance fix*/, + 'LBL_BROWSER_REQUIREMENT' => 'This requires IE 6.0 or greater for Windows.', + 'LBL_FORM_SELECT_TEMPLATE' => 'Please select a template.', + 'LBL_SELECT_ONE' => 'Please select at least one item.', + 'LBL_AVAILABLE' => 'Available', + 'LBL_SELECTED' => 'Selected', + 'LBL_RELATED_INFO_SELECTION' => 'Use the selections below to identify the related information you would like to display in your merged document. Skip this step if your template document contains no related information.', + ); diff --git a/modules/Meetings/Meeting.php b/modules/Meetings/Meeting.php index dde43644..7c64cd9d 100644 --- a/modules/Meetings/Meeting.php +++ b/modules/Meetings/Meeting.php @@ -723,6 +723,12 @@ class Meeting extends SugarBean { $list[$notify_user->id] = $notify_user; } + global $sugar_config; + if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) { + global $current_user; + if(isset($list[$current_user->id])) + unset($list[$current_user->id]); + } return $list; } diff --git a/modules/ModuleBuilder/Module/DropDownBrowser.php b/modules/ModuleBuilder/Module/DropDownBrowser.php index b7fb6995..9cd408a1 100644 --- a/modules/ModuleBuilder/Module/DropDownBrowser.php +++ b/modules/ModuleBuilder/Module/DropDownBrowser.php @@ -43,6 +43,7 @@ class DropDownBrowser 'eapm_list_documents', 'eapm_list_import', 'extapi_meeting_password', + 'Elastic_boost_options', // 'moduleList', // We may want to put this in at a later date // 'moduleListSingular', // Same with this ); diff --git a/modules/ModuleBuilder/javascript/ModuleBuilder.js b/modules/ModuleBuilder/javascript/ModuleBuilder.js index 01f2af70..74ac8838 100644 --- a/modules/ModuleBuilder/javascript/ModuleBuilder.js +++ b/modules/ModuleBuilder/javascript/ModuleBuilder.js @@ -410,7 +410,7 @@ if (typeof(ModuleBuilder) == 'undefined') { } } else { - alert("Could not find the save action for this view."); + alert(SUGAR.language.get('ModuleBuilder', 'LBL_NO_SAVE_ACTION')); } } if (saveBtn) { diff --git a/modules/ModuleBuilder/javascript/SimpleList.js b/modules/ModuleBuilder/javascript/SimpleList.js index 28d90f45..83eeb1dc 100644 --- a/modules/ModuleBuilder/javascript/SimpleList.js +++ b/modules/ModuleBuilder/javascript/SimpleList.js @@ -93,7 +93,7 @@ if(typeof(SimpleList) == 'undefined'){ var items = ul1.getElementsByTagName("li"); for (i=0;i 'This DetailView is sync\'d with the corresponding EditView.
    Fields and field placement in this DetailView reflect the fields and field placement in the EditView.
    Changes to the DetailView cannot be saved or deployed within this page. Make changes or un-sync the layouts in the EditView. ', 'LBL_COPY_FROM_EDITVIEW' => 'Copy from EditView', 'LBL_DROPDOWN_BLANK_WARNING' => 'Values are required for both the Item Name and the Display Label. To add a blank item, click Add without entering any values for the Item Name and the Display Label.', +'LBL_DROPDOWN_KEY_EXISTS' => 'Key already exists in list', +'LBL_NO_SAVE_ACTION' => 'Could not find the save action for this view.', +'LBL_BADLY_FORMED_DOCUMENT' => 'Studio2:establishLocation: badly formed document', diff --git a/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php b/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php index 95ba6faa..c96d6a1a 100644 --- a/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php +++ b/modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php @@ -107,12 +107,30 @@ class ActivitiesRelationship extends OneToManyRelationship ); } } - - $labelDefinitions [] = array ( - 'module' => $this->lhs_module , - 'system_label' => 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel() ) . '_TITLE' , - 'display_label' => $this->lhs_label ? $this->lhs_label : ucfirst($this->lhs_module) - ) ; + + $rhs_display_label = ''; + if (!empty($this->rhs_label)) { + $rhs_display_label .= $this->rhs_label . ':'; + } + $rhs_display_label .= translate($this->rhs_module); + + $lhs_display_label = ''; + if (!empty($this->rhs_label)) { + $lhs_display_label .= $this->rhs_label . ':'; + } + $lhs_display_label .= translate($this->lhs_module); + + $labelDefinitions[] = array ( + 'module' => $this->lhs_module , + 'system_label' => 'LBL_' . strtoupper($this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel()) . '_TITLE', + 'display_label' => $rhs_display_label + ); + $labelDefinitions[] = array( + 'module' => $this->rhs_module, + 'system_label' => 'LBL_' . strtoupper($this->relationship_name . '_FROM_' . $this->getLeftModuleSystemLabel()) . '_TITLE', + 'display_label' => $lhs_display_label + ); + ActivitiesRelationship::$labelsAdded[$this->lhs_module] = true; } return $labelDefinitions ; @@ -267,4 +285,3 @@ class ActivitiesRelationship extends OneToManyRelationship 'get_subpanel_data' => $relationshipName. '_emails' ) ) ) ; } } -?> \ No newline at end of file diff --git a/modules/Prospects/Prospect.php b/modules/Prospects/Prospect.php index a763a61e..f5126038 100644 --- a/modules/Prospects/Prospect.php +++ b/modules/Prospects/Prospect.php @@ -153,19 +153,6 @@ class Prospect extends Person { $this->_create_proper_name_field(); } - function get_list_view_data() { - global $current_user; - $this->_create_proper_name_field(); - $temp_array = $this->get_list_view_array(); - $temp_array["ENCODED_NAME"] = $this->full_name; - $temp_array["FULL_NAME"] = $this->full_name; - $temp_array["EMAIL1"] = $this->emailAddress->getPrimaryAddress($this); - $this->email1 = $temp_array['EMAIL1']; - $temp_array["EMAIL1_LINK"] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); - - return $temp_array; - } - /** builds a generic search based on the query string using or do not include any $this-> because this is called on without having the class instantiated diff --git a/modules/Studio/wizards/RenameModules.php b/modules/Studio/wizards/RenameModules.php index 6d5596fa..4e3cdcdd 100644 --- a/modules/Studio/wizards/RenameModules.php +++ b/modules/Studio/wizards/RenameModules.php @@ -521,46 +521,58 @@ class RenameModules */ private function renameModuleRelatedLinks($moduleName, $moduleClass) { + global $app_strings; $GLOBALS['log']->info("Begining to renameModuleRelatedLinks for $moduleClass\n"); - $tmp = new $moduleClass; - if( ! method_exists($tmp, 'get_related_fields') ) - { - $GLOBALS['log']->info("Unable to resolve linked fields for module $moduleClass "); + $bean = BeanFactory::getBean($moduleName); + if (!$bean instanceof SugarBean){ + $GLOBALS['log']->info("Unable to get linked fields for module $moduleClass\n"); return; } - $linkedFields = $tmp->get_related_fields(); - $mod_strings = return_module_language($this->selectedLanguage, $moduleName); + $arrayToRename = array(); $replacementStrings = array(); + $mod_strings = return_module_language($this->selectedLanguage, $moduleName); + $changedModules = array_keys($this->changedModules); - foreach($linkedFields as $link => $linkEntry) + $relatedFields = $bean->get_related_fields(); + foreach($relatedFields as $field => $defs) { - //For each linked field check if the module referenced to is in our changed module list. - foreach($this->changedModules as $changedModuleName => $renameFields) - { - if( isset($linkEntry['module']) && $linkEntry['module'] == $changedModuleName) - { - $GLOBALS['log']->debug("Begining to rename for link field {$link}"); - if( !isset($mod_strings[$linkEntry['vname']]) ) - { - $GLOBALS['log']->debug("No label attribute for link $link, continuing."); - continue; - } + if (isset($defs['module']) && in_array($defs['module'], $changedModules)){ + $arrayToRename[$field] = $defs; + } + } + $linkedFields = $bean->get_linked_fields(); + foreach($linkedFields as $field => $defs) + { + if ($bean->load_relationship($defs['name'])){ + $relModule = $bean->$defs['name']->getRelatedModuleName(); + if (in_array($relModule, $changedModules)) { + $defs['module'] = $relModule; + $arrayToRename[$field] = $defs; + } + } + } - $replaceKey = $linkEntry['vname']; - $oldStringValue = $mod_strings[$replaceKey]; - // 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'; + foreach($arrayToRename as $link => $linkEntry) + { + $GLOBALS['log']->debug("Begining to rename for link field {$link}"); + if( !isset($linkEntry['vname']) + || (!isset($mod_strings[$linkEntry['vname']]) && !isset($app_strings[$linkEntry['vname']]))) { + $GLOBALS['log']->debug("No label attribute for link $link, continuing."); + continue; + } - } - $replacedString = str_replace(html_entity_decode_utf8($renameFields['prev_' . $key], ENT_QUOTES), $renameFields[$key], $oldStringValue); - $replacementStrings[$replaceKey] = $replacedString; - } + $replaceKey = $linkEntry['vname']; + $oldStringValue = translate($replaceKey, $moduleName); + $renameFields = $this->changedModules[$linkEntry['module']]; + + 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; } //Now we can write out the replaced language strings for each module diff --git a/modules/Users/User.php b/modules/Users/User.php index f829c453..2242b210 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -927,11 +927,10 @@ EOQ; function get_list_view_data() { - global $current_user, $mod_strings; - // Bug #48555 Not User Name Format of User's locale. - $this->_create_proper_name_field(); + global $mod_strings; + + $user_fields = parent::get_list_view_data(); - $user_fields = $this->get_list_view_array(); if ($this->is_admin) $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '',null,null,'.gif',$mod_strings['LBL_CHECKMARK']); elseif (!$this->is_admin) $user_fields['IS_ADMIN'] = ''; @@ -955,7 +954,6 @@ EOQ; $user_fields['REPORTS_TO_NAME'] = $this->reports_to_name; - $user_fields['EMAIL1'] = $this->emailAddress->getPrimaryAddress($this); return $user_fields; } diff --git a/modules/Users/UserEditView.js b/modules/Users/UserEditView.js index da503fd8..247de9be 100644 --- a/modules/Users/UserEditView.js +++ b/modules/Users/UserEditView.js @@ -80,6 +80,6 @@ if(hide_td!=null) if(remove_td!=null) {var remove_ref=remove_td.getElementsByTagName('select')[0];for(i=0;iinfo("ldapauth: Binding user " . $bind_user); + $GLOBALS['log']->info("ldapauth: Binding user " . $bind_user); $bind = ldap_bind($ldapconn, $bind_user, $bind_password); - $error = ldap_errno($ldapconn); - if($this->loginError($error)){ - $GLOBALS['log']->fatal('[LDAP] ATTEMPTING BIND USING BASE DN PARAMS'); - $bind = ldap_bind($ldapconn, $GLOBALS['ldap_config']->settings['ldap_bind_attr'] . "=" . $bind_user . "," . $GLOBALS['ldap_config']->settings['ldap_base_dn'], $bind_password); - $error = ldap_errno($ldapconn); - if($this->loginError($error)){ - return ''; - } + $error = ldap_errno($ldapconn); + if($this->loginError($error)){ + $full_user = $GLOBALS['ldap_config']->settings['ldap_bind_attr'] . "=" . $bind_user . "," . $GLOBALS['ldap_config']->settings['ldap_base_dn']; + $GLOBALS['log']->info("ldapauth: Binding user " . $full_user); + $bind = ldap_bind($ldapconn, $full_user, $bind_password); + $error = ldap_errno($ldapconn); + if($this->loginError($error)){ + return ''; + } } $GLOBALS['log']->info("ldapauth: Bind attempt complete."); @@ -117,7 +118,7 @@ class LDAPAuthenticateUser extends SugarAuthenticateUser{ } } - $GLOBALS['log']->debug("ldapauth: Fetching user info from Directory."); + $GLOBALS['log']->debug("ldapauth: Fetching user info from Directory using base dn: " . $base_dn . ", name_filter: " . $name_filter . ", attrs: " . var_export($attrs)); $result = @ldap_search($ldapconn, $base_dn, $name_filter, $attrs); $error = ldap_errno($ldapconn); if($this->loginError($error)){ @@ -157,8 +158,21 @@ class LDAPAuthenticateUser extends SugarAuthenticateUser{ }else{ $user_uid = $info[0][$group_user_attr]; } - //user is not a member of the group if the count is zero get the logs and return no id so it fails login - if(!isset($user_uid[0]) || ldap_count_entries($ldapconn, ldap_search($ldapconn,$GLOBALS['ldap_config']->settings['ldap_group_name'] . ",". $GLOBALS['ldap_config']->settings['ldap_group_dn'] ,"($group_attr=" . $user_uid[0] . ")")) == 0){ + + // build search query and determine if we are searching for a bare id or the full dn path + $group_name = $GLOBALS['ldap_config']->settings['ldap_group_name'] . "," . $GLOBALS['ldap_config']->settings['ldap_group_dn']; + $GLOBALS['log']->debug("ldapauth: Searching for group name: " . $group_name); + $user_search = ""; + if(!empty($GLOBALS['ldap_config']->settings['ldap_group_attr_req_dn']) && $GLOBALS['ldap_config']->settings['ldap_group_attr_req_dn'] == 1) { + $GLOBALS['log']->debug("ldapauth: Checking for group membership using full user dn"); + $user_search = "($group_attr=" . $group_user_attr . "=" . $user_uid[0] . "," . $base_dn . ")"; + } else { + $user_search = "($group_attr=" . $user_uid[0] . ")"; + } + $GLOBALS['log']->debug("ldapauth: Searching for user: " . $user_search); + + //user is not a member of the group if the count is zero get the logs and return no id so it fails login + if(!isset($user_uid[0]) || ldap_count_entries($ldapconn, ldap_search($ldapconn,$group_name, $user_search)) == 0){ $GLOBALS['log']->fatal("ldapauth: User ($name) is not a member of the LDAP group"); $user_id = var_export($user_uid, true); $GLOBALS['log']->debug("ldapauth: Group DN:{$GLOBALS['ldap_config']->settings['ldap_group_dn']} Group Name: " . $GLOBALS['ldap_config']->settings['ldap_group_name'] . " Group Attribute: $group_attr User Attribute: $group_user_attr :(" . $user_uid[0] . ")"); diff --git a/modules/Users/reassignUserRecords.php b/modules/Users/reassignUserRecords.php index 4574da9c..3a2a292f 100644 --- a/modules/Users/reassignUserRecords.php +++ b/modules/Users/reassignUserRecords.php @@ -255,7 +255,7 @@ else if(!isset($_GET['execute'])){ $tousername = $_POST['touser']; $query = "select user_name, id from users where id in ('{$_POST['fromuser']}', '{$_POST['touser']}')"; - $res = $GLOBALS['db']->query($query); + $res = $GLOBALS['db']->query($query, true); while($row = $GLOBALS['db']->fetchByAssoc($res)){ if($row['id'] == $_POST['fromuser']) $fromusername = $row['user_name']; @@ -354,7 +354,7 @@ else if(!isset($_GET['execute'])){ $_SESSION['reassignRecords']['modules'][$module]['query'] = $query; $_SESSION['reassignRecords']['modules'][$module]['update'] = $updatequery; - $res = $GLOBALS['db']->query($countquery); + $res = $GLOBALS['db']->query($countquery, true); $row = $GLOBALS['db']->fetchByAssoc($res); echo "{$row['count']} {$mod_strings_users['LBL_REASS_RECORDS_FROM']} {$app_list_strings['moduleList'][$p_module]} {$mod_strings_users['LBL_REASS_WILL_BE_UPDATED']}\n
    \n"; diff --git a/robots.txt b/robots.txt index 1f53798b..3b5afa4e 100644 --- a/robots.txt +++ b/robots.txt @@ -1,2 +1,5 @@ User-agent: * Disallow: / + +User-agent: Googlebot +Allow: /ical_server.php diff --git a/soap/SoapHelperFunctions.php b/soap/SoapHelperFunctions.php index 87ac4b39..fb4040c7 100644 --- a/soap/SoapHelperFunctions.php +++ b/soap/SoapHelperFunctions.php @@ -376,6 +376,10 @@ function get_name_value_list($value, $returnDomValue = false){ }elseif(strcmp($type, 'enum') == 0 && !empty($var['options']) && $returnDomValue){ $val = $app_list_strings[$var['options']][$val]; } + elseif(strcmp($type, 'currency') == 0){ + $params = array( 'currency_symbol' => false ); + $val = currency_format_number($val, $params); + } $list[$var['name']] = get_name_value($var['name'], $val); } diff --git a/sugar_version.php b/sugar_version.php index 72a48402..34a9ce75 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.5.11'; -$sugar_db_version = '6.5.11'; +$sugar_version = '6.5.12'; +$sugar_db_version = '6.5.12'; $sugar_flavor = 'CE'; -$sugar_build = '8754'; -$sugar_timestamp = '2013-02-27 02:07pm'; +$sugar_build = '1046'; +$sugar_timestamp = '2013-04-02 11:00pm'; ?> diff --git a/tests/data/Bug60442Test.php b/tests/data/Bug60442Test.php new file mode 100755 index 00000000..b5c7443d --- /dev/null +++ b/tests/data/Bug60442Test.php @@ -0,0 +1,41 @@ +id = create_guid(); + $bean->fetched_row['assigned_user_id'] = 1; + $bean->assigned_user_id = 2; + $this->assertTrue($bean->isOwner(1), 'Incorrect ownership'); + } +} diff --git a/tests/include/Dashlets/Bug52173Test.php b/tests/include/Dashlets/Bug52173Test.php new file mode 100755 index 00000000..60a3e112 --- /dev/null +++ b/tests/include/Dashlets/Bug52173Test.php @@ -0,0 +1,183 @@ +createCustomField(); + $this->getSugarWidgetFieldRelate(); + + $this->account = SugarTestAccountUtilities::createAccount(); + $this->contact1 = SugarTestContactUtilities::createContact(); + $this->contact2 = SugarTestContactUtilities::createContact(); + } + + public function tearDown() + { + $this->relateField->delete($this->df); + $this->rc->repairAndClearAll(array("rebuildExtensions", "clearVardefs"), array("Contact"), false, false); + + SugarTestAccountUtilities::removeAllCreatedAccounts(); + SugarTestContactUtilities::removeAllCreatedContacts(); + SugarTestHelper::tearDown(); + } + + /** + * Create the custom field with type 'relate' + */ + protected function createCustomField() + { + $field = get_widget('relate'); + $field->id = 'Contacts'. $this->field_name_c; + $field->name = $this->field_name_c; + $field->type = 'relate'; + $field->label = 'LBL_' . strtoupper($this->field_name_c); + $field->ext2 = 'Accounts'; + $field->view_module = 'Contacts'; + $this->relateField = $field; + + $this->bean =BeanFactory::getBean('Contacts'); + $this->df = new DynamicField($this->bean->module_name); + $this->df->setup($this->bean); + $field->save($this->df); + + $this->rc = new RepairAndClear(); + $this->rc->repairAndClearAll(array("rebuildExtensions", "clearVardefs"), array('Contact'), false, false); + } + + /** + * Create SugarWidget for relate field + */ + public function getSugarWidgetFieldRelate() + { + $layoutManager = new LayoutManager(); + $layoutManager->setAttribute('context', 'Report'); + $db = new stdClass(); + $db->db = $GLOBALS['db']; + $db->report_def_str = ''; + $layoutManager->setAttributePtr('reporter', $db); + $this->sugarWidget = new SugarWidgetFieldrelate($layoutManager); + } + + /* + * Check correct execution of the query for Dashlets if filter contains default bean's relate field + * @return void + */ + public function testDefaultRelateField() + { + $this->contact2->account_id = $this->account->id; + $this->contact2->save(); + $layoutDef = array( 'name' => 'account_name', + 'id_name' => 'account_id', + 'type' => 'relate', + 'link' => 'accounts_contacts', + 'table' => 'contacts', + 'table_alias' => 'contacts', + 'module' => 'Contacts', + 'input_name0' => array( 0 => $this->account->id ), + ); + $out = $this->sugarWidget->queryFilterone_of($layoutDef); + $this->assertContains($this->contact2->id, $out, 'The request for existing relate field was made incorrectly'); + } + + /* + * Check correct execution of the query for Dashlets + * if filter contains default bean's relate field with same LHS and RHS modules + * @return void + */ + public function testDefaultRelateFieldForSameLHSAndRHSModules() + { + $this->contact2->reports_to_id = $this->contact1->id; + $this->contact2->save(); + $layoutDef = array( 'name' => 'report_to_name', + 'id_name' => 'reports_to_id', + 'type' => 'relate', + 'link' => 'contact_direct_reports', + 'table' => 'contacts', + 'table_alias' => 'contacts', + 'module' => 'Contacts', + 'input_name0' => array( 0 => $this->contact2->reports_to_id ), + ); + $out = $this->sugarWidget->queryFilterone_of($layoutDef); + $this->assertContains($this->contact2->id, $out, 'The request for existing relate field which has same LHS and RHS modules was made incorrectly'); + } + + /* + * Check correct execution of the query for Dashlets if filter contains custom relate field + * @return void + */ + public function testCustomRelateFieldInDashlet() + { + $id = $this->relateField->ext3; + $this->contact2->$id = $this->account->id; + $this->contact2->save(); + $layoutDef = array( 'name' => $this->relateField->name, + 'id_name' => $this->relateField->ext3, + 'type' => 'relate', + 'ext2' => 'Accounts', + 'custom_module' => 'Contacts', + 'table' => 'contacts_cstm', + 'table_alias' => 'contacts', + 'module' => 'Accounts', + 'input_name0' => array( 0 => $this->account->id ), + ); + $out = $this->sugarWidget->queryFilterone_of($layoutDef); + $this->assertContains($this->contact2->id, $out, 'The request for custom relate field was made incorrectly'); + } +} diff --git a/tests/include/SugarCharts/Bug52901Test.php b/tests/include/SugarCharts/Bug52901Test.php deleted file mode 100755 index da89ef28..00000000 --- a/tests/include/SugarCharts/Bug52901Test.php +++ /dev/null @@ -1,262 +0,0 @@ - array( - array( - '' => - array( - '' => - array( - 'numerical_value' => 1, - 'group_text' => '', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => '', - ), - ), - 'Bar' => - array( - 'Foo' => - array( - 'numerical_value' => 1, - 'group_text' => 'Bar', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Foo', - ), - ), - ), - array('', 'Foo'), - array('type', 'industry'), - array('', 'Foo', '', 'Foo'), - ), - // Accounts: - // 1. type = 'Foo', industry = 'Bar'; - // 2. type = 'Bar', industry = 'Foo' - 'bothDifferentTypeAndIndustry' => array( - array( - 'Foo' => - array( - 'Bar' => - array( - 'numerical_value' => 1, - 'group_text' => 'Foo', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Bar', - ), - ), - 'Bar' => - array( - 'Foo' => - array( - 'numerical_value' => 1, - 'group_text' => 'Bar', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Foo', - ), - ), - ), - array('Foo', 'Bar'), - array('type', 'industry'), - array('Foo', 'Bar', 'Foo', 'Bar'), - ), - // Accounts: - // 1. type = 'Foo', industry = 'Foo'; - // 2. type = 'Bar', industry = 'Bar' - 'bothEqualTypeAndIndustry' => array( - array( - 'Bar' => - array( - 'Bar' => - array( - 'numerical_value' => 1, - 'group_text' => 'Bar', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Bar', - ), - ), - 'Foo' => - array( - 'Foo' => - array( - 'numerical_value' => 1, - 'group_text' => 'Foo', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Foo', - ), - ), - ), - array('Foo', 'Bar'), - array('type', 'industry'), - array('Foo', 'Bar', 'Foo', 'Bar'), - ), - // Accounts: Single group by. only by type - // 1. type = 'Foo' - // 2. type = 'Bar' - 'onlyByType' => array( - array( - 'Bar' => - array( - 'Bar' => - array( - 'numerical_value' => 1, - 'group_text' => 'Bar', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Bar', - ), - ), - 'Foo' => - array( - 'Foo' => - array( - 'numerical_value' => 1, - 'group_text' => 'Foo', - 'group_key' => 'self:account_type', - 'count' => '', - 'group_label' => 'someHtml', - 'numerical_label' => 'someHtml', - 'numerical_key' => 'count', - 'module' => 'Accounts', - 'group_base_text' => 'Foo', - ), - ), - ), - array('Foo', 'Bar'), - array('type'), - array(), - ), - ); - - return $dataSeed; - } - - /** - * Test that is filled properly - * - * @param $dataSet array dataSet for JitReports - * @param $superSet array super_set for JitReports - * @param $groupBy array array of group_by levels - * @param $expectedSubgroupNodesTitles array expected list of values of node in each node <subgroups> - * - * @dataProvider dataFeed - * @group 52901 - */ - public function testXMLIsGeneratedProperly($dataSet, $superSet, $groupBy, $expectedSubgroupNodesTitles) - { - $JR = new JitReports(); - $JR->setData($dataSet); - $JR->super_set = $superSet; - $JR->setDisplayProperty('thousands', false); - $JR->group_by = $groupBy; - - // We do this because the function which is under the test (xmlDataReportChart()) returns XML without root node and thus causes XML parse error - $actualXML = '<data>' . $JR->xmlDataReportChart() . '</data>'; - - // Get the list of <title> node value elements of each <subgroup> - $dom = new DomDocument(); - $dom->loadXML($actualXML); - $xpath = new DomXPath($dom); - $nodes = $xpath->query('group/subgroups/group/title'); - $actualSubgroupNodesTitlesArray = array(); - foreach ($nodes as $node) - { - $actualSubgroupNodesTitlesArray[] = $node->nodeValue; - } - - $this->assertEquals($expectedSubgroupNodesTitles, $actualSubgroupNodesTitlesArray); - } - -} \ No newline at end of file diff --git a/tests/include/database/DBManagerTest.php b/tests/include/database/DBManagerTest.php index f45750c6..044c6802 100755 --- a/tests/include/database/DBManagerTest.php +++ b/tests/include/database/DBManagerTest.php @@ -220,12 +220,12 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase public function testRetrieveView() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testCreateTable() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testCreateTableParams() @@ -254,7 +254,7 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase public function testRepairTable() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testRepairTableNoChanges() @@ -726,431 +726,467 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase $this->dropTableName($tablename2); } -// public function testCompareIndexInTables() -// { -// $tablename1 = 'test9_' . mt_rand(); -// $this->_db->createTableParams($tablename1, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename1, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// $tablename2 = 'test10_' . mt_rand(); -// $this->_db->createTableParams($tablename2, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename2, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// -// $res = $this->_db->compareIndexInTables( -// 'idx_foo', $tablename1, $tablename2); -// -// $this->assertEquals($res['msg'],'match'); -// -// $this->_db->dropTableName($tablename1); -// $this->_db->dropTableName($tablename2); -// } -// -// public function testCompareIndexInTablesNotInTable1() -// { -// $tablename1 = 'test11_' . mt_rand(); -// $this->_db->createTableParams($tablename1, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename1, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// $tablename2 = 'test12_' . mt_rand(); -// $this->_db->createTableParams($tablename2, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename2, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// -// $res = $this->_db->compareIndexInTables( -// 'idx_foo', $tablename1, $tablename2); -// -// $this->assertEquals($res['msg'],'not_exists_table1'); -// -// $this->_db->dropTableName($tablename1); -// $this->_db->dropTableName($tablename2); -// } -// -// public function testCompareIndexInTablesNotInTable2() -// { -// $tablename1 = 'test13_' . mt_rand(); -// $this->_db->createTableParams($tablename1, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename1, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// $tablename2 = 'test14_' . mt_rand(); -// $this->_db->createTableParams($tablename2, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_'. $tablename2, -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// -// $res = $this->_db->compareIndexInTables( -// 'idx_foo', $tablename1, $tablename2); -// -// $this->assertEquals($res['msg'],'not_exists_table2'); -// -// $this->_db->dropTableName($tablename1); -// $this->_db->dropTableName($tablename2); -// } -// -// public function testCompareIndexInTablesIndexesDoNotMatch() -// { -// $tablename1 = 'test15_' . mt_rand(); -// $this->_db->createTableParams($tablename1, -// array( -// 'foo' => array ( -// 'name' => 'foo', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_foo', -// 'type' => 'index', -// 'fields' => array('foo'), -// ) -// ) -// ); -// $tablename2 = 'test16_' . mt_rand(); -// $this->_db->createTableParams($tablename2, -// array( -// 'foo' => array ( -// 'name' => 'foobar', -// 'type' => 'varchar', -// 'len' => '255', -// ), -// ), -// array( -// array( -// 'name' => 'idx_foo', -// 'type' => 'index', -// 'fields' => array('foobar'), -// ) -// ) -// ); -// -// $res = $this->_db->compareIndexInTables( -// 'idx_foo', $tablename1, $tablename2); -// -// $this->assertEquals($res['msg'],'no_match'); -// -// $this->_db->dropTableName($tablename1); -// $this->_db->dropTableName($tablename2); -// } - - public function testCreateIndex() - { - // TODO: Write this test - } - public function testAddIndexes() { - //TODO Fix test with normal index inspection - $this->markTestIncomplete( - 'TODO Reimplement test not using compareIndexInTables.' - ); - $tablename1 = 'test17_' . mt_rand(); - $this->createTableParams($tablename1, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array( - array( - 'name' => 'idx_foo', - 'type' => 'index', - 'fields' => array('foo'), - ) - ) - ); - $tablename2 = 'test18_' . mt_rand(); - $this->createTableParams($tablename2, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array() - ); - - // first test not executing the statement - $this->_db->addIndexes( - $tablename2, - array(array( + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ) + ); + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )), - false); + ) + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->dropTableName($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + $tableName = 'test18_' . mt_rand(); + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ) + ); + $indexes = array(); + $this->createTableParams($tableName, $fields, $indexes); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ) + ); - $this->assertEquals($res['msg'],'not_exists_table2'); + // first test not executing the statement + $this->_db->addIndexes($tableName, $indexes, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes were created'); // now, execute the statement - $this->_db->addIndexes( - $tablename2, - array(array( + $this->_db->addIndexes($tableName, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + } + + public function testDropIndexes() + { + $tableName = 'test19_' . mt_rand(); + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ) + ); + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )) - ); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + ) + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); - $this->assertEquals($res['msg'],'match'); + // first test not executing the statement + $this->_db->dropIndexes($tableName, $indexes, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are missed'); - $this->dropTableName($tablename1); - $this->dropTableName($tablename2); + // now, execute the statement + $this->_db->dropIndexes($tableName, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes were not dropped'); } - public function testDropIndexes() + public function testModifyIndexes() { - //TODO Fix test with normal index inspection - $this->markTestIncomplete( - 'TODO Reimplement test not using compareIndexInTables.' - ); + $tableName = 'test21_' . mt_rand(); + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'foobar' => array ( + 'name' => 'foobar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ) + ); + $this->createTableParams($tableName, $fields, $indexes); - $tablename1 = 'test19_' . mt_rand(); - $this->createTableParams($tablename1, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array( - array( - 'name' => 'idx_foo', - 'type' => 'index', - 'fields' => array('foo'), - ) - ) - ); - $tablename2 = 'test20_' . mt_rand(); - $this->createTableParams($tablename2, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array( - array( - 'name' => 'idx_foo', - 'type' => 'index', - 'fields' => array('foo'), - ) - ) - ); + $indexesNew = $indexes; + $indexesNew['idx_foo']['fields'] = array('foobar'); + $this->_db->modifyIndexes($tableName, $indexesNew, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + + $this->_db->modifyIndexes($tableName, $indexesNew); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexesNew, $indexesDB, 'Indexes are incorrect'); + } - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + public function testAddIndexByMultiQuery() + { + $tableName = 'test22_' . mt_rand(); + $this->created[$tableName] = true; + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ) + ); + $indexes = array(); - $this->assertEquals('match', $res['msg']); + $queries = array(); + $queries[] = $this->_db->createTableSQLParams($tableName, $fields, $indexes); - // first test not executing the statement - $this->_db->dropIndexes( - $tablename2, - array(array( + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )), - false); + ) + ); + $tQueries = $this->_db->addIndexes($tableName, $indexes, false); + $queries = array_merge($queries, explode(";\n", rtrim($tQueries, ";\n"))); + $this->_db->query($queries, true); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + } - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + public function testDropIndexByMultiQuery() + { + $tableName = 'test23_' . mt_rand(); + $this->created[$tableName] = true; + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ) + ); + $indexes = array(); - $this->assertEquals('match', $res['msg']); + $queries = array(); + $queries[] = $this->_db->createTableSQLParams($tableName, $fields, $indexes); - // now, execute the statement - $sql = $this->_db->dropIndexes( - $tablename2, - array(array( + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )), - true - ); + ) + ); + $tQueries = $this->_db->addIndexes($tableName, $indexes, false); + $queries = array_merge($queries, explode(";\n", rtrim($tQueries, ";\n"))); + $tQueries = $this->_db->dropIndexes($tableName, $indexes, false); + $queries = array_merge($queries, explode(";\n", rtrim($tQueries, ";\n"))); + $this->_db->query($queries, true); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes were not dropped'); + } + + public function testModifyIndexByMultiQuery() + { + $tableName = 'test24_' . mt_rand(); + $this->created[$tableName] = true; + $fields = array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'foobar' => array ( + 'name' => 'foobar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array(); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + $queries = array(); + $queries[] = $this->_db->createTableSQLParams($tableName, $fields, $indexes); - $this->assertEquals('not_exists_table2', $res['msg']); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ) + ); + $tQueries = $this->_db->addIndexes($tableName, $indexes, false); + $queries = array_merge($queries, explode(";\n", rtrim($tQueries, ";\n"))); - $this->dropTableName($tablename1); - $this->dropTableName($tablename2); + $indexesNew = $indexes; + $indexesNew['idx_foo']['fields'] = array('foobar'); + $tQueries = $this->_db->modifyIndexes($tableName, $indexesNew, false); + $queries = array_merge($queries, explode(";\n", rtrim($tQueries, ";\n"))); + $this->_db->query($queries); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexesNew, $indexesDB, 'Indexes are incorrect'); } - public function testModifyIndexes() + public function testAddMultiIndexes() { - //TODO Fix test with normal index inspection - $this->markTestIncomplete( - 'TODO Reimplement test not using compareIndexInTables.' - ); - $tablename1 = 'test21_' . mt_rand(); - $this->createTableParams($tablename1, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - 'foobar' => array ( - 'name' => 'foobar', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array( - array( - 'name' => 'idx_'. $tablename1, - 'type' => 'index', - 'fields' => array('foo'), - ) - ) - ); - $tablename2 = 'test22_' . mt_rand(); - $this->createTableParams($tablename2, - array( - 'foo' => array ( - 'name' => 'foo', - 'type' => 'varchar', - 'len' => '255', - ), - 'foobar' => array ( - 'name' => 'foobar', - 'type' => 'varchar', - 'len' => '255', - ), - ), - array( - array( - 'name' => 'idx_'. $tablename2, - 'type' => 'index', - 'fields' => array('foobar'), - ) - ) - ); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array(); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes are incorrect'); - $this->assertEquals($res['msg'],'no_match'); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $this->_db->addIndexes($tableName, $indexes, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB); - $this->_db->modifyIndexes( - $tablename2, - array(array( + $this->_db->addIndexes($tableName, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + } + + public function testDropMultiIndexes() + { + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )), - false); + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + $this->_db->dropIndexes($tableName, $indexes, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB); - $this->assertEquals($res['msg'],'no_match'); + $this->_db->dropIndexes($tableName, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes are incorrect'); + } - $this->_db->modifyIndexes( - $tablename2, - array(array( + public function testModifyMultiIndexes() + { + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array( + 'idx_foo' => array( 'name' => 'idx_foo', 'type' => 'index', 'fields' => array('foo'), - )) - ); + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); - $res = $this->_db->compareIndexInTables( - 'idx_foo', $tablename1, $tablename2); + $indexesNew = $indexes; + $indexesNew['idx_foo']['fields'] = array('bar'); + $indexesNew['idx_bar']['fields'] = array('foo'); + $this->_db->modifyIndexes($tableName, $indexesNew, false); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); - $this->assertEquals($res['msg'],'match'); + $this->_db->modifyIndexes($tableName, $indexesNew); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexesNew, $indexesDB, 'Indexes are incorrect'); + } - $this->dropTableName($tablename1); - $this->dropTableName($tablename2); + public function testAddMultiIndexesByMultiQuery() + { + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array(); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes are incorrect'); + + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $queries = $this->_db->addIndexes($tableName, $indexes, false); + $queries = explode(";\n", rtrim(trim($queries), ';')); + $this->_db->query($queries); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + } + + public function testDropMultiIndexesByMultiQuery() + { + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + + $queries = $this->_db->dropIndexes($tableName, $indexes, false); + $queries = explode(";\n", rtrim(trim($queries), ';')); + $this->_db->query($queries); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEmpty($indexesDB, 'Indexes are incorrect'); + } + + public function testModifyMultiIndexesByMultiQuery() + { + $tableName = 'test17_' . mt_rand(); + $fields = array( + 'foo' => array( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '255', + ), + 'bar' => array( + 'name' => 'bar', + 'type' => 'varchar', + 'len' => '255', + ), + ); + $indexes = array( + 'idx_foo' => array( + 'name' => 'idx_foo', + 'type' => 'index', + 'fields' => array('foo'), + ), + 'idx_bar' => array( + 'name' => 'idx_bar', + 'type' => 'index', + 'fields' => array('bar'), + ), + ); + $this->createTableParams($tableName, $fields, $indexes); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexes, $indexesDB, 'Indexes are incorrect'); + + $indexesNew = $indexes; + $indexesNew['idx_foo']['fields'] = array('bar'); + $indexesNew['idx_bar']['fields'] = array('foo'); + $queries = $this->_db->modifyIndexes($tableName, $indexesNew, false); + $queries = explode(";\n", rtrim(trim($queries), ';')); + $this->_db->query($queries); + $indexesDB = $this->_db->get_indices($tableName); + $this->assertEquals($indexesNew, $indexesDB, 'Indexes are incorrect'); } public function testAddColumn() @@ -1292,7 +1328,7 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase public function testDropTable() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testDropTableName() @@ -1317,7 +1353,7 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase public function testDeleteColumn() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testDisconnectAll() @@ -1418,7 +1454,7 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase public function testConnect() { - // TODO: Write this test + $this->markTestIncomplete('Write this test'); } public function testDisconnect() diff --git a/tests/include/database/MssqlManagerTest.php b/tests/include/database/MssqlManagerTest.php index 03a86464..fa974d64 100755 --- a/tests/include/database/MssqlManagerTest.php +++ b/tests/include/database/MssqlManagerTest.php @@ -569,6 +569,88 @@ class MssqlManagerTest extends Sugar_PHPUnit_Framework_TestCase "(ORDER BY isnull(accounts.name,'') ASC)" ), + array( + "SELECT DISTINCT meetings.id, + LTRIM(RTRIM(ISNULL(jt0.first_name,'')+' '+ISNULL(jt0.last_name,''))) assigned_user_name, + 'Users' assigned_user_name_mod, + meetings.date_entered + FROM meetings + LEFT JOIN + users jt0 + ON + meetings.assigned_user_id=jt0.id + AND jt0.deleted=0 + AND jt0.deleted=0 + LEFT JOIN + sugarfavorites sfav + ON + sfav.module ='Meetings' + AND sfav.record_id=meetings.id + AND sfav.created_by='1' + AND sfav.deleted=0 + where ( + (meetings.status IN ('Planned')) + AND (meetings.assigned_user_id IN ('1','seed_chris_id','seed_jim_id')) + ) AND meetings.deleted=0 + ORDER BY + meetings.date_entered DESC + ", + 1, + 1, + "group by meetings.id, LTRIM(RTRIM(ISNULL(jt0.first_name,'')+' '+ISNULL(jt0.last_name,''))), meetings.date_entered" + ), + + array( + "SELECT DISTINCT m1.id, + m1.name, + m1.date_start, + m1.date_end, + m1.assigned_user_id + FROM + meetings_users rt + inner join + meetings m1 + on + rt.meeting_id = m1.id + inner join + users m2 + on + rt.user_id = m2.id + AND m2.id = '1' + WHERE + (m1.deleted = 0) + AND m2.id = '1' + ", + 1, + 1, + "(ORDER BY m1.id, m1.name, m1.date_start, m1.date_end, m1.assigned_user_id)" + ), + + array( + "SELECT DISTINCT rt.id, + m1.name, + m1.date_start, + m1.date_end, + m1.assigned_user_id + FROM + meetings_users rt + inner join + meetings m1 + on + rt.meeting_id = m1.id + inner join + users m2 + on + rt.user_id = m2.id + AND m2.id = '1' + WHERE + (m1.deleted = 0) + AND m2.id = '1' + ", + 1, + 1, + "(ORDER BY rt.id, m1.name, m1.date_start, m1.date_end, m1.assigned_user_id)" + ), ); } } diff --git a/tests/include/generic/SugarWidgets/Bug59126Test.php b/tests/include/generic/SugarWidgets/Bug59126Test.php index e99c6a43..57d0180f 100755 --- a/tests/include/generic/SugarWidgets/Bug59126Test.php +++ b/tests/include/generic/SugarWidgets/Bug59126Test.php @@ -72,6 +72,24 @@ class Bug59126Test extends Sugar_PHPUnit_Framework_TestCase $this->assertRegExp($regExpPattern, $html); } + public function testCustomField() + { + $layoutDef = array( + 'table' => $this->contact->table_name, + 'module' => $this->contact->module_name, + 'custom_module' => 'Contacts', + 'input_name0' => array(), + 'name' => 'customField', + 'rname' => 'name', + ); + $html = $this->getSugarWidgetFieldRelate()->displayInput($layoutDef); + $regExpPattern = $this->getAssertRegExp( + $this->contact->id, + "{$this->contact->first_name}\s+{$this->contact->last_name}" + ); + $this->assertRegExp($regExpPattern, $html); + } + private function getAssertRegExp($value, $text) { $pattern = '/\<option.+value="' . $value . '".*\>' . $text . '\<\/option\>/i'; diff --git a/tests/modules/Documents/Bug61144Test.php b/tests/modules/Documents/Bug61144Test.php new file mode 100755 index 00000000..05ddedc0 --- /dev/null +++ b/tests/modules/Documents/Bug61144Test.php @@ -0,0 +1,98 @@ +<?php +/********************************************************************************* + * By installing or using this file, you are confirming on behalf of the entity + * subscribed to the SugarCRM Inc. product ("Company") that Company is bound by + * the SugarCRM Inc. Master Subscription Agreement (“MSA”), which is viewable at: + * http://www.sugarcrm.com/master-subscription-agreement + * + * If Company is not bound by the MSA, then by installing or using this file + * you are agreeing unconditionally that Company will be bound by the MSA and + * certifying that you have authority to bind Company accordingly. + * + * Copyright (C) 2004-2013 SugarCRM Inc. All rights reserved. + ********************************************************************************/ + +/** + * Bug #61144: remove doc link in field: Related Document, if linked doc is got deleted from the system + * + * @ticket 61144 + */ + +require_once('modules/Documents/Document.php'); + +class Bug61144Test extends Sugar_PHPUnit_Framework_TestCase +{ + protected $parent_doc; + protected $relate_doc; + + /** + * @var DocumentRevision + */ + protected $revision; + + public function setUp() + { + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); + SugarTestHelper::setUp('current_user'); + + $this->relate_doc = new Document(); + $this->relate_doc->document_name = 'Relate doc'; + $this->relate_doc->save(); + + $this->parent_doc = new Document(); + $this->parent_doc->document_name = 'Parent doc'; + $this->parent_doc->related_doc_id = $this->relate_doc->id; + $this->parent_doc->save(); + + $this->revision = new DocumentRevision(); + $this->revision->revision = 1; + $this->revision->doc_id = $this->relate_doc->id; + $this->revision->save(); + } + + public function tearDown() + { + SugarTestHelper::tearDown(); + $GLOBALS['db']->query("DELETE FROM documents WHERE id in ('{$this->relate_doc->id}', '{$this->parent_doc->id}')"); + $GLOBALS['db']->query("DELETE FROM {$this->revision->table_name} WHERE id in ('{$this->revision->id}')"); + } + + /** + * @group 61144 + */ + public function testDeleteRelateDocument() + { + $this->relate_doc->mark_deleted($this->relate_doc->id); + $this->parent_doc->fill_in_additional_detail_fields(); + $this->assertEmpty($this->parent_doc->related_doc_name); + } + + /** + * @group 61144 + */ + public function testRealteDocumentExist() + { + $this->parent_doc->fill_in_additional_detail_fields(); + $this->assertEquals('Relate doc', $this->parent_doc->related_doc_name); + } + + /** + * @group 61144 + */ + public function testDeleteRelateDocumentRevision() + { + $this->revision->mark_deleted($this->revision->id); + $actual = $this->revision->get_document_revision_name($this->revision->id); + $this->assertEmpty($actual, 'Deleted data is returned'); + } + + /** + * @group 61144 + */ + public function testRealteDocumentRevision() + { + $actual = $this->revision->get_document_revision_name($this->revision->id); + $this->assertEquals($this->revision->revision, $actual, 'Revision is incorrect'); + } +} diff --git a/tests/modules/MassUpdate/Bug51596Test.php b/tests/modules/MassUpdate/Bug51596Test.php index d477c1ef..1b889761 100755 --- a/tests/modules/MassUpdate/Bug51596Test.php +++ b/tests/modules/MassUpdate/Bug51596Test.php @@ -65,6 +65,8 @@ class Bug51596Test extends Sugar_PHPUnit_Framework_TestCase { SugarTestHelper::setUp('mod_strings', array('Administration')); SugarTestHelper::setUp('current_user', array(true, true)); + SugarTestHelper::setUp('beanFiles'); + SugarTestHelper::setUp('beanList'); // add an extra relationship that will be used for search self::registerExtension('Contacts', 'bug51596test.php', array( diff --git a/tests/modules/ModuleBuilder/parsers/relationships/Bug42169Test.php b/tests/modules/ModuleBuilder/parsers/relationships/Bug42169Test.php deleted file mode 100755 index 37ca1906..00000000 --- a/tests/modules/ModuleBuilder/parsers/relationships/Bug42169Test.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/********************************************************************************* - * SugarCRM Community Edition is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2013 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". - ********************************************************************************/ - - -require_once('modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php'); - -/** - * Bug #42169 - * Creating Relationship to Activities From Custom Module to Activities Via Studio Results in Module Key Displayed in Related To Dropdown - * - * @author mgusev@sugarcrm.com - * @ticket 42169 - */ -class Bug42169Test extends Sugar_PHPUnit_Framework_TestCase -{ - - /** - * @group 42169 - */ - public function testBuildLabels() - { - $definition = array( - 'lhs_module' => 'lhs_module', - 'lhs_label' => 'lhs_label' - ); - $activitiesRelationship = new ActivitiesRelationship($definition); - $actual = $activitiesRelationship->buildLabels(); - - foreach($actual as $item) - { - if (isset($item['display_label']) == false) - { - continue; - } - if (is_array($item['display_label'])) - { - if (isset($item['display_label'][$definition['lhs_module']])) - { - $this->assertEquals($definition['lhs_label'], $item['display_label'][$definition['lhs_module']], 'Label is missed'); - } - } - else - { - $this->assertEquals($definition['lhs_label'], $item['display_label'], 'Label is missed'); - } - } - } -} \ No newline at end of file diff --git a/tests/modules/ModuleBuilder/parsers/relationships/Bug56425Test.php b/tests/modules/ModuleBuilder/parsers/relationships/Bug56425Test.php new file mode 100755 index 00000000..30707cd9 --- /dev/null +++ b/tests/modules/ModuleBuilder/parsers/relationships/Bug56425Test.php @@ -0,0 +1,141 @@ +<?php +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2013 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". + ********************************************************************************/ + + +require_once('modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php'); + +/** + * Bug #56425 + * see duplicate modules name in Report's Related Modules box + * + * @author mgusev@sugarcrm.com + * @ticked 56425 + * @ticket 42169 + */ +class Bug56425Test extends Sugar_PHPUnit_Framework_TestCase +{ + /** + * Test asserts genereated labels for activities + * + * @param array $definition + * @param array $expected + * @dataProvider getDefinitions + * @group 56425 + * @group 42169 + * @return void + */ + public function testBuildLabels($definition, $expected) + { + ActivitiesRelationship56425::reset($definition['lhs_module']); + $relationship = new ActivitiesRelationship56425($definition); + $labels = $relationship->buildLabels(); + foreach ($labels as $label) { + $this->assertArrayHasKey($label['module'], $expected, 'Incorrect label was generated'); + $this->assertEquals($expected[$label['module']], $label['display_label'], 'Labels are incorrect'); + unset($expected[$label['module']]); + } + $this->assertEmpty($expected, 'Not all labels were generated'); + } + + /** + * Method returns definition for relationship & expected result + * + * @return array + */ + public function getDefinitions() + { + return array( + array( + array( + 'rhs_label' => 'Activities', + 'rhs_module' => 'Users', + 'lhs_module' => 'Contacts', + 'relationship_name' => 'users_contacts_relationship' + ), + array( + 'Contacts' => 'Activities:Users', + 'Users' => 'Activities:Contacts' + ) + ), + array( + array( + 'rhs_label' => 'Activities 123', + 'rhs_module' => 'Users', + 'lhs_module' => 'Contacts', + 'relationship_name' => 'users_contacts_relationship' + ), + array( + 'Contacts' => 'Activities 123:Users', + 'Users' => 'Activities 123:Contacts' + ) + ), + array( + array( + 'rhs_module' => 'Users', + 'lhs_module' => 'Contacts', + 'relationship_name' => 'users_contacts_relationship' + ), + array( + 'Contacts' => 'Users', + 'Users' => 'Contacts' + ) + ), + array( + array( + 'lhs_module' => 'lhs_module', + 'lhs_label' => 'lhs_label', + 'rhs_module' => 'rhs_module', + 'rhs_label' => 'rhs_label', + ), + array( + 'lhs_module' => 'rhs_label:rhs_module', + 'rhs_module' => 'rhs_label:lhs_module' + ) + ) + ); + } +} + +class ActivitiesRelationship56425 extends ActivitiesRelationship +{ + static public function reset($module) + { + self::$labelsAdded = array( + $module => true + ); + + } +} diff --git a/tests/service/Bug43196Test.php b/tests/service/Bug43196Test.php deleted file mode 100755 index 5c44d0a2..00000000 --- a/tests/service/Bug43196Test.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php -/********************************************************************************* - * SugarCRM Community Edition is a customer relationship management program developed by - * SugarCRM, Inc. Copyright (C) 2004-2013 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". - ********************************************************************************/ - - -require_once('include/nusoap/nusoap.php'); - -/** - * @group bug43196 - */ -class Bug43196Test extends Sugar_PHPUnit_Framework_TestCase -{ - public $_soapClient = null; - - public function setUp() - { - $this->_soapClient = new nusoapclient($GLOBALS['sugar_config']['site_url'].'/soap.php',false,false,false,false,false,600,600); - - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - $GLOBALS['beanList'] = $beanList; - $GLOBALS['beanFiles'] = $beanFiles; - - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); - $GLOBALS['current_user']->status = 'Active'; - $GLOBALS['current_user']->is_admin = 1; - $GLOBALS['current_user']->save(); - } - - public function tearDown() - { - foreach ( SugarTestContactUtilities::getCreatedContactIds() as $id ) { - $GLOBALS['db']->query("DELETE FROM accounts_contacts WHERE contact_id = '{$id}'"); - } - SugarTestContactUtilities::removeAllCreatedContacts(); - SugarTestAccountUtilities::removeAllCreatedAccounts(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - unset($GLOBALS['current_user']); - - unset($GLOBALS['beanList']); - unset($GLOBALS['beanFiles']); - } - - public function testGetEntryWhenContactHasMultipleAccountRelationshipsWorks() - { - $contact = SugarTestContactUtilities::createContact(); - $account1 = SugarTestAccountUtilities::createAccount(); - $account2 = SugarTestAccountUtilities::createAccount(); - - $contact->load_relationship('accounts'); - $contact->accounts->add($account1->id); - $contact->accounts->add($account2->id); - - $this->_login(); - - $parameters = array( - 'session' => $this->_sessionId, - 'module_name' => 'Contacts', - 'query' => "contacts.id = '{$contact->id}'", - 'order_by' => '', - 'offset' => 0, - 'select_fields' => array('id', 'account_id', 'account_name'), - 'max_results' => 250, - 'deleted' => 0, - ); - - $result = $this->_soapClient->call('get_entry_list',$parameters); - - $account_names = array($account1->name, $account2->name); - $account_ids = array($account1->id, $account2->id); - /* - $this->assertEquals($result['entry_list'][0]['name_value_list'][1]['value'],$account1->name); - $this->assertEquals($result['entry_list'][0]['name_value_list'][2]['value'],$account1->id); - $this->assertEquals($result['entry_list'][1]['name_value_list'][1]['value'],$account2->name); - $this->assertEquals($result['entry_list'][1]['name_value_list'][2]['value'],$account2->id); - */ - $this->assertTrue(in_array($result['entry_list'][0]['name_value_list'][1]['value'], $account_names)); - $this->assertTrue(in_array($result['entry_list'][1]['name_value_list'][1]['value'], $account_names)); - $this->assertTrue(in_array($result['entry_list'][0]['name_value_list'][2]['value'], $account_ids)); - $this->assertTrue(in_array($result['entry_list'][1]['name_value_list'][2]['value'], $account_ids)); - } - - /** - * Attempt to login to the soap server - * - * @return $set_entry_result - this should contain an id and error. The id corresponds - * to the session_id. - */ - public function _login() - { - global $current_user; - - $GLOBALS['db']->commit(); // Making sure we commit any changes before logging in - $result = $this->_soapClient->call( - 'login', - array('user_auth' => - array('user_name' => $current_user->user_name, - 'password' => $current_user->user_hash, - 'version' => '.01'), - 'application_name' => 'SoapTest') - ); - $this->_sessionId = $result['id']; - - return $result; - } -} \ No newline at end of file -- 2.45.0