From 7604ddae160dcbd1407097ad7275aa90b7a60f59 Mon Sep 17 00:00:00 2001 From: John Mertic Date: Thu, 5 Apr 2012 09:52:58 -0400 Subject: [PATCH] Release 6.4.3 --- ModuleInstall/ModuleInstaller.php | 3 +- .../PackageManager/PackageManager.php | 2 +- data/Link2.php | 3 + data/Relationships/One2MBeanRelationship.php | 3 +- data/Relationships/RelationshipFactory.php | 2 +- data/Relationships/SugarRelationship.php | 4 +- data/SugarBean.php | 89 +- files.md5 | 588 +++++------ include/Dashlets/Dashlet.php | 6 +- include/Dashlets/DashletGenericChart.php | 4 +- include/DetailView/DetailView.tpl | 2 + include/EditView/EditView2.php | 12 +- include/EditView/SubpanelQuickCreate.php | 22 +- include/ListView/ListView.php | 193 +++- include/ListView/ListViewData.php | 7 +- include/Localization/Localization.php | 35 +- include/MVC/Controller/SugarController.php | 21 + include/MVC/Controller/action_view_map.php | 1 + include/MVC/SugarApplication.php | 85 +- include/MVC/View/SugarView.php | 37 +- include/MVC/View/views/view.edit.php | 30 +- include/MVC/View/views/view.list.php | 3 +- include/MVC/View/views/view.quickcreate.php | 13 +- include/MVC/View/views/view.quickedit.php | 20 +- include/MassUpdate.php | 2 +- include/MySugar/javascript/MySugar.js | 2 +- include/Popups/PopupSmarty.php | 27 +- include/Popups/Popup_picker.php | 6 +- include/Popups/tpls/header.tpl | 2 +- include/QuickSearchDefaults.php | 3 +- include/SearchForm/SearchForm2.php | 125 ++- include/SearchForm/SugarSpot.php | 8 +- include/SearchForm/tpls/header.tpl | 17 +- .../function.sugar_currency_format.php | 3 +- include/SubPanel/SubPanelTiles.php | 7 +- include/SubPanel/SubPanelTilesTabs.php | 11 +- include/SubPanel/SugarTab.php | 8 +- .../SugarEmailAddress/SugarEmailAddress.php | 28 +- .../SugarFields/Fields/Address/DetailView.tpl | 1 + .../Fields/Address/en_us.DetailView.tpl | 1 + .../Fields/Base/SugarFieldBase.php | 18 +- .../Collection/ViewSugarFieldCollection.php | 4 +- .../SugarFields/Fields/Datetime/EditView.tpl | 4 +- .../Fields/Datetime/SugarFieldDatetime.php | 8 +- .../Fields/Datetimecombo/Datetimecombo.js | 4 +- .../Fields/Datetimecombo/EditView.tpl | 6 +- .../Fields/Datetimecombo/RangeSearchForm.tpl | 4 +- .../Fields/Datetimecombo/SearchView.tpl | 4 +- .../SugarFields/Fields/Enum/SearchView.tpl | 2 +- .../SugarFields/Fields/File/SugarFieldFile.js | 2 +- .../SugarFields/Fields/Float/DetailView.tpl | 2 +- include/SugarFields/Fields/Float/EditView.tpl | 2 +- .../Fields/Parent/SugarFieldParent.php | 4 +- .../Fields/Relate/SugarFieldRelate.php | 6 + include/SugarObjects/VardefManager.php | 6 +- .../assignable/language/en_us.lang.php | 2 +- .../templates/company/Company.php | 42 +- .../company/metadata/detailviewdefs.php | 2 +- include/SugarObjects/templates/file/File.php | 40 +- .../SugarObjects/templates/file/vardefs.php | 2 +- .../SugarObjects/templates/person/Person.php | 57 +- include/SugarPHPMailer.php | 2 +- include/SugarTheme/SugarTheme.php | 2 +- include/SugarTinyMCE.php | 19 +- include/TemplateHandler/TemplateHandler.php | 30 +- include/TimeDate.php | 2 +- include/VarDefHandler/VarDefHandler.php | 5 +- include/connectors/sources/default/source.php | 90 +- include/connectors/utils/ConnectorUtils.php | 10 +- include/database/DBManager.php | 77 +- include/database/MssqlManager.php | 14 +- include/database/MysqlManager.php | 5 +- include/entryPoint.php | 2 + include/export_utils.php | 280 +++--- include/generic/Save2.php | 2 +- .../SugarWidgets/SugarWidgetFielddatetime.php | 23 +- .../SugarWidgets/SugarWidgetFieldrelate.php | 118 ++- .../SugarWidgets/SugarWidgetFieldtext.php | 2 + include/javascript/calendar.js | 5 +- include/javascript/popup_parent_helper.js | 3 + include/javascript/quicksearch.js | 5 +- include/javascript/sugar_3.js | 14 +- .../sugarwidgets/SugarYUIWidgets.js | 2 +- include/language/en_us.lang.php | 6 + include/modules.php | 1 + include/templates/TemplateDragDropChooser.php | 16 +- include/utils.php | 83 +- include/utils/LogicHook.php | 4 +- include/utils/db_utils.php | 27 +- include/utils/mvc_utils.php | 2 +- include/utils/sugar_file_utils.php | 44 + install.php | 13 +- install/installSystemCheck.php | 28 + install/install_utils.php | 38 +- install/performSetup.php | 28 +- .../include/MySugar/javascript/MySugar.js | 2 +- .../Fields/Datetimecombo/Datetimecombo.js | 7 +- .../SugarFields/Fields/File/SugarFieldFile.js | 2 +- .../src_files/include/javascript/calendar.js | 11 +- .../include/javascript/popup_parent_helper.js | 19 + .../include/javascript/quicksearch.js | 6 + .../src_files/include/javascript/sugar_3.js | 54 +- .../sugarwidgets/SugarYUIWidgets.js | 2 +- .../modules/InboundEmail/InboundEmail.js | 4 +- metadata/email_cacheMetaData.php | 1 - modules/ACLRoles/EditAllBody.tpl | 16 +- modules/Accounts/AccountFormBase.php | 4 +- modules/Accounts/metadata/popupdefs.php | 2 +- modules/Accounts/tpls/QuickCreate.tpl | 103 +- modules/Accounts/views/view.edit.php | 49 + modules/Administration/Async.php | 2 +- modules/Administration/SupportPortal.php | 8 +- .../Administration/UpgradeWizard_prepare.php | 2 +- modules/Audit/Audit.php | 7 + modules/Calendar/Calendar.php | 4 +- modules/Calendar/tpls/shared_users.tpl | 2 +- modules/Calls/CallHelper.php | 10 +- .../MyCallsDashlet/MyCallsDashlet.php | 2 +- modules/Calls/metadata/editviewdefs.php | 4 +- modules/Calls/tpls/footer.tpl | 13 + modules/Calls/vardefs.php | 8 + modules/CampaignTrackers/EditView.html | 2 +- .../TopCampaignsDashlet.php | 3 +- modules/Campaigns/Delete.php | 23 +- modules/Campaigns/DeleteTestCampaigns.php | 85 ++ modules/Campaigns/GenerateWebToLeadForm.php | 33 +- modules/Campaigns/ProspectLink.php | 2 +- modules/Campaigns/RoiDetailView.tpl | 3 +- modules/Campaigns/Schedule.html | 12 + modules/Campaigns/WebToLeadCapture.php | 47 +- modules/Campaigns/WebToLeadCreation.php | 11 +- modules/Campaigns/WizardEmailSetup.html | 2 +- modules/Campaigns/WizardMarketing.html | 2 + modules/Campaigns/WizardNewsletter.php | 2 +- modules/Campaigns/metadata/detailviewdefs.php | 18 +- modules/Campaigns/metadata/subpaneldefs.php | 4 +- modules/Campaigns/views/view.detail.php | 4 +- .../PipelineBySalesStageDashlet.php | 5 +- modules/Charts/DynamicAction.php | 1 - modules/Configurator/tpls/EditView.tpl | 18 +- modules/Configurator/tpls/adminwizard.tpl | 4 +- .../rest/insideview/InsideViewLogicHook.php | 2 + .../ext/rest/insideview/insideview.php | 3 + .../ext/rest/insideview/tpls/InsideView.tpl | 34 +- .../Connectors/views/view.modifydisplay.php | 12 +- .../Connectors/views/view.modifymapping.php | 6 +- .../views/view.modifyproperties.php | 2 +- .../Connectors/views/view.modifysearch.php | 9 +- modules/Contacts/BusinessCard.php | 2 +- .../ContactOpportunityRelationshipEdit.html | 4 +- .../ContactOpportunityRelationshipEdit.php | 4 +- modules/Contacts/metadata/popupdefs.php | 2 +- modules/Contacts/metadata/popupdefsEmail.php | 2 +- modules/Contacts/vardefs.php | 6 +- modules/Currencies/Currency.php | 4 +- .../DocumentRevisions/DocumentRevision.php | 4 +- modules/Documents/Delete.php | 20 +- modules/Documents/language/en_us.lang.php | 3 + modules/Documents/tpls/view.extdoc.tpl | 3 +- modules/Documents/views/view.detail.php | 14 + modules/Documents/views/view.extdoc.php | 87 +- modules/DynamicFields/DynamicField.php | 24 +- modules/DynamicFields/FieldViewer.php | 2 +- .../templates/Fields/TemplateCurrency.php | 7 + .../Fields/TemplateDatetimecombo.php | 3 +- .../templates/Fields/TemplateField.php | 8 +- .../templates/Fields/TemplateMultiEnum.php | 6 +- modules/EmailMan/EmailMan.php | 12 +- modules/EmailMan/tpls/config.tpl | 6 +- modules/EmailMarketing/EmailMarketing.php | 4 +- modules/EmailTemplates/EditView.php | 20 +- .../EmailTemplates/language/en_us.lang.php | 3 +- modules/EmailTemplates/vardefs.php | 2 +- modules/Emails/EditView.php | 2 +- modules/Emails/Email.php | 37 +- modules/Emails/EmailUI.php | 4 +- modules/Emails/EmailUIAjax.php | 8 +- modules/Emails/javascript/EmailUI.js | 18 +- modules/Emails/javascript/EmailUICompose.js | 4 +- modules/Emails/javascript/ajax.js | 1 + modules/Emails/javascript/grid.js | 2 +- modules/Emails/javascript/init.js | 1 + modules/Emails/templates/outboundDialog.tpl | 2 +- modules/Employees/WapAuthenticate.php | 8 +- modules/Employees/views/view.edit.php | 2 +- modules/Home/QuickSearch.php | 634 ++++++++++++ modules/Home/SubpanelCreates.php | 1 - modules/Home/UnifiedSearchAdvanced.php | 18 +- modules/Home/quicksearchQuery.php | 314 +----- modules/Import/CsvAutoDetect.php | 34 +- modules/Import/ImportCacheFiles.php | 17 + modules/Import/Importer.php | 14 +- modules/Import/sources/ImportDataSource.php | 2 +- modules/Import/views/view.last.php | 6 +- modules/Import/views/view.step2.php | 19 +- modules/Import/views/view.step3.php | 73 +- modules/InboundEmail/EditView.php | 2 +- modules/InboundEmail/InboundEmail.js | 4 +- modules/InboundEmail/InboundEmail.php | 233 ++++- modules/InboundEmail/Save.php | 2 + modules/Leads/Lead.php | 2 +- modules/Leads/LeadsVarDefHandler.php | 54 + modules/Leads/metadata/editviewdefs.php | 2 +- modules/Leads/tpls/QuickCreate.tpl | 102 +- modules/Leads/vardefs.php | 4 +- modules/Leads/views/view.convertlead.php | 13 +- modules/Leads/views/view.edit.php | 49 + .../MyMeetingsDashlet/MyMeetingsDashlet.php | 2 +- modules/Meetings/metadata/editviewdefs.php | 2 +- modules/Meetings/tpls/footer.tpl | 13 + modules/ModuleBuilder/MB/MBPackage.php | 8 +- modules/ModuleBuilder/MB/MBVardefs.php | 1 + modules/ModuleBuilder/Module/StudioModule.php | 52 +- .../Module/StudioModuleFactory.php | 25 +- modules/ModuleBuilder/controller.php | 65 +- .../ModuleBuilder/javascript/ModuleBuilder.js | 2 +- .../ModuleBuilder/javascript/SimpleList.js | 4 +- modules/ModuleBuilder/language/en_us.lang.php | 16 +- .../ModuleBuilder/parsers/ParserFactory.php | 101 +- .../ModuleBuilder/parsers/parser.label.php | 2 +- .../parsers/parser.modifylistview.php | 2 +- .../relationships/AbstractRelationship.php | 2 +- .../parsers/views/AbstractMetaDataParser.php | 22 + .../views/DeployedMetaDataImplementation.php | 42 +- .../views/GridLayoutMetaDataParser.php | 54 +- .../parsers/views/PopupMetaDataParser.php | 10 +- .../parsers/views/SubpanelMetaDataParser.php | 16 +- .../ModuleBuilder/tpls/MBModule/dropdown.tpl | 2 +- .../ModuleBuilder/tpls/MBPackage/package.tpl | 2 +- modules/ModuleBuilder/views/view.labels.php | 34 +- .../ModuleBuilder/views/view.layoutview.php | 25 +- modules/ModuleBuilder/views/view.listview.php | 18 +- modules/ModuleBuilder/views/view.wizard.php | 2 +- modules/Opportunities/OpportunityFormBase.php | 4 +- modules/Opportunities/vardefs.php | 1 + modules/Project/metadata/editviewdefs.php | 8 +- modules/Project/metadata/listviewdefs.php | 2 +- modules/ProjectTask/ProjectTask.php | 42 +- modules/ProjectTask/views/view.list.php | 2 +- modules/ProspectLists/ProspectList.php | 15 +- modules/ProspectLists/metadata/popupdefs.php | 2 +- modules/Prospects/Menu.php | 2 +- modules/Prospects/metadata/popupdefs.php | 2 +- modules/Prospects/tpls/QuickCreate.tpl | 93 ++ modules/Prospects/views/view.edit.php | 49 + modules/Schedulers/EditView.php | 14 +- modules/Schedulers/Save.php | 14 +- modules/Schedulers/Scheduler.php | 20 +- modules/Schedulers/_AddJobsHere.php | 2 +- modules/Studio/TabGroups/TabGroupHelper.php | 2 +- modules/Studio/parsers/StudioParser.php | 2 +- modules/Studio/wizards/RenameModules.php | 12 +- modules/Tasks/Task.php | 34 +- modules/UpgradeWizard/end.php | 6 +- modules/UpgradeWizard/language/en_us.lang.php | 1 + modules/UpgradeWizard/silentUpgrade_step2.php | 6 +- modules/UpgradeWizard/systemCheck.php | 1 + modules/UpgradeWizard/uw_utils.php | 43 + modules/Users/Authenticate.php | 55 +- modules/Users/Changenewpassword.php | 2 +- modules/Users/GeneratePassword.php | 9 +- modules/Users/Login.php | 24 +- modules/Users/Save.php | 2 +- modules/Users/User.php | 4 +- .../SAMLAuthenticate/SAMLAuthenticateUser.php | 41 +- .../authentication/SAMLAuthenticate/index.php | 4 +- .../SugarAuthenticate/SugarAuthenticate.php | 10 +- modules/Users/login.tpl | 14 +- modules/Users/reassignUserRecords.php | 10 +- modules/Users/tpls/wizard.tpl | 1 + modules/Users/vardefs.php | 4 +- modules/Users/views/view.wizard.php | 49 +- service/core/REST/SugarRestRSS.php | 2 +- service/v4_1/SugarWebServiceImplv4_1.php | 2 +- soap/SoapHelperFunctions.php | 11 +- soap/SoapSugarUsers.php | 20 +- sugar_version.php | 8 +- .../PackageManager/Bug44896Test.php | 131 +++ tests/SugarTestUserUtilities.php | 2 +- tests/data/Relationships/Bug50910Test.php | 75 ++ tests/include/Bug46822Test.php | 72 ++ tests/include/Bug50285Test.php | 82 ++ tests/include/Bug50678Test.php | 100 ++ .../include/ListView/ListViewDisplayTest.php | 12 + tests/include/ListView/ListViewTest.php | 87 ++ tests/include/Localization/Bug35413Test.php | 29 +- tests/include/Localization/Bug49619.txt | 1 + tests/include/Localization/Bug50887Test.php | 63 ++ .../include/Localization/LocalizationTest.php | 16 + tests/include/MVC/View/SugarViewTest.php | 28 + tests/include/Popup/Bug36329Test.php | 9 +- tests/include/QuickSearchDefaultsTest.php | 47 + tests/include/SearchForm/FileLocatorTest.php | 147 +++ tests/include/SubPanel/Bug44344Test.php | 186 ++++ .../SugarFields/Fields/Base/Bug50117Test.php | 92 ++ .../Fields/Datetime/Bug28260Test.php | 88 ++ .../Fields/Relate/Bug47722Test.php | 81 ++ .../SugarTheme/SugarThemeRegistryTest.php | 1 + tests/include/ValidDBNameTest.php | 18 +- tests/include/connectors/Bug50800Test.php | 94 ++ tests/include/database/Bug51161Test.php | 168 ++++ tests/include/database/Bug51311Test.php | 131 +++ .../include/generic/SugarWidgets/Bug45716.php | 934 ++++++++++++++++++ .../generic/SugarWidgets/Bug49008Test.php | 8 +- tests/include/utils/SugarFileUtilsTest.php | 13 + tests/include/utils/ZipTest.php | 4 + tests/modules/Administration/Bug47069Test.php | 110 +++ tests/modules/Calendar/Bug50567Test.php | 87 ++ tests/modules/Calls/CallHelperTest.php | 6 +- .../Connectors/ConnectorsAdminViewTest.php | 108 ++ .../templates/Fields/Bug51695Test.php | 62 ++ tests/modules/Emails/EmailTest.php | 29 + tests/modules/Import/Bug50431Test.php | 126 +++ tests/modules/Import/Bug50438Test.php | 12 +- tests/modules/Import/ImporterTest.php | 2 +- tests/modules/InboundEmail/Bug49543Test.php | 102 ++ tests/modules/InboundEmail/Bug49784Test.php | 157 +++ tests/modules/InboundEmail/Bug50241Test.php | 88 ++ .../modules/InboundEmail/DecodeHeaderTest.php | 139 +++ tests/modules/Leads/Bug40209Test.php | 4 + tests/modules/Leads/Bug45187Test.php | 4 + tests/modules/ModuleBuilder/Bug47406Test.php | 125 +++ tests/modules/ModuleBuilder/Bug48826Test.php | 95 ++ tests/modules/ModuleBuilder/Bug49614Test.php | 81 ++ tests/modules/ModuleBuilder/Bug49964Test.php | 180 ++++ .../ModuleBuilder/Module/Bug46196Test.php | 138 +++ .../ModuleBuilder/Module/StudioModuleTest.php | 36 +- .../AbstractMetaDataParserTest.php | 82 +- .../parsers/views/Bug36668Test.php | 83 ++ .../parsers/views/Bug46325Test.php | 107 ++ .../parsers/views/Bug50308Test.php | 138 +++ .../parsers/views/HistoryTest.php | 13 +- .../ModuleBuilder/views/Bug39749Test.php | 74 ++ .../ModuleBuilder/views/Bug44372Test.php | 26 +- tests/modules/Schedulers/SchedulerTest.php | 10 +- tests/modules/Studio/Bug49772Test.php | 3 +- tests/modules/UpgradeWizard/Bug51721Test.php | 93 ++ .../UpgradeWizard/SugarMerge/Bug37841Test.php | 7 +- .../modules/Contacts/metadata/popupdefs.php | 2 +- tests/modules/Users/AuthenticateTest.php | 3 +- tests/modules/Users/Bug47156Test.php | 101 ++ tests/modules/Users/Bug50358Test.php | 109 ++ .../SAMLAuthenticate}/Bug49069Test.php | 1 + .../SAMLAuthenticate/Bug50936Test.php | 152 +++ tests/service/Bug48748Test.php | 29 +- .../NoBlankFieldUpdateOnFirstSyncTest.php | 23 +- tests/service/RESTAPI3Test.php | 2 +- tests/service/RESTAPI4_1Test.php | 9 +- tests/service/SOAPAPI1Test.php | 38 +- tests/service/SOAPAPI3Test.php | 2 +- .../service/core/SoapHelperWebServiceTest.php | 87 +- tests/soap/Bug41392Test.php | 89 ++ themes/Sugar5/css/yui.css | 2 +- themes/Sugar5/images/Accounts_favico.png | Bin 0 -> 451 bytes themes/Sugar5/images/Bugs_favico.png | Bin 0 -> 632 bytes themes/Sugar5/images/Calendar_favico.png | Bin 0 -> 385 bytes themes/Sugar5/images/Calls_favico.png | Bin 0 -> 433 bytes themes/Sugar5/images/Campaigns_favico.png | Bin 0 -> 358 bytes themes/Sugar5/images/Cases_favico.png | Bin 0 -> 447 bytes themes/Sugar5/images/Contacts_favico.png | Bin 0 -> 396 bytes themes/Sugar5/images/Documents_favico.png | Bin 0 -> 396 bytes .../Sugar5/images/EmailAddresses_favico.png | Bin 0 -> 319 bytes themes/Sugar5/images/Emails_favico.png | Bin 0 -> 373 bytes themes/Sugar5/images/Forecasts_favico.png | Bin 0 -> 531 bytes themes/Sugar5/images/KBDocuments_favico.png | Bin 0 -> 317 bytes themes/Sugar5/images/Leads_favico.png | Bin 0 -> 412 bytes themes/Sugar5/images/Meetings_favico.png | Bin 0 -> 376 bytes themes/Sugar5/images/Notes_favico.png | Bin 0 -> 376 bytes themes/Sugar5/images/Opportunities_favico.png | Bin 0 -> 513 bytes themes/Sugar5/images/Projects_favico.png | Bin 0 -> 420 bytes themes/Sugar5/images/Prospects_favico.png | Bin 0 -> 549 bytes themes/Sugar5/images/Quotes_favico.png | Bin 0 -> 382 bytes themes/Sugar5/images/Releases_favico.png | Bin 0 -> 496 bytes themes/Sugar5/images/Reports_favico.png | Bin 0 -> 403 bytes themes/Sugar5/images/Tasks_favico.png | Bin 0 -> 489 bytes themes/Sugar5/images/Teams_favico.png | Bin 0 -> 366 bytes themes/Sugar5/images/Trackers_favico.png | Bin 0 -> 377 bytes themes/Sugar5/images/Users_favico.png | Bin 0 -> 333 bytes themes/Sugar5/tpls/_head.tpl | 3 +- themes/Sugar5/tpls/header.tpl | 1 + 380 files changed, 10111 insertions(+), 2055 deletions(-) create mode 100644 modules/Accounts/views/view.edit.php create mode 100644 modules/Campaigns/DeleteTestCampaigns.php create mode 100644 modules/Home/QuickSearch.php create mode 100644 modules/Leads/LeadsVarDefHandler.php create mode 100644 modules/Leads/views/view.edit.php create mode 100644 modules/Prospects/tpls/QuickCreate.tpl create mode 100644 modules/Prospects/views/view.edit.php create mode 100755 tests/ModuleInstall/PackageManager/Bug44896Test.php create mode 100755 tests/data/Relationships/Bug50910Test.php create mode 100755 tests/include/Bug46822Test.php create mode 100755 tests/include/Bug50285Test.php create mode 100755 tests/include/Bug50678Test.php create mode 100755 tests/include/ListView/ListViewTest.php create mode 100755 tests/include/Localization/Bug49619.txt create mode 100755 tests/include/Localization/Bug50887Test.php create mode 100755 tests/include/QuickSearchDefaultsTest.php create mode 100755 tests/include/SearchForm/FileLocatorTest.php create mode 100755 tests/include/SubPanel/Bug44344Test.php create mode 100755 tests/include/SugarFields/Fields/Base/Bug50117Test.php create mode 100755 tests/include/SugarFields/Fields/Datetime/Bug28260Test.php create mode 100755 tests/include/SugarFields/Fields/Relate/Bug47722Test.php create mode 100755 tests/include/connectors/Bug50800Test.php create mode 100755 tests/include/database/Bug51161Test.php create mode 100755 tests/include/database/Bug51311Test.php create mode 100755 tests/include/generic/SugarWidgets/Bug45716.php create mode 100755 tests/modules/Administration/Bug47069Test.php create mode 100755 tests/modules/Calendar/Bug50567Test.php create mode 100755 tests/modules/Connectors/ConnectorsAdminViewTest.php create mode 100755 tests/modules/DynamicFields/templates/Fields/Bug51695Test.php create mode 100755 tests/modules/Import/Bug50431Test.php create mode 100755 tests/modules/InboundEmail/Bug49543Test.php create mode 100755 tests/modules/InboundEmail/Bug49784Test.php create mode 100755 tests/modules/InboundEmail/Bug50241Test.php create mode 100755 tests/modules/InboundEmail/DecodeHeaderTest.php create mode 100755 tests/modules/ModuleBuilder/Bug47406Test.php create mode 100755 tests/modules/ModuleBuilder/Bug48826Test.php create mode 100755 tests/modules/ModuleBuilder/Bug49614Test.php create mode 100755 tests/modules/ModuleBuilder/Bug49964Test.php create mode 100755 tests/modules/ModuleBuilder/Module/Bug46196Test.php rename tests/modules/ModuleBuilder/parsers/{ => views}/AbstractMetaDataParserTest.php (59%) create mode 100755 tests/modules/ModuleBuilder/parsers/views/Bug36668Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/views/Bug46325Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/views/Bug50308Test.php create mode 100755 tests/modules/ModuleBuilder/views/Bug39749Test.php create mode 100755 tests/modules/UpgradeWizard/Bug51721Test.php create mode 100755 tests/modules/Users/Bug47156Test.php create mode 100755 tests/modules/Users/Bug50358Test.php rename tests/modules/Users/{ => authentication/SAMLAuthenticate}/Bug49069Test.php (99%) create mode 100755 tests/modules/Users/authentication/SAMLAuthenticate/Bug50936Test.php create mode 100755 tests/soap/Bug41392Test.php create mode 100644 themes/Sugar5/images/Accounts_favico.png create mode 100644 themes/Sugar5/images/Bugs_favico.png create mode 100644 themes/Sugar5/images/Calendar_favico.png create mode 100644 themes/Sugar5/images/Calls_favico.png create mode 100644 themes/Sugar5/images/Campaigns_favico.png create mode 100644 themes/Sugar5/images/Cases_favico.png create mode 100644 themes/Sugar5/images/Contacts_favico.png create mode 100644 themes/Sugar5/images/Documents_favico.png create mode 100644 themes/Sugar5/images/EmailAddresses_favico.png create mode 100644 themes/Sugar5/images/Emails_favico.png create mode 100644 themes/Sugar5/images/Forecasts_favico.png create mode 100644 themes/Sugar5/images/KBDocuments_favico.png create mode 100644 themes/Sugar5/images/Leads_favico.png create mode 100644 themes/Sugar5/images/Meetings_favico.png create mode 100644 themes/Sugar5/images/Notes_favico.png create mode 100644 themes/Sugar5/images/Opportunities_favico.png create mode 100644 themes/Sugar5/images/Projects_favico.png create mode 100644 themes/Sugar5/images/Prospects_favico.png create mode 100644 themes/Sugar5/images/Quotes_favico.png create mode 100644 themes/Sugar5/images/Releases_favico.png create mode 100644 themes/Sugar5/images/Reports_favico.png create mode 100644 themes/Sugar5/images/Tasks_favico.png create mode 100644 themes/Sugar5/images/Teams_favico.png create mode 100644 themes/Sugar5/images/Trackers_favico.png create mode 100644 themes/Sugar5/images/Users_favico.png diff --git a/ModuleInstall/ModuleInstaller.php b/ModuleInstall/ModuleInstaller.php index ec55aea8..0587c6ae 100644 --- a/ModuleInstall/ModuleInstaller.php +++ b/ModuleInstall/ModuleInstaller.php @@ -1658,7 +1658,8 @@ class ModuleInstaller{ foreach($beans as $bean){ $dirs = array( 'custom/modules/' . $bean, - 'custom/Extension/modules/' . $bean + 'custom/Extension/modules/' . $bean, + 'custom/working/modules/' . $bean ); foreach($dirs as $dir) { diff --git a/ModuleInstall/PackageManager/PackageManager.php b/ModuleInstall/PackageManager/PackageManager.php index ac68e458..cafcda06 100644 --- a/ModuleInstall/PackageManager/PackageManager.php +++ b/ModuleInstall/PackageManager/PackageManager.php @@ -710,7 +710,7 @@ class PackageManager{ $packages[] = array('name' => $name, 'version' => $version, 'published_date' => $published_date, 'description' => $description, 'uninstallable' =>$uninstallable, 'type' => $type, - 'file' => fileToHash($upgrade_content), 'file_install' => fileToHash($upgrade_content)); + 'file' => fileToHash($upgrade_content), 'file_install' => fileToHash($upgrade_content), 'unFile' => fileToHash($upgrade_content)); }//fi }//rof return $packages; diff --git a/data/Link2.php b/data/Link2.php index 67359985..bd86ff48 100644 --- a/data/Link2.php +++ b/data/Link2.php @@ -120,6 +120,9 @@ class Link2 { //Instantiate the relationship for this link. $this->relationship = SugarRelationshipFactory::getInstance()->getRelationship($this->def['relationship']); + // Fix to restore functionality from Link.php that needs to be rewritten but for now this will do. + $this->relationship_fields = (!empty($this->def['rel_fields']))?$this->def['rel_fields']: array(); + if (!$this->loadedSuccesfully()) { $GLOBALS['log']->fatal("{$this->name} for {$this->def['relationship']} failed to load\n"); diff --git a/data/Relationships/One2MBeanRelationship.php b/data/Relationships/One2MBeanRelationship.php index b4b0ea01..e3bf9fa0 100644 --- a/data/Relationships/One2MBeanRelationship.php +++ b/data/Relationships/One2MBeanRelationship.php @@ -175,7 +175,8 @@ class One2MBeanRelationship extends One2MRelationship $query = $this->getQuery($link); if (empty($query)) { - echo ("query for {$this->name} was empty when loading from {$this->lhsLink}\n"); + $GLOBALS['log']->fatal("query for {$this->name} was empty when loading from {$this->lhsLink}\n"); + return array("rows" => array()); } $result = $db->query($query); while ($row = $db->fetchByAssoc($result)) diff --git a/data/Relationships/RelationshipFactory.php b/data/Relationships/RelationshipFactory.php index 4c405ad5..57010a93 100644 --- a/data/Relationships/RelationshipFactory.php +++ b/data/Relationships/RelationshipFactory.php @@ -195,7 +195,7 @@ class SugarRelationshipFactory { //Save it out sugar_mkdir(dirname($this->getCacheFile()), null, true); $out="getCacheFile(), $out); + sugar_file_put_contents_atomic($this->getCacheFile(), $out); $this->relationships = $relationships; $buildingRelCache = false; diff --git a/data/Relationships/SugarRelationship.php b/data/Relationships/SugarRelationship.php index 832fa68b..bc711b73 100644 --- a/data/Relationships/SugarRelationship.php +++ b/data/Relationships/SugarRelationship.php @@ -197,9 +197,9 @@ abstract class SugarRelationship { $field = $def['name']; if (isset($row[$field])) + { $values[$field] = "'{$row[$field]}'"; - else - $values[$field] = "''"; + } } $columns = implode(',', array_keys($values)); $values = implode(',', $values); diff --git a/data/SugarBean.php b/data/SugarBean.php index d611a3f1..ed8a7b94 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -1555,7 +1555,7 @@ class SugarBean if(in_array('set_notification_body', get_class_methods($this))) { $xtpl = $this->set_notification_body($xtpl, $this); } else { - $xtpl->assign("OBJECT", $this->object_name); + $xtpl->assign("OBJECT", translate('LBL_MODULE_NAME')); $template_name = "Default"; } if(!empty($_SESSION["special_notification"]) && $_SESSION["special_notification"]) { @@ -1617,23 +1617,34 @@ function save_relationship_changes($is_update, $exclude=array()) $new_rel_id = false; $new_rel_link = false; - //this allows us to dynamically relate modules without adding it to the relationship_fields array - if(!empty($_REQUEST['relate_id']) && !empty($_REQUEST['relate_to']) && !in_array($_REQUEST['relate_to'], $exclude) && $_REQUEST['relate_id'] != $this->id){ - $new_rel_id = $_REQUEST['relate_id']; - $new_rel_relname = $_REQUEST['relate_to']; - if(!empty($this->in_workflow) && !empty($this->not_use_rel_in_req)) { - $new_rel_id = !empty($this->new_rel_id) ? $this->new_rel_id : ''; - $new_rel_relname = !empty($this->new_rel_relname) ? $this->new_rel_relname : ''; - } - $new_rel_link = $new_rel_relname; + // check incoming data + if(isset($this->not_use_rel_in_req) && $this->not_use_rel_in_req) + { + // if we should use relation data from properties (for REQUEST-independent calls) + $rel_id=isset($this->new_rel_id) ? $this->new_rel_id : ''; + $rel_link=isset($this->new_rel_relname) ? $this->new_rel_relname : ''; + } + else + { + // if we should use relation data from REQUEST + $rel_id=isset($_REQUEST['relate_id']) ? $_REQUEST['relate_id'] : ''; + $rel_link=isset($_REQUEST['relate_to']) ? $_REQUEST['relate_to'] : ''; + } + + // filter relation data + if($rel_id && $rel_link && !in_array($rel_link, $exclude) && $rel_id != $this->id) + { + $new_rel_id = $rel_id; + $new_rel_link = $rel_link; //Try to find the link in this bean based on the relationship - foreach ( $this->field_defs as $key => $def ) { - if (isset($def['type']) && $def['type'] == 'link' - && isset($def['relationship']) && $def['relationship'] == $new_rel_relname) { + foreach ($this->field_defs as $key => $def) + { + if (isset($def['type']) && $def['type'] == 'link' && isset($def['relationship']) && $def['relationship'] == $rel_link) + { $new_rel_link = $key; } } - } + } // First we handle the preset fields listed in the fixed relationship_fields array hardcoded into the OOB beans @@ -3435,6 +3446,31 @@ function save_relationship_changes($is_update, $exclude=array()) if($temp->hasCustomFields()) $temp->custom_fields->fill_relationships(); $temp->call_custom_logic("process_record"); + // fix defect #44206. implement the same logic as sugar_currency_format + // Smarty modifier does. + if (property_exists($temp, 'currency_id') && -99 == $temp->currency_id) + { + // manually retrieve default currency object as long as it's + // not stored in database and thus cannot be joined in query + require_once 'modules/Currencies/Currency.php'; + $currency = new Currency(); + $currency->retrieve($temp->currency_id); + + // walk through all currency-related fields + foreach ($temp->field_defs as $temp_field) + { + if (isset($temp_field['type']) && 'relate' == $temp_field['type'] + && isset($temp_field['module']) && 'Currencies' == $temp_field['module'] + && isset($temp_field['id_name']) && 'currency_id' == $temp_field['id_name']) + { + // populate related properties manually + $temp_property = $temp_field['name']; + $currency_property = $temp_field['rname']; + $temp->$temp_property = $currency->$currency_property; + } + } + } + $list[] = $temp; $index++; @@ -3997,15 +4033,20 @@ function save_relationship_changes($is_update, $exclude=array()) * Fill in a link field */ - // fguerra@dri and jmorais@dri - fill in link fields not working - function fill_in_link_field( $linkFieldName, $fieldName ) + function fill_in_link_field( $linkFieldName , $def) { + $idField = $linkFieldName; + //If the id_name provided really was an ID, don't try to load it as a link. Use the normal link + if (!empty($this->field_defs[$linkFieldName]['type']) && $this->field_defs[$linkFieldName]['type'] == "id" && !empty($def['link'])) + { + $linkFieldName = $def['link']; + } if ($this->load_relationship($linkFieldName)) { $list=$this->$linkFieldName->get(); - $this->$fieldName = '' ; // match up with null value in $this->populateFromRow() + $this->$idField = '' ; // match up with null value in $this->populateFromRow() if (!empty($list)) - $this->$fieldName = $list[0]; + $this->$idField = $list[0]; } } @@ -4030,11 +4071,9 @@ function save_relationship_changes($is_update, $exclude=array()) // set the value of this relate field in this bean ($this->$field['name']) to the value of the 'name' field in the related module for the record identified by the value of $this->$field['id_name'] $related_module = $field['module']; $id_name = $field['id_name']; - // fguerra@dri and jmorais@dri - fill in link fields not working - if (empty($this->$id_name) && array_key_exists('link', $field)){ - $this->fill_in_link_field($field['link'], $id_name); + if (empty($this->$id_name)){ + $this->fill_in_link_field($id_name, $field); } - // ~ fguerra@dri and jmorais@dri if(!empty($this->$id_name) && ( $this->object_name != $related_module || ( $this->object_name == $related_module && $this->$id_name != $this->id ))){ if(isset($GLOBALS['beanList'][ $related_module])){ $class = $GLOBALS['beanList'][$related_module]; @@ -4042,7 +4081,12 @@ function save_relationship_changes($is_update, $exclude=array()) if(!empty($this->$id_name) && file_exists($GLOBALS['beanFiles'][$class]) && isset($this->$name)){ require_once($GLOBALS['beanFiles'][$class]); $mod = new $class(); + + // disable row level security in order to be able + // to retrieve related bean properties (bug #44928) + $mod->retrieve($this->$id_name); + if (!empty($field['rname'])) { $this->$name = $mod->$field['rname']; } else if (isset($mod->name)) { @@ -4373,6 +4417,7 @@ function save_relationship_changes($is_update, $exclude=array()) // cn: bug 12270 - sensitive fields being passed arbitrarily in listViews $sensitiveFields = array('user_hash' => ''); + $return_array = Array(); global $app_list_strings, $mod_strings; foreach($this->field_defs as $field=>$value){ diff --git a/files.md5 b/files.md5 index 371ca0e2..c21b5706 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -592,19 +592,43 @@ $md5_string = array ( './themes/default/css/print.css' => '91228fdf0a95726bfbb6f854b2ac3e01', './themes/default/css/deprecated.css' => 'b5471d86d506bea8630df869fbfbe9cb', './themes/default/css/chart.css' => '78bf9d159067f20c5e3fc6adf7762f1c', - './themes/Sugar5/tpls/header.tpl' => '70cb9e8664452982a0875dd59ddffb44', + './themes/Sugar5/tpls/header.tpl' => 'f4f2a382c900e9186faba11ce64803c7', './themes/Sugar5/tpls/footer.tpl' => '0f9636230cf14dd6ff76b70b6c8b369d', './themes/Sugar5/tpls/_welcome.tpl' => 'a758aa0298fc3a281dc9906e6f5ca48f', './themes/Sugar5/tpls/_headerShortcuts.tpl' => '11e9b605f337668aa1a1a6f4077127b5', './themes/Sugar5/tpls/_headerSearch.tpl' => '758b32eda17620d669450cb1eaaf5deb', './themes/Sugar5/tpls/_headerModuleList.tpl' => 'efa0fa3a938be9be6735ea564a546c31', './themes/Sugar5/tpls/_headerLastViewed.tpl' => '3b96479b265365920c2f1d36bad25b18', - './themes/Sugar5/tpls/_head.tpl' => '207d11fab18c90ad04084dd378c1ab21', + './themes/Sugar5/tpls/_head.tpl' => '53d3a8d5836d1ff25b252b39340d9dda', './themes/Sugar5/tpls/_globalLinks.tpl' => 'a2135ff6f4046466d7f0fb87a4ae0f59', './themes/Sugar5/tpls/_companyLogo.tpl' => 'aec162121df756deaeb8b2b24a877b65', './themes/Sugar5/themedef.php' => '79f66d3ad564f057ab233f595c84f28c', './themes/Sugar5/layout_utils.php' => '700d0368461e277b9e9e888fef350ad9', './themes/Sugar5/js/style.js' => '84f35636a28681089f88749b74e73349', + './themes/Sugar5/images/Users_favico.png' => '83d69dc6c89d858a680672c139d9906e', + './themes/Sugar5/images/Trackers_favico.png' => '94807eb46ee26a80dd2203c14ed71ab2', + './themes/Sugar5/images/Teams_favico.png' => 'c63eca31e22676b928d1e6ce18e8be2e', + './themes/Sugar5/images/Tasks_favico.png' => '42ef391ef0dcbcaf51c81c9b0c5dcf31', + './themes/Sugar5/images/Reports_favico.png' => 'f2e6b347648d42f68d0a0dc8ef87fd52', + './themes/Sugar5/images/Releases_favico.png' => '1faa43d7543319cb16bfdc185ea38be6', + './themes/Sugar5/images/Quotes_favico.png' => '81f167f05210e202b284fee045a2fa78', + './themes/Sugar5/images/Prospects_favico.png' => '1a8aae5c9e683e89979d58c76eec9b74', + './themes/Sugar5/images/Projects_favico.png' => '2a5f1ec622480e06e6cc6078a3c8eae4', + './themes/Sugar5/images/Opportunities_favico.png' => '12fe46d309d9c9d4d5356b23d9f095b7', + './themes/Sugar5/images/Notes_favico.png' => 'd91c08c2a4fea57871e84faf9fb18d85', + './themes/Sugar5/images/Meetings_favico.png' => 'bc05111d2ff3aa5dd2506b655ac2d627', + './themes/Sugar5/images/Leads_favico.png' => '45f6ac597c5bb66fa9ba2fcf99569640', + './themes/Sugar5/images/KBDocuments_favico.png' => 'cc1704213d5eaa9d2b7b1e272fa3990a', + './themes/Sugar5/images/Forecasts_favico.png' => 'b8eff5377e874e478509d0e7986b2bbd', + './themes/Sugar5/images/Emails_favico.png' => 'f78d33511014519ae977e6bf8960249e', + './themes/Sugar5/images/EmailAddresses_favico.png' => '25b70d2cc6256a7e2cc431025dfe584a', + './themes/Sugar5/images/Documents_favico.png' => '64ab943cc827a8fcade53933d9e17b32', + './themes/Sugar5/images/Contacts_favico.png' => '2a7c74cab079e132177c817bcb9f5af4', + './themes/Sugar5/images/Cases_favico.png' => '1280ec8c71f55ef5558cec9360b43a72', + './themes/Sugar5/images/Campaigns_favico.png' => 'd1d4e41e58a537ed4411f4bffd348c4b', + './themes/Sugar5/images/Calls_favico.png' => 'a67a35723ef7375566b49ec036ab1db2', + './themes/Sugar5/images/Calendar_favico.png' => '29a206011499729558fba4031810fdee', + './themes/Sugar5/images/Accounts_favico.png' => '72fd5b88c8eb62cb9ddc68930b77a6fa', './themes/Sugar5/images/yes.gif' => '5d3f887e0dbcd70a4708534be3bfa41a', './themes/Sugar5/images/yellow_camp.gif' => '593075b0d0f3dca3343e500f0bc1b4f7', './themes/Sugar5/images/xls_image_inline.gif' => 'e68c72edc63f0f8ab22a9b2cd49909c4', @@ -630,6 +654,7 @@ $md5_string = array ( './themes/Sugar5/images/sugar_icon.png' => '8a98242f1aae07923bf0c7289405b93b', './themes/Sugar5/images/sugar_icon.ico' => '92f1ffd4b2fef157613e48d2d2c7d9c8', './themes/Sugar5/images/sugar_document.png' => '649eeaf6da95e66caa7f961a25995e65', + './themes/Sugar5/images/Bugs_favico.png' => '953080871b3bb6f80cc22c81bbbeb640', './themes/Sugar5/images/sugar-yui-sprites.png' => '79e1cc79ea3c01d3a7a3ad8c96de34ec', './themes/Sugar5/images/sugar-yui-sprites-red.png' => '428926f9a17edbc9fbb714478803e6e4', './themes/Sugar5/images/sugar-yui-sprites-purple.png' => 'cc60edba84b9b93804eab9ad3775b357', @@ -1167,20 +1192,20 @@ $md5_string = array ( './themes/Sugar5/images/Accounts.gif' => 'e081de07d0263b270d0d306642375901', './themes/Sugar5/images/AccountReports.gif' => 'c98b4b2eb32be534f8fc1b2ac29fa1a2', './themes/Sugar5/images/ACLRoles.gif' => 'dcbf376b885458b1fc8c21de7884284e', - './themes/Sugar5/css/yui.css' => '5bdbc817ac4036dc251ec69d5e0cc1b0', + './themes/Sugar5/css/yui.css' => 'ec07e880dc74364cf529eb56ac7c69e3', './themes/Sugar5/css/wizard.css' => '0cfc4152a56c2268e5d8697cd396f8db', './themes/Sugar5/css/style.css' => '07efd48a555b0fd64da0e8c024d9fa57', './themes/Sugar5/css/print.css' => 'c00fb2d3011318e43c4b1332080d1698', './themes/Sugar5/css/deprecated.css' => 'b5471d86d506bea8630df869fbfbe9cb', './themes/Sugar5/css/chart.css' => '78bf9d159067f20c5e3fc6adf7762f1c', - './sugar_version.php' => '9e9b8cd083f1750d83cc883a0a3a4e69', + './sugar_version.php' => 'a3ddf9359046134ef76a6efa9488c866', './soap/SoapTypes.php' => '6dd557894d504db5527eceb5dab0a26f', - './soap/SoapSugarUsers.php' => '929ace28687ade89743d2a661746244a', + './soap/SoapSugarUsers.php' => '68537fcc17565ef5c2eacf1c47a9a52c', './soap/SoapStudio.php' => '0fd81758942a52940c119f3afa134fcd', './soap/SoapRelationshipHelper.php' => '03cfb58253ac766d90ddf57d38d36afe', './soap/SoapPortalUsers.php' => '042268bfdc548309f09f8862c51788ea', './soap/SoapPortalHelper.php' => 'c8b94b132b25e20498803a23dafc6c79', - './soap/SoapHelperFunctions.php' => '3b3f0583e23b5aec81ba3d86957b1e8a', + './soap/SoapHelperFunctions.php' => 'd58bffaef54d0824a9d259ab913f14d2', './soap/SoapErrorDefinitions.php' => '0ba2c58cdbdaec479860537420e4cf30', './soap/SoapError.php' => 'dff0c6fc02f66fbb4f86a91691ee300e', './soap/SoapDeprecated.php' => '309e512eb7592c910a824f991869c4b4', @@ -1190,7 +1215,7 @@ $md5_string = array ( './service/v4_1/rest.php' => '0a622cbfedd7592f7b4cc174bd8245c8', './service/v4_1/registry.php' => 'd26ac7142d9c2b8491754f2d01711088', './service/v4_1/SugarWebServiceUtilv4_1.php' => '914b66c8b3dff76e428d9be01c4442ab', - './service/v4_1/SugarWebServiceImplv4_1.php' => '2b19d928d604d18e82183db988bc6f26', + './service/v4_1/SugarWebServiceImplv4_1.php' => '021ce70d379cb92f6d40cff2d998b487', './service/v4/soap.php' => '846a967557552767c6ae0d366d4d3d2e', './service/v4/rest.php' => '0721bd365d3151c72db6f95ce4b7e186', './service/v4/registry.php' => 'eb5f47fb4e4a536aad58984a433b41d5', @@ -1228,7 +1253,7 @@ $md5_string = array ( './service/core/SugarRestService.php' => '3957ac988d90704f4b811eaab2dc16b0', './service/core/SoapHelperWebService.php' => '17c586774f82da0361700fc58fd194b4', './service/core/REST/SugarRestSerialize.php' => '199bc1b0b6c93e1b0e29c4c9fd47d6cc', - './service/core/REST/SugarRestRSS.php' => 'cc13e12068531afb8d973afd87907f46', + './service/core/REST/SugarRestRSS.php' => '2a39f41788a10686c9d282d5a99f23cf', './service/core/REST/SugarRestJSON.php' => '34ac0a137d6d32f8b118625eae5d200b', './service/core/REST/SugarRest.php' => 'fe298c96bf12d4a37b4d1bc76609fb1b', './service/core/PHP5Soap.php' => 'bec53408906a366dd024abff4ef6d5f2', @@ -1304,7 +1329,7 @@ $md5_string = array ( './modules/Users/views/view.quickedit.php' => '5a458c0188281d6ef893bf9e066ad4c6', './modules/Users/views/view.edit.php' => 'b5516b64c7aa79f1ba9288bc1e69c140', './modules/Users/views/view.detail.php' => '5e52feda3afb9995b83defb09c4df590', - './modules/Users/views/view.wizard.php' => 'b140f5a3f37c731680b30ce80b4151ad', + './modules/Users/views/view.wizard.php' => '0ee43721692818879c9ccf06e102bf3b', './modules/Users/views/view.list.php' => '2da7405c724b558b493865af34b4523c', './modules/Users/tpls/QuickEditFooter.tpl' => 'ca1415ac61ae726339e359a43a25d97e', './modules/Users/tpls/EditViewHeader.tpl' => '7ffe54d6ca1883436ebe93d8b971a77d', @@ -1312,8 +1337,8 @@ $md5_string = array ( './modules/Users/tpls/EditViewFooter.tpl' => '6ae2b2c3e3d45ad998791f4badd15ab9', './modules/Users/tpls/DetailViewHeader.tpl' => 'c2a1f379eb50f2d7dff3713fbecde359', './modules/Users/tpls/DetailViewFooter.tpl' => 'f07992b2e17ca83dbacc6d81c268906c', - './modules/Users/tpls/wizard.tpl' => '00f472389e882514a1621addb9d9091c', - './modules/Users/reassignUserRecords.php' => '37617a9320968073aa4b65bc835c558f', + './modules/Users/tpls/wizard.tpl' => '94d333a1ef8c91cba4410677231073fe', + './modules/Users/reassignUserRecords.php' => '7d3e8a0687b6297e4153ae72a6cb08b7', './modules/Users/password_utils.php' => '81d971c14523bc6a3e494c5c0bf1933f', './modules/Users/metadata/studio.php' => 'b4135b77f5d47955e7543eb901bcc9a4', './modules/Users/metadata/quickcreatedefs.php' => 'efccf71b760e579e2dcdd8154c0b5dc5', @@ -1334,12 +1359,12 @@ $md5_string = array ( './modules/Users/metadata/popupdefs.php' => '5108ed3d5c9b011dc6823fb7ff859995', './modules/Users/metadata/listviewdefs.php' => 'fa69fba8a906da85476ee99e7fff0b10', './modules/Users/metadata/SearchFields.php' => 'cc40bbd90b87e4bcb432cfd320f546aa', - './modules/Users/vardefs.php' => '751507fc670185e89bf7228e70d26548', + './modules/Users/vardefs.php' => '129234718b0763244f4385e6202615f9', './modules/Users/language/en_us.lang.php' => '3238507f61ffdb2f54a4f8c125ff40b4', './modules/Users/field_arrays.php' => 'dd10e757de20644a16a95c2e87bcecac', './modules/Users/controller.php' => '67bb0a4cbf220b76096941a34d3ff279', './modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php' => 'ccdc71346a6d93586b850d96ee7ebe7c', - './modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php' => '534f4d0de9c58299b5884dcadcf2ee9d', + './modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php' => '1444f1d0db49d6485b836a4e948e5517', './modules/Users/authentication/SAMLAuthenticate/settings.php' => 'aac61ea76cd0f3d13cdfcfc5e83d18b1', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/xmlseclibs.php' => '76623791faf895bcbbd016d9945e8c48', './modules/Users/authentication/SAMLAuthenticate/lib/xmlseclibs/CHANGELOG.txt' => '113d14ef4333039359236ffed624fb85', @@ -1348,8 +1373,8 @@ $md5_string = array ( './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/response.php' => 'fe50684dde6449668ec090969855ed59', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml/authrequest.php' => '96705df3ae615cdb2c75b2ca6bed6d05', './modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php' => '881ac527f24c2cd34b2565dcca59834a', - './modules/Users/authentication/SAMLAuthenticate/index.php' => 'ef9efccd250f104fc518337da1df0ac3', - './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php' => '839689aeaec06564815cec52f488ff0c', + './modules/Users/authentication/SAMLAuthenticate/index.php' => '9e608bd978f87faff418924de5f79864', + './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php' => '098392e5a27f6d837b82268037464f63', './modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticate.php' => 'f274a0cab35785d3ed960947b9d28caf', './modules/Users/authentication/LDAPAuthenticate/LDAPConfigs/default.php' => 'ca2447e635257835058b49b06d2234a8', './modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php' => '1770c2e11d93854ddea76dfd60f2dd6b', @@ -1359,9 +1384,9 @@ $md5_string = array ( './modules/Users/authentication/AuthenticationController.php' => '150a043e0f98128449eca108e5846aa5', './modules/Users/UserSignatureEditView.html' => '583e97e48d516a55745369222600b215', './modules/Users/UserSignature.php' => '410eac350e431f5f5e88ca59a01ad7d3', - './modules/Users/login.tpl' => '35803ff3bcd2991fd7e7af5a19acb631', + './modules/Users/login.tpl' => 'ddde079f012d9eb73ace1f222928bb8f', './modules/Users/login.css' => '40e6af67bdcdad5de2b3c2c594b61f39', - './modules/Users/User.php' => 'f63db57bc4fff4590cb4b966301fcd47', + './modules/Users/User.php' => 'e69a1a2ae9ffdabf1ff5ac756f27d00c', './modules/Users/SaveTimezone.php' => '3a27e5b03cbb1a9501401521dd2c1168', './modules/Users/SaveSignature.php' => 'cc2276e326ce4a58a4fce9b147302c4f', './modules/Users/SetTimezone.tpl' => '63de1550c8415a4a7f510846b0f1010a', @@ -1369,21 +1394,21 @@ $md5_string = array ( './modules/Users/PopupUsers.php' => '4014d4aec3ea2b4197dcddf8f0cb726d', './modules/Users/SetTimezone.php' => 'c44b79aaff575d0ca6250a1f1b7dcd84', './modules/Users/PasswordRequirementBox.css' => 'cac9ef53c3926307cdb27bd4d960f837', - './modules/Users/Save.php' => '53854737df67f1d360af5c2228146b99', + './modules/Users/Save.php' => 'bb146c897de62246b9ddd79f65fc9bbc', './modules/Users/Popup_picker.html' => '44ecf49fcfd43110437ff32d25736fa1', './modules/Users/ListRoles.php' => '5aecfc211a0f4f9d08010a3f7ab4f334', './modules/Users/PopupSignature.php' => '0d985743e8edf9ac971a4429b5c2234a', './modules/Users/Menu.php' => 'd57ecd83a83934875b98d855f9175a37', './modules/Users/Error.php' => 'e47d743efb522af6e4861396be53e8b6', './modules/Users/Logout.php' => '9b9980898ec0a1d58eaaf8a00faa2e67', - './modules/Users/Login.php' => 'e558a52ae6391d50093029f4b1020d15', - './modules/Users/GeneratePassword.php' => '6a1753f950ed75b147cd6def9ca37389', + './modules/Users/Login.php' => '7e1b037ae884636443058bf6e6ecb9ae', + './modules/Users/GeneratePassword.php' => '2a0664949e3dd49849374534fd652070', './modules/Users/Forms.php' => '5bc2ea470a1b882fa2bd7c199050353f', './modules/Users/Changenewpassword.tpl' => '8d01c6786232a13cb1ced470885ca4b5', - './modules/Users/Changenewpassword.php' => 'c3c09c4dd8d0fad602cdb2adba4ac8c7', + './modules/Users/Changenewpassword.php' => '421326be0e3623373c050e4b8315bfb5', './modules/Users/ChangePassword.php' => '2a6c396c3bb376eb1e0665d60f85ab5d', './modules/Users/ChangeGroupTab.php' => 'b1cdec1b88184545edc47b685abbd294', - './modules/Users/Authenticate.php' => '4dfd438941402ecd5cd83396135a2798', + './modules/Users/Authenticate.php' => '609ae7f1212586839801101fed57ee78', './modules/UserPreferences/vardefs.php' => '41b27420d0fa0076903d2f70aaf42325', './modules/UserPreferences/index.php' => '903eebcc2f8a7d04d245821c5f13121f', './modules/UserPreferences/field_arrays.php' => 'f2e3b2179e594e95d7e5d3fb2786323c', @@ -1392,7 +1417,7 @@ $md5_string = array ( './modules/UpgradeWizard/upgradeWizard.js' => '3375216ea56e2ebc6fd8cf15ee7d0fce', './modules/UpgradeWizard/UpgradeRemoval.php' => 'dafb5c6a72582cf510bca521d1c1bcb6', './modules/UpgradeWizard/uw_main.tpl' => '9151371cd86f8d5781f3de7586f89437', - './modules/UpgradeWizard/uw_utils.php' => 'db2d6ee2b4312e765baf855e6774e9b0', + './modules/UpgradeWizard/uw_utils.php' => '34aa752bab110e47d27281341c408ea7', './modules/UpgradeWizard/uw_emptyFunctions.php' => '81001e5fc9970324677c2b084052eace', './modules/UpgradeWizard/uw_files.php' => 'a874d9aca1246f5125cb8007e9a9364a', './modules/UpgradeWizard/upload.php' => '5a85ac5f7a24b0a22e264c727100d037', @@ -1400,9 +1425,9 @@ $md5_string = array ( './modules/UpgradeWizard/upgradeMetaHelper.php' => 'e8ec7f254fdb515c8e519d4535c3954d', './modules/UpgradeWizard/tpls/layoutsMerge.tpl' => '75425a4a3b20b5dadd5e6e9601324c59', './modules/UpgradeWizard/systemCheckJson.php' => '1b3ca3638039d16eab4dc010373effcd', - './modules/UpgradeWizard/systemCheck.php' => 'b30bc3f6848420fcaf23c0be3fd24906', + './modules/UpgradeWizard/systemCheck.php' => '5ce457069443b63a2c5c969363a8e15b', './modules/UpgradeWizard/start.php' => '46d768e67728644f5a312b3a7ad081c7', - './modules/UpgradeWizard/silentUpgrade_step2.php' => '092d876cfd113e6714edd5a246529b40', + './modules/UpgradeWizard/silentUpgrade_step2.php' => '72f9c8a48ddea79947e0db629d28f7bb', './modules/UpgradeWizard/silentUpgrade_step1.php' => '0d67bea758415ccaadc3d96f82a574ce', './modules/UpgradeWizard/silentUpgrade_dce_step2.php' => '5befff2aa180d9127dd4a83a28611e6b', './modules/UpgradeWizard/silentUpgrade_dce_step1.php' => '151cad05dc2cd2b2926e40cab690c994', @@ -1412,12 +1437,12 @@ $md5_string = array ( './modules/UpgradeWizard/preflight.php' => 'f54a095ddbbf38c82e613992573e30d0', './modules/UpgradeWizard/populateColumns.php' => 'e9a77b423f33e94e6c2e8664293e2a4b', './modules/UpgradeWizard/layouts.php' => '8e4ae4f83d7825ddb7dca7ef2dfc62b3', - './modules/UpgradeWizard/language/en_us.lang.php' => '6dd1898ee7e029e3f833ab78f3923d92', + './modules/UpgradeWizard/language/en_us.lang.php' => '9608c6cbd9d8a75e7530ca23cab3289a', './modules/UpgradeWizard/uw_ajax.php' => '8ed909021c2e338d0a185d01fa046a80', './modules/UpgradeWizard/deleteCache.php' => 'df77658b8c5c1c86badb998120ab73e5', './modules/UpgradeWizard/index.php' => '2e05260dc2035a5b5ea0bc24154cd434', './modules/UpgradeWizard/commitJson.php' => 'e02a21bb4ce00448e6bbb98526f860dd', - './modules/UpgradeWizard/end.php' => '1df2d40439988fe0e042b6845be4ebc9', + './modules/UpgradeWizard/end.php' => 'c84f449bcdcb96003f8a2d2649f15a56', './modules/UpgradeWizard/commit.php' => 'e585024644779600def1d87582dac72d', './modules/UpgradeWizard/cancel.php' => '97d22fbe214ea672250b63389101320f', './modules/UpgradeWizard/UploadFileCheck.php' => 'e5d0bac07ff5bb02ffaf9db0b605c9f4', @@ -1466,7 +1491,7 @@ $md5_string = array ( './modules/Tasks/language/en_us.lang.php' => 'b74f5f371636fec60f50199402160c3b', './modules/Tasks/field_arrays.php' => 'a933184fabc5f36b480317109efca54d', './modules/Tasks/TasksQuickCreate.php' => '7431c7f6ad20c9a78dbf0dfd25e7b188', - './modules/Tasks/Task.php' => 'cfded5d7998ab3de3350c3136a700049', + './modules/Tasks/Task.php' => '8d708e18ecaf6d40e5fc147f77df6d01', './modules/Tasks/Save.php' => '9f0a512dbd6d372bca431114f98b6b79', './modules/Tasks/MyTasks.php' => '159167f56cd8df10897cb9fef5c33cac', './modules/Tasks/MyTasks.html' => '3bdef8dbb787ca79198043c1eb761c66', @@ -1509,15 +1534,15 @@ $md5_string = array ( './modules/Studio/studiotabgroups.js' => '4273a9c4d7a2306e8472e50d0393943d', './modules/Studio/ygDDListStudio.js' => '580792b0450cf4844abde3cb037b337d', './modules/Studio/wizards/RenameModules.tpl' => 'd6deceb801f885ffc586887f7441d3c3', - './modules/Studio/wizards/RenameModules.php' => 'e783b4fa1933e3986d92a14da30869c3', + './modules/Studio/wizards/RenameModules.php' => 'b88318682263f8897ee6a2bf8f55ecf4', './modules/Studio/wizards/StudioWizard.php' => '23195644bedf65eaa92e0a376eb18b5b', './modules/Studio/wizards/EditDropDownWizard.php' => 'a3da04814708fd946b3890096aab6c2d', './modules/Studio/wizard.php' => '5415f91095354a07a99799d8aa02730f', - './modules/Studio/parsers/StudioParser.php' => '5e9e8feef1dffc64354c2b559316b4cb', + './modules/Studio/parsers/StudioParser.php' => 'd161af666e47c1fbe3387d42669e245c', './modules/Studio/language/en_us.lang.php' => 'eef38b5b55c45c9fb2f624183e081f7a', './modules/Studio/language/en_us.Portal.html' => '06519f1d1219175436818fe90efbaf10', './modules/Studio/config.php' => '70473977e64262de56d4f3d59c8695b3', - './modules/Studio/TabGroups/TabGroupHelper.php' => '0886e3f628115878f89bc300b7a9c03f', + './modules/Studio/TabGroups/TabGroupHelper.php' => '437544d4219110abf08daef55c610f11', './modules/Studio/TabGroups/EditViewTabs.tpl' => '3be986882dcde9ca1d3f92f86dd1c902', './modules/Studio/TabGroups/EditViewTabs.php' => 'c0e6813ded91f85f8c61de94a3259687', './modules/Studio/TabGroups.php' => '03ba320e2121576a2a9630dd1bd00878', @@ -1544,15 +1569,15 @@ $md5_string = array ( './modules/Schedulers/DetailView.html' => '2ebb771ba3e46868688c12c4978afea8', './modules/Schedulers/DeleteScheduled.php' => '3b52e0d8efaa59253555522b8a1ee250', './modules/Schedulers/Delete.php' => 'ebb70f19f39504d0644bca6638439359', - './modules/Schedulers/_AddJobsHere.php' => '10500dfe77b2118fc1d31e6fe4ad0665', + './modules/Schedulers/_AddJobsHere.php' => '3f6c5920996e80b648c23d556829d3ba', './modules/Schedulers/Menu.php' => 'ec8fe31293309109bc89184d9e59d4d1', './modules/Schedulers/EditView.html' => 'a41e1080ad5e758cead6f4aef669292b', './modules/Schedulers/vardefs.php' => '3d9cb993fcefe592594ae56ba7d31b98', './modules/Schedulers/SchedulerDaemon.php' => 'f750c573f651acf60b319275b980b803', - './modules/Schedulers/Scheduler.php' => '51edfd12a9d5ef3a5af4d739e4b534b1', - './modules/Schedulers/Save.php' => 'f346c78f1359e4931052ae14d2dc833d', + './modules/Schedulers/Scheduler.php' => '2fd1e5ebb2f2d9bafe71e1810d236752', + './modules/Schedulers/Save.php' => '96d6cec56e82ce30596d21d3c3886f47', './modules/Schedulers/JobThread.php' => '372301a6c760a85b3d69ddce4f027a32', - './modules/Schedulers/EditView.php' => '9405ddd64a88481fe6a4e35af09b60d6', + './modules/Schedulers/EditView.php' => '17e7ea9a33c92765aafd7504f80d0e3e', './modules/SavedSearch/vardefs.php' => 'f8829487992c517c72c4cf8bab7b1ccc', './modules/SavedSearch/metadata/listviewdefs.php' => 'a38ef0073621b4f5c37a10d0ff9d5e7e', './modules/SavedSearch/language/en_us.lang.php' => '6a13634a9671a40308230e7b9c345543', @@ -1609,15 +1634,17 @@ $md5_string = array ( './modules/Relationships/RelationshipHandler.php' => 'b910c7b8f19ec2a168642d3c2a68c7fd', './modules/Relationships/Relationship.php' => 'fb440b8891482cf38346f03c0129070e', './modules/Prospects/views/view.list.php' => '5b3e15e3d2b5c7da3eb281a234de5a3e', + './modules/Prospects/views/view.edit.php' => 'b170b99f193319f44795cdea735b3cdd', './modules/Prospects/views/view.detail.php' => '203ff6d2b35d9077e37c518739b337aa', './modules/Prospects/vardefs.php' => 'a2f530627be82745b14f1da5a4e54b6a', + './modules/Prospects/tpls/QuickCreate.tpl' => '4694ac305f16b20811c5cb9c0a945fe5', './modules/Prospects/tpls/DetailViewHeader.tpl' => 'dd705a91289d9c51886ecc83e55a0a3b', './modules/Prospects/metadata/subpanels/default.php' => '056af7b48aa9f535e0e71c21ad8bbafb', './modules/Prospects/metadata/subpaneldefs.php' => '77f75460948865c7fa7e50c21b13eef3', './modules/Prospects/metadata/studio.php' => 'ad26d5b7fa481301b576aaba0078cfd5', './modules/Prospects/metadata/searchdefs.php' => '985b927a730a4b724cbfc117afeba012', './modules/Prospects/metadata/quickcreatedefs.php' => '8a1402ad31dd0300c1d2ee133f5e1669', - './modules/Prospects/metadata/popupdefs.php' => '9ce429c19e737089979a2eea1a78ff63', + './modules/Prospects/metadata/popupdefs.php' => 'a9fa293c101e624474ad8cdc6d343b12', './modules/Prospects/metadata/listviewdefs.php' => '0807e9c0c16d8ea612ddc71f39e02752', './modules/Prospects/metadata/editviewdefs.php' => '4455b5ca716e6b9c65ac763983fc1c4e', './modules/Prospects/metadata/detailviewdefs.php' => '57061fe480000349069894c7ce7c3acd', @@ -1629,14 +1656,14 @@ $md5_string = array ( './modules/Prospects/ProspectFormBase.php' => 'e5fa28819dd0ea142f07e3d476ac607b', './modules/Prospects/Prospect.php' => 'e0d26b2ae630440b3443e5aad290793b', './modules/Prospects/Popup_picker.html' => '54b36af8cc8f4e07099e139845008ddb', - './modules/Prospects/Menu.php' => 'baa786f708566a420425163fc578c518', + './modules/Prospects/Menu.php' => '031eb2423070dee242ec8f0a7c7d43e1', './modules/Prospects/Import.php' => '614497f986383f860516ab61657971cc', './modules/Prospects/Delete.php' => 'be1e2de0c12c9c08030e485dd2fe5bcf', './modules/ProspectLists/vardefs.php' => 'f21154f0acd6ab164d7fafd4cd42d9a9', './modules/ProspectLists/metadata/subpanels/default.php' => '2d6e94f1f4459e4e77323a847f3df0d8', './modules/ProspectLists/metadata/subpaneldefs.php' => '91de2e82f326ef7f37e68ccaadfc03c5', './modules/ProspectLists/metadata/searchdefs.php' => '32f188c88dc6637a7a4fd0f1888f1e2e', - './modules/ProspectLists/metadata/popupdefs.php' => 'cdbf11d7516510cab94d2ccb9c914bf8', + './modules/ProspectLists/metadata/popupdefs.php' => '18fc64a67f8e3fb5b39d8c3464fd0e4d', './modules/ProspectLists/metadata/listviewdefs.php' => '720dfd39367607e8284d4d5ebbb46a53', './modules/ProspectLists/metadata/editviewdefs.php' => 'e066a85b3af4aa107d563e49a3d713d5', './modules/ProspectLists/metadata/detailviewdefs.php' => '8ef5270b176a0cca8b67c92a96d806b0', @@ -1648,7 +1675,7 @@ $md5_string = array ( './modules/ProspectLists/SubPanelView.html' => '66681a7823902dfe31a56ff210a128dc', './modules/ProspectLists/Save.php' => 'ab26cd4b0cd701a52ce48617ad80f5f2', './modules/ProspectLists/ProspectListFormBase.php' => 'cfb8be5b3b124bfaf72dfeeca1cf4912', - './modules/ProspectLists/ProspectList.php' => '01ca5819e271fa264aac6f7335b89dca', + './modules/ProspectLists/ProspectList.php' => '5e4066a71049c8f8577c517323b4af67', './modules/ProspectLists/Popup_picker.html' => '6c996537a99e4d21a8df37730bfa1345', './modules/ProspectLists/Menu.php' => '2e3b6c7003f8c707d2985a464512dcbc', './modules/ProspectLists/Forms.php' => '269c49c1f56b747ef00c0c192176890d', @@ -1656,7 +1683,7 @@ $md5_string = array ( './modules/ProspectLists/Duplicate.php' => '7196a7dcc38f009cc6e77f7e2163570f', './modules/ProspectLists/Delete.php' => 'cf669061c8a2f83091e4ef947151cd34', './modules/ProjectTask/ProjectTask.js' => 'f5859edf53adf5803537bc11cd05a10f', - './modules/ProjectTask/views/view.list.php' => 'fda829b9a93ebc3397d96259c54fb08e', + './modules/ProjectTask/views/view.list.php' => '2c2dcd055ce8f68be50ab671a73e868e', './modules/ProjectTask/tpls/QuickCreate.tpl' => '271f79cf1bed2a22e8af11bd08dd4787', './modules/ProjectTask/metadata/subpanels/default.php' => 'a7b2c4b8334454268ab38361ae3b661b', './modules/ProjectTask/metadata/subpaneldefs.php' => '6cfd1d7be3f474911c83a8e4c43c1376', @@ -1676,7 +1703,7 @@ $md5_string = array ( './modules/ProjectTask/Save.php' => 'b83d3f3d8250f0938a254cfbec141a40', './modules/ProjectTask/ProjectTaskQuickCreate.php' => 'c3190f8a60e3365c3cc510617b94be50', './modules/ProjectTask/vardefs.php' => '22aeae396afa19709d5bf2ea09844725', - './modules/ProjectTask/ProjectTask.php' => 'f3fb8a91677fdb44f70eaf6473375a19', + './modules/ProjectTask/ProjectTask.php' => '786e73ee32c56ccc06b6a9a065ada5b7', './modules/ProjectTask/Popup_picker.html' => '599aea3c4bb94c44bc6b571f85039da2', './modules/ProjectTask/MyProjectTasks.php' => '7d635091ff7013bc213927c74da2c52c', './modules/ProjectTask/MyProjectTasks.html' => '195e2ce8f43de26924bd8aeecef70a23', @@ -1702,8 +1729,8 @@ $md5_string = array ( './modules/Project/metadata/quickcreatedefs.php' => '2c2dda5219888a8a096e4005e8731bf4', './modules/Project/metadata/popupdefs.php' => 'd74362e83d52080ab04073b29184e2b4', './modules/Project/metadata/metafiles.php' => 'd85178ac378c73eec8b648fb00fc1e79', - './modules/Project/metadata/listviewdefs.php' => 'f53743e8277abba1043ad4a350070618', - './modules/Project/metadata/editviewdefs.php' => '848fa67734493ff15a00d3bb2e06ca70', + './modules/Project/metadata/listviewdefs.php' => '891ff5764cb2c4e652ae84acc11b6240', + './modules/Project/metadata/editviewdefs.php' => '26773666497cf52d8cdefaa729ea6eee', './modules/Project/metadata/detailviewdefs.php' => '36e09d8e8ea70431f2e5f648c40c01c2', './modules/Project/metadata/additionalDetails.php' => '9f73b631100e4c63b6d25d1fef6a5044', './modules/Project/metadata/SearchFields.php' => '79f45e0da02c43b2af963c39e80d0153', @@ -1723,7 +1750,7 @@ $md5_string = array ( './modules/OptimisticLock/Forms.php' => '6133a933f892bdefe2b83fa9e04ed496', './modules/Opportunities/views/view.edit.php' => '4b8faec19049c606fb827cf64c709d54', './modules/Opportunities/views/view.detail.php' => 'c35c409304d14f05cf500b129a4e31a9', - './modules/Opportunities/vardefs.php' => 'fffc3c75c77945472fa7fe9f70efa5e1', + './modules/Opportunities/vardefs.php' => '15456e90db79a6a3048c2420c46f80d4', './modules/Opportunities/tpls/QuickCreate.tpl' => '731c98d4b49e7a608da03ce0819a2204', './modules/Opportunities/metadata/subpanels/default.php' => 'f9b9a799c2f1fe4bd51fb6f20b32eb6e', './modules/Opportunities/metadata/subpanels/ForEmails.php' => 'fee9d4ab5b86b4f145043d5f3bdc72a2', @@ -1749,7 +1776,7 @@ $md5_string = array ( './modules/Opportunities/SubPanelView.html' => '9aa177e7127a78667a26e49e15b58dce', './modules/Opportunities/SaveOverload.php' => '9c6a9eb268ec206ca1d9ce494c1978cf', './modules/Opportunities/Save.php' => 'c09e98757bed656984ff81482a5a6b30', - './modules/Opportunities/OpportunityFormBase.php' => '2a233681b10c40685039549101614944', + './modules/Opportunities/OpportunityFormBase.php' => '576d892f4f2e117eb95ff3a09286730c', './modules/Opportunities/Opportunity.php' => '9f06f5b1602815266a0692b5e2fc59f3', './modules/Opportunities/OpportunitiesQuickCreate.php' => '9d0d2cde64d3d3f2607baab3c5e25d81', './modules/Opportunities/Menu.php' => 'b3d13418f68ba1eef892b965309e2b2a', @@ -1795,7 +1822,7 @@ $md5_string = array ( './modules/MySettings/TabController.php' => '1cd4a3c2b61bb33621899c23c0c9620f', './modules/MySettings/StoreQuery.php' => '8423a5e81861ef165e3b628f0b4c3b3a', './modules/MySettings/LoadTabSubpanels.php' => 'bf5d62359fbaf54c44c4fb564f4cece0', - './modules/ModuleBuilder/views/view.wizard.php' => '55f48a0d7ff2c6a6d5f611d0c49daecc', + './modules/ModuleBuilder/views/view.wizard.php' => 'feddf80628fc276d2141af1ce23ef405', './modules/ModuleBuilder/views/view.tree.php' => '83a4ce8d13593b57879adea46322e359', './modules/ModuleBuilder/views/view.searchview.php' => '0dc061820e877200bdfb8cabf326f050', './modules/ModuleBuilder/views/view.resetmodule.php' => 'c29d9ed79f75e33af345b98ec31fef5b', @@ -1809,9 +1836,9 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.modulefield.php' => '44f9388006e856b4463281847f04adf3', './modules/ModuleBuilder/views/view.module.php' => '1d7dde7b00d30ab2869ab96ddf308f5b', './modules/ModuleBuilder/views/view.main.php' => 'f8b0be69a2d97868312c7c0325b8bff0', - './modules/ModuleBuilder/views/view.listview.php' => '4a9c5063562ddc19ecf3206e3a646a73', - './modules/ModuleBuilder/views/view.layoutview.php' => 'c19c68f63f4f37ba389f8c9695ec8305', - './modules/ModuleBuilder/views/view.labels.php' => '9b4fb69ce344f239afd4f2253788a699', + './modules/ModuleBuilder/views/view.listview.php' => '64b1a9a74e2b6e28ae28322181d23ecf', + './modules/ModuleBuilder/views/view.layoutview.php' => '9739a1a3ce7795392008e15884e9e23a', + './modules/ModuleBuilder/views/view.labels.php' => '92f65144037092997d893f6f27267c1c', './modules/ModuleBuilder/views/view.home.php' => '720827d3c058a8a0326c2e20acefa892', './modules/ModuleBuilder/views/view.history.php' => '300fe8425bd9b4758ed01d7796c295c1', './modules/ModuleBuilder/views/view.exportcustomizations.php' => '194c2c422c6fd19a681e205a1bfef4f2', @@ -1839,7 +1866,7 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/assistantJavascript.tpl' => 'b81f8d3ef511fbd137c65b840b5cccbf', './modules/ModuleBuilder/tpls/Preview/listView.tpl' => 'e02e17a74873593c7b44f451bddb1c1a', './modules/ModuleBuilder/tpls/Preview/layoutView.tpl' => '07f87563ade5d9d0d40ebbedcdd9a11f', - './modules/ModuleBuilder/tpls/MBPackage/package.tpl' => '39e42df629705629d2a3866161befd1e', + './modules/ModuleBuilder/tpls/MBPackage/package.tpl' => 'a7bc59a1b066d39c7bc2f2c2f7ae0021', './modules/ModuleBuilder/tpls/MBPackage/deploy.tpl' => '8a040930e6a16bd54ea84bdf5abd5c50', './modules/ModuleBuilder/tpls/MBPackage/appLanguage.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/ModuleBuilder/tpls/MBModule/vardef.tpl' => 'bc4087eba4e8c8043dc63d55aa3fe527', @@ -1850,7 +1877,7 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/MBModule/fields.tpl' => '950ba2ba57aebe9322005dda4da593e7', './modules/ModuleBuilder/tpls/MBModule/field.tpl' => '71eb7ec4ede83d624f143926717699db', './modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl' => 'cba5330aeffbdd4dad3bb8fd7006aa67', - './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => '41014d8bf6788273397d5e7e83313372', + './modules/ModuleBuilder/tpls/MBModule/dropdown.tpl' => 'c941c67ca5adfc7cad536496074ac62d', './modules/ModuleBuilder/tpls/MBModule/dropdown.css' => 'ff1e6128a880bb1db6b8248d85e10471', './modules/ModuleBuilder/tpls/MBModule/Studio.tpl' => '3be9217d61a57bd61297c0d4bd02bf82', './modules/ModuleBuilder/tpls/MBModule/Menu.tpl' => '9263626d657f1238f30eb3cb105e4e6a', @@ -1862,19 +1889,19 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/parser.searchfields.php' => 'a44fd32ac5773fe751e22907ccf0cf34', './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => '9bf70fa555014fd415478b66ee2de930', './modules/ModuleBuilder/parsers/views/UndeployedMetaDataImplementation.php' => 'd08c83158fc599313de72722cc8d9ea9', - './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => '2704e97301ca35e9231dc787341cf080', + './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => 'ed5a62b4e2611d275a3d2eea0595a573', './modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php' => 'b39b4d7794eebee28fa61e20255f2442', - './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => '9b92bf71f04a8c9e47b32ea9e220ef8d', + './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => '983372e3529c23ff91237434f7c3e9bb', './modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' => 'f492a0646a1f9bd8bbee809fd1b0c78a', './modules/ModuleBuilder/parsers/views/MetaDataImplementationInterface.php' => '96a4fcfa2ee73ff09cb2d868c3ac686f', './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'bb5f5c2be17774499559cb56b272b00c', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'e36cbef6bc14174d015f17f1fd0578d8', './modules/ModuleBuilder/parsers/views/History.php' => 'a564c9e3b8c97298cca20e70ddda1060', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '296eb1b0f8c6faed6e01122862c4b618', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '6542e84c9c18849b6cbb0e31b33d0ecf', './modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php' => '64c63d0356764ab4a6bfe70d4f3014a2', - './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => '4c506c9092f52c5371208e850893f270', + './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => '42220536052241844c59285762872d6c', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => 'be0b37cb1b948cad5f982a40b6acff20', - './modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' => 'b6f8a8284af3f72bdafaed44737deea4', + './modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' => 'd836d57c65f3eb291902fbf4bae47e39', './modules/ModuleBuilder/parsers/views/AbstractMetaDataImplementation.php' => '914276cd920516e39603fc162a6b0a0d', './modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' => 'ab2a7e3f86bd46511a844eade9ae0f39', './modules/ModuleBuilder/parsers/relationships/RelationshipsInterface.php' => 'f75349afd3df2d632e9426f039a8665a', @@ -1886,17 +1913,17 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' => '303ac5f1dfd5d138007e05b6a1694ec8', './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => 'e699545483baf1b996a5dfc8c6787442', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => 'f55bd707d59e455f80d2fb79e5b7d868', - './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '3dfd89d7b070608346be658f137c631c', + './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => 'db2fb9195f0834346f5c61c863f4929e', './modules/ModuleBuilder/parsers/parser.modifysubpanel.php' => 'c3848b1a209455fe7f4a3a1fcbb53fe4', - './modules/ModuleBuilder/parsers/parser.modifylistview.php' => 'c2f708b7ad19306d8cb41f44b92ab35a', + './modules/ModuleBuilder/parsers/parser.modifylistview.php' => 'fa0ed1f8dce73863c5e2cd69a18b1e75', './modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => '9cc9a21bc66d3e5cc1b76d155229ddc8', - './modules/ModuleBuilder/parsers/parser.label.php' => '2cc86e33408315485c39e6cb97095fac', + './modules/ModuleBuilder/parsers/parser.label.php' => '3a486a68cb5ad24d87e293e37524b310', './modules/ModuleBuilder/parsers/parser.dropdown.php' => 'c41a2ea4bcf2a314ac028125754214ad', './modules/ModuleBuilder/parsers/constants.php' => '859d39d8e265b729077ef95e6f3dfb6e', './modules/ModuleBuilder/parsers/StandardField.php' => '2b46875b842ba5d48690ce5ae198a261', - './modules/ModuleBuilder/parsers/ParserFactory.php' => '42cdb696ba381d53731c38608369dd9b', + './modules/ModuleBuilder/parsers/ParserFactory.php' => 'ab9f0e24322d43c62a5e55411670cbd9', './modules/ModuleBuilder/parsers/ModuleBuilderParser.php' => '56f6ad4be02cb18edd6a84cd48f0014c', - './modules/ModuleBuilder/language/en_us.lang.php' => 'fe93820431b841dd84aa34aaea500f04', + './modules/ModuleBuilder/language/en_us.lang.php' => 'cc04619ad56f5a21e80d290ad808a979', './modules/ModuleBuilder/javascript/wizardTemplate.js' => '3d3ab9ff2f4bbf520c3d708c370919d9', './modules/ModuleBuilder/javascript/studiotabgroups.js' => '9122fbe637449b8419dcf54138796d61', './modules/ModuleBuilder/javascript/studio2RowDD.js' => '3faaeadba8b352f2f7e09d6766b74641', @@ -1904,24 +1931,24 @@ $md5_string = array ( './modules/ModuleBuilder/javascript/studio2ListDD.js' => '9d40914804207760756f7bb22e2d4b20', './modules/ModuleBuilder/javascript/studio2FieldDD.js' => '861ad309dff7d455329591168e4c6ac9', './modules/ModuleBuilder/javascript/studio2.js' => 'fd387f59c9ffe44be63fca80334739f6', - './modules/ModuleBuilder/javascript/SimpleList.js' => 'd1482d3407423ed9ff21e573cbd50f16', - './modules/ModuleBuilder/javascript/ModuleBuilder.js' => 'e5467ff32dc1a466b5b3cc7ddf53678e', + './modules/ModuleBuilder/javascript/SimpleList.js' => '384c32d3940fd4fcd0a5b04c17bee5ff', + './modules/ModuleBuilder/javascript/ModuleBuilder.js' => '704afe847aa655dd95213615ce030579', './modules/ModuleBuilder/javascript/JSTransaction.js' => '6022b3b17d3bace0ecd4e31b747f36fb', - './modules/ModuleBuilder/controller.php' => '59e0a547ed7a32f1a00544144d07bba1', + './modules/ModuleBuilder/controller.php' => 'b5d55ebbb64ea0ba943fe761a42938e5', './modules/ModuleBuilder/action_view_map.php' => '211f7363fe60af9cfb8e0dda4a8e8573', './modules/ModuleBuilder/Module/StudioTree.php' => 'ba8cb5bb1828ab02c95b763ebb0d508f', - './modules/ModuleBuilder/Module/StudioModuleFactory.php' => 'c947de76e2e1da571c84b9d7c7ef3226', - './modules/ModuleBuilder/Module/StudioModule.php' => '6a2612c6ead3387b5fd7535401a44380', + './modules/ModuleBuilder/Module/StudioModuleFactory.php' => '5a0a2bd755bc8add80477aa029324416', + './modules/ModuleBuilder/Module/StudioModule.php' => 'f3da5d509e606d445ac81d257efc73f1', './modules/ModuleBuilder/Module/StudioBrowser.php' => '92c13d7c173dd243c2a72c821c17189f', './modules/ModuleBuilder/Module/MainTree.php' => '2817547b3c188df1d5c4b0bed2510552', './modules/ModuleBuilder/Module/DropDownTree.php' => '1efd3171700422c9bb838a0e8a8c8699', './modules/ModuleBuilder/Module/DropDownBrowser.php' => 'eb231cf94dbec3b0cf1bfa5bd14bb5d2', './modules/ModuleBuilder/MB/header.php' => 'baaed55a6950279aa14ed24eb6007395', './modules/ModuleBuilder/MB/ModuleBuilder.php' => '6a1162227672a5c59b20692faf770e2d', - './modules/ModuleBuilder/MB/MBVardefs.php' => '01c4ec764ef189f8d4ca627bddaf574d', + './modules/ModuleBuilder/MB/MBVardefs.php' => 'b20c90fac5d47104d918ec502b3781ae', './modules/ModuleBuilder/MB/MBRelationship.php' => '387ceae2d9fbaeb0b6c5a04f59e869d5', './modules/ModuleBuilder/MB/MBPackageTree.php' => '479f8be396033c768a3b82780d8420a9', - './modules/ModuleBuilder/MB/MBPackage.php' => '07fee5a8a70a49b3a8e4064c1adad2c6', + './modules/ModuleBuilder/MB/MBPackage.php' => 'c54d5df6bb04e27f163c85b470719249', './modules/ModuleBuilder/MB/MBModule.php' => '0085956c81ed08d9e2618bcfae138ff0', './modules/ModuleBuilder/MB/MBLanguage.php' => 'c81ed5f12838381ba1bfe402e27c32cf', './modules/ModuleBuilder/MB/MBField.php' => '545003d5e4f70b3a80e360c27e287e6e', @@ -1953,7 +1980,7 @@ $md5_string = array ( './modules/Meetings/tpls/extMeetingNotInvited.tpl' => '4cd1dd9a2f232673e7828455bb0df98e', './modules/Meetings/tpls/extMeetingNoStart.tpl' => '4f0e0734534e99f878aa68196f46678f', './modules/Meetings/tpls/header.tpl' => 'd2ecbc05b238906de6b4dfd3c0e06129', - './modules/Meetings/tpls/footer.tpl' => '028c72038cd59bda5521662b43f2b71d', + './modules/Meetings/tpls/footer.tpl' => '341a7075f5dc13b16b24d7fdb8732d79', './modules/Meetings/tpls/QuickCreate.tpl' => '713e1113ca260e860e7f8b68085caec9', './modules/Meetings/metadata/subpanels/default.php' => 'e03965d5107ea63b3ad9613db944d2f2', './modules/Meetings/metadata/subpanels/ForHistory.php' => '6edc70ad5a10f4057dbf91486995ff6a', @@ -1963,7 +1990,7 @@ $md5_string = array ( './modules/Meetings/metadata/searchdefs.php' => '1812616f0e6dc434312700ebdcf5fe51', './modules/Meetings/metadata/quickcreatedefs.php' => '141cfa2f5f5fc8b8e600abd0689d5efd', './modules/Meetings/metadata/listviewdefs.php' => 'fa302246f3795a3fcfe46455158eccc7', - './modules/Meetings/metadata/editviewdefs.php' => 'a477e88335d915563acdfefe65a1c7b6', + './modules/Meetings/metadata/editviewdefs.php' => '5e87fce5adc7437be1fbd87616614740', './modules/Meetings/metadata/detailviewdefs.php' => '16640ba7a788084d67c9a03b7149982e', './modules/Meetings/metadata/additionalDetails.php' => 'c8779decd308d5ffcaf383f5c267e2ee', './modules/Meetings/metadata/SearchFields.php' => '06b45aadf77c191d52f16b79c912f896', @@ -1976,7 +2003,7 @@ $md5_string = array ( './modules/Meetings/MeetingsQuickCreate.php' => '5e67b447ae39ad80afe5588a4a293388', './modules/Meetings/MeetingFormBase.php' => '1ce3024e5addd56104171bddda4be15a', './modules/Meetings/Meeting.php' => '0a14859e3b16116969818fdbb180fc4e', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => 'a88ad20618e4892632fa99e575fc454e', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '7823935ea41c4e7139c51012a2a22741', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => '1f17c035ab5229249ccb4dbbb51a1d39', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => '71a3a44c23a6fd7ed3c65a5b56795414', './modules/MailMerge/controller.php' => '1a052a7b54f7eb715fc0de494c5e1fad', @@ -2002,12 +2029,14 @@ $md5_string = array ( './modules/MailMerge/EditView.php' => '49037736b7d859efa825a849e3698061', './modules/MailMerge/DetailView.php' => '6cf4d56ae32f6c99466689ad953b1db0', './modules/Leads/Lead.js' => 'a2e9935a484a388b6ce8ff1f7219647d', + './modules/Leads/LeadsVarDefHandler.php' => '14a48b105f3e946df9a42468de32ac92', './modules/Leads/views/view.showduplicates.php' => 'c9eac311e3979edb0a67b62beae4d46e', './modules/Leads/views/view.list.php' => '47e14d2db5e9b71d410c74ef07142f53', - './modules/Leads/views/view.convertlead.php' => '8f267802032e6b306228511a7e669a0e', - './modules/Leads/vardefs.php' => '30f50517a3e7fd8018a88e3cc99a763b', + './modules/Leads/views/view.edit.php' => '4208b82205cf63936b78da5eac7df01f', + './modules/Leads/views/view.convertlead.php' => '03c5feddb818cbe863d1d13073ebd0c1', + './modules/Leads/vardefs.php' => '1f9c40d4ad9570de8b773335e26582c6', './modules/Leads/tpls/ShowDuplicates.tpl' => '085379f8906ab42bafebe5470ac83f6c', - './modules/Leads/tpls/QuickCreate.tpl' => '122622c9ecb88815519718df1fdd1979', + './modules/Leads/tpls/QuickCreate.tpl' => 'f49c00a1acb4d5da111b509d6fde53ec', './modules/Leads/tpls/EditConvertLead.tpl' => '1546ed54811c02bf8deb822160cc7ac3', './modules/Leads/tpls/DetailViewHeader.tpl' => 'e0b101be788e4d8244d1943d54e51cf8', './modules/Leads/tpls/ConvertLeadHeader.tpl' => '6904932ada4e65462e3aaa786e2b77db', @@ -2023,7 +2052,7 @@ $md5_string = array ( './modules/Leads/metadata/quickcreatedefs.php' => '47cc25bd22610e63d9663980dd3f839d', './modules/Leads/metadata/popupdefs.php' => 'af881434584f038f8ae5a3ed86b321fd', './modules/Leads/metadata/listviewdefs.php' => '726b1cc5522d858c96bb5672a9e1689f', - './modules/Leads/metadata/editviewdefs.php' => 'f3a19ee1b031f2c99c1828825e9d4bd1', + './modules/Leads/metadata/editviewdefs.php' => 'b298dac7aa75ce2dbd8b95b70d2b18c0', './modules/Leads/metadata/detailviewdefs.php' => '3179e9ac2c54d1e06027ee46e44ff10e', './modules/Leads/metadata/convertdefs.php' => 'e8e66bf7417a4ca65c1e8b652372c070', './modules/Leads/metadata/additionalDetails.php' => 'ffab90ad426822cc0d8c97d3d3fb0367', @@ -2042,7 +2071,7 @@ $md5_string = array ( './modules/Leads/Menu.php' => 'e41cf004f788a5488e8e035cafa00f4e', './modules/Leads/LeadsQuickCreate.php' => '22025cf0899bc6ff093e5406a83fb2f7', './modules/Leads/LeadFormBase.php' => 'ad1ef5d150dae835ab207074a9cefbbd', - './modules/Leads/Lead.php' => '039b984a416efcdba1300f548557d665', + './modules/Leads/Lead.php' => '77b1e1c182ce6b63c01147735ea44949', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.php' => '8ce6d5ff322ddf7ca2b4812fc86812a9', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.meta.php' => '455d7167fe7a3b8ea833f1acdea0af0e', './modules/Leads/Dashlets/MyLeadsDashlet/MyLeadsDashlet.data.php' => '82f050801e93d67532de03e56f477fed', @@ -2054,7 +2083,7 @@ $md5_string = array ( './modules/LabelEditor/Forms.php' => '535059156d5be9138f1073b6df8578dd', './modules/LabelEditor/EditView.php' => '01a4550d90827014359f9d584a5ad083', './modules/LabelEditor/EditView.html' => '8e35d6773893b0f2dc0dc7f8940ae1de', - './modules/InboundEmail/InboundEmail.js' => '34bf74031f6daef9deda9074283f4921', + './modules/InboundEmail/InboundEmail.js' => '0b71a05d9f5002bcbb5cc55db5ea9786', './modules/InboundEmail/vardefs.php' => '9165aa71623a179d41cf5d9b85145ff1', './modules/InboundEmail/language/en_us.lang.php' => 'ae833e99a3be579da67788c144af7ee2', './modules/InboundEmail/index.php' => '6b54e0739c45bd059cc2da5f3aa41d9a', @@ -2062,14 +2091,14 @@ $md5_string = array ( './modules/InboundEmail/View.html' => 'bc8a276ffbe71fa4763a040ae6c5daad', './modules/InboundEmail/ShowInboundFoldersList.php' => 'a59dcd7535d7f0f3a5344238f35b1057', './modules/InboundEmail/SaveGroupFolder.php' => '59a7d467ab0166f09f5b0e746898fecb', - './modules/InboundEmail/Save.php' => 'b6a8cada0662af75d835c4b1d071191a', + './modules/InboundEmail/Save.php' => 'c34f4fb2ddb373bfa5fb5642d4d14621', './modules/InboundEmail/Popup.php' => '472052c2da7990c6e8d63a0a2dccbbd2', './modules/InboundEmail/Menu.php' => 'b84fd55a1a077ea4c07f3c42ca857b0f', './modules/InboundEmail/ListView.php' => '69f5836cee3be0e4afcd740d795ca44e', './modules/InboundEmail/ListView.html' => 'd76aa28386e3f7165f62dabfc6f0beb7', './modules/InboundEmail/InboundEmailTest.php' => '04ac2888e0372a0315d4086ec2e765f5', - './modules/InboundEmail/InboundEmail.php' => 'd7abf0cddf22b427dce6fb52b469624f', - './modules/InboundEmail/EditView.php' => '446d83e1078329e9ff912f8e5c898f6b', + './modules/InboundEmail/InboundEmail.php' => '73f79a09d7de54a862f1e60531cd7a2a', + './modules/InboundEmail/EditView.php' => '8d2777b9b2a0f72f198858073abb6e37', './modules/InboundEmail/EditView.html' => '5b106b1d4f2109fdae661d5ccc871479', './modules/InboundEmail/EditGroupFolder.php' => '0567428bfcddf16d2ef3654d8c965df2', './modules/InboundEmail/DetailView.php' => 'a171268c4c9e85ac2fc62efce30deeb7', @@ -2082,10 +2111,10 @@ $md5_string = array ( './modules/Import/views/ImportListView.php' => '8a86c159a94446b315785c4ca0f8fa25', './modules/Import/views/view.undo.php' => '445e58df91429d47e2e34192ea4f7892', './modules/Import/views/view.step4.php' => '2759ba63cac39f2d75fa521bbc9c2b3d', - './modules/Import/views/view.step3.php' => '7636309297612d2b56c8856d391f130e', - './modules/Import/views/view.step2.php' => '6bea1ff052a5bf3cd56a374578158182', + './modules/Import/views/view.step3.php' => '35baf6fa30f2bcd9035162655898aed9', + './modules/Import/views/view.step2.php' => 'b39b86517fe072d6a17d2f6238d5f005', './modules/Import/views/view.step1.php' => '7a6f866ef1917412702b560b613d2a9c', - './modules/Import/views/view.last.php' => '8c56fee1ae726d866b127431163fa60e', + './modules/Import/views/view.last.php' => 'e2f4bf88cccd007b574bc33783a66c5c', './modules/Import/views/view.error.php' => '27af21ad339434f78abc51a28c8a6f0b', './modules/Import/vardefs.php' => '60cff61c52c1283ffe7dd161c28c074a', './modules/Import/tpls/wizardWrapper.tpl' => '8d62ce933902ee2326d13a85feff7999', @@ -2103,7 +2132,7 @@ $md5_string = array ( './modules/Import/language/en_us.lang.php' => '82467768109f364d7cfe422a25de1c23', './modules/Import/Menu.php' => '034a5c49ca2cf04f95b2465e051e8c98', './modules/Import/sources/ImportFile.php' => 'eb0e3f87a1844350535ec4cc74b6398b', - './modules/Import/sources/ImportDataSource.php' => '87ce861c3c2b11c457a31f4f37faad9c', + './modules/Import/sources/ImportDataSource.php' => '3736d8c8e5edd94906477f7de408c7e0', './modules/Import/sources/ExternalSourceEAPMAdapter.php' => '3225e6643f00846460a653872e652e25', './modules/Import/maps/ImportMapTab.php' => 'b9a4fd5a189c914c02f1b5bb66d6debb', './modules/Import/maps/ImportMapSalesforce.php' => 'c92732861334cc13ae1e2ac6cedc4a16', @@ -2113,31 +2142,32 @@ $md5_string = array ( './modules/Import/maps/ImportMapCsv.php' => 'cbe41f5e574067e60ae6098aa1afeacf', './modules/Import/maps/ImportMapAct.php' => '10b875d1bfa8f195d2fb4d504ef571d1', './modules/Import/maps/ImportMap.php' => 'b0123e2d7678c753d58636f278c1fe09', - './modules/Import/Importer.php' => '8d34205911aa5da6c67dda3b8babe63a', - './modules/Import/CsvAutoDetect.php' => '618ff4172756def9c50fa0a4e98178eb', + './modules/Import/Importer.php' => 'd0684d7cf71538235610209cfce395b2', + './modules/Import/CsvAutoDetect.php' => '0388c726dd7ffdcd44190eb1aaac9aad', './modules/Import/controller.php' => 'ec75d24cc37cc2b6528f9d2c316aa537', './modules/Import/UsersLastImport.php' => '6e8e429b3eb290ef163e4ca5df88acf0', './modules/Import/ImportFileSplitter.php' => 'f04008a8ca18bf42a3dd3cad5f67c086', './modules/Import/ImportFieldSanitize.php' => 'd32a76f0cabb2f5dba570ae8b0d440e3', './modules/Import/ImportDuplicateCheck.php' => '487ae16c739aa9c5d3b8186d367cbcb2', - './modules/Import/ImportCacheFiles.php' => '62309bd68e1b7b317a3c041a80af89b2', + './modules/Import/ImportCacheFiles.php' => 'bc9e5518ede183cee83aefedf20ad244', './modules/Import/Forms.php' => '314917d04d7839e651e26df955d76242', './modules/Home/about.js' => '100062f5a04f31cfa0f3fa4eebeb22ee', './modules/Home/action_view_map.php' => '42ac212dbe9fd781aa849d252222a781', './modules/Home/SubpanelEdits.php' => 'a7c382727fd45ea8e3f3be39846b7ada', + './modules/Home/QuickSearch.php' => '347d4fcf688a4321af0eff8377b52d86', './modules/Home/views/view.additionaldetailsretrieve.php' => '44643d23831f590152b9f5f97815e08d', './modules/Home/views/view.modulelistmenu.php' => 'a1a8df55d774b049f8728fd70d8de48c', './modules/Home/views/view.list.php' => '3cd80d79fd232f21279f931557a49b43', './modules/Home/sitemap.tpl' => '3619e568a9ad07ab4b5e35dd3780b298', './modules/Home/sitemap.php' => '14f8d01f2c88bf7ba4a54cc980ad46a3', - './modules/Home/quicksearchQuery.php' => 'd780162c65b5f6849001a61f182931ee', + './modules/Home/quicksearchQuery.php' => 'a721841e2e099399f7d5cf12be5f29f9', './modules/Home/language/en_us.lang.php' => 'e76c3e67828191f43b5c8056a3a534f8', './modules/Home/dashlets.php' => 'd7ee77314c504c10c60f385fe3f97cda', './modules/Home/UnifiedSearchAdvancedResults.tpl' => 'db10bb4e894f46054ca120ec74569981', './modules/Home/UnifiedSearchAdvancedForm.tpl' => '6213260d588340fc97e52ec0f3e1b977', './modules/Home/index.php' => '401f05cd174b6ea2ed72eccfb9d13fa3', './modules/Home/UnifiedSearchAdvanced.tpl' => 'e0c7d63a16de2718887838c5617ac706', - './modules/Home/UnifiedSearchAdvanced.php' => '1394d13d9130b86dfb9c028ceaf50e59', + './modules/Home/UnifiedSearchAdvanced.php' => 'b283350379de8f275a0662ed6f8810cd', './modules/Home/TrainingPortal.tpl' => '1e181d4b3f021a74b7ce165a71558863', './modules/Home/TrainingPortal.php' => '1ec4a300d6dfd51f80eb642eee05f0f0', './modules/Home/UnifiedSearch.php' => '5ae8ec639a6e9409bc35303a94921b35', @@ -2181,7 +2211,7 @@ $md5_string = array ( './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php' => '94554200337a02b707c3c2a218f1f667', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.meta.php' => '4a0ce2d02f29a09782be1eeb4ce5c00d', './modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.en_us.lang.php' => 'eba1a456bf639ba649b8bec503776be2', - './modules/Home/SubpanelCreates.php' => '7d8fdbcbec37e7017002a78ce65f08ab', + './modules/Home/SubpanelCreates.php' => '798fa6f7a2355b85c7a2ce071354cac5', './modules/Home/AddToFavorites.php' => '2d1240598be9e7f74c497fe3a6578868', './modules/Home/About.php' => '9da62614a557c841cbdc7747d13d3ece', './modules/History/metadata/subpaneldefs.php' => '339198dff618cadf1e87d5d963e31ce0', @@ -2207,7 +2237,7 @@ $md5_string = array ( './modules/Employees/EmployeesSearchForm.php' => '81b214b49b93923bf432d6b49445cf25', './modules/Employees/EmployeeStatus.php' => '7de817da1c6516362cf167a6ab6c0117', './modules/Employees/views/view.list.php' => 'da0798a40da08d186877563cfdda0977', - './modules/Employees/views/view.edit.php' => '3d5aa9f80679019662a15e34262ea791', + './modules/Employees/views/view.edit.php' => 'dfa544fca99d42d2ec4e21af1b4d10c7', './modules/Employees/views/view.detail.php' => '755840909fe611ca102dc256b22e8777', './modules/Employees/vardefs.php' => '391506313b4acbbee78091994b990083', './modules/Employees/metadata/studio.php' => '69518398640ba7ad59a093a447d2af6c', @@ -2221,7 +2251,7 @@ $md5_string = array ( './modules/Employees/field_arrays.php' => '01119ad0d1c31523e44c8012e736ad70', './modules/Employees/controller.php' => 'c364dd30c16977791c985bc52698a97b', './modules/Employees/WapMenu.php' => '3b8c36366b656138df83dfad8d948364', - './modules/Employees/WapAuthenticate.php' => 'bcd8f53ed93a343a7e9cc7ce5a3d0ab6', + './modules/Employees/WapAuthenticate.php' => 'd57d187e1eaf738af438e7174fe75652', './modules/Employees/Popup_picker.php' => '8dd56afa5b0762070993b9cecea17adc', './modules/Employees/Popup_picker.html' => '2c5a03f7134c836c7dc66048343273d4', './modules/Employees/Menu.php' => '32d0848b3ceeed481d9cf0b952e757ac', @@ -2236,7 +2266,7 @@ $md5_string = array ( './modules/Emails/templates/successMessage.tpl' => 'a4304b6afb9efa67bce0e8c331623e1a', './modules/Emails/templates/overlay.tpl' => '7dff62b07652c9ab611379d0790e97a1', './modules/Emails/templates/outboundDialogTest.tpl' => '7900f98cb45df8855b0edbb5de4447f1', - './modules/Emails/templates/outboundDialog.tpl' => '2173369f73e2c71664d95a403bbfeda5', + './modules/Emails/templates/outboundDialog.tpl' => '1a5f9e4e25e4aad3ed2c3891505a1b38', './modules/Emails/templates/importRelate.tpl' => '0cc53223f0b61672a81839ae8c273874', './modules/Emails/templates/emailSettingsRules.tpl' => '0372b76de421181ff9e2494c2c5e0f31', './modules/Emails/templates/emailSettingsGeneral.tpl' => 'fdc075debf8aadef710e6c71fdb28d06', @@ -2275,16 +2305,16 @@ $md5_string = array ( './modules/Emails/language/en_us.lang.php' => 'dd71a85977e7a3ac75340367dc3c1cec', './modules/Emails/javascript/viewPrintable.js' => '1e5ed81de106298be2e5c11f955c6a09', './modules/Emails/javascript/vars.js' => '94c74e526e26aa91ab32bcd01cd4a70b', - './modules/Emails/javascript/init.js' => '2b9d6641ac6115db6cdb78bce4d18342', - './modules/Emails/javascript/grid.js' => '3106310de3661d5ea8ffcfd6323d1fcd', + './modules/Emails/javascript/init.js' => 'b48256570c9c73556b36248fd7b45d8b', + './modules/Emails/javascript/grid.js' => '713826b7fbaf8fa6879a2ceb7c2a2523', './modules/Emails/javascript/email_popup_helper.js' => '104dd8dd391a907e53606df613d90f34', './modules/Emails/javascript/displayOneEmailTemplate.js' => '4efbf9ed736dffca56a40d16456adf58', './modules/Emails/javascript/composeEmailTemplate.js' => '40158862759b06078af3f54cedf9ce67', './modules/Emails/javascript/complexLayout.js' => '6fe20d010015992fdea22f58b05c2325', - './modules/Emails/javascript/ajax.js' => '97a5620d3a2f8c6d3eac98125f964cbd', + './modules/Emails/javascript/ajax.js' => '33a6ad6c218a4cd45e7016b76654799b', './modules/Emails/javascript/EmailUIShared.js' => '7f22615880460f916042d37a166121b5', - './modules/Emails/javascript/EmailUICompose.js' => '48e3b74e85501624e3da0999e3f75843', - './modules/Emails/javascript/EmailUI.js' => 'fdcb7326af4074e490d7438ff4307403', + './modules/Emails/javascript/EmailUICompose.js' => '22050f4cb3a972bb654300297be22b56', + './modules/Emails/javascript/EmailUI.js' => '279ee95b8d428fd6be8d64a68e8611a8', './modules/Emails/javascript/Email.js' => '7c4964df7744820d10def3e92c7b54e1', './modules/Emails/index.php' => '793a57712ae26b09706ba36c5445fd9a', './modules/Emails/images/sugarGroup.gif' => 'ad21210176b6a2a10a7a9b8f876ad83b', @@ -2326,12 +2356,12 @@ $md5_string = array ( './modules/Emails/Grab.php' => 'a23b6c00e77eb737421b635732c70ab3', './modules/Emails/GenerateQuickComposeFrame.php' => '961e97097f5031ce17efa4d3c0130acd', './modules/Emails/Save.php' => '3c0ea8c00c5422e321632a64beb6af93', - './modules/Emails/EmailUIAjax.php' => '614144fa0910378f4ae616e63dd33955', - './modules/Emails/EmailUI.php' => '9448e2986601b677ca3dba39b41ea729', + './modules/Emails/EmailUIAjax.php' => 'c0a2e03eebae95a05fa833522eb67c27', + './modules/Emails/EmailUI.php' => 'cb9ac49079a137031fa332c39dbb6a51', './modules/Emails/EmailUI.css' => '5b76c65f92c066ae2e5ba605f46843ee', - './modules/Emails/Email.php' => '822cae119c6e400dab81baa0b426f2ab', + './modules/Emails/Email.php' => '357b53ecda9157c1c7c7e1551259a5b4', './modules/Emails/EditViewArchive.html' => 'ec3d3a403d492ee8af9ecf3f9d47471f', - './modules/Emails/EditView.php' => 'a6aa5f4de9bd39fad2c9eafd826f0ac8', + './modules/Emails/EditView.php' => '536460a6f0c6bab00d63f9eff82a8287', './modules/Emails/DetailViewSent.html' => '0da0a04f252103f8e837e99612d6df18', './modules/Emails/DetailView.php' => 'f4cff7a340ee28b3ac0e9967a86f5735', './modules/Emails/DetailView.html' => '4b4fc549e59a75b2507c243a0402ca10', @@ -2342,11 +2372,11 @@ $md5_string = array ( './modules/Emails/Compose.php' => '48aa2680069d1653658ee76c76aa649b', './modules/Emails/Check.php' => 'e955c7c45b1d2488cc57ada923142575', './modules/EmailTemplates/EmailTemplate.js' => '9910486181a411ead1f7df9e3c27e730', - './modules/EmailTemplates/vardefs.php' => 'f4bb45472a22f7763e427e6ecbdc046a', + './modules/EmailTemplates/vardefs.php' => 'd49134dcd22da11c2b42e5bae23524df', './modules/EmailTemplates/metadata/searchdefs.php' => '386ea470211f6e651749d00c2d8c714e', './modules/EmailTemplates/metadata/listviewdefs.php' => '17289e24a65a7f4cd4c22cfc21b10558', './modules/EmailTemplates/metadata/SearchFields.php' => '9b2a9251e9dc46103e184edab8ca71e7', - './modules/EmailTemplates/language/en_us.lang.php' => '5f69a41b21c1be69d83acb7241c57227', + './modules/EmailTemplates/language/en_us.lang.php' => '7b0644aa1a050eacbd1aec1345bc86bc', './modules/EmailTemplates/field_arrays.php' => '9b66e4d674a4d5ff2d1b4ff084595bda', './modules/EmailTemplates/Save.php' => '307b6446f617d164735636906d4971de', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.php' => '8202422bc30f5c020bf53b1e2f208bba', @@ -2355,7 +2385,7 @@ $md5_string = array ( './modules/EmailTemplates/EmailTemplateFormBase.php' => '16cb8049789667d8278043324d51a6de', './modules/EmailTemplates/EmailTemplate.php' => 'f9af5d416cabd21ca313c6aa3f2295e3', './modules/EmailTemplates/EditViewMain.html' => '75b6755798c990ffeddebe70ecee3c98', - './modules/EmailTemplates/EditView.php' => 'b77b25109a316c5e9f8be049f047a8c1', + './modules/EmailTemplates/EditView.php' => '65c2e542424f9759522c71578474730f', './modules/EmailTemplates/EditView.html' => '6de94e3657c8829680044915b8cd688a', './modules/EmailTemplates/DetailView.php' => '30d911f0c30ed468932232b1e5dd02ca', './modules/EmailTemplates/DetailView.html' => '2e659eed1152c544c05fb407554e0503', @@ -2373,7 +2403,7 @@ $md5_string = array ( './modules/EmailMarketing/Save.php' => '70d8fc0269686b3b90972751f7a12e2d', './modules/EmailMarketing/Menu.php' => '19da40f2c0b0700d9a5691823181c3e9', './modules/EmailMarketing/Forms.php' => '76760b77bb2cf3497833ae2d9f479b78', - './modules/EmailMarketing/EmailMarketing.php' => '998dbc54517def57a7201d95d8720c2f', + './modules/EmailMarketing/EmailMarketing.php' => '36d0a297001f84540de585629d3537d2', './modules/EmailMarketing/EditView.php' => '178036b193ac697ed0d2e5c633154251', './modules/EmailMarketing/EditView.html' => 'c15d3f7b87f9cb9f6b12384b9a0054bf', './modules/EmailMarketing/DetailView.php' => 'c1583cfb1cab04cc9c9e1c0a1ed5cc63', @@ -2385,7 +2415,7 @@ $md5_string = array ( './modules/EmailMan/views/view.config.php' => '0f083ffb933de1a16f4ec16e6cab4ad4', './modules/EmailMan/views/view.campaignconfig.php' => '57c300fec0919129d97c5c83987cf363', './modules/EmailMan/vardefs.php' => 'bb0f414c73b28779fe531420052a811f', - './modules/EmailMan/tpls/config.tpl' => '98c0bd0e627a01829315fadf11c1d5dd', + './modules/EmailMan/tpls/config.tpl' => '1a02a8f04651a8f9f316dc3100d2cbf6', './modules/EmailMan/tpls/campaignconfig.tpl' => '273798dcbff480e7f2b082ac48570ec1', './modules/EmailMan/testOutboundEmail.php' => '56363da528191562f3405d5999639f52', './modules/EmailMan/subpanels/default.php' => 'b36c0c1b45ea365c69d9d282da5a1799', @@ -2399,7 +2429,7 @@ $md5_string = array ( './modules/EmailMan/Menu.php' => 'e42681e7ce08924a06d020bd27f291c4', './modules/EmailMan/Forms.php' => '5fdc2b1b3b271dac9c1def1cef7da067', './modules/EmailMan/EmailManDelivery.php' => 'c36bbdc4b66025526b6ec4643ec29e8d', - './modules/EmailMan/EmailMan.php' => 'c1439c61b38514aabb079b12e21d5ca3', + './modules/EmailMan/EmailMan.php' => '683685417937e1b7d9e85f2c003800ae', './modules/EmailAddresses/vardefs.php' => '6e6564777f5fdd6b022c9c180fa41e11', './modules/EmailAddresses/language/en_us.lang.php' => 'f5715cae656b627542578bf65f20fd56', './modules/EmailAddresses/EmailAddress.php' => '4b40122938682fa4dd3d9418b62a551e', @@ -2415,22 +2445,22 @@ $md5_string = array ( './modules/DynamicFields/templates/Fields/TemplatePhone.php' => '7d8d627a1b8679a30c5c5228651569f1', './modules/DynamicFields/templates/Fields/TemplateParentType.php' => '907d33ada089fd376fb41368c6bd56f6', './modules/DynamicFields/templates/Fields/TemplateParent.php' => 'ab9ac498341df36b279510c3cf535972', - './modules/DynamicFields/templates/Fields/TemplateMultiEnum.php' => '003edf10a957c053f38eb1fbd732f0bf', + './modules/DynamicFields/templates/Fields/TemplateMultiEnum.php' => '540a77e3e183393d4146db01af180487', './modules/DynamicFields/templates/Fields/TemplateInt.php' => '0938d72d6c7ec85dbd6abeae7a25456c', './modules/DynamicFields/templates/Fields/TemplateImage.php' => '204a692a2ac716ff6eec839f53c49183', './modules/DynamicFields/templates/Fields/TemplateId.php' => '1e60856dfe5c3b955d0ffb04337b7b8f', './modules/DynamicFields/templates/Fields/TemplateIFrame.php' => 'e7b366897709c12396ac423cdf77b9dc', './modules/DynamicFields/templates/Fields/TemplateHTML.php' => '54a7b54e35652a082428b4680b93cc95', './modules/DynamicFields/templates/Fields/TemplateFloat.php' => 'cdd88fb190e94c4bda06e6be5a4ab7ce', - './modules/DynamicFields/templates/Fields/TemplateField.php' => 'e4176bac5f6d814db513769bc99c9e6d', + './modules/DynamicFields/templates/Fields/TemplateField.php' => '45510abce93d0380ec593014773617c5', './modules/DynamicFields/templates/Fields/TemplateEnum.php' => 'd45ac95de40ce220fcee5cf73b0bb6b3', './modules/DynamicFields/templates/Fields/TemplateEncrypt.php' => '28db5af0d64cff070439a52b22588f50', './modules/DynamicFields/templates/Fields/TemplateEmail.php' => '0c5f1a9f9e72bcc3eab2fecd0bea40e3', './modules/DynamicFields/templates/Fields/TemplateDecimal.php' => 'b10b08df804f49467e02dc747485f3f9', - './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => '40fac3ec251ad7dbfcc35cb0bc2ff93a', + './modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php' => '51cf1f35817cbfba8f97eb1cd1c8d20e', './modules/DynamicFields/templates/Fields/TemplateDate.php' => '288f1feccd81ccf38f1b056e4c7a54b4', './modules/DynamicFields/templates/Fields/TemplateCurrencyId.php' => '493c29ed2bed033c83ebc5cb599c3caa', - './modules/DynamicFields/templates/Fields/TemplateCurrency.php' => '1b05ed52cb75ad89ef953e3fad29ad63', + './modules/DynamicFields/templates/Fields/TemplateCurrency.php' => 'ea510b1868f5dc211521653c976f4b1e', './modules/DynamicFields/templates/Fields/TemplateBoolean.php' => 'a64de32021cb733c65fe52e7d886516a', './modules/DynamicFields/templates/Fields/TemplateAddressCountry.php' => 'b6c42b51c77c9c260677a0c9a3990c5b', './modules/DynamicFields/templates/Fields/TemplateAddress.php' => 'a802f044bb48da01845a188ce9af15be', @@ -2472,16 +2502,16 @@ $md5_string = array ( './modules/DynamicFields/UpgradeFields.php' => '94256fcc419774c426bed4e16d0b0992', './modules/DynamicFields/Save.php' => 'cda85056a5ed28f6b5d228731bf70a09', './modules/DynamicFields/FieldsMetaData.php' => 'fdea25798cde860a9ca26514798745c0', - './modules/DynamicFields/FieldViewer.php' => 'd0ad7e81a1d63c3f656ccf03c7a5f65d', + './modules/DynamicFields/FieldViewer.php' => '650bf8da3b81dc6c02b485ffae257eb5', './modules/DynamicFields/FieldCases.php' => '14b8c94e02dc85b2bbecf93709bce933', - './modules/DynamicFields/DynamicField.php' => 'c73fbfa93232dadacc9472358136dc79', + './modules/DynamicFields/DynamicField.php' => '4d0aa56e3982e9b30137b2566010d783', './modules/Documents/documents.js' => '62fae37d1716d8cb3449bd0776290990', - './modules/Documents/tpls/view.extdoc.tpl' => 'b59a3c8ea970dbb2da17b2df8c3efac0', + './modules/Documents/tpls/view.extdoc.tpl' => '1ca19fa9546ede05285d2f84a7dad8b1', './modules/Documents/action_view_map.php' => 'c99de9fefebe9e4ade24d34076b1daaa', './modules/Documents/DocumentExternalApiDropDown.php' => 'd4a205ecc9c70686ba90822eede2e54a', - './modules/Documents/views/view.extdoc.php' => '0254db63a97323a867bee8ea736c4ea1', + './modules/Documents/views/view.extdoc.php' => '4952ce7d1ad95f8544ab63eba854eec0', './modules/Documents/views/view.edit.php' => '51ffc2415e3a6d4f3f3fd8f310451256', - './modules/Documents/views/view.detail.php' => '720fb04affbecd5c145bcedbb3dcbdaf', + './modules/Documents/views/view.detail.php' => '63d25e2a9517c0fed495feeae6b8ed79', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php' => 'f249cd244151430b14b590b0ec374b50', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php' => '883e4c55dbf4b6f2478f87a6d1d88d77', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php' => 'e727a85cfb4e4265e87879cf4552c57f', @@ -2496,7 +2526,7 @@ $md5_string = array ( './modules/Documents/metadata/editviewdefs.php' => '77320823297fcada95e446f1cd64d81e', './modules/Documents/metadata/detailviewdefs.php' => 'd1b960967d9e6cee2578d8bffad9ce32', './modules/Documents/metadata/SearchFields.php' => '608a6c85b7ddbef2a920b1a1ea1fec29', - './modules/Documents/language/en_us.lang.php' => '681ad7cf26bed3898a3a6cd242cc77c1', + './modules/Documents/language/en_us.lang.php' => '1340a69992a426676dc8055a4a7c4948', './modules/Documents/field_arrays.php' => '5d1668261acf5205c872f326b9218957', './modules/Documents/TreeData.php' => '7be00f7c0da85b30313a58d9cadda60c', './modules/Documents/Popup_picker.php' => 'e102ca13c714efc49565ee3351a75386', @@ -2506,7 +2536,7 @@ $md5_string = array ( './modules/Documents/GetLatestRevision.php' => '4810e123a8d2793523ba6010bcf3a55f', './modules/Documents/DocumentSoap.php' => 'c7284b775de7124771ac025ed49de307', './modules/Documents/Document.php' => '915b7e09df384de87137c85c50e0c9b8', - './modules/Documents/Delete.php' => '03cbf7d73cb56050bbdd319f788a48ca', + './modules/Documents/Delete.php' => '30de4e8c6aed68bf0fd616179cbdf019', './modules/DocumentRevisions/subpanels/default.php' => 'cc8f191b61f5f0c8d06a0af773eeeba6', './modules/DocumentRevisions/metadata/editviewdefs.php' => '2a64c25167c1ac91b20ba1b9f12febeb', './modules/DocumentRevisions/metadata/detailviewdefs.php' => '0ecdf4afe311d88d6a45f33f2c52cd5b', @@ -2517,7 +2547,7 @@ $md5_string = array ( './modules/DocumentRevisions/ListView.html' => 'dac4cd310e0add58d102c5a6a41b154e', './modules/DocumentRevisions/Forms.php' => 'a9672ec8e20be2699753fccba26094ed', './modules/DocumentRevisions/vardefs.php' => '8c30033ea2313f6826012a0e036125af', - './modules/DocumentRevisions/DocumentRevision.php' => '37b6515fb9a974f7b62ec5fdafee2976', + './modules/DocumentRevisions/DocumentRevision.php' => 'e9dbc304fd09bb3c70d975e2ef176447', './modules/Currencies/EditView.js' => '10254a15db85ce01d7eaa11f3afbbfdb', './modules/Currencies/vardefs.php' => '63d6274bb668ffa09d76cb341333dd5f', './modules/Currencies/language/en_us.lang.php' => 'fdf361824c56c986633cfe6e40a714bc', @@ -2530,7 +2560,7 @@ $md5_string = array ( './modules/Currencies/Forms.php' => 'ec975a705ebda21ec50b9036e4c3e717', './modules/Currencies/EditView.tpl' => '8c780c83a03413867494eaf093999a5b', './modules/Currencies/EditCurrency.php' => '83f64af84a704b168e0e2992a15e7d6e', - './modules/Currencies/Currency.php' => '690fcf0211a533a991e58283590acaad', + './modules/Currencies/Currency.php' => 'e851e04c65f83b8aa2e24124beb806aa', './modules/Contacts/Contact.js' => '0e2a44c59d59b3beb18b9aef5ddfde3c', './modules/Contacts/views/view.quickcreate.php' => 'b6287d02b002b75be781e8fde11bfab3', './modules/Contacts/views/view.list.php' => '1a8f5e97a659c4642003594954d09744', @@ -2555,8 +2585,8 @@ $md5_string = array ( './modules/Contacts/metadata/studio.php' => '8a4fa54f580072cbcc66ef88f6c0825a', './modules/Contacts/metadata/searchdefs.php' => 'd9ec8b279cdf7dc8c8868d7870990c1c', './modules/Contacts/metadata/quickcreatedefs.php' => 'a17d61a34f6cc5acaa37adb1611270c0', - './modules/Contacts/metadata/popupdefsEmail.php' => '975da299312c9b8b587a7de8ef7e6269', - './modules/Contacts/metadata/popupdefs.php' => 'fe72cbbca0c8cf97ce62af6c0531ce10', + './modules/Contacts/metadata/popupdefsEmail.php' => 'cc8564b0bda07e50183bd184e9ab8035', + './modules/Contacts/metadata/popupdefs.php' => '0befccf66814c8cf3a6c1a62562c93a7', './modules/Contacts/metadata/metafiles.php' => '589cd33eb9432e80a1f2606dfa63b426', './modules/Contacts/metadata/listviewdefs.php' => '195c4236e50f5e98d5240af41437470f', './modules/Contacts/metadata/editviewdefs.php' => 'f553d0823fde7874f5d6ea75ab122ae8', @@ -2566,7 +2596,7 @@ $md5_string = array ( './modules/Contacts/language/en_us.lang.php' => '0bf86afb20f95014a82ff20176cb0af6', './modules/Contacts/field_arrays.php' => '7318b83ae77d80524a51e2d5840d4a03', './modules/Contacts/controller.php' => 'b2e9c61cd9ebcf9dd0adf8848a0d1962', - './modules/Contacts/vardefs.php' => '30b728eb7bbe4c6340c6ed432780f8dc', + './modules/Contacts/vardefs.php' => 'f63acf5f2f03454ca658f45ae113b74e', './modules/Contacts/SugarFeeds/ContactFeed.php' => '0f5dbc3b7f436278b4ad20103306a3ba', './modules/Contacts/ShowDuplicates.php' => '3944169e63494f19d615c1adc0bf71b5', './modules/Contacts/ShowDuplicates.html' => '71949d6852e24da1346b2f5799e6eb94', @@ -2580,22 +2610,22 @@ $md5_string = array ( './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.meta.php' => 'b42ca325847c88851e88c5cfde0ab29b', './modules/Contacts/Dashlets/MyContactsDashlet/MyContactsDashlet.data.php' => '06342bff6da916febc1f1a52732a564f', './modules/Contacts/ContactsQuickCreate.php' => '5a7fa4581d4c3bc6b4eaa2b08e327d07', - './modules/Contacts/ContactOpportunityRelationshipEdit.php' => 'aec7ef17b870676ca6f36c3a0472a226', - './modules/Contacts/ContactOpportunityRelationshipEdit.html' => 'be33a35cdaabc074cfa0420d38c3ddbd', + './modules/Contacts/ContactOpportunityRelationshipEdit.php' => '989748fbb9350215e6fc966a50b2523d', + './modules/Contacts/ContactOpportunityRelationshipEdit.html' => 'f102087675f5e38b029b62fde7c609df', './modules/Contacts/ContactOpportunityRelationship.php' => '9c6fd1dec44848c6d6f42a19cd36e3db', './modules/Contacts/ContactFormBase.php' => '1e4237e769aa2ce5026e42a5249ccf71', './modules/Contacts/Contact.php' => 'd5a201c9ae661fbeac7929b83b5c94d4', - './modules/Contacts/BusinessCard.php' => 'f7054617c886a55359cab2af3884f459', + './modules/Contacts/BusinessCard.php' => 'e2dd2c205a177cea20e3bb9f9ea347db', './modules/Contacts/BusinessCard.html' => '4fc58cd95d20b120454df377620ec00d', './modules/Contacts/Address_picker.html' => '0185fed92bdfa3b09bad5727a382ec92', './modules/Contacts/AcceptDecline.php' => '1dfb3390d5cced88009482d94c85129d', './modules/Connectors/Connector.js' => '163dfe32f69f4434a114ca1634b04eed', './modules/Connectors/views/view.sourceproperties.php' => '08cc483268f4ac592ced39dd440499b1', './modules/Connectors/views/view.searchproperties.php' => '250a07223c0a49772784b79aeb15edd9', - './modules/Connectors/views/view.modifysearch.php' => '460cc1c49b9f42a543c6a5543632c555', - './modules/Connectors/views/view.modifyproperties.php' => '4c26624eaf8dba87c2bd753a720f4556', - './modules/Connectors/views/view.modifymapping.php' => 'ebcfe0616020d83ab0336f7342b8b8c3', - './modules/Connectors/views/view.modifydisplay.php' => '463016748d789235b0c1a73b83345362', + './modules/Connectors/views/view.modifysearch.php' => 'b9b9c88f35175a3bb8a54deef9c40854', + './modules/Connectors/views/view.modifyproperties.php' => 'd66dd049e6e8b37a0f61ea384eb87cce', + './modules/Connectors/views/view.modifymapping.php' => 'df99a6e2b247a521bd39e0ff2b3a390a', + './modules/Connectors/views/view.modifydisplay.php' => '905548c4eab19cbeab5d335319421c55', './modules/Connectors/views/view.mappingproperties.php' => 'adfe754529fa5c2d1df2eac5bbdb8851', './modules/Connectors/views/view.displayproperties.php' => '060e76489ddf21fff37875f94a404d15', './modules/Connectors/views/view.connectorsettings.php' => '3599b338539419bead9903170b7cc8df', @@ -2614,17 +2644,17 @@ $md5_string = array ( './modules/Connectors/metadata/searchdefs.php' => 'a0644cec088c95ecbb1af6013c77099b', './modules/Connectors/language/en_us.lang.php' => '6da4f5e7f61502c9c60ab3da21822abb', './modules/Connectors/controller.php' => '328c25a71868499ad83d263e547921b3', - './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => '9f0db3fa93a4ea0935c04c043a6e9fb3', + './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => '7a272434f40711c8b75f94ca375f8b67', './modules/Connectors/connectors/sources/ext/rest/insideview/mapping.php' => 'f1eaaa85b15bbdcf4a2471d92830e663', './modules/Connectors/connectors/sources/ext/rest/insideview/language/en_us.lang.php' => 'd5b5b276a5aee95b4d9dcb26d3c4dacf', - './modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php' => 'd2ca46f0bd5c7408834df1a9e4cfe76c', + './modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php' => '28b1f720d42562cbca8d79f44ede2b26', './modules/Connectors/connectors/sources/ext/rest/insideview/images/video.png' => '78914852af51eb8eb694fdcf518b6752', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_expanded.png' => 'db7e5e84b7891adaed90dfd211338959', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_collapsed.png' => 'dc728b8cb2023847a28eb54a06c4d78e', './modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview.png' => 'b94d9483f486e0f53b3d98c6d04bd9f6', './modules/Connectors/connectors/sources/ext/rest/insideview/images/close.png' => 'a0d9ad4fc0c4a58ebaa7823216f6cc98', './modules/Connectors/connectors/sources/ext/rest/insideview/config.php' => 'c92b8816212c0ef5203a9c19676fb193', - './modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php' => '26550c272336cb3d3f944a2998014ec9', + './modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php' => '9ea893764bea3c7ef9007e9c523a41cc', './modules/Connectors/connectors/sources/ext/rest/linkedin/vardefs.php' => '45c64c53066830c8bd07dda6777b539a', './modules/Connectors/connectors/sources/ext/rest/linkedin/mapping.php' => '34344851a94856ebe23bf4af76630fb4', './modules/Connectors/connectors/sources/ext/rest/linkedin/linkedin.php' => 'ad4ee690c62d78cfd5b301a09e5973ce', @@ -2646,12 +2676,12 @@ $md5_string = array ( './modules/Configurator/views/view.addfontview.php' => '4219a23aa0e9d936b847dc353aa1bd2b', './modules/Configurator/views/view.addfontresult.php' => '2e92eedd9ae52db5903bb11d5286b77b', './modules/Configurator/tpls/fontmanager.tpl' => '1825567230ccefbe24318f6e87fd18a8', - './modules/Configurator/tpls/adminwizard.tpl' => '83e8454b72b8ca5c103c4658e4a0510f', + './modules/Configurator/tpls/adminwizard.tpl' => '7e27b74dc326b3aaa3e7a4743503c8a1', './modules/Configurator/tpls/addFontView.tpl' => '43ce9b72b79fa7c5838625f16a8ed1bb', './modules/Configurator/tpls/addFontResult.tpl' => '883aab2f2c47f7dd78d69d8094257a79', './modules/Configurator/tpls/SugarpdfSettingsFields.tpl' => '220de2fecf8bd16f2a6bde807a3d1196', './modules/Configurator/tpls/SugarpdfSettings.tpl' => '5bf4ad395a4406a35c7015261c0f1669', - './modules/Configurator/tpls/EditView.tpl' => '2afaaae793ffb70628e47298c6bfddc9', + './modules/Configurator/tpls/EditView.tpl' => 'e9afdb16501132248ef5eda4fb5905aa', './modules/Configurator/metadata/SugarpdfSettingsdefs.php' => '11e35d8657b2f5fa72588ec9fab24f54', './modules/Configurator/language/en_us.lang.php' => 'eff8c60dd973acc7236f20dfff93d27e', './modules/Configurator/controller.php' => 'b0a13efcd7259e5228b0e4e5153aa69c', @@ -2661,7 +2691,7 @@ $md5_string = array ( './modules/Configurator/LogView.php' => 'f062eaf27b3ab1b3326f0df396514449', './modules/Configurator/Forms.php' => '05095502bdc7e8e5ef2c726d45356a13', './modules/Configurator/Configurator.php' => 'e055f589c00dacadf1bb07811bce7e85', - './modules/Charts/DynamicAction.php' => '4dd91dfb12c5ebe5026cbf08635ea217', + './modules/Charts/DynamicAction.php' => '92cb8f5f38f39e2f0941e540538a7f1c', './modules/Charts/language/en_us.lang.php' => '3254163431c91d7510b5fc2b26b86655', './modules/Charts/code/predefined_charts.php' => '400b6637a6db557c8a99e5bfa9c063c3', './modules/Charts/code/Chart_pipeline_by_sales_stage.php' => '1206aa03a657c8742077b049c6cffec9', @@ -2672,7 +2702,7 @@ $md5_string = array ( './modules/Charts/chartdefs.php' => 'cf30bc7b7c15f699bf7c6935427c1a79', './modules/Charts/PredefinedChart.php' => 'c6e0e66e219b06d5cec5a660689f54ad', './modules/Charts/Dashlets/PredefinedChartDashletScript.tpl' => 'ce07fd62375fb0af058d359f87080fae', - './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => '99a67d887185ca22bc3e83e353f32088', + './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => '27c17a6e8c623ed8519c78acbae1982a', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.meta.php' => 'a851773de6eaba9d8129ee044c3475e9', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php' => 'd72356d6ea84d348ea4804a6a3a23e63', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.data.php' => '6a423175e66a0556e41aca8393fabeaa', @@ -2731,10 +2761,11 @@ $md5_string = array ( './modules/Campaigns/WebToLead.js' => '840e3b542e2e391235ad9c543a5cae66', './modules/Campaigns/wizard.js' => 'c205d02684fe0eb4f5afcb993f638ed1', './modules/Campaigns/TrackDetailView.tpl' => 'e6927d6a24b660ac45255ddc93e8a7be', - './modules/Campaigns/RoiDetailView.tpl' => '3faf0bfbb13373be16f51c256828a716', + './modules/Campaigns/RoiDetailView.tpl' => 'e0cf627f04e2e321308de9adf4720707', + './modules/Campaigns/ProspectLink.php' => 'f3003adb8efc2c7809f7e0383ee9ebf9', './modules/Campaigns/views/view.newsletterlist.php' => '7fabf9718039ec3786dde791fe397f22', './modules/Campaigns/views/view.modulelistmenu.php' => '9198864e2c3029c22427e1897797dc62', - './modules/Campaigns/views/view.detail.php' => '12dc9fd3e963fd0d14b6cc2dbe481ea2', + './modules/Campaigns/views/view.detail.php' => '5e31fdf7e14323e7b42bdc8e46b443df', './modules/Campaigns/views/view.classic.php' => 'b007aa55b60f4bd1f3526f19bd64af4e', './modules/Campaigns/vardefs.php' => 'b5a4c2900d59850fa610b0b3b487c900', './modules/Campaigns/tpls/campaign-inactive.tpl' => '957f2786c766e575827e118e17faa664', @@ -2747,13 +2778,13 @@ $md5_string = array ( './modules/Campaigns/tpls/WizardCampaignBudget.tpl' => '79175fb69b15c9bd869d2f836b814cb1', './modules/Campaigns/metadata/subpanels/default.php' => '91c7184d9710f1caf307cdad0041b695', './modules/Campaigns/metadata/subpanels/ForEmailMarketing.php' => 'ba92694a89b8ffa65d67976fb1ad0110', - './modules/Campaigns/metadata/subpaneldefs.php' => 'a0d18e933767812adc20d9c09c0484d8', + './modules/Campaigns/metadata/subpaneldefs.php' => '3cbb7bf3b827a3ac88b5a121d8dccab6', './modules/Campaigns/metadata/studio.php' => '7f527321f988b1b525bb0c995b6d983a', './modules/Campaigns/metadata/searchdefs.php' => 'c734542a34452e69a25995390ac1569b', './modules/Campaigns/metadata/popupdefs.php' => '1ddac8f3cbd1e6fe738bc6904a10e9d3', './modules/Campaigns/metadata/listviewdefs.php' => '3cad66e6e8f3917f2f49e0e88d89a64c', './modules/Campaigns/metadata/editviewdefs.php' => 'ba6bcf46f5b01a2a52f67b6c233028d0', - './modules/Campaigns/metadata/detailviewdefs.php' => '71c8764a2f4793cd69455dbc3cce28e9', + './modules/Campaigns/metadata/detailviewdefs.php' => 'ccee50af83c4dc791e3db46164863900', './modules/Campaigns/metadata/additionalDetails.php' => 'fe10d71bc807363897c878614af4bc2b', './modules/Campaigns/metadata/SearchFields.php' => 'fbf3d73ecc02f6800b2f537bfa70c0c2', './modules/Campaigns/language/en_us.lang.php' => '7f4f69557e52c40fca6d988adcdfbc38', @@ -2764,23 +2795,23 @@ $md5_string = array ( './modules/Campaigns/action_file_map.php' => '01327f193ceaccf4465ebafbad0b61d8', './modules/Campaigns/image.php' => '952e9db32b2c127811e4aeb87b5fda69', './modules/Campaigns/WizardNewsletterSave.php' => 'af859c8d068f9cae6009760735af36c2', - './modules/Campaigns/WizardNewsletter.php' => 'a2d30e32e4a2ff06c3a56b8aed7c7dac', + './modules/Campaigns/WizardNewsletter.php' => '7f528643267e38360937969e6542629d', './modules/Campaigns/WizardNewsletter.html' => '3cff64dc9e857633b7d3855887b5b3ea', './modules/Campaigns/WizardMarketingSave.php' => '4669fba10e6b4078cf75fe4bb6c4987f', './modules/Campaigns/WizardMarketing.php' => 'fb008007e1cb396e015362609b8d760b', - './modules/Campaigns/WizardMarketing.html' => 'b2e6a1ced0ef718743bd782cbbb08757', + './modules/Campaigns/WizardMarketing.html' => 'a1829d27c34e6b8c6b424b9a12976fce', './modules/Campaigns/WizardHome.html' => 'b1876f7fc33ebb237541ce6769ba2a14', './modules/Campaigns/WizardEmailSetupSave.php' => '6687ec09c03e96c49a6a5f61e45e2ace', './modules/Campaigns/WizardEmailSetup.php' => '845dbaee097c67f3c97aa6fe523c4b2d', - './modules/Campaigns/WizardEmailSetup.html' => 'ae816f75f3ed38901e38d77e642077af', + './modules/Campaigns/WizardEmailSetup.html' => '58a28e249690919281eb2f3dd0842a7b', './modules/Campaigns/WebToLeadFormSave.php' => '114526cb1aeabf283a5dc3e34df8338c', './modules/Campaigns/WebToLeadForm.html' => '4c4fc18a514415b7286f195495546d0d', './modules/Campaigns/WebToLeadDownloadForm.html' => '44e9c3f8ff27c646fed38b5da68f9c04', - './modules/Campaigns/WebToLeadCreation.php' => '33ecaa142b58af4efa4307e569208b2f', + './modules/Campaigns/WebToLeadCreation.php' => '37d6e50ae7ddce3140977c6df6743eb2', './modules/Campaigns/WebToLeadCreation.html' => '05e6a884007096050f3b3c9d23b4adcc', - './modules/Campaigns/WebToLeadCapture.php' => '0169594a049e4ff9d15e7057057517eb', + './modules/Campaigns/WebToLeadCapture.php' => 'f93e6f45e1ad20e42dd5ffba597043b1', './modules/Campaigns/Tracker.php' => 'ded64f00b5089f9ed0a8b1998f423713', - './modules/Campaigns/ProspectLink.php' => '8165ec3a3045de3067d64de25307f075', + './modules/Campaigns/DeleteTestCampaigns.php' => '0252ecdf2e0978b07d39c1bb63405864', './modules/Campaigns/WizardHome.php' => '13e160667cf44e1d30bfae1ec1124128', './modules/Campaigns/TrackDetailView.php' => '66386a8943a09b80e21e3c37edb5dbf8', './modules/Campaigns/Subscriptions.tpl' => '02012c3332ecb15cc8497e59adc13482', @@ -2789,7 +2820,7 @@ $md5_string = array ( './modules/Campaigns/SearchForm_NewsLetter.html' => '7ae41b03c12f952677912464c97885a1', './modules/Campaigns/Subscriptions.php' => 'f7c814ad513c464e72207feb30dd95dd', './modules/Campaigns/Schedule.php' => '1d9b5fcb4830b99382a7e3ba46a7c9fe', - './modules/Campaigns/Schedule.html' => 'c66d0e4fcc267127f65d916988916222', + './modules/Campaigns/Schedule.html' => '5e032b1c1b2ed03848af26e415926685', './modules/Campaigns/Save.php' => '986952a0159c6de59fe1ca2a961f5332', './modules/Campaigns/RoiDetailView.php' => '10c41669b01bb56f43388c483418bf3f', './modules/Campaigns/RemoveMe.php' => '0ecd6d1b56bf9be7a5366acc5273a927', @@ -2801,12 +2832,12 @@ $md5_string = array ( './modules/Campaigns/PopupCampaignRoi.html' => '0c7fe47140b048a34074aba5d87dd671', './modules/Campaigns/Menu.php' => '56fe7db6c8c20af19da4a23f76418ecf', './modules/Campaigns/MailMerge.php' => '70fee5f3d6433de51b52cde759428168', - './modules/Campaigns/GenerateWebToLeadForm.php' => '3e92068b65b4236eb5f567a32da1e789', + './modules/Campaigns/GenerateWebToLeadForm.php' => '98a0d41c83f2b29e558b235b3fa44316', './modules/Campaigns/EmailQueue.php' => 'f7224c8c2ceceb7aa1f7094db3110101', - './modules/Campaigns/Delete.php' => 'b0e5a1f023b8d0b4653ab1eeb902db15', + './modules/Campaigns/Delete.php' => '8c1473e01c2711e8754e058fc44323da', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => 'df7707f57edab45115cf42900b0215cb', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl' => 'ea825d2c46d621e689d19c4390345892', - './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php' => 'd1f919eaa9d0e08b191e084fe5ae0415', + './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php' => '4ef73bbcfcd902457c79ef170d75a516', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.meta.php' => '11eaf5e6dd39e13714669347502e89c0', './modules/Campaigns/Charts1.php' => 'b0e59e3c59349505c7e5bfaff869d5fa', './modules/Campaigns/Charts.php' => 'f34dcb3df4e7b00d23d4320bd16855c6', @@ -2822,7 +2853,7 @@ $md5_string = array ( './modules/CampaignTrackers/Forms.php' => '55aaee4db773726d612449b6003c5e3d', './modules/CampaignTrackers/Forms.html' => '3f9e5c9260c1af145e1902979ed2a6fe', './modules/CampaignTrackers/EditView.php' => 'f994aa34155346db474fc152d08d66a3', - './modules/CampaignTrackers/EditView.html' => 'adf6037b7a23b411d679d48d2c01430b', + './modules/CampaignTrackers/EditView.html' => '1ce5f8111edf386805f3e352f606e27c', './modules/CampaignTrackers/DetailView.php' => '9fad5ebb0bab04674e29e8aae54203de', './modules/CampaignTrackers/DetailView.html' => '9b3c03eeaf9ebfcd76795ffba8590486', './modules/CampaignTrackers/CampaignTracker.php' => 'cce26ed821589429d7915b56c2eb9c85', @@ -2836,8 +2867,8 @@ $md5_string = array ( './modules/CampaignLog/CampaignLog.php' => 'dba048da56ad0505426cab5b1fbf7449', './modules/Calls/controller.php' => '11b464106f66d286b6a48065b2e5555a', './modules/Calls/views/view.edit.php' => '8c94e4b5f35e895b73cf1236abb252fb', - './modules/Calls/vardefs.php' => '0e590579a532706a7af216f9f49b12ac', - './modules/Calls/tpls/footer.tpl' => '4315beec3e3c8f579254f16111d2bf1d', + './modules/Calls/vardefs.php' => 'f352c10ea95ee43da37310b0084c39b4', + './modules/Calls/tpls/footer.tpl' => 'b1bb660105583440d3c000b6893eb532', './modules/Calls/tpls/QuickCreate.tpl' => '83609a9e601a5599dc3f3d2674665941', './modules/Calls/metadata/subpanels/default.php' => '1f0a263cefebd8b908e9b3b95d433e80', './modules/Calls/metadata/subpanels/ForHistory.php' => 'e4e71584844b27a4602a5544add48179', @@ -2847,7 +2878,7 @@ $md5_string = array ( './modules/Calls/metadata/searchdefs.php' => '892464b109427176fc0dc9ca870ae1e4', './modules/Calls/metadata/quickcreatedefs.php' => 'cd55c14f3be5324623eca631dcc3dc31', './modules/Calls/metadata/listviewdefs.php' => 'd8fbb386c9825e95b0d20a90bef4a1fc', - './modules/Calls/metadata/editviewdefs.php' => '2831ecb2f6d654fc314e2721d2503a2d', + './modules/Calls/metadata/editviewdefs.php' => '7fcde9c4ad32b3b170e3f86a5f01b82f', './modules/Calls/metadata/detailviewdefs.php' => '9f12f16bc3cc7d15ca7a49603effeda2', './modules/Calls/metadata/additionalDetails.php' => 'f4a03882602f5e25ae9680a7628d25c6', './modules/Calls/metadata/SearchFields.php' => '478819054d7ea0c931e4601ccbfd62b4', @@ -2857,11 +2888,11 @@ $md5_string = array ( './modules/Calls/SubPanelViewInvitees.html' => '4e7eeaa3d0ea3807ce8632669df1e176', './modules/Calls/Save.php' => '89bcb06dff3026f3627692ee1616d86a', './modules/Calls/Menu.php' => '858bb3073b45d382034626a6ae3e13dd', - './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '4d956da7ecfd631a45894dcc94b8835a', + './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => '6bf0c16b793ffcadcf14333530dafe83', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php' => '81158ed6fa50d810929b4ff429657161', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => '879e5027ef79b3bf23f9c09609188e29', './modules/Calls/CallsQuickCreate.php' => '1d0f9551f8a18c310d5c37f80a7ee82a', - './modules/Calls/CallHelper.php' => '7d0e227e5503394a3c9e1ad795c456d4', + './modules/Calls/CallHelper.php' => '0259d8643b53c0afc964fc289aa3e6d0', './modules/Calls/CallFormBase.php' => 'd3aa539db9ee0913a2a061d210719f1d', './modules/Calls/Call.php' => '80a2053fe0e08a784e66003cc6317cc6', './modules/Calendar/Cal.js' => '0142de3a086e870ec719597edaa1e6de', @@ -2872,7 +2903,7 @@ $md5_string = array ( './modules/Calendar/views/view.quickedit.php' => 'dd9ab0bafd0c760ac3fd92d1fb2db097', './modules/Calendar/views/view.getgrusers.php' => '2262f5fa42e4d01030c39898f6c884b4', './modules/Calendar/views/view.getgr.php' => 'a39da65c98dcfacf66119d87e0dd0fc8', - './modules/Calendar/tpls/shared_users.tpl' => '068d2de0ae1c34b4bb1f8db9db7f4572', + './modules/Calendar/tpls/shared_users.tpl' => 'c0a03eb44143aca7c713fa8040a61830', './modules/Calendar/tpls/settings.tpl' => '4d3f6ac4829ce2c1df7b76591177b3f3', './modules/Calendar/tpls/main.tpl' => 'aea13c0862e17c98f313c79f77c48347', './modules/Calendar/tpls/header.tpl' => 'b5664a969b238f25ce18f46114177e73', @@ -2892,7 +2923,7 @@ $md5_string = array ( './modules/Calendar/Cal.css' => '2b8912bd81d3a37df2a2e487258acc85', './modules/Calendar/index.php' => 'cb3c105377e97d68047a6b40599ec35f', './modules/Calendar/Menu.php' => '151fbe4aad28bc42dd8f14cd0a48dc7c', - './modules/Calendar/Calendar.php' => '1bf6a1a2ec2a463ebc6146037bc02115', + './modules/Calendar/Calendar.php' => 'fa1e9304d665745e7521e83dfd9b47bc', './modules/Bugs/views/view.edit.php' => 'ad81ea5a1895c1dcf2fd4f92194637b5', './modules/Bugs/views/view.detail.php' => 'f97331e3c895ef164cc11826525e3945', './modules/Bugs/vardefs.php' => 'f5ea3eb73c1778791525d349a803d06f', @@ -2924,7 +2955,7 @@ $md5_string = array ( './modules/Audit/field_assoc.php' => '00f694000b29379563ab90fb21a88ecb', './modules/Audit/Popup_picker.php' => '81e1994846c6b3e28f6ca10bcde25079', './modules/Audit/Popup_picker.html' => 'b8b1dcfcc518c978155496285ff7dcaa', - './modules/Audit/Audit.php' => 'be6b090068216875380f94837b35e1b3', + './modules/Audit/Audit.php' => 'd43bf5585473b05f91ab6c11c36695f6', './modules/Administration/views/view.languages.php' => 'eca8a961cbf9e45bb21127ee1db25768', './modules/Administration/views/view.globalsearchsettings.php' => '81b102cec8c8a9cece2dc63175cc8127', './modules/Administration/views/view.configureajaxui.php' => '3668e9bc0b0bb4cb389d8a848d4c4ec4', @@ -2960,7 +2991,7 @@ $md5_string = array ( './modules/Administration/repairUniSearch.php' => '24e27ac7f8c09e8abd017974cf6fded8', './modules/Administration/clear_chart_cache.php' => 'a4be1a29a9f98f1f86215c6540c0b712', './modules/Administration/Diagnostic.tpl' => 'dd85b66e84e47c05f1da3cd8ccefaec3', - './modules/Administration/UpgradeWizard_prepare.php' => '23a73fc61d6bc55454010cd72c079e79', + './modules/Administration/UpgradeWizard_prepare.php' => '79d0670ca24e0948af4a4396ba3c689a', './modules/Administration/UpgradeWizard_commit.php' => 'e78691523ec261b1c227338fbcd41b57', './modules/Administration/UpgradeIISAccess.php' => 'fa50ac29309a95d7a325c1ec7444013c', './modules/Administration/UpgradeWizard.php' => '44260efe5d777ba21db42e70f378900f', @@ -2993,7 +3024,7 @@ $md5_string = array ( './modules/Administration/PasswordManager.tpl' => 'fab5ccf465ba483a805b8d43ac1e8fba', './modules/Administration/index.tpl' => 'c934bbbb1b6c1d224160d3eb2474f880', './modules/Administration/index.php' => 'b0b44837711a09ab86fa37f8998e628f', - './modules/Administration/SupportPortal.php' => '351ad2f18e079763e1310225cec03c2d', + './modules/Administration/SupportPortal.php' => '0bd583e18376f7ec8f0a2f57b8b0d104', './modules/Administration/Menu.php' => '8516a0e9af7e0a5fcc61b4d87b123cc2', './modules/Administration/RepairIndex.php' => '31d55e4ce8069277191685e503ade848', './modules/Administration/RepairFieldCasing.php' => '3745cce20da1779ce71f71021f8d0ac9', @@ -3015,7 +3046,7 @@ $md5_string = array ( './modules/Administration/CustomizeFields.php' => '211c61052aa8ae8d3959eb3e9bbdb832', './modules/Administration/Diagnostic.php' => 'f7d3ce6daca382c290e27128e0690cf0', './modules/Administration/Common.php' => '0ed6160fe894dd0c6642258eb1396a8f', - './modules/Administration/Async.php' => 'fa86606d1481dffec28757adfbb3f923', + './modules/Administration/Async.php' => '3a6cc7676af1b2c884eb7113cc8fd178', './modules/Administration/Administration.php' => '8a972beb37ff7f35f024f96c42fea740', './modules/Activities/views/view.modulelistmenu.php' => '632432dc452616687ef23799a059a025', './modules/Activities/views/view.list.php' => 'b2df983557ef30ed6dc5f8e35cc6e9d0', @@ -3034,9 +3065,10 @@ $md5_string = array ( './modules/Activities/Forms.php' => 'd3b4ae8c5adefe0459f8191015aa963a', './modules/Accounts/Account.js' => '3e0aff752d8b0a652423751dbb6daa0a', './modules/Accounts/views/view.list.php' => 'a9e10fd5720e44a1b561018e14c481a2', + './modules/Accounts/views/view.edit.php' => '0f40a80ec74c239f984660505fc3fee1', './modules/Accounts/views/view.detail.php' => 'ca5bac8edc5d5bd243aae331b7127241', './modules/Accounts/vardefs.php' => '5a61ee3def742e849e5787d298a99221', - './modules/Accounts/tpls/QuickCreate.tpl' => 'fe358dababa2d0482e0f9b8f6c584853', + './modules/Accounts/tpls/QuickCreate.tpl' => '4694ac305f16b20811c5cb9c0a945fe5', './modules/Accounts/metadata/subpanels/default.php' => '407c62c71fdf151d856eca0f26afbb74', './modules/Accounts/metadata/subpanels/ForProspectLists.php' => 'e941b808db7b4ac990081d2c16b583c6', './modules/Accounts/metadata/subpanels/ForEmails.php' => '0a6963de71042e845d6aefd45e344011', @@ -3044,7 +3076,7 @@ $md5_string = array ( './modules/Accounts/metadata/studio.php' => '396a3510b4e19f728e0b67e261cb6e5c', './modules/Accounts/metadata/searchdefs.php' => '5b43f8872cad0bd9874de4132142c72e', './modules/Accounts/metadata/quickcreatedefs.php' => '5921d2ba0285f6c214a37ebabed63cb1', - './modules/Accounts/metadata/popupdefs.php' => '9912b6a1b4f18b307bea748dad1e581f', + './modules/Accounts/metadata/popupdefs.php' => '0cb0e29240a6feb4f2bd7914cc0ce786', './modules/Accounts/metadata/metafiles.php' => '15c04f28844c48dbd5bc04000c3c51dc', './modules/Accounts/metadata/listviewdefs.php' => '2264817999893fe9ee12e25b5059cd27', './modules/Accounts/metadata/fieldGroups.php' => 'e0b1a511f6979cc7536df6a72dcf466d', @@ -3064,7 +3096,7 @@ $md5_string = array ( './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.meta.php' => 'cdf3a2e2cf2e38956a51905f01166f26', './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php' => '39a2e1411d5894fb7b29e022549143a7', './modules/Accounts/AccountsQuickCreate.php' => 'af3838e16c1a2b717c1227cfd74158fb', - './modules/Accounts/AccountFormBase.php' => 'c63f2dfe791f4b5b6be7aa8a954662b3', + './modules/Accounts/AccountFormBase.php' => '0529447d14b2e49f73d47a8c2e1bb714', './modules/Accounts/Account.php' => '4d5b6b8fafa85d726f10ca736a5d9a99', './modules/ACLRoles/ACLRoles.js' => 'dc5ebbb3d7e6e537f9eac53d3ca74c08', './modules/ACLRoles/views/view.list.php' => '41f69cfe7aed8a3528470b292e305046', @@ -3089,7 +3121,7 @@ $md5_string = array ( './modules/ACLRoles/EditView.php' => '12421b13da10235684d09114d1909d3d', './modules/ACLRoles/EditRole.tpl' => 'c8de93f656849fa81bb19ce16bdcdfb2', './modules/ACLRoles/EditRole.php' => 'b6f5cd93ee278c497ea4a52641636b3f', - './modules/ACLRoles/EditAllBody.tpl' => 'ee56b9834191502147b9b75041214218', + './modules/ACLRoles/EditAllBody.tpl' => 'd336447c60a1e9ac45c6b1ec7e626e92', './modules/ACLRoles/DetailViewUser.tpl' => '18e622140a11dc0f1d7580605d336d9f', './modules/ACLRoles/DetailViewBody.tpl' => 'dc83e41fd44e0cc390c25771a9a6ac74', './modules/ACLRoles/DetailView.tpl' => '7ffedcabe1e510e728a21a23fb8b8a2a', @@ -3157,7 +3189,7 @@ $md5_string = array ( './metadata/fields_meta_dataMetaData.php' => '47228108824588a66ae8c82b5d7afaa4', './metadata/emails_beansMetaData.php' => '6e081438f1330fb26d7c9cd07400c161', './metadata/email_marketing_prospect_listsMetaData.php' => '1740cd44e217576c7b6128779cf3b2fa', - './metadata/email_cacheMetaData.php' => '3a10254df08094b820b087073a0beadd', + './metadata/email_cacheMetaData.php' => 'a06c48e9ced9dbf1b4bf9b4812389b94', './metadata/email_addressesMetaData.php' => '894cba1da59bb6e071ce62083fdfc34a', './metadata/custom_fieldsMetaData.php' => '614f38f8bf37a1639699e405cab54d84', './metadata/contacts_usersMetaData.php' => 'e5e1608f215df1d1df73f70bc0c9ca1d', @@ -3180,7 +3212,7 @@ $md5_string = array ( './log_file_restricted.html' => 'c060f5a22a297b26a3c27fab7e99e4a9', './log4php/LoggerManager.php' => 'fa34194306cd50c01b71d8d5060ee362', './leadCapture.php' => '2ea92050e32327efc03a4d6f1bd014b5', - './jssource/src_files/include/MySugar/javascript/MySugar.js' => '7d761c0ad068f123799e73677911b775', + './jssource/src_files/include/MySugar/javascript/MySugar.js' => '270b71a9ce6b524095622d58e9e8b105', './jssource/src_files/include/SubPanel/SubPanelTiles.js' => 'de8d2b393848a3a97da76afde8e9d906', './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/canvas2png.js' => '4c95a8c2071e0d5b4ae1531a790f1492', './jssource/src_files/include/SugarCharts/Jit/FlashCanvas/flashcanvas.js' => '60e9df067b6a0591aedbfd15f2a6d21b', @@ -3191,8 +3223,8 @@ $md5_string = array ( './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => 'dbdc67c4b71a5c24bd8ef7efb12675b7', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '0f97d6009e2d91ea00eb18b788e04ae0', './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => 'd1d65de88ed79260fd0c234bfd85c6d2', - './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '34cd78a4a7144b513952aa946e47a99e', - './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => '9ce5a549e77aa4565ef86a9922f4a62b', + './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '04c6a3584bd1e08b9c6ff4f76ffbf484', + './jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js' => '103bcede04c3e18e7ebf1df5a68fa3c4', './jssource/src_files/include/connectors/formatters/default/company_detail.js' => '4df2a6df9d9a5e704d6fb6d0ce99ea04', './jssource/src_files/include/javascript/cookie.js' => 'c4e6168195f22c5fbb1780a0745bde24', './jssource/src_files/include/javascript/dashlets.js' => 'b3112d593623416d4874ec7b655c12a8', @@ -3201,17 +3233,17 @@ $md5_string = array ( './jssource/src_files/include/javascript/jsclass_base.js' => '68f095cc1d1f016ae276854e582d78ed', './jssource/src_files/include/javascript/menu.js' => 'd5b3b0de4b7cd4c2c10eef2e5f2977a7', './jssource/src_files/include/javascript/popup_helper.js' => '6a80921c2744d8cfa92cdb6f03b12a86', - './jssource/src_files/include/javascript/popup_parent_helper.js' => '9f6057d5090396a9164f0627b368d96e', + './jssource/src_files/include/javascript/popup_parent_helper.js' => 'c546e26584026b47054eecbcba234410', './jssource/src_files/include/javascript/quickCompose.js' => '495728436c153d7159e370bc941b3230', - './jssource/src_files/include/javascript/quicksearch.js' => 'f8011b77a2c9f41641fb49bb3c2e49bb', + './jssource/src_files/include/javascript/quicksearch.js' => 'ccd04eaefef5df50e9b30ca48d96ae29', './jssource/src_files/include/javascript/report_additionals.js' => 'c181eaae12c44a7f9c8869d4b73ddb02', - './jssource/src_files/include/javascript/sugar_3.js' => 'be540378dd545ac302ecde2fb24f4226', + './jssource/src_files/include/javascript/sugar_3.js' => 'bead5849ec4974f5456862f43c92766d', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => 'e38a0e0155991cbc8fabaa59bcb1b705', - './jssource/src_files/include/javascript/swfobject.js' => 'a7dc61c4ada3b828e0e09e51f943c6db', './jssource/src_files/include/javascript/overlibmws.js' => 'baaf046aa93f29e370d17b31e0d66e16', + './jssource/src_files/include/javascript/overlibmws_iframe.js' => 'b250fc67fe7d6812a41b528ac39083bc', './jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => '083ca4051ecfd7eab9d6af2ddb36631a', - './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => '2ef21876e4bfbe35ac344103adcb1acb', - './jssource/src_files/include/javascript/ajaxUI.js' => '00b22a6971244645c79c7bae2bbc6c06', + './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'ccacbd59b563da6345bf67d85c29684c', + './jssource/src_files/include/javascript/swfobject.js' => 'a7dc61c4ada3b828e0e09e51f943c6db', './jssource/src_files/include/javascript/yui3/assets/dpSyntaxHighlighter.js' => 'e3c2434acdcd9f4b0717efba1d7d7ebb', './jssource/src_files/include/javascript/yui3/assets/syntax.js' => '4099ad678b4ce516afa04ba6b112a568', './jssource/src_files/include/javascript/yui3/build/anim/anim-base-min.js' => '6d538bd720e4e2fd02c88cd3e4d40b80', @@ -3973,8 +4005,8 @@ $md5_string = array ( './jssource/src_files/include/javascript/yui3/build/widget-anim/widget-anim.js' => '73dda979e61a729d65d9fde370194b70', './jssource/src_files/include/javascript/yui3/build/yql/yql-min.js' => '9d94bc7ae9cf56021a5dc3f454a5b8bb', './jssource/src_files/include/javascript/yui3/build/yql/yql.js' => 'e1a2b802089686337415bcbdc54c23f6', - './jssource/src_files/include/javascript/overlibmws_iframe.js' => 'b250fc67fe7d6812a41b528ac39083bc', - './jssource/src_files/include/javascript/calendar.js' => 'd69fdf8e293c24c000b0321efe97c255', + './jssource/src_files/include/javascript/ajaxUI.js' => '00b22a6971244645c79c7bae2bbc6c06', + './jssource/src_files/include/javascript/calendar.js' => '8a64349697d88a99b897514e60afcb4d', './jssource/src_files/include/javascript/importWizard.js' => 'bf7aa9a7181f8b06de8caad5df37d553', './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', './jssource/src_files/include/javascript/phpjs/get_html_translation_table.js' => '9667941dd790119d552f99b6d6b73fdf', @@ -4013,7 +4045,7 @@ $md5_string = array ( './jssource/src_files/modules/Documents/documents.js' => 'b15b9c6f9ec7ea2bc2ad3dbfb5de46bd', './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => '3ba07abfef8bbfbba604ed19ebd52fd0', './jssource/src_files/modules/Home/about.js' => '5df96a1f221dfb3ca25650abe3c24eff', - './jssource/src_files/modules/InboundEmail/InboundEmail.js' => 'dcbeb6e733cd85e43c78252d4f5386aa', + './jssource/src_files/modules/InboundEmail/InboundEmail.js' => 'fed61a8bbd33b3106e5b5bc5d4753c1a', './jssource/src_files/modules/Leads/Lead.js' => 'c81abe209fd0eb0b07fe03e822181221', './jssource/src_files/modules/Meetings/jsclass_scheduler.js' => '60fb26dd4dc6bd8f9d81b3a32986d641', './jssource/src_files/modules/MergeRecords/Merge.js' => '18d685f4e15c20f8adc6c1ed80cf6148', @@ -4058,16 +4090,16 @@ $md5_string = array ( './install/licensePrint.php' => 'd574f1f71eeaf3dc4be9e12f3d5b43e9', './install/license.php' => '6ce09b8e515ccf0855e289a0101adfc1', './install/language/en_us.lang.php' => 'e015f1803d7a707d6a4668b01663c0c3', - './install/performSetup.php' => '34a4b2a45d9da4e22befb498345ee837', + './install/performSetup.php' => 'c979fee0f4715fd1e22d9b3af02c8de5', './install/install_defaults.php' => '8fdb4b9eacb7b264339875c327cc6694', './install/installType.php' => '7a7dc11d09fcc1a42929715f1e02b26d', - './install/installSystemCheck.php' => 'f477531c54ec54206ba1107eb57c38df', + './install/installSystemCheck.php' => '3357176fe492406d1d1f1c941451432c', './install/installHelp.php' => '2a0effc990dad02a1dc5eb7edf08bdaf', './install/installDisabled.php' => '62132bd46cff466d58fb7e52ef07ccab', './install/install.css' => 'bfcdc7a796ee4e2ad5ee7976d67fa138', './install/download_patches.php' => '6ff45bb95c80aec627607e8d3d52adf4', './install/download_modules.php' => 'd105c8d5111d70a96c34ce90c0d0bdc0', - './install/install_utils.php' => 'ec5d81bb19810dff9a5638b143fd3ce2', + './install/install_utils.php' => '1df9855535c625bccf9222b473f75ecf', './install/populateSeedData.php' => '7de245f982b7a9081f3d9bc4aa998c3f', './install/demoData.en_us.php' => '7d6a56d4b61a1bca6910df394c4e35b7', './install/dbConfig_a.php' => '7c4f15caea3479043263e6f7b4711b12', @@ -4164,7 +4196,7 @@ $md5_string = array ( './include/ytree/ExtNode.php' => '7cec3d9c9eebab441bfa6ed2c03b4009', './include/vCard.php' => 'b9b49b4d676cbb05c00771e037687ef3', './include/utils/php_zip_utils.php' => '837fa2513561b0b259abbbbd4082cd7e', - './include/utils/sugar_file_utils.php' => '1b90e8d430e455c5fd57da34837f081f', + './include/utils/sugar_file_utils.php' => 'c5ac04cc61fcd8b9e127105a56aba441', './include/utils/security_utils.php' => '1d7299533b136af8ac2d6448c93c34c1', './include/utils/progress_bar_utils.php' => 'dd1681c9c3f418d66364f4565eb0e286', './include/utils/zip_utils.php' => 'f765a38da8ded7c908fa5319d175c836', @@ -4172,18 +4204,18 @@ $md5_string = array ( './include/utils/layout_utils.php' => '8e9ba2ade862c13f6b5af45f5713eb2c', './include/utils/file_utils.php' => 'd27f493aaffe0d4ecc32db336be9d0b0', './include/utils/external_cache.php' => 'a0e044ccf54743fddb2da7b1d6208a07', - './include/utils/mvc_utils.php' => '0f9fb4f2c9aec99a611775aaadc09e59', + './include/utils/mvc_utils.php' => '84a3d13da3434244058d059349944d48', './include/utils/encryption_utils.php' => 'aed0886450487779feb6612dae1b68c9', - './include/utils/db_utils.php' => '3d000220b95163739f8b9290e211cd9f', + './include/utils/db_utils.php' => 'af7720b5866d652605efc17c132cd5e9', './include/utils/autoloader.php' => '3d86e0d26ac8fc289c5d5ca1e8cc6d5a', './include/utils/array_utils.php' => 'cd219555951987e06bee9321e57ab9db', './include/utils/activity_utils.php' => '489f37be89640717f8e6d0122fd9b8e7', - './include/utils/LogicHook.php' => '79d69db1f7cd332920762ef9397fbf9e', - './include/utils.php' => 'e6c68311fb76adbfa5b13b676bbeda65', + './include/utils/LogicHook.php' => 'ceeaf8d2efd82f52f34fa0d2af84fd27', + './include/utils.php' => '8cfc8333ec61560dfb736b6f68f6be15', './include/upload_file.php' => 'df7b3b994bc7703e471b62a5ab7a7598', './include/timezone/timezones.php' => '15844342704f03ef8d40603abe9aa99b', './include/templates/TemplateGroupChooser.php' => '6ae99e0ff3795b613d03ec0474e52c46', - './include/templates/TemplateDragDropChooser.php' => '5e2fce533ecb31e98f021b2aca730c92', + './include/templates/TemplateDragDropChooser.php' => 'cbe704ecc8a751776bbddaff8732cc7f', './include/templates/Template.php' => '36ef9b944d7e36d9853d9879f6194969', './include/tcpdf/unicode_data.php' => 'd20008bba6110e94611ac0939a92913b', './include/tcpdf/tcpdf.php' => 'e1032f914233be45b287bbb29bdfb452', @@ -4273,10 +4305,10 @@ $md5_string = array ( './include/nusoap/class.soap_fault.php' => 'bf058747b0ecefe183194300dbd73dff', './include/nusoap/class.nusoap_base.php' => 'cf8310e722c8fc7e310dc5ba413b1ea6', './include/nusoap/changelog' => 'd75ed67ec93c02e5bce94eee8205b425', - './include/modules.php' => 'fd7f394d22ebaf1a0f554766257bc264', + './include/modules.php' => '41d6f963f0295ec12b8d02cba0e86a6f', './include/language/jsLanguage.php' => '3aade005a1d8758085838ed1a22ebf34', './include/language/en_us.notify_template.html' => '575ac8c5b777f5a9c9cce5c0825a1182', - './include/language/en_us.lang.php' => '74caeac509381ad71a55deb95dedb8a0', + './include/language/en_us.lang.php' => 'fb8d7848e23656929d0e2b7a707f6f09', './include/json_config.php' => 'b14ab9be033480aa03fd2d43aab52591', './include/javascript/cookie.js' => '2e1893d27968b7ce7e74bb07307ad9fc', './include/javascript/dashlets.js' => 'dbe2229706fecdd3b764acea455b3c7f', @@ -4285,17 +4317,17 @@ $md5_string = array ( './include/javascript/jsclass_base.js' => 'e701e42b5bbc617eaf26cdcd9314ffaa', './include/javascript/menu.js' => '52cba0465dfc5aa3c36a3cb3874e09aa', './include/javascript/popup_helper.js' => '27f0824e84835be723a7e0035d4e000e', - './include/javascript/popup_parent_helper.js' => '913120a1a85be7234146d2726a8808f5', + './include/javascript/popup_parent_helper.js' => '7b023927b48f5e006042c763401cc94a', './include/javascript/quickCompose.js' => '4a097a6d9de93625b0e49c2f116f9908', - './include/javascript/quicksearch.js' => '3732eb53e3350a76f0aee82af28ffc88', + './include/javascript/quicksearch.js' => 'c8a23b196f8ef46a1cf8cc1e352bae7e', './include/javascript/report_additionals.js' => '1002991805113832dfca9df1b6af9684', - './include/javascript/sugar_3.js' => 'f79439e99d48698f8ae0c54a2187a5e5', + './include/javascript/sugar_3.js' => '95317f33ca84639721baa49a6e5379a7', './include/javascript/sugar_connection_event_listener.js' => '1b0384a38278c86f2bf7edeb985ed9ad', - './include/javascript/swfobject.js' => 'e83d1ca12de8ee2787c9189119cbd959', './include/javascript/overlibmws.js' => '66a898aad7f5de44cae6d97016ae91dd', - './include/javascript/ajaxUI.js' => '62152e9ff9b9289861b55ca684a6fed4', './include/javascript/overlibmws_iframe.js' => 'aae059277f699dde6451e92c51a3746d', - './include/javascript/calendar.js' => '78ee65c74c750d2cca55d4c03479b037', + './include/javascript/swfobject.js' => 'e83d1ca12de8ee2787c9189119cbd959', + './include/javascript/ajaxUI.js' => '62152e9ff9b9289861b55ca684a6fed4', + './include/javascript/calendar.js' => 'd3eb391b937d3d9a0c52e0401e92dd1c', './include/javascript/importWizard.js' => '11af9f88100e4583aa210c0757c6e6a5', './include/javascript/iscroll.js' => 'f2f4abe47439bfe02f0001e51dcbd0cd', './include/javascript/sugar_yui_overrides.js' => '49a2e18bcd66e0fae2a9f1234c6b81aa', @@ -5964,7 +5996,7 @@ $md5_string = array ( './include/javascript/tiny_mce/license.txt' => '045d04e17422d99e338da75b9c749b7c', './include/javascript/tiny_mce/langs/en.js' => 'df79faa676ad0876ad07b3618ef468a9', './include/javascript/sugarwidgets/SugarYUILoader.js' => '8206f5302b76612f51c45e21aa7c370c', - './include/javascript/sugarwidgets/SugarYUIWidgets.js' => '7ff48fdc6846878e73eb37b9378150a4', + './include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'b8492d3acfcd7381ae771f9aa2dcd74e', './include/javascript/jsAlerts.php' => '8fdc717c5046c81681ffaa513f9ae156', './include/javascript/javascript.php' => 'a2e0897741545fa87f6e5e086397bc82', './include/javascript/getYUIComboFile.php' => 'def01d82b9184bc3d553c3b7ba54315c', @@ -6044,9 +6076,9 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFielduser_name.php' => 'ac7581e728a68f2f08292dd2ff53def4', './include/generic/SugarWidgets/SugarWidgetFieldurl.php' => '8909a2b419250e770cd07129da34b6d7', './include/generic/SugarWidgets/SugarWidgetFieldtime.php' => '6df626a7deedbbad97b45a5424554458', - './include/generic/SugarWidgets/SugarWidgetFieldtext.php' => '3a6c60b6c08d92dbde5fc52efc39172e', + './include/generic/SugarWidgets/SugarWidgetFieldtext.php' => '1782b8e9e2f92bce28cbc0e81b29aa9e', './include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php' => '0338edf920bf35a9d965509024f94473', - './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => 'dd12d8c88309b999592da2d541d2dac9', + './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => '910dc3f9910d596919b5406ff6734e19', './include/generic/SugarWidgets/SugarWidgetFieldradioenum.php' => '0e82e38ab02f701c778bec444f4e93e5', './include/generic/SugarWidgets/SugarWidgetFieldphone.php' => '2146ea9625d363284a00213492a2c512', './include/generic/SugarWidgets/SugarWidgetFieldparent_type.php' => 'ee2dddadb3f8c070e48e8fc3c7bc5f99', @@ -6064,7 +6096,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFielddouble.php' => 'dfea9a0c6a04f2377cea4c0f41fae6e1', './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => 'de2b9da14bee9fb4a0fa6999c7cce7ea', './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => '396fdadd308d80ae58390314c518dbda', - './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '12eb37a25de69bf79810e3f1b7ce462d', + './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => 'e31cc5d5437bdab1845e9474d6d9cf15', './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => 'dee020ff9030fee04b450be6d2f57db4', './include/generic/SugarWidgets/SugarWidgetFielddate.php' => 'bf200f01dbe67d14123f62db17a6e53f', './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => '5a93ce41bb40b604c337bf2367491c9f', @@ -6072,7 +6104,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldbool.php' => '36271858b5a70373b5d10004d146fd0c', './include/generic/SugarWidgets/SugarWidgetField.php' => '677f2d56818b2b35611e73799d80140b', './include/generic/SugarWidgets/SugarWidget.php' => '82a67ab46009625671c7b0ae3f28e936', - './include/generic/Save2.php' => 'cdc76d398fc2e0b9032c5fa0fc40df53', + './include/generic/Save2.php' => '0bba899836b7ccb55a01b8a51b4bcc54', './include/generic/LayoutManager.php' => 'e8db5069fc639225d5f81760d9dfe799', './include/generic/DeleteRelationship.php' => '73e87c09bc4e90c35a551a6d290965c1', './include/formbase.php' => '46189b0cab499a78ffc418c728343008', @@ -6100,30 +6132,30 @@ $md5_string = array ( './include/SugarCache/SugarCacheAbstract.php' => '9218a98cb1a555613f3fe229d40560e3', './include/SugarCache/SugarCacheAPC.php' => 'cc128b1ad852e32c7acbd5d8fbd3b9f7', './include/SugarCache/SugarCache.php' => '8683bd1b3fdcbc613f66803b867693cb', - './include/export_utils.php' => 'eaba44ab2a51dc48c0e2fcb2ef3d7fb8', - './include/entryPoint.php' => '9e0c20e28c3961ae199ebad64f9f2142', + './include/export_utils.php' => '0611a231b318028b10c1af327b1ce9bb', + './include/entryPoint.php' => '273e99d81e39dbe5217ec73520d36a7b', './include/database/MysqlHelper.php' => '6081c98891b401e3653bde7ec539b6d9', './include/database/MssqlHelper.php' => '6b3a36ab4462e0f838c35e0e74e0f02b', './include/database/FreeTDSHelper.php' => '06d0b4b1635e1c87d6afae4a022f8374', './include/database/DBHelper.php' => '74b36f164c288872a50d1f6132d4875e', './include/database/SqlsrvManager.php' => '7bbe33003d89066ad7314c969b3aede3', './include/database/MysqliManager.php' => 'eddf4fdac6d13510551e2c7c85489bf3', - './include/database/MysqlManager.php' => '1dffbc70d0615755df4d83a14b2a01a5', - './include/database/MssqlManager.php' => 'c30b945a027e8db4ae2e97701f7cacb7', + './include/database/MysqlManager.php' => '4df6bf1ee35062f434021cff5d85d82a', + './include/database/MssqlManager.php' => 'ff63b96ead22cbcfb7791dd3aa55d27e', './include/database/FreeTDSManager.php' => 'e8dd14878558239a32e4c963f03ddf74', './include/database/DBManagerFactory.php' => '021c6c562cd96f304544af0e336dc736', - './include/database/DBManager.php' => 'eae3f58a50cbb6197fd7a426764aa8a1', + './include/database/DBManager.php' => '61079fa0123b0257abcc710f5e9e780b', './include/controller/Controller.php' => 'c5d723fc98af89861c9e68ae49ac9fee', './include/contextMenus/menuDefs/sugarPerson.php' => '42e0ac494bdc341fc929fc622cb0df85', './include/contextMenus/menuDefs/sugarObject.php' => '811fc5b4cf27bfb04a1b81ede08e9e76', './include/contextMenus/menuDefs/sugarAccount.php' => '5dbaee754f336cfd1ab7c51786e9c749', './include/contextMenus/contextMenu.php' => '291b728de6b490849cfdd733a219e9d1', - './include/connectors/utils/ConnectorUtils.php' => '69574b981ebf3ee736c531d573263c60', + './include/connectors/utils/ConnectorUtils.php' => '5d481ca1e3ac140a6090389e9ef2257e', './include/connectors/sources/loc/xml.php' => '652f5fc4c0cf1dfd45cc3c9b03d719e8', './include/connectors/sources/ext/eapm/eapm.php' => 'fe168bdeb686dea935a3c91ef430d2c7', './include/connectors/sources/ext/soap/soap.php' => 'b37ae7a01f4a56324d51f84403d73633', './include/connectors/sources/ext/rest/rest.php' => '24e0769a0b1145d4808dad49da5863a6', - './include/connectors/sources/default/source.php' => 'c36a54f34c72410cadd12f41b1f81d49', + './include/connectors/sources/default/source.php' => '4d019c5b2d502d38e12deff076f99fbc', './include/connectors/sources/SourceFactory.php' => 'c737c029a531c7dd1cae7fb8944f2951', './include/connectors/formatters/ext/soap/tpls/default.tpl' => 'bb94484438e077933a0dab2ff917890b', './include/connectors/formatters/ext/rest/tpls/default.tpl' => '875ed0f4b66f91a07fa5f9204d3b10be', @@ -6136,9 +6168,9 @@ $md5_string = array ( './include/connectors/ConnectorFactory.php' => '33d27fc539bbd684cf7deb0cea6ed37d', './include/VarDefHandler/vardef_meta_arrays.php' => '3b2540e7bb696e5654866dba8367fe71', './include/VarDefHandler/listvardefoverride.php' => '14a6ad705f72cefd760e5baee1d2fe37', - './include/VarDefHandler/VarDefHandler.php' => 'c1a9ed2e12a8811786400dcc4062c100', + './include/VarDefHandler/VarDefHandler.php' => '98501d67453e16436759aff7ad420bcb', './include/dir_inc.php' => 'faef07151e61f4fce6525afc96bdab28', - './include/TemplateHandler/TemplateHandler.php' => '9604dd375206531fcf949fee8cfca8bf', + './include/TemplateHandler/TemplateHandler.php' => 'e93d94b4dc829f10e369e38e83138d66', './include/Sugarpdf/sugarpdf_default.php' => '7f19994bcf11b5d98801c3739eab57a2', './include/Sugarpdf/sugarpdf_config.php' => '3768422dd5bfb14aca352ea209a0ebae', './include/Sugarpdf/sugarpdf/sugarpdf.smarty.php' => 'aff5a60a5e144a76ff625266ee90659a', @@ -6147,13 +6179,13 @@ $md5_string = array ( './include/Sugarpdf/Sugarpdf.php' => '32754834159db2701779a0a0caeccea1', './include/Sugarpdf/FontManager.php' => '35afc404d22ad40c6ab6e17e10bbc061', './include/Sugar_Smarty.php' => 'ac26b79b198a41180bdfd39170974f95', - './include/SugarTinyMCE.php' => '6dfd1b19fc68be655451023ad30b9d93', + './include/SugarTinyMCE.php' => '45e816a31cebb23c9f8568e34561745b', './include/SugarTheme/SugarSprites.php' => '10818287a033eed727e4269522cc7044', './include/SugarTheme/getImage.php' => 'c23b59c73f8ac895ff4b9da999348f03', './include/SugarTheme/cssmin.php' => '05384ba957435def09368425e4480688', - './include/SugarTheme/SugarTheme.php' => '7633bbb808fab4cd4ad40f63cef03310', - './include/TimeDate.php' => '4c9d64bc5f584fdd1e45aa750601ca29', - './include/SugarPHPMailer.php' => '78d7eb7d4348a4c83ee978f4633ca2fe', + './include/SugarTheme/SugarTheme.php' => '48c4b8f4ee26428bfeb75f5caae7d6f5', + './include/TimeDate.php' => '642e1064f889bf9f41d4e197176c0432', + './include/SugarPHPMailer.php' => 'e76d35ad2ca291828635e9577d47cb67', './include/SugarObjects/forms/PersonFormBase.php' => 'd2d1fdc5db381af193cbffd8ae1ae30f', './include/SugarObjects/forms/FormBase.php' => '31eff850186ccd48b965d6e73b574366', './include/SugarObjects/templates/sale/vardefs.php' => 'ac3bdd56b3eb6a50e4a4d469a8e9b26c', @@ -6194,7 +6226,7 @@ $md5_string = array ( './include/SugarObjects/templates/person/icons/person.gif' => 'ea5e2b2022166291d01ccedaf24b4e33', './include/SugarObjects/templates/person/icons/Createperson.gif' => '2e20692d501b15729294b80f4f311d77', './include/SugarObjects/templates/person/config.php' => '03a311c5d9412313a2c81bbf607781bd', - './include/SugarObjects/templates/person/Person.php' => 'bc47188c8040cbb4b219fd137e29e03a', + './include/SugarObjects/templates/person/Person.php' => '4082948ab2cf15be8f910f8f57cb284c', './include/SugarObjects/templates/issue/vardefs.php' => 'a2d76c0105c2f2f6f93a58cbf48c6577', './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => '22b186fcdeaca6550d28ba1df682ec69', './include/SugarObjects/templates/issue/metadata/searchdefs.php' => 'dd34c2ee72943cd8d908e7bd3b49f46d', @@ -6214,7 +6246,7 @@ $md5_string = array ( './include/SugarObjects/templates/issue/config.php' => '92befb45176ef9d23be2f27f0ac59fc6', './include/SugarObjects/templates/issue/Issue.php' => '5633c4b2e0f5fa321458e155f4d18c75', './include/SugarObjects/templates/file/views/view.edit.php' => '22e44b99ac7bb5d9aa1a1b7bda8288da', - './include/SugarObjects/templates/file/vardefs.php' => '05efae97f05999c1e631d321f362411f', + './include/SugarObjects/templates/file/vardefs.php' => 'e5026477a2cfc97a491b06b3df0a6bc8', './include/SugarObjects/templates/file/metadata/subpanels/default.php' => 'b05da88f0c1db5fc5fec78df44bc1675', './include/SugarObjects/templates/file/metadata/searchdefs.php' => 'e5e746e60f52b5d6908bd9c2572e403d', './include/SugarObjects/templates/file/metadata/quickcreatedefs.php' => 'c0082e7516cf13f7df016fcc65328dff', @@ -6230,7 +6262,7 @@ $md5_string = array ( './include/SugarObjects/templates/file/icons/file.gif' => 'a577b65a0589e748d18aa1baef4e05c6', './include/SugarObjects/templates/file/icons/Createfile.gif' => '3ed1d93938f715b1af93c0e99e900af5', './include/SugarObjects/templates/file/controller.php' => '10e7cf55405d3e6bc10ee2e3b4eb2fe5', - './include/SugarObjects/templates/file/File.php' => '23c569aa43b1fc7444093954439485f4', + './include/SugarObjects/templates/file/File.php' => '2e2ceb1a921678171d05c8202c634279', './include/SugarObjects/templates/company/vardefs.php' => 'bd83d7c05072660a156d9160a39ff2ab', './include/SugarObjects/templates/company/metadata/subpanels/default.php' => '6d4254462dbfef445d2a6e752ec037c6', './include/SugarObjects/templates/company/metadata/searchdefs.php' => '534153698c83d1ba533748eb8a37fd5b', @@ -6239,7 +6271,7 @@ $md5_string = array ( './include/SugarObjects/templates/company/metadata/metafiles.php' => '7e2cd7fed643df88ca71b8da4ffd90df', './include/SugarObjects/templates/company/metadata/listviewdefs.php' => '91efe4582d964ebca4bf0f3cb5b72ad2', './include/SugarObjects/templates/company/metadata/editviewdefs.php' => '6acc6288525f5168b30436397ce24eac', - './include/SugarObjects/templates/company/metadata/detailviewdefs.php' => '899d16d6750cab3169214442e288cca2', + './include/SugarObjects/templates/company/metadata/detailviewdefs.php' => 'c3ced1417dad90088373114236873178', './include/SugarObjects/templates/company/metadata/dashletviewdefs.php' => '0e3d5775767147a15d8ed54d867b1490', './include/SugarObjects/templates/company/metadata/SearchFields.php' => 'ecfa75634d3ceb65befd17c0506c59a0', './include/SugarObjects/templates/company/language/en_us.lang.php' => 'c9a98e5acc779109f500d30bc291fb65', @@ -6248,7 +6280,7 @@ $md5_string = array ( './include/SugarObjects/templates/company/icons/company.gif' => '7890367dfe0e337a2f5f2839b3e6dac7', './include/SugarObjects/templates/company/icons/Createcompany.gif' => '3978b32e01cbeb974d86b1da0617dae9', './include/SugarObjects/templates/company/config.php' => 'a9b4d6ee2c4a4d3b40194db8d3696ff3', - './include/SugarObjects/templates/company/Company.php' => '522e7d5469303496b2fc4b72bdbe9fbf', + './include/SugarObjects/templates/company/Company.php' => 'f91a3108758b2d1cf3405e765b426048', './include/SugarObjects/templates/basic/vardefs.php' => '83db9c83d4522d65e63b7393a00ca22e', './include/SugarObjects/templates/basic/metadata/subpanels/default.php' => 'f2b7f012d1ecfd6c2d92107171ecfa57', './include/SugarObjects/templates/basic/metadata/searchdefs.php' => '86dc366893917b0768819862b29bb986', @@ -6270,8 +6302,8 @@ $md5_string = array ( './include/SugarObjects/implements/team_security/vardefs.php' => 'd42e95e7eb7b74cd00411815a9877006', './include/SugarObjects/implements/team_security/language/en_us.lang.php' => '8434444c2ddc04581bc68703203d19ac', './include/SugarObjects/implements/assignable/vardefs.php' => '257d03ae035f53509c309658c4d04e49', - './include/SugarObjects/implements/assignable/language/en_us.lang.php' => 'd47ac46b12646e90c8907ccd175be7a7', - './include/SugarObjects/VardefManager.php' => 'a939cc5aa6ebf7f3323539b47834dd0b', + './include/SugarObjects/implements/assignable/language/en_us.lang.php' => '3a36062ee4d7012d80ee4642fdc5702c', + './include/SugarObjects/VardefManager.php' => '9101445a38219c19c482182af2ed418f', './include/SugarObjects/SugarSession.php' => '3f1cdefe0f810a15ef344e0086905be5', './include/SugarObjects/SugarRegistry.php' => '9983aad8fa1c984c64d2c8e439851cee', './include/SugarObjects/SugarConfig.php' => '155f1630be85066f2d36221a91d8fd7c', @@ -6318,7 +6350,7 @@ $md5_string = array ( './include/SugarFields/Fields/Text/EditView.tpl' => '26aa7313fd3fe83db6f16c1de80a2823', './include/SugarFields/Fields/Text/DetailView.tpl' => 'cbf8e46def8846161dbc6ccfd8e4ee1b', './include/SugarFields/Fields/Text/ClassicEditView.tpl' => 'b0b4eba7ded342f4b26d79d4b8c3a723', - './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => 'dca7e4e2992848c086690ee857275d41', + './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => 'c1bccc2ebff8cc58f20deaf71be9f61e', './include/SugarFields/Fields/Relate/SearchView.tpl' => 'ceca0856d893a7ae78cecd35b95fcff9', './include/SugarFields/Fields/Relate/EditView.tpl' => '6fd3f5f47d2908588f15ce55c347fb4a', './include/SugarFields/Fields/Relate/DetailView.tpl' => '256e3bfa0a77434237fad67fee60d0d6', @@ -6332,7 +6364,7 @@ $md5_string = array ( './include/SugarFields/Fields/Phone/DetailView.tpl' => 'ce6b524b3132e8c3712f28baee4a97f8', './include/SugarFields/Fields/Password/SugarFieldPassword.php' => '50644b74c6a8bc8d1a62b81bbb4d7d80', './include/SugarFields/Fields/Password/EditView.tpl' => 'aa42f8ace5d954a82a0cecd46b9fd549', - './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '8c2fc5b744c6681b46fe6d0906b0938d', + './include/SugarFields/Fields/Parent/SugarFieldParent.php' => '80f9e10a8ab4b9737868ffb57a216214', './include/SugarFields/Fields/Parent/SearchView.tpl' => 'e954dfff5a3866d502ba5de2d7b999c7', './include/SugarFields/Fields/Parent/EditView.tpl' => '02ab304bbd89b599b592af16e519642a', './include/SugarFields/Fields/Parent/DetailView.tpl' => 'c0134de64f17b6498188d2e5bfabe9e6', @@ -6357,36 +6389,36 @@ $md5_string = array ( './include/SugarFields/Fields/Fullname/SugarFieldFullname.php' => 'cf2903b1f2bf62b5e51a026e823407f4', './include/SugarFields/Fields/Fullname/DetailView.tpl' => 'f61a51cd909a6ca2dd5b12bd9353ec96', './include/SugarFields/Fields/Float/SugarFieldFloat.php' => '8452804572e9a4aa4c711a22530a65f9', - './include/SugarFields/Fields/Float/EditView.tpl' => '0380114a23903950126af91a8b8ef8cf', - './include/SugarFields/Fields/Float/DetailView.tpl' => 'd2aa90f1ecd42436fbed79478d5775c9', - './include/SugarFields/Fields/File/SugarFieldFile.js' => 'b643ae411557050badadfd19f4930152', + './include/SugarFields/Fields/Float/EditView.tpl' => '7f8f08b4f16fbb26cb172aa162f95d01', + './include/SugarFields/Fields/Float/DetailView.tpl' => 'f6bde8840c2aebb3937a1e290b6c33e2', + './include/SugarFields/Fields/File/SugarFieldFile.js' => '8e34528505f33fb607b5653018164d70', './include/SugarFields/Fields/File/SearchView.tpl' => '03bcd06cd7f6dd1f013481a62a0ef5f5', './include/SugarFields/Fields/File/ListView.tpl' => '95e874bab3a46d7de4c46d46507f914a', './include/SugarFields/Fields/File/SugarFieldFile.php' => '3ceb9730345547f4111f7c80ed3e2bec', './include/SugarFields/Fields/File/EditView.tpl' => '163d94c73919e249894ccd0bbaf826b9', './include/SugarFields/Fields/File/DetailView.tpl' => 'c53209bd4256bfe36c907885ce676de0', './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => '3963542a5b484e74c52c2b78ba861bbb', - './include/SugarFields/Fields/Enum/SearchView.tpl' => 'f14088fed2f1ab0b74ba806c86d3588a', + './include/SugarFields/Fields/Enum/SearchView.tpl' => '0bd1380b5df678fc4c896a26697245d6', './include/SugarFields/Fields/Enum/EditViewFunction.tpl' => '6b99381565947a6486b5bfa51cee4968', './include/SugarFields/Fields/Enum/EditView.tpl' => '85fd18ff6921bccc796e4a6155f2e36b', './include/SugarFields/Fields/Enum/DetailViewFunction.tpl' => 'fc3c5ee4257ab9f7a56fb3282dfa54ed', './include/SugarFields/Fields/Enum/DetailView.tpl' => '1e351b912cd977be21380c828f990db5', './include/SugarFields/Fields/Download/SugarFieldDownload.php' => '9aff3c7f986153faf4946a8c7d9e657b', './include/SugarFields/Fields/Download/DetailView.tpl' => 'f768b45ff7bed5b8f4fc7857e295e0e0', - './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '4ab2ed941dd0243b19ab0930a6d9383c', - './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => 'd6f7597652394f9a58e04bbb18a45253', + './include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '09ad21bea4bc8fd731217721bb879d98', + './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => '1e3b90f82507ece35ab90abff047a117', './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => '9b6aa4667dbb6827f59c0c543a47aa40', - './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '0bc291edf541e3b9def26072c19d41a6', - './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => '95fd6a02a293437a7e194a327a36b61e', - './include/SugarFields/Fields/Datetime/SugarFieldDatetime.php' => 'ef6c15229c008ceab3614c752f0f7758', - './include/SugarFields/Fields/Datetime/EditView.tpl' => 'ed0086da0244156ccca0c66fead9cacf', + './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '06b6d8acd48103d3efd8b09941e7a056', + './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => '04aad57b92d7039a11132845be4a0a47', + './include/SugarFields/Fields/Datetime/SugarFieldDatetime.php' => '0ba9d8e5dec44c37b188899bdfbd9061', + './include/SugarFields/Fields/Datetime/EditView.tpl' => '427c55fa793f553e071940f3a067e130', './include/SugarFields/Fields/Currency/SugarFieldCurrency.php' => '7e8de8cbec2d09cbd8cd0c3d41f467aa', './include/SugarFields/Fields/Currency/ListView.tpl' => '9b169f665697516c771151a27ab7dc3a', './include/SugarFields/Fields/Currency/EditView.tpl' => '047c303129e89b26ad0da1741cd28e90', './include/SugarFields/Fields/Currency/DetailView.tpl' => 'd66275d18e5f54d81e39fe27040f6a24', './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => '69e925dccacccab7de8449c47eb62b62', './include/SugarFields/Fields/Collection/view.sugarfieldcollection.php' => 'f5d0d3ed5902a7f9ea61305b0b1783da', - './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '94f0df5f3c909cb33f79caaa3501b908', + './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '3b7a84adc56bdafd49abbe2396dcc404', './include/SugarFields/Fields/Collection/SugarFieldCollection.php' => '578c4617bddc15c39860c85ee0707b37', './include/SugarFields/Fields/Collection/EditView.tpl' => '40769b344b37cc97ea530c4270198d0b', './include/SugarFields/Fields/Collection/DetailView.tpl' => '9eb4f6e5c824803e7b1a035254368f2c', @@ -6401,7 +6433,7 @@ $md5_string = array ( './include/SugarFields/Fields/Bool/EditView.tpl' => '98efdf47840f62178136fd47ca7e2c2b', './include/SugarFields/Fields/Bool/DetailView.tpl' => 'fdec36e7403b2f50a8b6aaf93c6caa50', './include/SugarFields/Fields/Base/ImportViewFunction.tpl' => 'cc97e23ed4bc84c8bf7bdfad700a1371', - './include/SugarFields/Fields/Base/SugarFieldBase.php' => 'a4411cc054221e1b76a8fa2fd22098e3', + './include/SugarFields/Fields/Base/SugarFieldBase.php' => '3bffbac5971d7e36f7b80fa31d52e453', './include/SugarFields/Fields/Base/SearchForm.tpl' => '89584f42f6317bd59182cf6aa8cc0763', './include/SugarFields/Fields/Base/ListView.tpl' => 'e5bef5e195aad2fb3fa6c1ae93c8bcca', './include/SugarFields/Fields/Base/InlineEditView.tpl' => '8ae00593c64a7c5171a9f4f463cbb1d3', @@ -6415,16 +6447,16 @@ $md5_string = array ( './include/SugarFields/Fields/Assigned_user_name/SearchView.tpl' => 'e6949bbc092460af32c5c108be011cd4', './include/SugarFields/Fields/Address/SugarFieldAddress.js' => '6da0b197e6ef2d32f3441fff5cacb0d5', './include/SugarFields/Fields/Address/en_us.EditView.tpl' => '7fc405996fb718a56a9884a34122cb2b', - './include/SugarFields/Fields/Address/en_us.DetailView.tpl' => 'bcc0830b2310d0ac4f5fd6e01e820562', + './include/SugarFields/Fields/Address/en_us.DetailView.tpl' => '1ce27abf558ddc9aa596fd201f0fd131', './include/SugarFields/Fields/Address/SugarFieldAddress.php' => '19cc10f4e1494071e022e42dfcd36071', './include/SugarFields/Fields/Address/EditView.tpl' => '05f3b1ed9c93622ae768244b7513ccb4', - './include/SugarFields/Fields/Address/DetailView.tpl' => '326e866930a93f06cddd4b019395648b', + './include/SugarFields/Fields/Address/DetailView.tpl' => '1a393176b4ebb3b3611f6efd2e19459f', './include/SugarEmailAddress/SugarEmailAddress.js' => 'd632ee12353a7871b3c82763ab6c63f1', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => '0dc9422da0b8ec60a58ae06d7215c3fb', './include/SugarEmailAddress/templates/forEditView.tpl' => 'ffd92cf011d18742e184a3694db33b20', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '7606911a788f6fa0f4aca806679e4098', './include/SugarEmailAddress/templates/forDetailView.tpl' => '8a913b1d6cbaf35ff7237c8c6022af9c', - './include/SugarEmailAddress/SugarEmailAddress.php' => '7944544256dfc7e8be9d97b84eac33f5', + './include/SugarEmailAddress/SugarEmailAddress.php' => '6c576d0b5c034645288efb3b48e66c10', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => '687d5cf1b099d7f81bd40cace28f33dc', './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => 'ed2e4980312e2a8b75fe46631b83095a', './include/SugarDependentDropdown/SugarDependentDropdown.php' => '86eb13e7c54068ec87679e98a4e0d406', @@ -6456,10 +6488,10 @@ $md5_string = array ( './include/SubPanel/tpls/singletabmenu.tpl' => '252c751fac27affd042dc7ba1ee83a00', './include/SubPanel/subpanels.txt' => '6979f7aaf435a32e1aaedb1b02c5361e', './include/SubPanel/registered_layout_defs.php' => 'd71c8000fd9dabffa19a3711f60c0f39', - './include/SubPanel/SugarTab.php' => '73d99368377688e3471d26bad2077248', + './include/SubPanel/SugarTab.php' => '398584e6128906ecf4b4b5154ced95ee', './include/SubPanel/SubPanelViewer.php' => 'de240547489fe04b229caa2c5fc34e61', - './include/SubPanel/SubPanelTilesTabs.php' => '67005f64c14a31cdf8d427bc54a5702b', - './include/SubPanel/SubPanelTiles.php' => '38b5af3e3e64dfedc0f15c8ec90f3538', + './include/SubPanel/SubPanelTilesTabs.php' => 'eab9d983b2caae6009bd0a4e9f2f7e11', + './include/SubPanel/SubPanelTiles.php' => '78ae26e19d263a73f1e53039c5b206cf', './include/SubPanel/SubPanelDynamic.html' => '85423af1e959aea28d87da8e7ef7aeed', './include/SubPanel/SubPanelDefinitions.php' => 'f27534562c69db5e1303735db2809b05', './include/SubPanel/SubPanel.php' => 'a8662b2cfced1d600156dc4775f33b85', @@ -6519,7 +6551,7 @@ $md5_string = array ( './include/Smarty/plugins/function.sugar_fetch.php' => '6fd07816cbba8003cdb31d3ee067271f', './include/Smarty/plugins/function.sugar_evalcolumn_old.php' => '85b786307307859d4221cf32466d7893', './include/Smarty/plugins/function.sugar_evalcolumn.php' => '4a3bee9672c840cb602f36f8fc42c542', - './include/Smarty/plugins/function.sugar_currency_format.php' => '328379f1c05a4e8e60d640ce4fc8cb15', + './include/Smarty/plugins/function.sugar_currency_format.php' => '268767b7aa105b53920027d2802d15b6', './include/Smarty/plugins/function.sugar_connector_display.php' => '8227a28e8f6e5b2acc877debb2fad0ba', './include/Smarty/plugins/function.sugar_button_slider.php' => '6152ab8014fecf6fa1b6af75c28af497', './include/Smarty/plugins/function.sugar_button.php' => '0564b9b61d21d18d858b8bfa693e8243', @@ -6576,19 +6608,19 @@ $md5_string = array ( './include/Smarty/Config_File.class.php' => '8852379ae39541f5e3355591ee0bfa03', './include/Smarty/COPYING.lib' => '8c2e1ec1540fb3e0beb68361344cba7e', './include/SearchForm/tpls/SugarSpot.tpl' => 'e787d85848ac801e6c259db91a187d95', - './include/SearchForm/tpls/header.tpl' => '4a976a0c8b12d0a13338c394b67a9ae2', + './include/SearchForm/tpls/header.tpl' => '0b05ea448b3cccff2af45f4e07a8421d', './include/SearchForm/tpls/footer.tpl' => '3461531f4a52f4aecc61756098bb982f', './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '54c92421c8229120ca03dcfb654c1036', './include/SearchForm/tpls/SearchFormGeneric.tpl' => '9c181db110e051e04e47772c9c06c3ba', - './include/SearchForm/SugarSpot.php' => 'a8b50028435870c0664e4979707cb0fe', - './include/SearchForm/SearchForm2.php' => '525385400d6421ccafd9af8fdedd925d', + './include/SearchForm/SugarSpot.php' => '6233362d7d2ad876c1a725aac68620d0', + './include/SearchForm/SearchForm2.php' => 'a850daa037a4c9975a4128a69f676d11', './include/SearchForm/SearchForm.php' => '5f78eed3075ae7ad1172b639516d2539', - './include/QuickSearchDefaults.php' => 'f14426f30e851c53fd4591238d57966b', - './include/Popups/tpls/header.tpl' => 'c9de12af512c54eb4284519e31df6efa', + './include/QuickSearchDefaults.php' => '1a158e511eb11bccec29cb7fa8903aff', + './include/Popups/tpls/header.tpl' => '6bc620f0bd22e7c352e2b3ae25b70515', './include/Popups/tpls/footer.tpl' => 'cda2c59d64c7135b261e145856bb3e5d', './include/Popups/tpls/PopupGeneric.tpl' => '75c6832529067e7fdc677cfa8ef9a56f', - './include/Popups/Popup_picker.php' => '03b00ec3bd3ba2092337d1ae0f7f2e9d', - './include/Popups/PopupSmarty.php' => '7828b4bc26c435d158c9296a4a44f836', + './include/Popups/Popup_picker.php' => '021273a0792c4a8469f9f9fb6839df31', + './include/Popups/PopupSmarty.php' => '5107bfc954fd861787a7c2f974c694e6', './include/Pear/XML_HTMLSax3/LICENSE' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/XML_HTMLSax3/HTMLSax3/States.php' => '5b528baa84631f85349a7183597d2fb3', './include/Pear/XML_HTMLSax3/HTMLSax3/Decorators.php' => '34a9a95566c891f013584073fbadaf7e', @@ -6605,11 +6637,11 @@ $md5_string = array ( './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '594c737584658863ee36e5ca1a8a8297', './include/MySugar/tpls/addDashletsDialog.tpl' => '555233abb02648590a9b44619a27b2d4', './include/MySugar/tpls/MySugar.tpl' => '14fafcbe89fd63de00f6064bb2545cad', - './include/MySugar/javascript/MySugar.js' => '020c43f65707ba1fc33e579e671544ab', + './include/MySugar/javascript/MySugar.js' => 'de2ef12c48fc8443563198e0e49df961', './include/MySugar/MySugar.php' => 'd9f07b876fa42736b9b80766d335e9e4', './include/MySugar/DashletsDialog/DashletsDialog.php' => '05b91ebbb8a045d2f4ddb78b5ffea986', - './include/MassUpdate.php' => 'f4e53efe4330d12748032cb6316141d0', - './include/MVC/View/views/view.quickedit.php' => '28a657f575d0cf4a275d651b32c0cc27', + './include/MassUpdate.php' => '439beda560c327f30a5b2f999c0e9889', + './include/MVC/View/views/view.quickedit.php' => 'd968dbf0e129d45c2e8a508f356b38ab', './include/MVC/View/views/view.metadata.php' => '358be31f180b06068b9c9296de8a5415', './include/MVC/View/views/view.gs.php' => '43892f69640e1f9562bbf3934deab9d1', './include/MVC/View/views/view.detail.config.php' => 'c39a0838b0caa86281c6f500779260df', @@ -6619,18 +6651,18 @@ $md5_string = array ( './include/MVC/View/views/view.sugarpdf.php' => 'ebcfcb7fb254d8a671a584528e495e1a', './include/MVC/View/views/view.sugarpdf.config.php' => '85c23b2aa8b6af2b82efc3eae453a118', './include/MVC/View/views/view.serialized.php' => '40e61a7baacf410ecbcd680ddaf9c460', - './include/MVC/View/views/view.quickcreate.php' => '8d2fde9a0837bb106fe06d7fbaba248e', + './include/MVC/View/views/view.quickcreate.php' => '49806236c0cc41cc5a8b39c2008f6c4f', './include/MVC/View/views/view.quick.php' => '4c1fda7615101d7c9a11af7e9c495289', './include/MVC/View/views/view.popup.php' => '98047c3014cd67b6281ec9af7e292f9a', './include/MVC/View/views/view.noaccess.php' => '25d3b1cabcc3ce86d9110214f67bb862', './include/MVC/View/views/view.multiedit.php' => '14e60eed1da6bdd4484a9fba241ac7a0', './include/MVC/View/views/view.modulelistmenu.php' => '335182388522588add94bd462f3e19af', - './include/MVC/View/views/view.list.php' => 'b287ac3ad8afa162ffe38b5f21f7d3d0', + './include/MVC/View/views/view.list.php' => '5358bc908eff9b78802c3bc68cc36ede', './include/MVC/View/views/view.json.php' => '485c56b29adf66aaabe28e259f325588', './include/MVC/View/views/view.importvcardsave.php' => '8bd57468686c0893aefdf4007b99d5ee', './include/MVC/View/views/view.importvcard.php' => 'fd7a69f7fb258ce490acbf0334b263f9', './include/MVC/View/views/view.html.php' => '7c493d7269b25b440cfd7e9f80551084', - './include/MVC/View/views/view.edit.php' => 'f3373a8c963b390f60e9c9b375fae3d3', + './include/MVC/View/views/view.edit.php' => 'd6e43b8556b66192ee8a95a81c793321', './include/MVC/View/views/view.detail.php' => 'b392814e6da151932d176f8c210d093f', './include/MVC/View/views/view.config.php' => 'bc419d92b61e932b154fa4350df86673', './include/MVC/View/views/view.classic.php' => '36203ddc3461f3b8c2e24f2c2dbe69e3', @@ -6641,16 +6673,16 @@ $md5_string = array ( './include/MVC/View/tpls/modulelistmenu.tpl' => '136df5b86eb938738c37bc836c8ace97', './include/MVC/View/tpls/Importvcard.tpl' => '55563c9368088b0ac99ec7aecf7619d0', './include/MVC/View/ViewFactory.php' => '56116e594364b8a34b3d8986e93fce1e', - './include/MVC/View/SugarView.php' => '284a9688063203bf614bc4ffb6e9b366', + './include/MVC/View/SugarView.php' => '9bca4fa316603b34bd18c564fec475f6', './include/MVC/SugarModule.php' => '1d53f536613de51c996600e26c14ca97', - './include/MVC/SugarApplication.php' => '1c230e95a96896713362741db0391a58', + './include/MVC/SugarApplication.php' => 'ffef242415706200c354bdb0cc5228dc', './include/MVC/Controller/file_access_control_map.php' => '6bf1388c2830450cb92d8b9e374a04d5', './include/MVC/Controller/entry_point_registry.php' => '5b7aef0d506fb3cf9d635e49f714d7ed', - './include/MVC/Controller/action_view_map.php' => 'bde130b89866e1fd18d47db176b6362d', + './include/MVC/Controller/action_view_map.php' => 'f5af879adb4520ff0263a0ddedfda7ba', './include/MVC/Controller/action_file_map.php' => '43531cea8d74490f8b465b4e5049e5e9', - './include/MVC/Controller/SugarController.php' => 'd94deb081e5da7ff71051887988df148', + './include/MVC/Controller/SugarController.php' => 'f4ebfe04b790c24b0e578fafcda3bf2f', './include/MVC/Controller/ControllerFactory.php' => 'a72a8293bff267483111eca226880ae1', - './include/Localization/Localization.php' => '20023cf1bb81f392b9165824ae5fc682', + './include/Localization/Localization.php' => '4457d1268188679cb77909a29a8ca988', './include/ListView/ListViewDCMenu.tpl' => 'e7f7ad82a50d2998a933c7e8c333c080', './include/ListView/ListViewXTPL.php' => '5fff1f22e74a373c216a5358e9be1aae', './include/ListView/ListViewSmarty.php' => '2b7c32852ccb227bd377be44feebd84a', @@ -6659,8 +6691,8 @@ $md5_string = array ( './include/ListView/ListViewGeneric.tpl' => '0f9988baad6b8605d1ee4e132ffbf885', './include/ListView/ListViewFacade.php' => 'e82b5372d43acd05f1dbe5855c40cdbd', './include/ListView/ListViewDisplay.php' => '687857289fcd396ee8c809039b3127c9', - './include/ListView/ListViewData.php' => 'efd1f15451d03101bde1ce55bdc3205b', - './include/ListView/ListView.php' => '1815448dde81d0da170c1b230a1f3146', + './include/ListView/ListViewData.php' => 'b1d9848243ff74173102ac0db06644d4', + './include/ListView/ListView.php' => 'df56dea163a354c3ee71099eafa96278', './include/tabs.php' => '7cf9418691424c673218c535fec27a05', './include/JSON.php' => '2eba2a68646da24407b48808143b27fa', './include/HTTP_WebDAV_Server/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', @@ -6675,17 +6707,17 @@ $md5_string = array ( './include/EditView/header.tpl' => 'a68a8476bd62a629b7663e5965140252', './include/EditView/footer.tpl' => '3409357a2f9475654a71e4cc21eaae6a', './include/EditView/SugarVCR.php' => 'bd3b23612d9584232569b67709f270c3', - './include/EditView/SubpanelQuickCreate.php' => '1b834bf4a6555d83fb67482f102124a2', + './include/EditView/SubpanelQuickCreate.php' => '7a54666a3544fa8d2125c881924f70e6', './include/EditView/QuickCreate.tpl' => 'fa3dacaca4c4985fa7d4e19e44d8a30a', './include/EditView/QuickCreate.php' => 'a4351f400593c2a1933176d8e34bc82c', './include/EditView/PopupQuickCreate.php' => '9a8b7a895799ed90058b3e070ad7f672', - './include/EditView/EditView2.php' => 'd694b6f19ecc2f611a0ba1a8780e25e3', + './include/EditView/EditView2.php' => '60b7ab88bcdf3557c5f3f0a835742a4c', './include/EditView/EditView.tpl' => '51b73e717218583b938b95f8ca081c68', './include/EditView/EditView.php' => '585450ac1a175834d05e944f77364c17', './include/DetailView/header.tpl' => '098c9f396d326aca981402ee49974d70', './include/DetailView/footer.tpl' => '82f240a39faba85858e561048e23fffd', './include/DetailView/DetailView2.php' => 'e0a3dd0e83240b39502607997657c080', - './include/DetailView/DetailView.tpl' => '32ca5b78ebec2e70d2c1297191344d55', + './include/DetailView/DetailView.tpl' => '1e7a58a9af2d9d79c2818eb67dc98b28', './include/DetailView/DetailView.php' => 'e1f2ad218b211775fe175b6acb5ee457', './include/Dashlets/DashletRssFeedTitle.php' => '10771bdc817e8ae49e4a9938d2bcf9d8', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => '355b7490fa2339a87e1fbc7e479dfb73', @@ -6693,10 +6725,10 @@ $md5_string = array ( './include/Dashlets/DashletGenericConfigure.tpl' => 'f8bcde927cd58fe4f1e03a6ba63aa607', './include/Dashlets/DashletGenericAutoRefresh.tpl' => 'c4b3caa740d9105e20bcf69924957a2e', './include/Dashlets/DashletGenericChartConfigure.tpl' => 'e71612ba829ca02bd0b89aa66d60e3bc', - './include/Dashlets/DashletGenericChart.php' => '4e8b5c7700008c41be902f520108c3c5', + './include/Dashlets/DashletGenericChart.php' => 'bbc3f371a3d4db0e44b1f9196bad47d3', './include/Dashlets/DashletGeneric.php' => '7baac46cf83d3b81474060e0947ebe23', './include/Dashlets/DashletCacheBuilder.php' => 'a0c56547321767e6b599f98293d2fa39', - './include/Dashlets/Dashlet.php' => '3f1f1d019fd96726d8bdd66c2a60a00a', + './include/Dashlets/Dashlet.php' => 'e82515c4bab666685a1c4d7e47e04e9a', './image.php' => 'b0c5fc46ffdd7231bfd45ad267e23773', './json_server.php' => 'e08a0f156722169ffde6052329116ec2', './examples/SoapTestPortal2.php' => 'bb350fe03b42a7d3342ba06635862847', @@ -7108,20 +7140,20 @@ $md5_string = array ( './Zend/Crypt/DiffieHellman/Exception.php' => '767330f408c58b089aa082d990b73099', './Zend/Crypt/DiffieHellman.php' => 'ec0a4f522b732f7fcbb9c4ab94d926e1', './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', - './install.php' => 'c5a0f419d51149f8502b61276e4e0b60', + './install.php' => 'ca312618e7c873e5fd538592e9f186d2', './export.php' => '7639b2373c4d0c73765033d70abfb55d', - './data/Relationships/SugarRelationship.php' => '6f5285dfca38d43dad4eb4e5048de21f', - './data/Relationships/RelationshipFactory.php' => 'd1b759cda7b9dc92f1032ed1be661816', + './data/Relationships/SugarRelationship.php' => '25634fab41c0fc3465b0b8da259f44ae', + './data/Relationships/RelationshipFactory.php' => 'a391d4897e76daddc44b177a72a5628d', './data/Relationships/One2OneRelationship.php' => 'ff626e945ee12921eeabfd99ae37db5e', './data/Relationships/One2OneBeanRelationship.php' => '1f86b9f8d35e27c8b65df11674c2caa1', './data/Relationships/One2MRelationship.php' => '16fc46eebde91ac5a345a335ff14b1a4', - './data/Relationships/One2MBeanRelationship.php' => '1cd219ec9230346717848fe84f5481b4', + './data/Relationships/One2MBeanRelationship.php' => '1274ca6b5cbd0ea658915b52fd56ae95', './data/Relationships/M2MRelationship.php' => 'fbfe10bd6fbf435d12d7f113c4c1ae5c', './data/Relationships/EmailAddressRelationship.php' => '00e8f2e17d2b8510c4489bbaa3b1bf52', - './data/Link2.php' => '2c2f27279282c62a2f94d4bfe6cc7b2f', + './data/Link2.php' => 'fd200c8f75732e87f03ce482d61ad924', './data/BeanFactory.php' => '77ec681a3548ce0a4d67ef1a59553c26', './data/Tracker.php' => '78c6ca1fadfe9e7984b001fed296f332', - './data/SugarBean.php' => '19d8719349134f86211749cdb85215f1', + './data/SugarBean.php' => '67ee5d2d1d1a7a57b9a2ef77e7a59ea1', './data/Link.php' => '68c906a3ded8cbe7ec5665aef410517f', './custom/index.html' => '601a18f179c2ac55779c9bac46942525', './cron.php' => '21c4360055ada2ab9524a4439b2de1ca', @@ -7150,11 +7182,11 @@ $md5_string = array ( './ModuleInstall/PackageManager/PackageManagerDownloader.php' => '3b65a83bab1ad8099252ca9c8a89c530', './ModuleInstall/PackageManager/PackageManagerDisplay.php' => '5e31b13d4d7351c6132afeb26ce71302', './ModuleInstall/PackageManager/PackageManagerComm.php' => '76612432086bdcc15c6cca1f005cf763', - './ModuleInstall/PackageManager/PackageManager.php' => 'a9996b2cdb5bf8711174c20752bccbe3', + './ModuleInstall/PackageManager/PackageManager.php' => 'b0aebd9ae74dbd737970486b131f439f', './ModuleInstall/PackageManager/PackageController.php' => 'af8c746cbb6ba5142568d34e535d0a94', './ModuleInstall/PackageManager/ListViewPackages.php' => '9ad64855ae4721d76eac402fd7adc524', './ModuleInstall/ModuleScanner.php' => 'b124cc2069f4419ae8c50335a6ffdbf2', - './ModuleInstall/ModuleInstaller.php' => '968eddb60d3da05bbae7eeb0fa3b430d', + './ModuleInstall/ModuleInstaller.php' => '8432c635d9b6133faf1479f9229c08d9', './HandleAjaxCall.php' => 'e8f0cb63050a3f85e26d5f295c54d8b6', ); ?> diff --git a/include/Dashlets/Dashlet.php b/include/Dashlets/Dashlet.php index 2cb30bcf..60a0223e 100644 --- a/include/Dashlets/Dashlet.php +++ b/include/Dashlets/Dashlet.php @@ -256,8 +256,8 @@ class Dashlet if ( empty($this->autoRefresh) ) { $this->autoRefresh = 0; } - elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) ) { - $this->autoRefresh = min($sugar_config['dashlet_auto_refresh_min'],$this->autoRefresh); + elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) && $sugar_config['dashlet_auto_refresh_min'] > $this->autoRefresh ) { + $this->autoRefresh = $sugar_config['dashlet_auto_refresh_min']; } $autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000); $tpl = 'include/Dashlets/DashletGenericAutoRefresh.tpl'; @@ -384,4 +384,4 @@ class Dashlet ( isset($GLOBALS['sugar_config']['dashlet_auto_refresh_min']) ? $GLOBALS['sugar_config']['dashlet_auto_refresh_min'] != -1 : true ); } -} \ No newline at end of file +} diff --git a/include/Dashlets/DashletGenericChart.php b/include/Dashlets/DashletGenericChart.php index 75d4c12c..2319f54e 100644 --- a/include/Dashlets/DashletGenericChart.php +++ b/include/Dashlets/DashletGenericChart.php @@ -343,8 +343,8 @@ abstract class DashletGenericChart extends Dashlet if ( empty($this->autoRefresh) ) { $this->autoRefresh = 0; } - elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) ) { - $this->autoRefresh = min($sugar_config['dashlet_auto_refresh_min'],$this->autoRefresh); + elseif ( !empty($sugar_config['dashlet_auto_refresh_min']) && $sugar_config['dashlet_auto_refresh_min'] > $this->autoRefresh ) { + $this->autoRefresh = $sugar_config['dashlet_auto_refresh_min']; } $autoRefreshSS->assign('dashletRefreshInterval', $this->autoRefresh * 1000); $autoRefreshSS->assign('url', "predefined_chart"); diff --git a/include/DetailView/DetailView.tpl b/include/DetailView/DetailView.tpl index 5078a9f2..b034f1c1 100644 --- a/include/DetailView/DetailView.tpl +++ b/include/DetailView/DetailView.tpl @@ -87,6 +87,7 @@ class="yui-navset detailview_tabs" {if !({{$colData.field.hideIf}}) } {{/if}} {counter name="fieldsUsed"} + {{if empty($colData.field.hideLabel)}} {{if !empty($colData.field.name)}} {if !$fields.{{$colData.field.name}}.hidden} @@ -116,6 +117,7 @@ class="yui-navset detailview_tabs" {{/if}} {{if !empty($colData.field.name)}} {/if} + {{/if}} {{/if}} diff --git a/include/EditView/EditView2.php b/include/EditView/EditView2.php index 105bccff..65f8f5ae 100644 --- a/include/EditView/EditView2.php +++ b/include/EditView/EditView2.php @@ -88,7 +88,7 @@ class EditView */ function setup($module, $focus = null, $metadataFile = null, $tpl = 'include/EditView/EditView.tpl', $createFocus = true) { - $this->th = new TemplateHandler(); + $this->th = $this->getTemplateHandler(); $this->th->ss =& $this->ss; $this->tpl = $tpl; $this->module = $module; @@ -423,7 +423,6 @@ class EditView $this->focus->assigned_user_name = get_assigned_user_name($this->focus->assigned_user_id); } - foreach ($this->focus->toArray() as $name => $value) { $valueFormatted = false; @@ -866,5 +865,14 @@ class EditView return ''; } + + /** + * Get template handler object + * @return TemplateHandler + */ + protected function getTemplateHandler() + { + return new TemplateHandler(); + } } diff --git a/include/EditView/SubpanelQuickCreate.php b/include/EditView/SubpanelQuickCreate.php index 4b8d89b2..1e3b1c86 100644 --- a/include/EditView/SubpanelQuickCreate.php +++ b/include/EditView/SubpanelQuickCreate.php @@ -43,7 +43,8 @@ require_once('include/EditView/EditView2.php'); class SubpanelQuickCreate{ var $defaultProcess = true; - function SubpanelQuickCreate($module, $view='QuickCreate', $proccessOverride = false){ + public function SubpanelQuickCreate($module, $view='QuickCreate', $proccessOverride = false) + { //treat quickedit and quickcreate views as the same if($view == 'QuickEdit') {$view = 'QuickCreate';} @@ -65,7 +66,7 @@ class SubpanelQuickCreate{ } } - $this->ev = new EditView(); + $this->ev = $this->getEditView(); $this->ev->view = $view; $this->ev->ss = new Sugar_Smarty(); //$_REQUEST['return_action'] = 'SubPanelViewer'; @@ -78,6 +79,7 @@ class SubpanelQuickCreate{ $this->ev->setup($module, $bean, $source); unset($bean); + // Bug 49219 - Check empty before set defaults, or the settings from viewdefs above will be overridden. if (!isset($this->ev->defs['templateMeta']['form']['headerTpl'])) { @@ -91,8 +93,8 @@ class SubpanelQuickCreate{ // Comment below, breaks many out of the box viewdefs /*if (empty($this->ev->defs['templateMeta']['form']['buttons'])) $this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM');*/ $this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM'); - - //Load the parent view class if it exists. Check for custom file first + + //Load the parent view class if it exists. Check for custom file first loadParentView('edit'); $viewEditSource = 'modules/'.$module.'/views/view.edit.php'; @@ -145,5 +147,13 @@ class SubpanelQuickCreate{ $this->ev->process(true, $form_name); echo $this->ev->display(false, true); } -} -?> \ No newline at end of file + + /** + * Get EditView object + * @return EditView + */ + protected function getEditView() + { + return new EditView(); + } +} \ No newline at end of file diff --git a/include/ListView/ListView.php b/include/ListView/ListView.php index c08af450..bcd9c051 100644 --- a/include/ListView/ListView.php +++ b/include/ListView/ListView.php @@ -527,6 +527,11 @@ function setDisplayHeaderAndFooter($bool) { function getOrderBy($varName, $defaultOrderBy='', $force_sortorder='') { $sortBy = $this->getSessionVariable($varName, "ORDER_BY") ; + $orderByDirection = $this->getSessionVariableName($varName, "order_by_direction"); + $orderByColumn = $this->getSessionVariableName($varName, "ORDER_BY"); + $lastEqualsSortBy = false; + $defaultOrder = false; //ascending + if(empty($sortBy)) { $this->setUserVariable($varName, "ORDER_BY", $defaultOrderBy); $sortBy = $defaultOrderBy; @@ -542,29 +547,67 @@ function getOrderBy($varName, $defaultOrderBy='', $force_sortorder='') { $desc = $this->getSessionVariable($varName, $sortBy."S"); - if(empty($desc)) - $desc = false; - if(isset($_REQUEST[$this->getSessionVariableName($varName, "ORDER_BY")])) - $last = $this->getSessionVariable($varName, "OBL"); - if(!empty($last) && $last == $sortBy) { - $desc = !$desc; - }else { - $this->setSessionVariable($varName, "OBL", $sortBy); + if (empty($desc)) + { + $desc = $defaultOrder; } - $this->setSessionVariable($varName, $sortBy."S", $desc); - if(!empty($sortBy)) { - if(empty($force_sortorder)) { - if(substr_count(strtolower($sortBy), ' desc') == 0 && substr_count(strtolower($sortBy), ' asc') == 0) { - if($desc) { - $this->query_orderby = $sortBy.' desc'; - } else { - $this->query_orderby = $sortBy.' asc'; - } + $defaultOrder = $desc ? 'desc' : 'asc'; + $orderByValue = $defaultOrder; + if (isset($_REQUEST[$orderByDirection])) + { + $possibleRequestOrderBy = $_REQUEST[$orderByDirection]; + if ($possibleRequestOrderBy == 'asc' || $possibleRequestOrderBy == 'desc') + { + $orderByValue = $possibleRequestOrderBy; } + } - } else { - $this->query_orderby = $sortBy . ' ' . $force_sortorder; + if (isset($_REQUEST[$orderByColumn])) + { + $last = $this->getSessionVariable($varName, "OBL"); + } + if (!empty($last) && $last == $sortBy) + { + $lastEqualsSortBy = true; + } else + { + $orderByValue = $defaultOrder; + $this->setSessionVariable($varName, "OBL", $sortBy); } + $desc = $orderByValue == 'desc'; + $orderByDirectionValue = false; + $this->setSessionVariable($varName, $sortBy . "S", $desc); + if (!empty($sortBy)) + { + if (empty($force_sortorder)) + { + if (substr_count(strtolower($sortBy), ' desc') == 0 && substr_count(strtolower($sortBy), ' asc') == 0) + { + if ($sortBy) + { + $orderByDirectionValue = $desc ? 'asc' : 'desc'; + } + $this->query_orderby = $sortBy . ' ' . $orderByValue; + } + } else + { + $this->query_orderby = $sortBy . ' ' . $force_sortorder; + } + if (!isset($this->appendToBaseUrl)) + { + $this->appendToBaseUrl = array(); + } + if ($orderByDirectionValue) + { + $this->appendToBaseUrl[$orderByDirection] = $orderByDirectionValue; + } + $offsetVar = $this->getSessionVariableName($varName, "offset"); + if (isset($_REQUEST[$offsetVar])) + { + $this->appendToBaseUrl[$offsetVar] = $_REQUEST[$offsetVar]; + } + //Just clear from url... + $this->appendToBaseUrl[$orderByColumn] = false; }else { $this->query_orderby = ""; } @@ -780,7 +823,34 @@ function getUserVariable($localVarName, $varName) { } - + /** + * helper method to determine sort order by priority of source + * 1. explicit in request object + * 2. in session variable + * 3. subpaneldefs metadata + * 4. default 'asc' + * @param array $sortOrderList - contains options + * @return string 'asc' | 'desc' + */ + function calculateSortOrder($sortOrderList) + { + $priority_map = array( + 'request', + 'session', + 'subpaneldefs', + 'default', + ); + + foreach($priority_map as $p) { + if (key_exists($p, $sortOrderList)) { + $order = strtolower($sortOrderList[$p]); + if (in_array($order, array('asc', 'desc'))) { + return $order; + } + } + } + return 'asc'; + } /** @@ -855,6 +925,8 @@ function getUserVariable($localVarName, $varName) { return $list; } + + function processUnionBeans($sugarbean, $subpanel_def, $html_var = 'CELL') { $last_detailview_record = $this->getSessionVariable("detailview", "record"); @@ -867,29 +939,37 @@ function getUserVariable($localVarName, $varName) { $module = isset($_REQUEST['module']) ? $_REQUEST['module'] : ''; $response = array(); - $this->sort_order = 'asc'; - if(isset($_REQUEST['sort_order'])) { - $this->sort_order = $_REQUEST['sort_order']; - } else { - if(isset($subpanel_def->_instance_properties['sort_order'])) { - $sort_order = $subpanel_def->_instance_properties['sort_order']; - } + // choose sort order + $sort_order = array(); + $sort_order['default'] = 'asc'; - if(isset($_SESSION['last_sub' .$this->subpanel_module. '_order'])) { - // We swap the order when the request contains an offset (indicating a column sort issued); - // otherwise we do not sort. If we don't make this check, then the subpanel listview will - // swap ordering each time a new record is entered via quick create forms + // explicit request parameter gets priority over all + $sort_order['request'] = isset($_REQUEST['sort_order']) ? $_REQUEST['sort_order'] : null; - if(isset($_REQUEST[$module. '_' . $html_var . '_offset'])) { - $this->sort_order = $_SESSION['last_sub' .$this->subpanel_module. '_order'] == 'asc' ? 'desc' : 'asc'; - } else { - $this->sort_order = $_SESSION['last_sub' .$this->subpanel_module. '_order']; - } - } - elseif(isset($sort_order)) { - $this->sort_order = $sort_order; + // see if the session data has a sort order + if (isset($_SESSION['last_sub' . $this->subpanel_module . '_order'])) + { + $sort_order['session'] = $_SESSION['last_sub' . $this->subpanel_module . '_order']; + + // We swap the order when the request contains an offset (indicating a column sort issued); + // otherwise we do not sort. If we don't make this check, then the subpanel listview will + // swap ordering each time a new record is entered via quick create forms + if (isset($_REQUEST[$module . '_' . $html_var . '_offset'])) + { + $sort_order['session'] = $sort_order['session'] == 'asc' ? 'desc' : 'asc'; } } + else + { + $sort_order['session'] = null; + } + + // does the metadata have a default sort order? + $sort_order['subpaneldefs'] = isset($subpanel_def->_instance_properties['sort_order']) ? + $subpanel_def->_instance_properties['sort_order'] : null; + + $this->sort_order = $this->calculateSortOrder($sort_order); + if (isset($subpanel_def->_instance_properties['sort_by'])) { $this->query_orderby = $subpanel_def->_instance_properties['sort_by']; @@ -1277,6 +1357,35 @@ $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'bor $this->base_URL.='&to_pdf=true&action=SubPanelViewer&subpanel=' . $this->source_module; } + //bug43465 start + if (isset($this->appendToBaseUrl) && is_array($this->appendToBaseUrl)) + { + foreach ($this->appendToBaseUrl as $key => $value) + { + $fullRequestString = $key . '=' . $value; + + if ($this->base_URL == "/index.php") + { + $this->base_URL .= "?"; + } else + { + if ($fullRequestString == substr($this->baseURL, '-' . strlen($fullRequestString))) + { + $this->base_URL = preg_replace("/&" . $key . "\=.*/", "", $this->base_URL); + } else + { + $this->base_URL = preg_replace("/&" . $key . "\=.*?&/", "&", $this->base_URL); + } + $this->base_URL .= "&"; + } + if (!empty($value)) + { + $this->base_URL .= "{$key}={$value}"; + } + } + } + //bug43465 end + $sort_URL_base = $this->base_URL. "&".$this->getSessionVariableName($html_varName,"ORDER_BY")."="; if($sort_URL_base !== "") @@ -1415,12 +1524,6 @@ $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'bor if(trim($results['string']) == '') $results['string'] = $app_strings['LBL_NONE']; $fields[$results['fieldToAddTo']] = $fields[$results['fieldToAddTo']].''; } - //fixes bug for IE where empty list view rows causes IE to not display bottom border - if(isset($fields['DESCRIPTION']) && empty($fields['DESCRIPTION'])) - $fields['DESCRIPTION'] = " "; - if(isset($fields['LIST_ORDER']) && empty($fields['LIST_ORDER'])) - $fields['LIST_ORDER'] = " "; - $this->xTemplate->assign($html_varName, $fields); $aItem->setupCustomFields($aItem->module_dir); $aItem->custom_fields->populateAllXTPL($this->xTemplate, 'detail', $html_varName, $fields); diff --git a/include/ListView/ListViewData.php b/include/ListView/ListViewData.php index 8fa62738..2aeb7a0e 100644 --- a/include/ListView/ListViewData.php +++ b/include/ListView/ListViewData.php @@ -365,7 +365,12 @@ class ListViewData { //NOW HANDLE SECONDARY QUERIES if(!empty($ret_array['secondary_select'])) { $secondary_query = $ret_array['secondary_select'] . $ret_array['secondary_from'] . ' WHERE '.$this->seed->table_name.'.id IN ' .$id_list; - $secondary_result = $this->db->query($secondary_query); + if(isset($ret_array['order_by'])) + { + $secondary_query .= ' ' . $ret_array['order_by']; + } + + $secondary_result = $this->db->query($secondary_query); $ref_id_count = array(); while($row = $this->db->fetchByAssoc($secondary_result)) { diff --git a/include/Localization/Localization.php b/include/Localization/Localization.php index 82992c56..cc34b459 100644 --- a/include/Localization/Localization.php +++ b/include/Localization/Localization.php @@ -76,7 +76,11 @@ class Localization { var $default_email_charset = 'UTF-8'; var $currencies = array(); // array loaded with current currencies var $invalidNameFormatUpgradeFilename = 'upgradeInvalidLocaleNameFormat.php'; - + /* Charset mappings for iconv */ + var $iconvCharsetMap = array( + 'KS_C_5601-1987' => 'CP949', + 'ISO-8859-8-I' => 'ISO-8859-8' + ); /** * sole constructor @@ -330,14 +334,15 @@ class Localization { * @param string string the string to be translated * @param string fromCharset the charset the string is currently in * @param string toCharset the charset to translate into (defaults to UTF-8) + * @param bool forceIconv force using the iconv library instead of mb_string * @return string the translated string */ - function translateCharset($string, $fromCharset, $toCharset='UTF-8') + function translateCharset($string, $fromCharset, $toCharset='UTF-8', $forceIconv = false) { - $GLOBALS['log']->debug("Localization: translating [ {$string} ] into {$toCharset}"); + $GLOBALS['log']->debug("Localization: translating [{$string}] from {$fromCharset} into {$toCharset}"); // Bug #35413 Function has to use iconv if $fromCharset is not in mb_list_encodings - $isMb = function_exists('mb_convert_encoding'); + $isMb = function_exists('mb_convert_encoding') && !$forceIconv; $isIconv = function_exists('iconv'); if ($isMb == true) { @@ -361,7 +366,17 @@ class Localization { } elseif($isIconv) { - return iconv($fromCharset, $toCharset, $string); + $newFromCharset = $fromCharset; + if (isset($this->iconvCharsetMap[$fromCharset])) { + $newFromCharset = $this->iconvCharsetMap[$fromCharset]; + $GLOBALS['log']->debug("Localization: iconv using charset {$newFromCharset} instead of {$fromCharset}"); + } + $newToCharset = $toCharset; + if (isset($this->iconvCharsetMap[$toCharset])) { + $newToCharset = $this->iconvCharsetMap[$toCharset]; + $GLOBALS['log']->debug("Localization: iconv using charset {$newToCharset} instead of {$toCharset}"); + } + return iconv($newFromCharset, $newToCharset, $string); } else { @@ -426,7 +441,8 @@ class Localization { /////////////////////////////////////////////////////////////////////////// //// NUMBER DISPLAY FORMATTING CODE function getDecimalSeparator($user=null) { - $dec = $this->getPrecedentPreference('default_decimal_separator', $user); + // Bug50887 this is purposefully misspelled as ..._seperator to match the way it's defined throughout the app. + $dec = $this->getPrecedentPreference('default_decimal_seperator', $user); return $dec; } @@ -783,14 +799,13 @@ eoq; * Attempts to detect the charset used in the string * * @param $str string + * @param $strict bool default false (use strict encoding?) * @return string */ - public function detectCharset( - $str - ) + public function detectCharset($str, $strict=false) { if ( function_exists('mb_convert_encoding') ) - return mb_detect_encoding($str,'ASCII,JIS,UTF-8,EUC-JP,SJIS,ISO-8859-1'); + return mb_detect_encoding($str,'ASCII,JIS,UTF-8,EUC-JP,SJIS,ISO-8859-1',$strict); return false; } diff --git a/include/MVC/Controller/SugarController.php b/include/MVC/Controller/SugarController.php index 77904171..d8e5032d 100644 --- a/include/MVC/Controller/SugarController.php +++ b/include/MVC/Controller/SugarController.php @@ -695,6 +695,27 @@ class SugarController{ } } + /** + * Global method to delete an attachment + * + * If the bean does not have a deleteAttachment method it will return 'false' as a string + * + * @return void + */ + protected function action_deleteattachment() + { + $this->view = 'edit'; + $GLOBALS['view'] = $this->view; + ob_clean(); + if(method_exists($this->bean, 'deleteAttachment')) { + echo $this->bean->deleteAttachment($_REQUEST['isDuplicate']) ? 'true' : 'false'; + } else { + echo 'false'; + } + + sugar_cleanup(true); + } + /** * getActionFilename */ diff --git a/include/MVC/Controller/action_view_map.php b/include/MVC/Controller/action_view_map.php index 46169305..be91eb50 100644 --- a/include/MVC/Controller/action_view_map.php +++ b/include/MVC/Controller/action_view_map.php @@ -51,6 +51,7 @@ $action_view_map['importvcard']= 'importvcard'; $action_view_map['importvcardsave']= 'importvcardsave'; $action_view_map['modulelistmenu']= 'modulelistmenu'; $action_view_map['ajaxui']= 'ajaxui'; +$action_view_map['noaccess']= 'noaccess'; // SugarPDF $action_view_map['sugarpdf']= 'sugarpdf'; diff --git a/include/MVC/SugarApplication.php b/include/MVC/SugarApplication.php index 2738f4e9..319a9dcb 100644 --- a/include/MVC/SugarApplication.php +++ b/include/MVC/SugarApplication.php @@ -104,26 +104,23 @@ class SugarApplication (!isset($_SESSION['login_error']))) { session_destroy(); - $post_login_nav = ''; - if(!empty($this->controller->module)){ - $post_login_nav .= '&login_module='.$this->controller->module; - } if(!empty($this->controller->action)){ - if(in_array(strtolower($this->controller->action), array('delete'))) - $post_login_nav .= '&login_action=DetailView'; - elseif(in_array(strtolower($this->controller->action), array('save'))) - $post_login_nav .= '&login_action=EditView'; + if(strtolower($this->controller->action) == 'delete') + $this->controller->action = 'DetailView'; + elseif(strtolower($this->controller->action) == 'save') + $this->controller->action = 'EditView'; + elseif(strtolower($this->controller->action) == 'quickcreate') { + $this->controller->action = 'index'; + $this->controller->module = 'home'; + } elseif(isset($_REQUEST['massupdate'])|| isset($_GET['massupdate']) || isset($_POST['massupdate'])) - $post_login_nav .= '&login_action=index'; - else - $post_login_nav .= '&login_action='.$this->controller->action; - } - if(!empty($this->controller->record)){ - $post_login_nav .= '&login_record='.$this->controller->record; + $this->controller->action = 'index'; + elseif($this->isModifyAction()) + $this->controller->action = 'index'; } - header('Location: index.php?action=Login&module=Users'.$post_login_nav); + header('Location: index.php?action=Login&module=Users'.$this->createLoginVars()); exit (); } @@ -594,6 +591,8 @@ class SugarApplication } } + + LogicHook::initialize()->call_custom_logic('', 'after_session_start'); } @@ -691,4 +690,60 @@ class SugarApplication $_COOKIE[$name] = $value; } + + protected $redirectVars = array('module', 'action', 'record', 'token'); + + /** + * Create string to attach to login URL with vars to preserve post-login + * @return string URL part with login vars + */ + public function createLoginVars() + { + $ret = array(); + foreach($this->redirectVars as $var) { + if(!empty($this->controller->$var)) { + $ret["login_".$var] = $this->controller->$var; + continue; + } + if(!empty($_REQUEST[$var])) { + $ret["login_".$var] = $_REQUEST[$var]; + } + } + if(empty($ret)) return ''; + return "&".http_build_query($ret); + } + + /** + * Get the list of vars passed with login form + * @param bool $add_empty Add empty vars to the result? + * @return array List of vars passed with login + */ + public function getLoginVars($add_empty = true) + { + $ret = array(); + foreach($this->redirectVars as $var) { + if(!empty($_REQUEST['login_'.$var]) || $add_empty) { + $ret["login_".$var] = isset($_REQUEST['login_'.$var])?$_REQUEST['login_'.$var]:''; + } + } + return $ret; + } + + /** + * Get URL to redirect after the login + * @return string the URL to redirect to + */ + public function getLoginRedirect() + { + $vars = array(); + foreach($this->redirectVars as $var) { + if(!empty($_REQUEST['login_'.$var])) $vars[$var] = $_REQUEST['login_'.$var]; + } + + if(empty($vars)) { + return "index.php?module=Home&action=index"; + } else { + return "index.php?".http_build_query($vars); + } + } } diff --git a/include/MVC/View/SugarView.php b/include/MVC/View/SugarView.php index eb7ce092..a89d170e 100644 --- a/include/MVC/View/SugarView.php +++ b/include/MVC/View/SugarView.php @@ -1371,6 +1371,11 @@ EOHTML; } } + /** + * Fetch config values to be put into an array for JavaScript + * + * @return array + */ protected function getSugarConfigJS(){ global $sugar_config; @@ -1379,7 +1384,7 @@ EOHTML; // AjaxUI stock banned modules $config_js[] = "SUGAR.config.stockAjaxBannedModules = ".json_encode(ajaxBannedModules()).";"; if ( isset($sugar_config['quicksearch_querydelay']) ) { - $config_js[] = "SUGAR.config.quicksearch_querydelay = {$GLOBALS['sugar_config']['quicksearch_querydelay']};"; + $config_js[] = $this->prepareConfigVarForJs('quicksearch_querydelay', $sugar_config['quicksearch_querydelay']); } if ( empty($sugar_config['disableAjaxUI']) ) { $config_js[] = "SUGAR.config.disableAjaxUI = false;"; @@ -1388,15 +1393,41 @@ EOHTML; $config_js[] = "SUGAR.config.disableAjaxUI = true;"; } if ( !empty($sugar_config['addAjaxBannedModules']) ){ - $config_js[] = "SUGAR.config.addAjaxBannedModules = ".json_encode($sugar_config['addAjaxBannedModules']).";"; + $config_js[] = $this->prepareConfigVarForJs('addAjaxBannedModules', $sugar_config['addAjaxBannedModules']); } if ( !empty($sugar_config['overrideAjaxBannedModules']) ){ - $config_js[] = "SUGAR.config.overrideAjaxBannedModules = ".json_encode($sugar_config['overrideAjaxBannedModules']).";"; + $config_js[] = $this->prepareConfigVarForJs('overrideAjaxBannedModules', $sugar_config['overrideAjaxBannedModules']); + } + if (!empty($sugar_config['js_available']) && is_array ($sugar_config['js_available'])) + { + foreach ($sugar_config['js_available'] as $configKey) + { + if (isset($sugar_config[$configKey])) + { + $jsVariableStatement = $this->prepareConfigVarForJs($configKey, $sugar_config[$configKey]); + if (!array_search($jsVariableStatement, $config_js)) + { + $config_js[] = $jsVariableStatement; + } + } + } } return $config_js; } + /** + * Utility method to convert sugar_config values into a JS acceptable format. + * + * @param string $key Config Variable Name + * @param string $value Config Variable Value + * @return string + */ + protected function prepareConfigVarForJs($key, $value) + { + $value = json_encode($value); + return "SUGAR.config.{$key} = {$value};"; + } /** * getHelpText diff --git a/include/MVC/View/views/view.edit.php b/include/MVC/View/views/view.edit.php index cdf53ed2..b60ede61 100644 --- a/include/MVC/View/views/view.edit.php +++ b/include/MVC/View/views/view.edit.php @@ -53,17 +53,29 @@ require_once('include/EditView/EditView2.php'); parent::SugarView(); } - function preDisplay(){ - $metadataFile = $this->getMetaDataFile(); - $this->ev = new EditView(); - $this->ev->ss =& $this->ss; - $this->ev->setup($this->module, $this->bean, $metadataFile, 'include/EditView/EditView.tpl'); - - } + /** + * @see SugarView::preDisplay() + */ + public function preDisplay() + { + $metadataFile = $this->getMetaDataFile(); + $this->ev = $this->getEditView(); + $this->ev->ss =& $this->ss; + $this->ev->setup($this->module, $this->bean, $metadataFile, 'include/EditView/EditView.tpl'); + } function display(){ $this->ev->process(); echo $this->ev->display($this->showTitle); } - } -?> + + /** + * Get EditView object + * @return EditView + */ + protected function getEditView() + { + return new EditView(); + } +} + diff --git a/include/MVC/View/views/view.list.php b/include/MVC/View/views/view.list.php index afd25631..d8c317d6 100644 --- a/include/MVC/View/views/view.list.php +++ b/include/MVC/View/views/view.list.php @@ -71,6 +71,7 @@ class ViewList extends SugarView{ sugar_die($GLOBALS['app_strings']['LBL_NO_ACTION'] ); require($metadataFile); + $this->listViewDefs = $listViewDefs; if(!empty($this->bean->object_name) && isset($_REQUEST[$module.'2_'.strtoupper($this->bean->object_name).'_offset'])) {//if you click the pagination button, it will poplate the search criteria here @@ -240,7 +241,7 @@ class ViewList extends SugarView{ $this->searchForm = new SearchForm($this->seed, $this->module, $this->action); - $this->searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $this->listViewDefs); + $this->searchForm->setup($searchdefs, $searchFields, 'SearchFormGeneric.tpl', $view, $this->listViewDefs); $this->searchForm->lv = $this->lv; } } diff --git a/include/MVC/View/views/view.quickcreate.php b/include/MVC/View/views/view.quickcreate.php index f52a80ec..74afaa82 100644 --- a/include/MVC/View/views/view.quickcreate.php +++ b/include/MVC/View/views/view.quickcreate.php @@ -105,7 +105,7 @@ class ViewQuickcreate extends ViewAjax * @see SugarView::display() */ public function display() - { + { $view = (!empty($_REQUEST['target_view']))?$_REQUEST['target_view']: 'QuickCreate'; $module = $_REQUEST['module']; @@ -127,7 +127,7 @@ class ViewQuickcreate extends ViewAjax } } - $this->ev = new EditView(); + $this->ev = $this->getEditView(); $this->ev->view = $view; $this->ev->ss = new Sugar_Smarty(); @@ -183,4 +183,13 @@ class ViewQuickcreate extends ViewAjax echo $this->ev->display(false, true); } } + + /** + * Get EditView object + * @return EditView + */ + protected function getEditView() + { + return new EditView(); + } } \ No newline at end of file diff --git a/include/MVC/View/views/view.quickedit.php b/include/MVC/View/views/view.quickedit.php index b50608cc..297bfafb 100644 --- a/include/MVC/View/views/view.quickedit.php +++ b/include/MVC/View/views/view.quickedit.php @@ -110,7 +110,12 @@ class ViewQuickedit extends ViewAjax */ public function display() { - + if(($this->bean instanceOf SugarBean) && !$this->bean->ACLAccess('edit')){ + $no_defs_js = ''; + echo json_encode(array('scriptOnly'=> $no_defs_js)); + return; + } + $view = (!empty($_REQUEST['target_view']))?$_REQUEST['target_view']: 'QuickCreate'; $module = $_REQUEST['module']; @@ -155,8 +160,8 @@ class ViewQuickedit extends ViewAjax return; } - - $this->ev = new EditView(); + + $this->ev = $this->getEditView(); $this->ev->view = $view; $this->ev->ss = new Sugar_Smarty(); @@ -224,4 +229,13 @@ class ViewQuickedit extends ViewAjax echo json_encode(array('title'=> $this->bean->name, 'url'=>'index.php?module=' . $this->bean->module_dir . '&action=DetailView&record=' . $this->bean->id ,'html'=> $this->ev->display(false, true), 'eval'=>true)); } } + + /** + * Get EditView object + * @return EditView + */ + protected function getEditView() + { + return new EditView(); + } } \ No newline at end of file diff --git a/include/MassUpdate.php b/include/MassUpdate.php index 33ebd10a..08d36993 100644 --- a/include/MassUpdate.php +++ b/include/MassUpdate.php @@ -1230,7 +1230,7 @@ EOQ; } $searchForm = new SearchForm($seed, $module); - $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl'); + $searchForm->setup($searchdefs, $searchFields, 'SearchFormGeneric.tpl'); } /* bug 31271: using false to not add all bean fields since some beans - like SavedReports can have fields named 'module' etc. which may break the query */ diff --git a/include/MySugar/javascript/MySugar.js b/include/MySugar/javascript/MySugar.js index c50f4e72..1113f1dc 100644 --- a/include/MySugar/javascript/MySugar.js +++ b/include/MySugar/javascript/MySugar.js @@ -63,7 +63,7 @@ if(type=='module'||type=='web'){url=null;type='module';} else if(type=='predefined_chart'){url='predefined_chart';type='predefined_chart';} else if(type=='chart'){url='chart';type='chart';} SUGAR.mySugar.retrieveDashlet(data.responseText,url,finishRetrieve,true);} -var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab='+activeTab+'&id='+id+'&type='+type+'&type_module='+escape(type_module),{success:success,failure:success},null);return false;},showDashletsDialog:function(){columns=SUGAR.mySugar.getLayout();if(this.closeDashletsDialogTimer!=null){window.clearTimeout(this.closeDashletsDialogTimer);} +var cObj=YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab='+activeTab+'&id='+id+'&type='+type+'&type_module='+encodeURIComponent(type_module),{success:success,failure:success},null);return false;},showDashletsDialog:function(){columns=SUGAR.mySugar.getLayout();if(this.closeDashletsDialogTimer!=null){window.clearTimeout(this.closeDashletsDialogTimer);} var num_dashlets=0;var i=0;for(i=0;i<3;i++){if(typeof columns[i]!="undefined"){num_dashlets=num_dashlets+columns[i].length;}} if((num_dashlets)>=SUGAR.mySugar.maxCount){alert(SUGAR.language.get('app_strings','LBL_MAX_DASHLETS_REACHED'));return;} ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));var success=function(data){eval(data.responseText);dashletsListDiv=document.getElementById('dashletsList');dashletsListDiv.innerHTML=response['html'];document.getElementById('dashletsDialog_c').style.display='';SUGAR.mySugar.dashletsDialog.show();eval(response['script']);ajaxStatus.hideStatus();} diff --git a/include/Popups/PopupSmarty.php b/include/Popups/PopupSmarty.php index d978a033..6f2766a5 100644 --- a/include/Popups/PopupSmarty.php +++ b/include/Popups/PopupSmarty.php @@ -241,6 +241,10 @@ class PopupSmarty extends ListViewSmarty{ $this->th->ss->assign('formData', $this->formData); $this->th->ss->assign('APP', $GLOBALS['app_strings']); $this->th->ss->assign('MOD', $GLOBALS['mod_strings']); + if (isset($this->_popupMeta['create']['createButton'])) + { + $this->_popupMeta['create']['createButton'] = translate($this->_popupMeta['create']['createButton']); + } $this->th->ss->assign('popupMeta', $this->_popupMeta); $this->th->ss->assign('current_query', base64_encode(serialize($_REQUEST))); $this->th->ss->assign('customFields', $this->customFieldDefs); @@ -302,7 +306,7 @@ class PopupSmarty extends ListViewSmarty{ $this->searchdefs[$this->module]['templateMeta']['widths']['field'] = 30; $this->searchForm->view = 'PopupSearchForm'; - $this->searchForm->setup($this->searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGenericAdvanced.tpl', 'advanced_search', $this->listviewdefs); + $this->searchForm->setup($this->searchdefs, $searchFields, 'SearchFormGenericAdvanced.tpl', 'advanced_search', $this->listviewdefs); $lv = new ListViewSmarty(); $displayColumns = array(); @@ -380,6 +384,25 @@ class PopupSmarty extends ListViewSmarty{ } } + /** + * Bug #46842 : The relate field field_to_name_array fails to copy over custom fields + * By default bean's create_new_list_query function loads fields displayed on the page or used in the search + * add fields used to populate forms from _viewdefs :: field_to_name_array to retrive from db + */ + if ( isset($_REQUEST['field_to_name']) && $_REQUEST['field_to_name'] ) + { + $_REQUEST['field_to_name'] = is_array($_REQUEST['field_to_name']) ? $_REQUEST['field_to_name'] : array($_REQUEST['field_to_name']); + foreach ( $_REQUEST['field_to_name'] as $add_field ) + { + $add_field = strtolower($add_field); + if ( $add_field != 'id' && !isset($this->filter_fields[$add_field]) && isset($this->seed->field_defs[$add_field]) ) + { + $this->filter_fields[$add_field] = true; + } + } + + } + if (!empty($_REQUEST['query']) || (!empty($GLOBALS['sugar_config']['save_query']) && $GLOBALS['sugar_config']['save_query'] != 'populate_only')) { $data = $this->lvd->getListViewData($this->seed, $searchWhere, 0, -1, $this->filter_fields, $params, 'id'); @@ -542,7 +565,7 @@ EOQ; } - $addformheader = get_form_header($this->_popupMeta['create']['createButton'], $formSave, false); + $addformheader = get_form_header(translate($this->_popupMeta['create']['createButton']), $formSave, false); return $addformheader; } diff --git a/include/Popups/Popup_picker.php b/include/Popups/Popup_picker.php index ae2b4df8..442a0d59 100644 --- a/include/Popups/Popup_picker.php +++ b/include/Popups/Popup_picker.php @@ -156,11 +156,11 @@ EOQ; foreach($this->_popupMeta['customInput'] as $key => $value) $formSave .= '\n'; } - + $createButtonTranslation = translate($this->_popupMeta['create']['createButton']); $createButton = << + EOQ; - $addformheader = get_form_header($this->_popupMeta['create']['createButton'], $formSave, false); + $addformheader = get_form_header($createButtonTranslation, $formSave, false); } // END CREATE STUFF diff --git a/include/Popups/tpls/header.tpl b/include/Popups/tpls/header.tpl index 5e86b360..000db267 100644 --- a/include/Popups/tpls/header.tpl +++ b/include/Popups/tpls/header.tpl @@ -123,5 +123,5 @@ function clearAll() { {$multiSelectData} - + {{/if}} \ No newline at end of file diff --git a/include/QuickSearchDefaults.php b/include/QuickSearchDefaults.php index 135b61af..653795b7 100644 --- a/include/QuickSearchDefaults.php +++ b/include/QuickSearchDefaults.php @@ -44,7 +44,8 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * @since Class available since Release 4.0 */ -class QuickSearchDefaults { +class QuickSearchDefaults +{ var $form_name = 'EditView'; diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index 032ff22d..821c3e41 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -37,7 +37,6 @@ require_once('include/tabs.php'); require_once('include/ListView/ListViewSmarty.php'); - require_once('include/TemplateHandler/TemplateHandler.php'); require_once('include/EditView/EditView2.php'); @@ -74,7 +73,13 @@ require_once('include/EditView/EditView2.php'); var $displayType = 'searchView'; - function SearchForm($seed, $module, $action = 'index'){ + /** + * @var array + */ + protected $options; + + public function SearchForm($seed, $module, $action = 'index', $options = array()) + { $this->th = new TemplateHandler(); $this->th->loadSmarty(); $this->seed = $seed; @@ -92,7 +97,8 @@ require_once('include/EditView/EditView2.php'); 'displayDiv' => 'display:none'), ); $this->searchColumns = array () ; - } + $this->setOptions($options); + } function setup($searchdefs, $searchFields = array(), $tpl, $displayView = 'basic_search', $listViewDefs = array()){ $this->searchdefs = $searchdefs[$this->module]; @@ -184,7 +190,7 @@ require_once('include/EditView/EditView2.php'); $this->tabs[$tabkey]['displayDiv']=''; //if this is advanced tab, use form with saved search sub form built in if($viewName=='advanced'){ - $this->tpl = 'include/SearchForm/tpls/SearchFormGenericAdvanced.tpl'; + $this->tpl = 'SearchFormGenericAdvanced.tpl'; if ($this->action =='ListView') { $this->th->ss->assign('DISPLAY_SEARCH_HELP', true); } @@ -232,21 +238,73 @@ require_once('include/EditView/EditView2.php'); if ($this->module == 'Documents'){ $this->th->ss->assign('DOCUMENTS_MODULE', true); } - $return_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchForm_'.$this->parsedView, $this->tpl); + $return_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchForm_'.$this->parsedView, $this->locateFile($this->tpl)); if($header){ $this->th->ss->assign('return_txt', $return_txt); - $header_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormHeader', 'include/SearchForm/tpls/header.tpl'); + $header_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormHeader', $this->locateFile('header.tpl')); //pass in info to render the select dropdown below the form - $footer_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormFooter', 'include/SearchForm/tpls/footer.tpl'); + $footer_txt = $this->th->displayTemplate($this->seed->module_dir, 'SearchFormFooter', $this->locateFile('footer.tpl')); $return_txt = $header_txt.$footer_txt; } return $return_txt; } - function displaySavedSearch(){ + /** + * Set options + * @param array $options + * @return SearchForm2 + */ + public function setOptions($options = null) + { + $defaults = array( + 'locator_class' => 'FileLocator', + 'locator_class_params' => array( + array( + 'custom/modules/' . $this->module . '/tpls/SearchForm', + 'modules/' . $this->module . '/tpls/SearchForm', + 'custom/include/SearchForm/tpls', + 'include/SearchForm/tpls' + ) + ) + ); + + $this->options = empty($options) ? $defaults : $options; + return $this; + } + + /** + * Get Options + * @return array + */ + public function getOptions() + { + return $this->options; + } + + + /** + * Locate a file in the custom or stock folders. Look in the custom folders first. + * + * @param string $file The file we are looking for + * @return bool|string If the file is found return the path, False if not + */ + protected function locateFile($file) + { + $paths = isset($this->options['locator_class_params'])?$this->options['locator_class_params'][0]:array(); + foreach ($paths as $path) { + if (is_file($path . '/' . $file)) { + return $path . '/' . $file; + } + } + + return false; + } + + function displaySavedSearch() + { $savedSearch = new SavedSearch($this->listViewDefs[$this->module], $this->lv->data['pageData']['ordering']['orderBy'], $this->lv->data['pageData']['ordering']['sortOrder']); return $savedSearch->getForm($this->module, false); - } + } function displaySavedSearchSelect(){ @@ -437,27 +495,28 @@ require_once('include/EditView/EditView2.php'); } } } - }else{ $fromMergeRecords = isset($array['merge_module']); foreach($this->searchFields as $name => $params) { - $long_name = $name.'_'.$SearchName; + $long_name = $name.'_'.$SearchName; /*nsingh 21648: Add additional check for bool values=0. empty() considers 0 to be empty Only repopulates if value is 0 or 1:( */ - if(isset($array[$long_name]) && !$this->isEmptyDropdownField($long_name, $array[$long_name]) && ( $array[$long_name] !== '' || (isset($this->fieldDefs[$long_name]['type']) && $this->fieldDefs[$long_name]['type'] == 'bool'&& ($array[$long_name]=='0' || $array[$long_name]=='1')))) - { + if (isset($array[$long_name]) && ( $array[$long_name] !== '' || (isset($this->fieldDefs[$long_name]['type']) && $this->fieldDefs[$long_name]['type'] == 'bool'&& ($array[$long_name]=='0' || $array[$long_name]=='1')))) + { $this->searchFields[$name]['value'] = $array[$long_name]; if(empty($this->fieldDefs[$long_name]['value'])) { $this->fieldDefs[$long_name]['value'] = $array[$long_name]; } - }else if(!empty($array[$name]) && !$fromMergeRecords && !$this->isEmptyDropdownField($name, $array[$name])) { //basic + } + else if(!empty($array[$name]) && !$fromMergeRecords) // basic + { $this->searchFields[$name]['value'] = $array[$name]; if(empty($this->fieldDefs[$long_name]['value'])) { $this->fieldDefs[$long_name]['value'] = $array[$name]; } } - + if(!empty($params['enable_range_search']) && isset($this->searchFields[$name]['value'])) { if(preg_match('/^range_(.*?)$/', $long_name, $match) && isset($array[$match[1].'_range_choice'])) @@ -472,7 +531,7 @@ require_once('include/EditView/EditView2.php'); // FG - bug 45287 - to db conversion is ok, but don't adjust timezone (not now), otherwise you'll jump to the day before (if at GMT-xx) $date_value = $timedate->to_db_date($this->searchFields[$name]['value'], false); $this->searchFields[$name]['value'] = $date_value == '' ? $this->searchFields[$name]['value'] : $date_value; - } + } } if((empty($array['massupdate']) || $array['massupdate'] == 'false') && $addAllBeanFields) { @@ -480,23 +539,23 @@ require_once('include/EditView/EditView2.php'); if($key != 'assigned_user_name' && $key != 'modified_by_name') { $long_name = $key.'_'.$SearchName; - - if(in_array($key.'_'.$SearchName, $arrayKeys) && !in_array($key, $searchFieldsKeys) && !$this->isEmptyDropdownField($long_name, $array[$long_name])) - { - + + if(in_array($key.'_'.$SearchName, $arrayKeys) && !in_array($key, $searchFieldsKeys)) + { + $this->searchFields[$key] = array('query_type' => 'default', 'value' => $array[$long_name]); - + if (!empty($params['type']) && $params['type'] == 'parent' && !empty($params['type_name']) && !empty($this->searchFields[$key]['value'])) { require_once('include/SugarFields/SugarFieldHandler.php'); $sfh = new SugarFieldHandler(); $sf = $sfh->getSugarField('Parent'); - + $this->searchFields[$params['type_name']] = array('query_type' => 'default', 'value' => $sf->getSearchInput($params['type_name'], $array)); } - + if(empty($this->fieldDefs[$long_name]['value'])) { $this->fieldDefs[$long_name]['value'] = $array[$long_name]; } @@ -504,7 +563,6 @@ require_once('include/EditView/EditView2.php'); } } } - } } @@ -515,7 +573,7 @@ require_once('include/EditView/EditView2.php'); $this->searchFields[$fieldName]['value'] = trim($field['value']); } } - } + } } @@ -571,6 +629,7 @@ require_once('include/EditView/EditView2.php'); $values = $this->searchFields; $where_clauses = array(); + $like_char = '%'; $table_name = $this->seed->object_name; $this->seed->fill_in_additional_detail_fields(); @@ -969,7 +1028,7 @@ require_once('include/EditView/EditView2.php'); $where .= ' OR ' . $this->seed->db->concat($column_name[0],array('last_name','first_name')) . " LIKE ".$this->seed->db->quoted($field_value.'%'); }else{ //no space was found, add normal where clause - $where .= $db_field . " like ".$this->seed->db->quoted($field_value.'%'); + $where .= $db_field . " like ".$this->seed->db->quoted(sql_like_string($field_value, $like_char)); } }else { @@ -984,7 +1043,7 @@ require_once('include/EditView/EditView2.php'); { foreach($GLOBALS['app_list_strings']['salutation_dom'] as $salutation) { - if(!empty($salutation) && strpos($field_value, $salutation) == 0) + if(!empty($salutation) && strpos($field_value, $salutation) === 0) { $field_value = trim(substr($field_value, strlen($salutation))); break; @@ -995,7 +1054,7 @@ require_once('include/EditView/EditView2.php'); } //field is not last name or this is not from global unified search, so do normal where clause - $where .= $db_field . " like ".$this->seed->db->quoted($field_value.'%'); + $where .= $db_field . " like ".$this->seed->db->quoted(sql_like_string($field_value, $like_char)); } } break; @@ -1095,14 +1154,14 @@ require_once('include/EditView/EditView2.php'); return $where_clauses; } - - + + /** * isEmptyDropdownField - * + * * This function checks to see if a blank dropdown field was supplied. This scenario will occur where * a dropdown select is in single selection mode - * + * * @param $value Mixed dropdown value */ private function isEmptyDropdownField($name='', $value=array()) @@ -1110,6 +1169,6 @@ require_once('include/EditView/EditView2.php'); $result = is_array($value) && isset($value[0]) && $value[0] == ''; $GLOBALS['log']->debug("Found empty value for {$name} dropdown search key"); return $result; - } + } } diff --git a/include/SearchForm/SugarSpot.php b/include/SearchForm/SugarSpot.php index f608d1eb..a60bab5f 100644 --- a/include/SearchForm/SugarSpot.php +++ b/include/SearchForm/SugarSpot.php @@ -210,6 +210,10 @@ class SugarSpot $where = ''; $searchEmail = preg_match('/^([^%]|%)*@([^%]|%)*$/', $query); + // bug49650 - strip out asterisks from query in case + // user thinks asterisk is a wildcard value + $query = str_replace( '*' , '' , $query ); + $limit = !empty($GLOBALS['sugar_config']['max_spotresults_initial']) ? $GLOBALS['sugar_config']['max_spotresults_initial'] : 5; if($offset !== -1){ $limit = !empty($GLOBALS['sugar_config']['max_spotresults_more']) ? $GLOBALS['sugar_config']['max_spotresults_more'] : 20; @@ -277,7 +281,9 @@ class SugarSpot } } //foreach } - if(!$keep){ + # Bug 42961 Spot search for custom fields + if (!$keep && (isset($v['force_unifiedsearch']) == false || $v['force_unifiedsearch'] != true)) + { if(strpos($k,'email') === false || !$searchEmail) { unset($searchFields[$moduleName][$k]); } diff --git a/include/SearchForm/tpls/header.tpl b/include/SearchForm/tpls/header.tpl index cec1f61f..e6b97abf 100644 --- a/include/SearchForm/tpls/header.tpl +++ b/include/SearchForm/tpls/header.tpl @@ -43,7 +43,22 @@ {/literal} {{/if}} -
+{literal} + +{/literal} + diff --git a/include/Smarty/plugins/function.sugar_currency_format.php b/include/Smarty/plugins/function.sugar_currency_format.php index 1fc942a5..2e411088 100644 --- a/include/Smarty/plugins/function.sugar_currency_format.php +++ b/include/Smarty/plugins/function.sugar_currency_format.php @@ -63,7 +63,8 @@ r14718 - 2006-07-17 17:39:10 -0700 (Mon, 17 Jul 2006) - wayne - format the curre */ function smarty_function_sugar_currency_format($params, &$smarty) { - if(!isset($params['var']) || $params['var'] == '') { + // Bug #47406 : Currency field doesn't accept 0.00 as default value + if(!isset($params['var']) || $params['var'] === '') { return ''; } diff --git a/include/SubPanel/SubPanelTiles.php b/include/SubPanel/SubPanelTiles.php index edcab94e..4045658e 100644 --- a/include/SubPanel/SubPanelTiles.php +++ b/include/SubPanel/SubPanelTiles.php @@ -137,7 +137,12 @@ class SubPanelTiles if(!empty($selectedGroup)) { - return SubPanelTilesTabs::getTabs($tabs, $showTabs, $selectedGroup); + // Bug #44344 : Custom relationships under same module only show once in subpanel tabs + // use object property instead new object to have ability run unit test (can override subpanel_definitions) + $objSubPanelTilesTabs = new SubPanelTilesTabs($this->focus); + $tabs = $objSubPanelTilesTabs->getTabs($tabs, $showTabs, $selectedGroup); + unset($objSubPanelTilesTabs); + return $tabs; } else { diff --git a/include/SubPanel/SubPanelTilesTabs.php b/include/SubPanel/SubPanelTilesTabs.php index b5992803..d7dee60a 100644 --- a/include/SubPanel/SubPanelTilesTabs.php +++ b/include/SubPanel/SubPanelTilesTabs.php @@ -107,9 +107,6 @@ class SubPanelTilesTabs extends SubPanelTiles if($selectedGroup=='All') $selectedGroup=translate('LBL_TABGROUP_ALL'); - require_once 'include/SubPanel/SubPanelDefinitions.php' ; - $spd = new SubPanelDefinitions ( $this->focus ) ; - // Set up a mapping from subpanelID, found in the $tabs list, to the source module name // As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two // when constructing the subpanel tabs @@ -120,7 +117,9 @@ class SubPanelTilesTabs extends SubPanelTiles $moduleNames = array () ; foreach ( $tabs as $subpanelID ) { - $subpanel = $spd->load_subpanel( $subpanelID ); + // Bug #44344 : Custom relationships under same module only show once in subpanel tabs + // use object property instead new object to have ability run unit test (can override subpanel_definitions) + $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID ); if ($subpanel !== false) $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ; } @@ -135,9 +134,9 @@ class SubPanelTilesTabs extends SubPanelTiles foreach ( $tabs as $subpanelID ) if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0) { - $groups [ translate ( $mainTab ) ] [ 'modules' ] [ $key ] = $subpanelID ; + // Bug #44344 : Custom relationships under same module only show once in subpanel tabs + $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ; $found [ $subpanelID ] = true ; - break; } } } diff --git a/include/SubPanel/SugarTab.php b/include/SubPanel/SugarTab.php index b905f2c5..44a3bc69 100644 --- a/include/SubPanel/SugarTab.php +++ b/include/SubPanel/SugarTab.php @@ -69,9 +69,13 @@ class SugarTab } $subpanelTitles = array(); - foreach($otherTabs[$key_all]['tabs'] as $subtab) + + if(isset($otherTabs[$key_all]) && isset($otherTabs[$key_all]['tabs'])) { - $subpanelTitles[$subtab['key']] = $subtab['label']; + foreach($otherTabs[$key_all]['tabs'] as $subtab) + { + $subpanelTitles[$subtab['key']] = $subtab['label']; + } } $this->ss->assign('showLinks', 'false'); diff --git a/include/SugarEmailAddress/SugarEmailAddress.php b/include/SugarEmailAddress/SugarEmailAddress.php index 6309c834..b553eae1 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.php +++ b/include/SugarEmailAddress/SugarEmailAddress.php @@ -674,14 +674,38 @@ class SugarEmailAddress extends SugarBean { return ''; } - function getReplyToAddress($focus) { + /** + * As long as this function is used not only to retrieve user's Reply-To + * address, but also notification address and so on, there were added + * $replyToOnly optional parameter used to retrieve only address marked as + * Reply-To (bug #43643). + * + * @param SugarBean $focus + * @param bool $replyToOnly + * @return string + */ + function getReplyToAddress($focus, $replyToOnly = false) { $q = "SELECT ea.email_address FROM email_addresses ea LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id WHERE ear.bean_module = '{$focus->module_dir}' AND ear.bean_id = '{$focus->id}' AND ear.deleted = 0 - AND ea.invalid_email = 0 + AND ea.invalid_email = 0"; + + if (!$replyToOnly) + { + // retrieve reply-to address if it exists or any other address + // otherwise + $q .= " ORDER BY ear.reply_to_address DESC"; + } + else + { + // retrieve reply-to address only + $q .= " + AND ear.reply_to_address = 1"; + } + $r = $this->db->query($q); $a = $this->db->fetchByAssoc($r); diff --git a/include/SugarFields/Fields/Address/DetailView.tpl b/include/SugarFields/Fields/Address/DetailView.tpl index a70034c3..36580c10 100644 --- a/include/SugarFields/Fields/Address/DetailView.tpl +++ b/include/SugarFields/Fields/Address/DetailView.tpl @@ -40,6 +40,7 @@ + {$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br}
diff --git a/include/SugarFields/Fields/Address/en_us.DetailView.tpl b/include/SugarFields/Fields/Address/en_us.DetailView.tpl index 0e1db016..9184e2d8 100644 --- a/include/SugarFields/Fields/Address/en_us.DetailView.tpl +++ b/include/SugarFields/Fields/Address/en_us.DetailView.tpl @@ -40,6 +40,7 @@ + {$fields.{{$displayParams.key}}_address_street.value|escape:'htmlentitydecode'|escape:'html'|url2html|nl2br}
diff --git a/include/SugarFields/Fields/Base/SugarFieldBase.php b/include/SugarFields/Fields/Base/SugarFieldBase.php index 821fc729..43328ccd 100644 --- a/include/SugarFields/Fields/Base/SugarFieldBase.php +++ b/include/SugarFields/Fields/Base/SugarFieldBase.php @@ -125,7 +125,17 @@ class SugarFieldBase { function getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col) { $tabindex = 1; - $parentFieldArray = $this->setupFieldArray($parentFieldArray, $vardef); + //fixing bug #46666: don't need to format enum and radioenum fields + //because they are already formated in SugarBean.php in the function get_list_view_array() as fix of bug #21672 + if ($this->type != 'Enum' && $this->type != 'Radioenum') + { + $parentFieldArray = $this->setupFieldArray($parentFieldArray, $vardef); + } + else + { + $vardef['name'] = strtoupper($vardef['name']); + } + $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex, false); $this->ss->left_delimiter = '{'; @@ -163,6 +173,12 @@ class SugarFieldBase { $this->type = $type; return $result; } + // jpereira@dri - #Bug49513 - Readonly type not working as expected + // If readonly is set in displayParams, the vardef will be displayed as in DetailView. + if (isset($displayParams['readonly']) && $displayParams['readonly']) { + return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'DetailView'); + } + // ~ jpereira@dri - #Bug49513 - Readonly type not working as expected return $this->getSmartyView($parentFieldArray, $vardef, $displayParams, $tabindex, 'EditView'); } diff --git a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php index 5731d645..eeb1cdeb 100644 --- a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php +++ b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php @@ -363,7 +363,7 @@ FRA; function createQuickSearchCode($returnAsJavascript = true){ $sqs_objects = array(); require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName($this->form_name); for($i=0; $i<$this->numFields; $i++){ $name1 = "{$this->form_name}_{$this->name}_collection_{$i}"; @@ -539,4 +539,4 @@ FRA; return $tplName; } -} \ No newline at end of file +} diff --git a/include/SugarFields/Fields/Datetime/EditView.tpl b/include/SugarFields/Fields/Datetime/EditView.tpl index fabf680a..b1f0a9d1 100644 --- a/include/SugarFields/Fields/Datetime/EditView.tpl +++ b/include/SugarFields/Fields/Datetime/EditView.tpl @@ -43,8 +43,8 @@ {assign var=date_value value={{sugarvar key='value' string=true}} } {{if !$displayParams.hiddeCalendar}} -{capture assign="other_attributes"}align="absmiddle" border="0" id="{{$idname}}_trigger"{/capture} -{sugar_getimage name="jscalendar" ext=".gif" alt="$APP.LBL_ENTER_DATE other_attributes=$other_attributes"} +{capture assign="other_attributes"}alt="{$APP.LBL_ENTER_DATE}" style="position:relative; top:6px" border="0" id="{{$idname}}_trigger"{/capture} +{sugar_getimage name="jscalendar" ext=".gif" other_attributes="$other_attributes"} {{/if}} {{if $displayParams.showFormats}}  ({$USER_DATEFORMAT}) diff --git a/include/SugarFields/Fields/Datetime/SugarFieldDatetime.php b/include/SugarFields/Fields/Datetime/SugarFieldDatetime.php index 86fdbb95..f2429423 100644 --- a/include/SugarFields/Fields/Datetime/SugarFieldDatetime.php +++ b/include/SugarFields/Fields/Datetime/SugarFieldDatetime.php @@ -108,11 +108,17 @@ class SugarFieldDatetime extends SugarFieldBase { $user = $context['notify_user']; } else { $user = $GLOBALS['current_user']; - } + } if($vardef['type'] == 'date') { + if(!$timedate->check_matching_format($inputField, TimeDate::DB_DATE_FORMAT)) { + return $inputField; + } // convert without TZ return $timedate->to_display($inputField, $timedate->get_db_date_format(), $timedate->get_date_format($user)); } else { + if(!$timedate->check_matching_format($inputField, TimeDate::DB_DATETIME_FORMAT)) { + return $inputField; + } return $timedate->to_display_date_time($inputField, true, true, $user); } } diff --git a/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js b/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js index f15adbcd..446f3dca 100644 --- a/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js +++ b/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js @@ -40,13 +40,13 @@ this.meridiem=this.hasMeridiem?trim(this.datetime.substring(16)):'';this.datetim if(this.hrs>12){this.hrs=this.hrs-12;}}} Datetimecombo.prototype.jsscript=function(callback){text='\nfunction update_'+this.fieldname+'(calendar) {';text+='\nd = document.getElementById("'+this.fieldname+'_date").value;';text+='\nh = document.getElementById("'+this.fieldname+'_hours").value;';text+='\nm = document.getElementById("'+this.fieldname+'_minutes").value;';text+='\nnewdate = d + " " + h + "'+this.timeseparator+'" + m;';if(this.hasMeridiem){text+='\nif(typeof document.getElementById("'+this.fieldname+'_meridiem") != "undefined") {';text+='\n newdate += document.getElementById("'+this.fieldname+'_meridiem").value;';text+='\n}';} text+='\nif(trim(newdate) =="'+this.timeseparator+'") newdate="";';text+='\ndocument.getElementById("'+this.fieldname+'").value = newdate;';text+='\n'+callback;text+='\n}';return text;} -Datetimecombo.prototype.html=function(callback){var text='';var h1=this.has12Hours?1:0;var h2=this.has12Hours?12:23;if(this.allowEmptyHM){text+='';} for(i=h1;i<=h2;i++){val=i<10?"0"+i:i;text+='';} text+='\n ';text+=this.timeseparator;text+='\n ';if(this.hasMeridiem){text+='\n ';text+='\n';} if(this.showCheckbox){text+='\n';} -return text;};Datetimecombo.prototype.update=function(updateListeners){if(typeof(updateListeners)=="undefined") +text+='';return text;};Datetimecombo.prototype.update=function(updateListeners){if(typeof(updateListeners)=="undefined") updateListeners=true;var d=window.document.getElementById(this.fieldname+'_date');var h=window.document.getElementById(this.fieldname+'_hours');var m=window.document.getElementById(this.fieldname+'_minutes');var mer=document.getElementById(this.fieldname+"_meridiem");if(d.value==""){h.selectedIndex=0;m.selectedIndex=0;if(mer)mer.selectedIndex=0;}else{if(this.allowEmptyHM){if(h.selectedIndex==0)h.selectedIndex=12;if(m.selectedIndex==0)m.selectedIndex=1;if(mer&&(mer.selectedIndex==0))mer.selectedIndex=1;}} var newdate=d.value+' '+h.value+this.timeseparator+m.value;if(this.hasMeridiem){ampm=document.getElementById(this.fieldname+"_meridiem").value;newdate+=ampm;} if(trim(newdate)==""+this.timeseparator+""){newdate='';} diff --git a/include/SugarFields/Fields/Datetimecombo/EditView.tpl b/include/SugarFields/Fields/Datetimecombo/EditView.tpl index 89acc4aa..1d1371dd 100644 --- a/include/SugarFields/Fields/Datetimecombo/EditView.tpl +++ b/include/SugarFields/Fields/Datetimecombo/EditView.tpl @@ -44,9 +44,9 @@ + + + '; +} else { + installLog("/zip check passed"); + +} + + + +$customSystemChecks = installerHook('additionalCustomSystemChecks'); +if($customSystemChecks != 'undefined'){ + if($customSystemChecks['error_found'] == true){ + $error_found = true; + } + if(!empty($customSystemChecks['error_txt'])){ + $error_txt .= $customSystemChecks['error_txt']; + } +} // PHP.ini $phpIniLocation = get_cfg_var("cfg_file_path"); diff --git a/install/install_utils.php b/install/install_utils.php index d15f9bd4..1d2f5052 100644 --- a/install/install_utils.php +++ b/install/install_utils.php @@ -47,6 +47,41 @@ require_once('include/utils/zip_utils.php'); require_once('include/upload_file.php'); +//////////////// +//// GLOBAL utility +/** + * Calls a custom function (if it exists) based on the first parameter, + * and returns result of function call, or 'undefined' if the function doesn't exist + * @param string function name to call in custom install hooks + * @return mixed function call result, or 'undefined' + */ +function installerHook($function_name, $options = array()){ + if(!isset($GLOBALS['customInstallHooksExist'])){ + if(file_exists('custom/install/install_hooks.php')){ + installLog("installerHook: Found custom/install/install_hooks.php"); + require_once('custom/install/install_hooks.php'); + $GLOBALS['customInstallHooksExist'] = true; + } + else{ + installLog("installerHook: Could not find custom/install/install_hooks.php"); + $GLOBALS['customInstallHooksExist'] = false; + } + } + + if($GLOBALS['customInstallHooksExist'] === false){ + return 'undefined'; + } + else{ + if(function_exists($function_name)){ + installLog("installerHook: function {$function_name} found, calling and returning the return value"); + return $function_name($options); + } + else{ + installLog("installerHook: function {$function_name} not found in custom install hooks file"); + return 'undefined'; + } + } +} /////////////////////////////////////////////////////////////////////////////// //// FROM welcome.php @@ -422,7 +457,8 @@ function writeSugarConfig($sugar_config) { '$sugar_config = ' . var_export($sugar_config, true) . ";\n?>\n"; - if(is_writable('config.php') && write_array_to_file( "sugar_config", $sugar_config, "config.php")) { + if(is_writable('config.php')) { + write_array_to_file( "sugar_config", $sugar_config, "config.php"); } } diff --git a/install/performSetup.php b/install/performSetup.php index a667da19..06649eed 100644 --- a/install/performSetup.php +++ b/install/performSetup.php @@ -152,17 +152,24 @@ echo "
"; // create the SugarCRM database if($setup_db_create_database) { installLog("calling handleDbCreateDatabase()"); + installerHook('pre_handleDbCreateDatabase'); handleDbCreateDatabase(); + installerHook('post_handleDbCreateDatabase'); } else { // ensure the charset and collation are utf8 installLog("calling handleDbCharsetCollation()"); + installerHook('pre_handleDbCharsetCollation'); handleDbCharsetCollation(); + installerHook('post_handleDbCharsetCollation'); } // create the SugarCRM database user -if($setup_db_create_sugarsales_user) +if($setup_db_create_sugarsales_user){ + installerHook('pre_handleDbCreateSugarUser'); handleDbCreateSugarUser(); + installerHook('post_handleDbCreateSugarUser'); +} foreach( $beanFiles as $bean => $file ){ require_once( $file ); @@ -195,6 +202,7 @@ $nonStandardModules = array ( installLog("looping through all the Beans and create their tables"); //start by clearing out the vardefs VardefManager::clearVardef(); +installerHook('pre_createAllModuleTables'); foreach( $beanFiles as $bean => $file ) { $doNotInit = array('Scheduler', 'SchedulersJob', 'ProjectTask'); @@ -245,11 +253,14 @@ foreach( $beanFiles as $bean => $file ) { } installLog("creating Relationship Meta for ".$focus->getObjectName()); + installerHook('pre_createModuleTable', array('module' => $focus->getObjectName())); SugarBean::createRelationshipMeta($focus->getObjectName(), $db, $table_name, $empty, $focus->module_dir); + installerHook('post_createModuleTable', array('module' => $focus->getObjectName())); echo "."; } // end if() } +installerHook('post_createAllModuleTables'); echo "
"; //// END TABLE STUFF @@ -280,15 +291,18 @@ echo "
"; echo "{$mod_strings['LBL_PERFORM_CREATE_DEFAULT']}
"; echo "
"; installLog("Begin creating Defaults"); + installerHook('pre_createDefaultSettings'); if ($new_config) { installLog("insert defaults into config table"); insert_default_settings(); } + installerHook('post_createDefaultSettings'); + installerHook('pre_createUsers'); if ($new_tables) { echo $line_entry_format.$mod_strings['LBL_PERFORM_DEFAULT_USERS'].$line_exit_format; installLog($mod_strings['LBL_PERFORM_DEFAULT_USERS']); @@ -302,6 +316,7 @@ echo "
"; set_admin_password($setup_site_admin_password); echo $mod_strings['LBL_PERFORM_DONE']; } + installerHook('post_createUsers'); @@ -311,7 +326,9 @@ echo "
"; echo $line_entry_format.$mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER'].$line_exit_format; installLog($mod_strings['LBL_PERFORM_DEFAULT_SCHEDULER']); $scheduler = new Scheduler(); + installerHook('pre_createDefaultSchedulers'); $scheduler->rebuildDefaultSchedulers(); + installerHook('post_createDefaultSchedulers'); echo $mod_strings['LBL_PERFORM_DONE']; @@ -333,6 +350,7 @@ enableInsideViewConnector(); // populating the db with seed data installLog("populating the db with seed data"); if( $_SESSION['demoData'] != 'no' ){ + installerHook('pre_installDemoData'); set_time_limit( 301 ); echo "
"; @@ -346,6 +364,7 @@ enableInsideViewConnector(); $current_user = new User(); $current_user->retrieve(1); include("install/populateSeedData.php"); + installerHook('post_installDemoData'); } $endTime = microtime(true); @@ -449,11 +468,13 @@ FP; $enabled_tabs[] = 'Prospects'; $enabled_tabs[] = 'ProspectLists'; - + + installerHook('pre_setSystemTabs'); require_once('modules/MySettings/TabController.php'); $tabs = new TabController(); $tabs->set_system_tabs($enabled_tabs); - + installerHook('post_setSystemTabs'); + post_install_modules(); //Call rebuildSprites @@ -470,6 +491,7 @@ if( count( $bottle ) > 0 ){ } else { $bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS']; } +installerHook('post_installModules'); diff --git a/jssource/src_files/include/MySugar/javascript/MySugar.js b/jssource/src_files/include/MySugar/javascript/MySugar.js index 5f247937..d09aeeb9 100644 --- a/jssource/src_files/include/MySugar/javascript/MySugar.js +++ b/jssource/src_files/include/MySugar/javascript/MySugar.js @@ -366,7 +366,7 @@ SUGAR.mySugar = function() { SUGAR.mySugar.retrieveDashlet(data.responseText, url, finishRetrieve, true); // retrieve it from the server } - var cObj = YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab=' + activeTab + '&id=' + id+'&type=' + type + '&type_module=' + escape(type_module), + var cObj = YAHOO.util.Connect.asyncRequest('GET','index.php?to_pdf=1&module='+module+'&action=DynamicAction&DynamicAction=addDashlet&activeTab=' + activeTab + '&id=' + id+'&type=' + type + '&type_module=' + encodeURIComponent(type_module), {success: success, failure: success}, null); return false; diff --git a/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js b/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js index 68f830de..e3aec78a 100644 --- a/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js +++ b/jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js @@ -100,7 +100,7 @@ function Datetimecombo (datetime, field, timeformat, tabindex, showCheckbox, che this.hrs += 1; this.mins = 0; if(this.hasMeridiem && this.hrs == 12) { - if(this.meridiem == "pm" || this.meridiem == "am") { + if(this.meridiem == "pm" || this.meridiem == "am") { if(this.meridiem == "pm") { this.meridiem = "am"; } else { @@ -116,7 +116,7 @@ function Datetimecombo (datetime, field, timeformat, tabindex, showCheckbox, che } if (this.hrs > 12) { this.hrs = this.hrs - 12; - } + } } //if-else } @@ -164,7 +164,7 @@ Datetimecombo.prototype.jsscript = function(callback) { Datetimecombo.prototype.html = function(callback) { //Now render the items - var text = ''; var h1 = this.has12Hours ? 1 : 0; var h2 = this.has12Hours ? 12 : 23; if(this.allowEmptyHM){ @@ -203,6 +203,7 @@ Datetimecombo.prototype.html = function(callback) { //text += ' ' + SUGAR.language.get("app_strings", "LBL_LINK_NONE"); } + text += ''; return text; }; diff --git a/jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js b/jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js index 41bff34f..e139b79c 100644 --- a/jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js +++ b/jssource/src_files/include/SugarFields/Fields/File/SugarFieldFile.js @@ -43,7 +43,7 @@ if ( typeof(SUGAR.field.file) == 'undefined' ) { deleteAttachment: function(elemBaseName,docTypeName,elem) { ajaxStatus.showStatus(SUGAR.language.get("app_strings", "LBL_REMOVING_ATTACHMENT")); elem.form.deleteAttachment.value=1; - elem.form.action.value="EditView"; + elem.form.action.value="deleteattachment"; var callback = SUGAR.field.file.deleteAttachmentCallbackGen(elemBaseName,docTypeName); var success = function(data) { diff --git a/jssource/src_files/include/javascript/calendar.js b/jssource/src_files/include/javascript/calendar.js index 4911b0b9..dadce706 100644 --- a/jssource/src_files/include/javascript/calendar.js +++ b/jssource/src_files/include/javascript/calendar.js @@ -110,7 +110,8 @@ Calendar.setup = function (params) { calendar.clear(); var now = new Date(); //Reset the input field value - Dom.get(inputField).value = formatSelectedDate(now); + var input = Dom.get(inputField); + input.value = formatSelectedDate(now); //Highlight the cell var cellIndex = calendar.getCellIndex(now); if(cellIndex > -1 ) @@ -118,6 +119,14 @@ Calendar.setup = function (params) { var cell = calendar.cells[cellIndex]; Dom.addClass(cell, calendar.Style.CSS_CELL_SELECTED); } + + //bug 50740 - explicitly fire onchange event for this input + if(input.onchange) + input.onchange(); + + //Fire any on-change events for this input field + SUGAR.util.callOnChangeListers(input); + //Must return false to prevent onbeforeunload from firing in IE8 return false; }); diff --git a/jssource/src_files/include/javascript/popup_parent_helper.js b/jssource/src_files/include/javascript/popup_parent_helper.js index 91dbad36..7fb4e4a9 100644 --- a/jssource/src_files/include/javascript/popup_parent_helper.js +++ b/jssource/src_files/include/javascript/popup_parent_helper.js @@ -95,6 +95,25 @@ function open_popup(module_name, width, height, initial_filter, close_popup, hid URL+='&metadata='+metadata; } + // Bug #46842 : The relate field field_to_name_array fails to copy over custom fields + // post fields that should be populated from popup form + if(popup_request_data.jsonObject) { + var request_data = popup_request_data.jsonObject; + } else { + var request_data = popup_request_data; + } + var field_to_name_array_url = ''; + if (request_data && request_data.field_to_name_array != 'undefined') { + for(var key in request_data.field_to_name_array) { + if ( key.toLowerCase() != 'id' ) { + field_to_name_array_url += '&field_to_name[]='+encodeURIComponent(key.toLowerCase()); + } + } + } + if ( field_to_name_array_url ) { + URL+=field_to_name_array_url; + } + win = window.open(URL, windowName, windowFeatures); if(window.focus) diff --git a/jssource/src_files/include/javascript/quicksearch.js b/jssource/src_files/include/javascript/quicksearch.js index 8ad2cb73..910adc15 100644 --- a/jssource/src_files/include/javascript/quicksearch.js +++ b/jssource/src_files/include/javascript/quicksearch.js @@ -151,6 +151,11 @@ function enableQS(noReload){ inputElement: qsFields[qsField], //YUI requires the data, even POST, to be URL encoded generateRequest : function(sQuery) { + //preprocess values + 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', @@ -351,4 +356,5 @@ function registerSingleSmartInputListener(input) { if(typeof QSFieldsArray == 'undefined') { QSFieldsArray = new Array(); QSProcessedFieldsArray = new Array(); + QSCallbacksArray = new Array(); } diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js index bc79d5d3..7c2cba27 100644 --- a/jssource/src_files/include/javascript/sugar_3.js +++ b/jssource/src_files/include/javascript/sugar_3.js @@ -884,6 +884,13 @@ function validate_form(formname, startsWith){ add_error_style(formname, validate[formname][i][nameIndex], invalidTxt + " " + validate[formname][i][msgIndex]); } break; + // Bug #49614 : Check value without trimming before + case 'DBNameRaw': + if(!isDBName(form[validate[formname][i][nameIndex]].value)){ + isError = true; + add_error_style(formname, validate[formname][i][nameIndex], invalidTxt + " " + validate[formname][i][msgIndex]); + } + break; case 'alphanumeric': break; case 'file': @@ -1600,8 +1607,15 @@ function sendAndRetrieve(theForm, theDiv, loadingStr) { } if(typeof loadingStr == 'undefined') SUGAR.language.get('app_strings', 'LBL_LOADING'); ajaxStatus.showStatus(loadingStr); - YAHOO.util.Connect.setForm(theForm); - var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {success: success, failure: success}); + oForm = new YAHOO.util.Element(theForm); + if ( oForm.get('enctype') && oForm.get('enctype') == 'multipart/form-data' ) { + // the second argument is true to indicate file upload. + YAHOO.util.Connect.setForm(theForm, true); + var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {upload: success, failure: success}); + } else { + YAHOO.util.Connect.setForm(theForm); + var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {success: success, failure: success}); + } return false; } @@ -1615,8 +1629,15 @@ function sendAndRedirect(theForm, loadingStr, redirect_location) { } if(typeof loadingStr == 'undefined') SUGAR.language.get('app_strings', 'LBL_LOADING'); ajaxStatus.showStatus(loadingStr); - YAHOO.util.Connect.setForm(theForm); - var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {success: success, failure: success}); + oForm = new YAHOO.util.Element(theForm); + if ( oForm.get('enctype') && oForm.get('enctype') == 'multipart/form-data' ) { + // the second argument is true to indicate file upload. + YAHOO.util.Connect.setForm(theForm, true); + var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {upload: success, failure: success}); + } else { + YAHOO.util.Connect.setForm(theForm); + var cObj = YAHOO.util.Connect.asyncRequest('POST', 'index.php', {success: success, failure: success}); + } return false; } @@ -2812,7 +2833,7 @@ SUGAR.util = function () { var script = document.createElement('script'); script.type= 'text/javascript'; if(result[1].indexOf("src=") > -1){ - var srcRegex = /.*src=['"]([a-zA-Z0-9_\&\/\.\?=:-]*)['"].*/igm; + var srcRegex = /.*src=['"]([a-zA-Z0-9_\-\&\/\.\?=:-]*)['"].*/igm; var srcResult = result[1].replace(srcRegex, '$1'); script.src = srcResult; }else{ @@ -4071,6 +4092,25 @@ function open_popup(module_name, width, height, initial_filter, close_popup, hid URL+='&metadata='+metadata; } + // Bug #46842 : The relate field field_to_name_array fails to copy over custom fields + // post fields that should be populated from popup form + if(popup_request_data.jsonObject) { + var request_data = popup_request_data.jsonObject; + } else { + var request_data = popup_request_data; + } + var field_to_name_array_url = ''; + if (request_data && request_data.field_to_name_array != 'undefined') { + for(var key in request_data.field_to_name_array) { + if ( key.toLowerCase() != 'id' ) { + field_to_name_array_url += '&field_to_name[]='+encodeURIComponent(key.toLowerCase()); + } + } + } + if ( field_to_name_array_url ) { + URL+=field_to_name_array_url; + } + win = SUGAR.util.openWindow(URL, windowName, windowFeatures); if(window.focus) @@ -4167,7 +4207,9 @@ function set_return(popup_reply_data) { if (popupConfirm > -1) { set_return_basic(popup_reply_data,/\S/); - } + } else { + set_return_basic(popup_reply_data,/account/); + } } // Bug 48726 End else if(confirm(SUGAR.language.get('app_strings', 'NTC_OVERWRITE_ADDRESS_PHONE_CONFIRM') + '\n\n' + label_data_str)) diff --git a/jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js b/jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js index ac8bdf2c..1a8946bd 100644 --- a/jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js +++ b/jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js @@ -110,7 +110,7 @@ sw.MessageBox = { width: myConf.width + 'px', close: myConf.close, modal: myConf.modal, - visible: true, + visible: false, fixedcenter: true, constraintoviewport: true, draggable: true, diff --git a/jssource/src_files/modules/InboundEmail/InboundEmail.js b/jssource/src_files/modules/InboundEmail/InboundEmail.js index 672708bf..f56c1a6d 100644 --- a/jssource/src_files/modules/InboundEmail/InboundEmail.js +++ b/jssource/src_files/modules/InboundEmail/InboundEmail.js @@ -135,7 +135,7 @@ function ie_test_open_popup_with_submit(module_name, action, pageTarget, width, + '&email_user=' + words[0] + '&protocol=' + protocol + '&port=' + port - + '&email_password=' + words[1] + + '&email_password=' + encodeURIComponent(words[1]) + '&mailbox=' + words[2] + '&ssl=' + ssl + '&ie_id=' + ie_id @@ -232,7 +232,7 @@ function getFoldersListForInboundAccount(module_name, action, pageTarget, width, + '&email_user=' + words[0] + '&protocol=' + protocol + '&port=' + port - + '&email_password=' + words[1] + + '&email_password=' + encodeURIComponent(words[1]) + '&mailbox=' + words[2] + '&ssl=' + ssl + '&personal=' + isPersonal diff --git a/metadata/email_cacheMetaData.php b/metadata/email_cacheMetaData.php index 5433d75e..789bff45 100644 --- a/metadata/email_cacheMetaData.php +++ b/metadata/email_cacheMetaData.php @@ -51,7 +51,6 @@ $dictionary['email_cache'] = array( 'ie_id' => array( 'name' => 'ie_id', 'type' => 'id', - 'required' => 'true', ), 'mbox' => array( 'name' => 'mbox', diff --git a/modules/ACLRoles/EditAllBody.tpl b/modules/ACLRoles/EditAllBody.tpl index cd50a0c7..919b8061 100644 --- a/modules/ACLRoles/EditAllBody.tpl +++ b/modules/ACLRoles/EditAllBody.tpl @@ -48,11 +48,11 @@

- -{capture assign="other_attributes"}align="absmiddle" border="0" id="{{$idname}}_trigger"{/capture} -{sugar_getimage name="jscalendar" ext=".gif" alt="$APP.LBL_ENTER_DATE" other_attributes="$other_attributes"}  + +{capture assign="other_attributes"}alt="{$APP.LBL_ENTER_DATE}" style="position:relative; top:6px" border="0" id="{{$idname}}_trigger"{/capture} +{sugar_getimage name="jscalendar" ext=".gif" other_attributes="$other_attributes"}  {{if empty($displayParams.splitDateTime)}} diff --git a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl b/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl index 6ee9194e..26689557 100644 --- a/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl +++ b/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl @@ -56,8 +56,8 @@
{{if !$displayParams.hiddeCalendar}} -{capture assign="other_attributes"}align="absmiddle" border="0" id="{$id}_trigger"{/capture} -{sugar_getimage name="jscalendar" ext=".gif" alt="$APP.LBL_ENTER_DATE other_attributes=$other_attributes"} +{capture assign="other_attributes"}alt="{$APP.LBL_ENTER_DATE}" style="position:relative; top:6px" border="0" id="{$id}_trigger"{/capture} +{sugar_getimage name="jscalendar" ext=".gif" other_attributes="$other_attributes"} {{/if}} {{if $displayParams.showFormats}}  ({$USER_DATEFORMAT}) diff --git a/include/SugarFields/Fields/Datetimecombo/SearchView.tpl b/include/SugarFields/Fields/Datetimecombo/SearchView.tpl index e301117b..5c63706d 100644 --- a/include/SugarFields/Fields/Datetimecombo/SearchView.tpl +++ b/include/SugarFields/Fields/Datetimecombo/SearchView.tpl @@ -39,8 +39,8 @@
-{capture assign="other_attributes"}align="absmiddle" border="0" id="{{sugarvar key='name'}}_trigger"{/capture} -{sugar_getimage name="jscalendar" ext=".gif" alt="$APP.LBL_ENTER_DATE other_attributes=$other_attributes"}  +{capture assign="other_attributes"}alt="{$APP.LBL_ENTER_DATE}" style="position:relative; top:6px" border="0" id="{{sugarvar key='name'}}_trigger"{/capture} +{sugar_getimage name="jscalendar" ext=".gif" other_attributes="$other_attributes"}  {{if empty($displayParams.splitDateTime)}} diff --git a/include/SugarFields/Fields/Enum/SearchView.tpl b/include/SugarFields/Fields/Enum/SearchView.tpl index 8b4a515b..113ba5d3 100644 --- a/include/SugarFields/Fields/Enum/SearchView.tpl +++ b/include/SugarFields/Fields/Enum/SearchView.tpl @@ -36,4 +36,4 @@ *} {{capture name=display_size assign=size}}{{$displayParams.size|default:6}}{{/capture}} -{html_options name='{{$vardef.name}}[]' options={{sugarvar key='options' string=true}} size="{{$size}}" style="width: 150px" {{if $size > 1}}multiple="1"{{/if}} selected={{sugarvar key='value' string=true}}} +{html_options id='{{$vardef.name}}' name='{{$vardef.name}}[]' options={{sugarvar key='options' string=true}} size="{{$size}}" style="width: 150px" {{if $size > 1}}multiple="1"{{/if}} selected={{sugarvar key='value' string=true}}} diff --git a/include/SugarFields/Fields/File/SugarFieldFile.js b/include/SugarFields/Fields/File/SugarFieldFile.js index 4eb607d2..b076c38d 100644 --- a/include/SugarFields/Fields/File/SugarFieldFile.js +++ b/include/SugarFields/Fields/File/SugarFieldFile.js @@ -33,7 +33,7 @@ * "Powered by SugarCRM". ********************************************************************************/ if(typeof(SUGAR.field)=='undefined'){SUGAR.field=new Object();} -if(typeof(SUGAR.field.file)=='undefined'){SUGAR.field.file={deleteAttachment:function(elemBaseName,docTypeName,elem){ajaxStatus.showStatus(SUGAR.language.get("app_strings","LBL_REMOVING_ATTACHMENT"));elem.form.deleteAttachment.value=1;elem.form.action.value="EditView";var callback=SUGAR.field.file.deleteAttachmentCallbackGen(elemBaseName,docTypeName);var success=function(data){if(data){callback(data.responseText);}} +if(typeof(SUGAR.field.file)=='undefined'){SUGAR.field.file={deleteAttachment:function(elemBaseName,docTypeName,elem){ajaxStatus.showStatus(SUGAR.language.get("app_strings","LBL_REMOVING_ATTACHMENT"));elem.form.deleteAttachment.value=1;elem.form.action.value="deleteattachment";var callback=SUGAR.field.file.deleteAttachmentCallbackGen(elemBaseName,docTypeName);var success=function(data){if(data){callback(data.responseText);}} YAHOO.util.Connect.setForm(elem.form);var cObj=YAHOO.util.Connect.asyncRequest('POST','index.php',{success:success,failure:success});elem.form.deleteAttachment.value=0;elem.form.action.value="";},deleteAttachmentCallbackGen:function(elemBaseName,docTypeName){return function(text){if(text=='true'){document.getElementById(elemBaseName+'_new').style.display='';ajaxStatus.hideStatus();document.getElementById(elemBaseName+'_old').innerHTML='';if(docTypeName){document.getElementById(docTypeName).disabled=false;} document.getElementById(elemBaseName).value='';}else{document.getElementById(elemBaseName+'_new').style.display='none';ajaxStatus.flashStatus(SUGAR.language.get('app_strings','ERR_REMOVING_ATTACHMENT'),2000);}}},checkEapiLogin:function(res){var failedLogins=YAHOO.lang.JSON.parse(res.responseText);if(failedLogins.length==0){return;} for(var idx in failedLogins){if(confirm(failedLogins[idx].label)){window.open(failedLogins[idx].checkURL,'EAPM_CHECK_'+idx);}else{document.getElementById(res.argument.docTypeName).value='Sugar';document.getElementById(res.argument.docTypeName).onchange();}}},setupEapiShowHide:function(elemBaseName,docTypeName,formName){var externalSearchToggle=function(){var moreElem=document.getElementById(elemBaseName+"_more");var hideMore=(moreElem.style.display=='none');if(hideMore){moreElem.style.display='';document.getElementById(elemBaseName+'_less').style.display='none';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='none';document.getElementById(elemBaseName+'_file').disabled=false;}else{moreElem.style.display='none';document.getElementById(elemBaseName+'_less').style.display='';document.getElementById(elemBaseName+'_remoteNameSpan').style.display='';document.getElementById(elemBaseName+'_file').disabled=true;}} diff --git a/include/SugarFields/Fields/Float/DetailView.tpl b/include/SugarFields/Fields/Float/DetailView.tpl index ed7ddb2d..1547f049 100644 --- a/include/SugarFields/Fields/Float/DetailView.tpl +++ b/include/SugarFields/Fields/Float/DetailView.tpl @@ -36,7 +36,7 @@ *} -{sugar_number_format var={{sugarvar key='value' stringFormat='false'}} {{if !empty($vardef.precision)}}precision={{$vardef.precision}}{{/if}} } +{sugar_number_format var={{sugarvar key='value' stringFormat='false'}} {{if isset($vardef.precision)}}precision={{$vardef.precision}}{{/if}} } {{if !empty($displayParams.enableConnectors)}} {{sugarvar_connector view='DetailView'}} diff --git a/include/SugarFields/Fields/Float/EditView.tpl b/include/SugarFields/Fields/Float/EditView.tpl index 436d3919..b80d3e46 100644 --- a/include/SugarFields/Fields/Float/EditView.tpl +++ b/include/SugarFields/Fields/Float/EditView.tpl @@ -44,7 +44,7 @@ id='{{if empty($displayParams.idName)}}{{sugarvar key='name'}}{{else}}{{$displayParams.idName}}{{/if}}' size='{{$displayParams.size|default:30}}' {{if isset($displayParams.maxlength)}}maxlength='{{$displayParams.maxlength}}'{{elseif isset($vardef.len)}}maxlength='{{$vardef.len}}'{{/if}} -value='{sugar_number_format var=$value {{if !empty($vardef.precision)}}precision={{$vardef.precision}}{{/if}} }' +value='{sugar_number_format var=$value {{if isset($vardef.precision)}}precision={{$vardef.precision}}{{/if}} }' title='{{$vardef.help}}' tabindex='{{$tabindex}}' {{if !empty($displayParams.accesskey)}} accesskey='{{$displayParams.accesskey}}' {{/if}} diff --git a/include/SugarFields/Fields/Parent/SugarFieldParent.php b/include/SugarFields/Fields/Parent/SugarFieldParent.php index fab8c44a..507e7cfc 100644 --- a/include/SugarFields/Fields/Parent/SugarFieldParent.php +++ b/include/SugarFields/Fields/Parent/SugarFieldParent.php @@ -167,7 +167,7 @@ class SugarFieldParent extends SugarFieldRelate { $dynamicParentType = '{/literal}{if !empty($fields.parent_type.value)}{$fields.parent_type.value}{else}Accounts{/if}{literal}'; //Get the parent sqs definition - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName($formName); $sqsFieldArray = $qsd->getQSParent($dynamicParentTypePlaceHolder); $qsFieldName = $formName . "_" . $vardef['name']; @@ -211,4 +211,4 @@ class SugarFieldParent extends SugarFieldRelate { return isset($args[$key]) ? $args[$key] : ''; } } -?> \ No newline at end of file +?> diff --git a/include/SugarFields/Fields/Relate/SugarFieldRelate.php b/include/SugarFields/Fields/Relate/SugarFieldRelate.php index 59d8a4ba..a8940f80 100644 --- a/include/SugarFields/Fields/Relate/SugarFieldRelate.php +++ b/include/SugarFields/Fields/Relate/SugarFieldRelate.php @@ -326,6 +326,12 @@ class SugarFieldRelate extends SugarFieldBase { $focus->$idField = ''; } + // fixing bug #47722: Imports to Custom Relate Fields Do Not Work + if (!isset($vardef['table'])) + { + // Set target module table as the default table name + $vardef['table'] = $newbean->table_name; + } // be sure that the id isn't already set for this row if ( empty($focus->$idField) && $idField != $vardef['name'] diff --git a/include/SugarObjects/VardefManager.php b/include/SugarObjects/VardefManager.php index 2ca5c8e7..8f642e0d 100644 --- a/include/SugarObjects/VardefManager.php +++ b/include/SugarObjects/VardefManager.php @@ -161,7 +161,9 @@ class VardefManager{ if (empty($GLOBALS['dictionary'][$object])) $object = BeanFactory::getObjectName($module); $file = create_cache_directory('modules/' . $module . '/' . $object . 'vardefs.php'); - write_array_to_file('GLOBALS["dictionary"]["'. $object . '"]',$GLOBALS['dictionary'][$object], $file); + + $out="buildCache($module); + $df->buildCache($module, false); } //great! now that we have loaded all of our vardefs. diff --git a/include/SugarObjects/implements/assignable/language/en_us.lang.php b/include/SugarObjects/implements/assignable/language/en_us.lang.php index 62d86a78..9299efc1 100644 --- a/include/SugarObjects/implements/assignable/language/en_us.lang.php +++ b/include/SugarObjects/implements/assignable/language/en_us.lang.php @@ -36,5 +36,5 @@ $mod_strings = array( 'LBL_ASSIGNED_TO_ID'=>'Assigned User Id', -'LBL_ASSIGNED_TO_NAME' => 'User', +'LBL_ASSIGNED_TO_NAME' => 'Assigned to', ); \ No newline at end of file diff --git a/include/SugarObjects/templates/company/Company.php b/include/SugarObjects/templates/company/Company.php index 9789b94e..fe19f0d8 100644 --- a/include/SugarObjects/templates/company/Company.php +++ b/include/SugarObjects/templates/company/Company.php @@ -35,13 +35,23 @@ ********************************************************************************/ require_once('include/SugarObjects/templates/basic/Basic.php'); - class Company extends Basic{ - - function Company(){ + +class Company extends Basic +{ + /** + * Constructor + */ + public function Company() + { parent::Basic(); $this->emailAddress = new SugarEmailAddress(); } - function save($check_notify=false) { + + /** + * @see parent::save() + */ + public function save($check_notify=false) + { $this->add_address_streets('billing_address_street'); $this->add_address_streets('shipping_address_street'); $ori_in_workflow = empty($this->in_workflow) ? false : true; @@ -63,14 +73,22 @@ require_once('include/SugarObjects/templates/basic/Basic.php'); return $this; } - function retrieve($id = -1, $encode=true) { - $ret_val = parent::retrieve($id, $encode); - $this->emailAddress->handleLegacyRetrieve($this); - return $ret_val; + /** + * Populate email address fields here instead of retrieve() so that they are properly available for logic hooks + * + * @see parent::fill_in_relationship_fields() + */ + public function fill_in_relationship_fields() + { + parent::fill_in_relationship_fields(); + $this->emailAddress->handleLegacyRetrieve($this); } - function get_list_view_data() { - + /** + * @see parent::get_list_view_data() + */ + public function get_list_view_data() + { global $system_config; global $current_user; $temp_array = $this->get_list_view_array(); @@ -78,6 +96,4 @@ require_once('include/SugarObjects/templates/basic/Basic.php'); $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView'); return $temp_array; } - - } -?> +} diff --git a/include/SugarObjects/templates/company/metadata/detailviewdefs.php b/include/SugarObjects/templates/company/metadata/detailviewdefs.php index 29506984..1d358716 100644 --- a/include/SugarObjects/templates/company/metadata/detailviewdefs.php +++ b/include/SugarObjects/templates/company/metadata/detailviewdefs.php @@ -60,7 +60,7 @@ $viewdefs[$module_name]['DetailView'] = array( array($_object_name . '_type', 'annual_revenue'), array('team_name', array('name'=>'date_modified', 'label'=>'LBL_DATE_MODIFIED', 'customCode'=>'{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}')), - array(array('name'=>'assigned_user_name', 'label'=>'LBL_ASSIGNED_TO'), + array(array('name'=>'assigned_user_name', 'label'=>'LBL_ASSIGNED_TO_NAME'), array('name'=>'date_entered', 'customCode'=>'{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}')), array ( array ( diff --git a/include/SugarObjects/templates/file/File.php b/include/SugarObjects/templates/file/File.php index 1c3ca6e0..4d997952 100644 --- a/include/SugarObjects/templates/file/File.php +++ b/include/SugarObjects/templates/file/File.php @@ -97,12 +97,48 @@ class File extends Basic /** * @see SugarBean::retrieve() */ - public function retrieve($id = -1, $encode=true) + public function retrieve($id = -1, $encode=true, $deleted=true) { - $ret_val = parent::retrieve($id, $encode); + $ret_val = parent::retrieve($id, $encode, $deleted); $this->name = $this->document_name; return $ret_val; } + + /** + * Method to delete an attachment + * + * @param string $isduplicate + * @return bool + */ + public function deleteAttachment($isduplicate = "false") + { + if ($this->ACLAccess('edit')) { + if ($isduplicate == "true") { + return true; + } + $removeFile = "upload://{$this->id}"; + } + if (file_exists($removeFile)) { + if (!unlink($removeFile)) { + $GLOBALS['log']->error("*** Could not unlink() file: [ {$removeFile} ]"); + } else { + $this->uploadfile = '';$this->uploadfile = ''; + $this->filename = ''; + $this->file_mime_type = ''; + $this->file_ext = ''; + $this->save(); + return true; + } + } else { + $this->uploadfile = ''; + $this->filename = ''; + $this->file_mime_type = ''; + $this->file_ext = ''; + $this->save(); + return true; + } + return false; + } } diff --git a/include/SugarObjects/templates/file/vardefs.php b/include/SugarObjects/templates/file/vardefs.php index da1be74e..6291a383 100644 --- a/include/SugarObjects/templates/file/vardefs.php +++ b/include/SugarObjects/templates/file/vardefs.php @@ -96,7 +96,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 'vname' => 'LBL_FILE_UPLOAD', 'type' => 'file', 'source' => 'non-db', - 'noChange' => true, + //'noChange' => true, // jwhitcraft BUG44657 - Take this out as it was causing the remove button not to show up on custom modules ), 'active_date' => diff --git a/include/SugarObjects/templates/person/Person.php b/include/SugarObjects/templates/person/Person.php index 85562519..bed0e7ff 100644 --- a/include/SugarObjects/templates/person/Person.php +++ b/include/SugarObjects/templates/person/Person.php @@ -35,37 +35,49 @@ ********************************************************************************/ - require_once('include/SugarObjects/templates/basic/Basic.php'); - class Person extends Basic { var $picture; - //Variable to control whether or not to invoke the getLocalFormatttedName method with title and salutation + /** + * @var bool controls whether or not to invoke the getLocalFormatttedName method with title and salutation + */ var $createLocaleFormattedName = true; - function Person(){ + public function Person() + { parent::Basic(); $this->emailAddress = new SugarEmailAddress(); } - // need to override to have a name field created for this class - function retrieve($id = -1, $encode=true) { - $ret_val = parent::retrieve($id, $encode); + /** + * need to override to have a name field created for this class + * + * @see parent::retrieve() + */ + public function retrieve($id = -1, $encode=true, $deleted=true) { + $ret_val = parent::retrieve($id, $encode, $deleted); $this->_create_proper_name_field(); - $this->emailAddress->handleLegacyRetrieve($this); return $ret_val; } + /** + * Populate email address fields here instead of retrieve() so that they are properly available for logic hooks + * + * @see parent::fill_in_relationship_fields() + */ + public function fill_in_relationship_fields() + { + parent::fill_in_relationship_fields(); + $this->emailAddress->handleLegacyRetrieve($this); + } /** - * _create_proper_name_field - * - * This function helps generate the name and full_name member field variables from the salutation, title, first_name and last_name fields. + * This function helps generate the name and full_name member field variables from the salutation, title, first_name and last_name fields. * It takes into account the locale format settings as well as ACL settings if supported. */ - function _create_proper_name_field() + public function _create_proper_name_field() { global $locale, $app_list_strings; @@ -109,7 +121,11 @@ class Person extends Basic } - function save($check_notify=false) { + /** + * @see parent::save() + */ + public function save($check_notify=false) + { //If we are saving due to relationship changes, don't bother trying to update the emails if(!empty($GLOBALS['resavingRelatedBeans'])) { @@ -137,13 +153,20 @@ class Person extends Basic return $this->id; } - function get_summary_text() { + /** + * @see parent::get_summary_text() + */ + public function get_summary_text() + { $this->_create_proper_name_field(); return $this->name; } - function get_list_view_data() { - + /** + * @see parent::get_list_view_data() + */ + public function get_list_view_data() + { global $system_config; global $current_user; $this->_create_proper_name_field(); @@ -184,5 +207,3 @@ class Person extends Basic } } } - -?> diff --git a/include/SugarPHPMailer.php b/include/SugarPHPMailer.php index e2fc8fbb..cbffcd28 100644 --- a/include/SugarPHPMailer.php +++ b/include/SugarPHPMailer.php @@ -101,7 +101,7 @@ class SugarPHPMailer extends PHPMailer require_once("include/OutboundEmail/OutboundEmail.php"); $oe = new OutboundEmail(); - $oe = $oe->getUserMailerSettings($current_user, $mailer_id, $ieId); + $oe = $oe->getUserMailerSettings($current_user); // ssl or tcp - keeping outside isSMTP b/c a default may inadvertantly set ssl:// $this->protocol = ($oe->mail_smtpssl) ? "ssl://" : "tcp://"; diff --git a/include/SugarTheme/SugarTheme.php b/include/SugarTheme/SugarTheme.php index fb59dc6f..ac8783a5 100644 --- a/include/SugarTheme/SugarTheme.php +++ b/include/SugarTheme/SugarTheme.php @@ -985,7 +985,7 @@ EOHTML; $defaultFileName = $this->getDefaultJSPath().'/'.$jsFileName; if (isset($this->parentTheme) && SugarThemeRegistry::get($this->parentTheme) instanceOf SugarTheme - && ($filename = SugarThemeRegistry::get($this->parentTheme)->getJSURL($jsFileName,false)) != '') { + && ($filename = SugarThemeRegistry::get($this->parentTheme)->getJSURL($jsFileName,false)) != '' && !in_array($jsFileName,$this->ignoreParentFiles)) { $jsFileContents .= file_get_contents($filename); } else { if (sugar_is_file($defaultFileName)) diff --git a/include/SugarTinyMCE.php b/include/SugarTinyMCE.php index b7342af7..bed3cdc8 100644 --- a/include/SugarTinyMCE.php +++ b/include/SugarTinyMCE.php @@ -53,30 +53,31 @@ class SugarTinyMCE { var $buttonConfigs = array( 'default' => array( 'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright, - justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", + justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", 'buttonConfig2' => "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent, indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap, - visualaid", + visualaid", 'buttonConfig3' => "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,inserttime,separator,preview"), 'email_compose' => array( 'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright, - justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", - 'buttonConfig2' => "", + justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", + 'buttonConfig2' => "", 'buttonConfig3' => ""), 'email_compose_light' => array( 'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright, - justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", - 'buttonConfig2' => "", + justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", + 'buttonConfig2' => "", 'buttonConfig3' => ""), ); - + var $pluginsConfig = array( 'email_compose_light' => 'insertdatetime,paste,directionality,safari', 'email_compose' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality,fullpage', ); - + var $defaultConfig = array( 'convert_urls' => false, + 'valid_children' => '+body[style]', 'height' => 300, 'width' => '100%', 'theme' => 'advanced', @@ -90,7 +91,7 @@ class SugarTinyMCE { 'language' => 'en', 'plugins' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality', 'elements' => '', - 'extended_valid_elements' => 'style,hr[class|width|size|noshade],@[class|style]', + 'extended_valid_elements' => 'style[dir|lang|media|title|type],hr[class|width|size|noshade],@[class|style]', 'content_css' => 'include/javascript/tiny_mce/themes/advanced/skins/default/content.css', ); diff --git a/include/TemplateHandler/TemplateHandler.php b/include/TemplateHandler/TemplateHandler.php index 58f3ec23..6afff108 100644 --- a/include/TemplateHandler/TemplateHandler.php +++ b/include/TemplateHandler/TemplateHandler.php @@ -299,14 +299,23 @@ class TemplateHandler { * This function creates the $sqs_objects array that will be used by the quicksearch Javascript * code. The $sqs_objects array is wrapped in a $json->encode call. * - * @param $def The vardefs.php definitions - * @param $defs2 The Meta-Data file definitions - * + * @param array $def The vardefs.php definitions + * @param array $defs2 The Meta-Data file definitions + * @param string $view + * @param strign $module + * @return string */ - function createQuickSearchCode($defs, $defs2, $view = '', $module='') { + public function createQuickSearchCode($defs, $defs2, $view = '', $module='') + { $sqs_objects = array(); require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + if(isset($this) && $this instanceof TemplateHandler) //If someone calls createQuickSearchCode as a static method (@see ImportViewStep3) $this becomes anoter object, not TemplateHandler + { + $qsd = QuickSearchDefaults::getQuickSearchDefaults($this->getQSDLookup()); + }else + { + $qsd = QuickSearchDefaults::getQuickSearchDefaults(array()); + } $qsd->setFormName($view); if(preg_match('/^SearchForm_.+/', $view)){ if(strpos($view, 'popup_query_form')){ @@ -385,7 +394,6 @@ class TemplateHandler { $name = $qsd->form_name . '_' . $field['name']; - if($field['type'] == 'relate' && isset($field['module']) && (preg_match('/_name$|_c$/si',$name) || !empty($field['quicksearch']))) { if(!preg_match('/_c$/si',$name) && preg_match('/^(Campaigns|Teams|Users|Contacts|Accounts)$/si', $field['module'], $matches)) { @@ -458,5 +466,15 @@ class TemplateHandler { return ''; } + + /** + * Get lookup array for QuickSearchDefaults custom class + * @return array + * @see QuickSearchDefaults::getQuickSearchDefaults() + */ + protected function getQSDLookup() + { + return array(); + } } ?> diff --git a/include/TimeDate.php b/include/TimeDate.php index 11135f98..495009a6 100644 --- a/include/TimeDate.php +++ b/include/TimeDate.php @@ -1876,7 +1876,7 @@ class TimeDate /** * AMPMMenu - * This method renders a '; + + $sql = 'SELECT id, ' . $layout_def['rname'] . ' title FROM ' . $layout_def['table'] . ' WHERE deleted = 0 ORDER BY title ASC'; + $result = $this->reporter->db->query($sql); + while ($row = $this->reporter->db->fetchByAssoc($result)) + { + $html .= '
'.$mod_strings['LBL_CHECKSYS_ZIP'].''.$zipStatus.'
- - + + -{foreach from=$ACTION_NAMES item="ACTION_NAME" } - +{foreach from=$ACTION_NAMES item="ACTION_LABEL" key="ACTION_NAME"} + {foreachelse} @@ -67,8 +67,8 @@ {if $APP_LIST.moduleList[$CATEGORY_NAME]!='Users'} - - + {/if} diff --git a/modules/Accounts/AccountFormBase.php b/modules/Accounts/AccountFormBase.php index 5f60b7e4..39a17d70 100644 --- a/modules/Accounts/AccountFormBase.php +++ b/modules/Accounts/AccountFormBase.php @@ -194,12 +194,12 @@ function buildTableForm($rows, $mod='Accounts'){ if ($action == 'ShowDuplicates') { $return_action = 'ListView'; // cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel $return_action = (isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action'])) ? $_REQUEST['return_action'] : $return_action; - $form .= "\n"; + $form .= "\n"; if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) $form .= ""; else if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) - $form .= ""; + $form .= ""; else $form .= ""; } else { diff --git a/modules/Accounts/metadata/popupdefs.php b/modules/Accounts/metadata/popupdefs.php index 34819202..e998c538 100644 --- a/modules/Accounts/metadata/popupdefs.php +++ b/modules/Accounts/metadata/popupdefs.php @@ -52,7 +52,7 @@ $popupMeta = array( 'formBase' => 'AccountFormBase.php', 'formBaseClass' => 'AccountFormBase', 'getFormBodyParams' => array('','','AccountSave'), - 'createButton' => $mod_strings['LNK_NEW_ACCOUNT'] + 'createButton' => 'LNK_NEW_ACCOUNT' ), 'listviewdefs' => array( 'NAME' => array( diff --git a/modules/Accounts/tpls/QuickCreate.tpl b/modules/Accounts/tpls/QuickCreate.tpl index b7a67684..84ed7312 100644 --- a/modules/Accounts/tpls/QuickCreate.tpl +++ b/modules/Accounts/tpls/QuickCreate.tpl @@ -1,5 +1,4 @@ {* - /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. @@ -35,56 +34,60 @@ * "Powered by SugarCRM". ********************************************************************************/ - - - *} - - - - - - - - - - - - - - - - - +
{$ACTION_NAME}
{$ACTION_LABEL}
 
+
{if $APP_LIST.moduleList[$CATEGORY_NAME]=='Users'} {$MOD.LBL_USER_NAME_FOR_ROLE} {elseif !empty($APP_LIST.moduleList[$CATEGORY_NAME])} @@ -82,7 +82,7 @@ {foreach from=$TYPES item="ACTIONS"} {foreach from=$ACTIONS item="ACTION" key="ACTION_NAME_ACTIVE"} {if $ACTION_NAME==$ACTION_NAME_ACTIVE} - + +
N/A
- - - - -
- - - {$APP.LBL_REQUIRED_SYMBOL} {$APP.NTC_REQUIRED}
- + + +
- - - - - - - - - - - - - - - -

{$MOD.LBL_ACCOUNT_INFORMATION}

{$MOD.LBL_ACCOUNT_NAME} {$APP.LBL_REQUIRED_SYMBOL}{$MOD.LBL_PHONE}
{$MOD.LBL_WEBSITE}{$MOD.LBL_EMAIL}
- - \ No newline at end of file + +{if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"} + +{else} + +{/if} + + + + + + +{if !empty($smarty.request.return_module)} + + +{/if} + +{{if isset($form.hidden)}} +{{foreach from=$form.hidden item=field}} +{{$field}} +{{/foreach}} +{{/if}} + +{* -- Begin QuickCreate Specific -- *} +{if $smarty.request.action != 'SubpanelEdits'} + + + + + +{/if} + + +{* -- End QuickCreate Specific -- *} + +{{if empty($form.button_location) || $form.button_location == 'top'}} +{{if !empty($form) && !empty($form.buttons)}} + {{foreach from=$form.buttons key=val item=button}} + {{sugar_button module="$module" id="$button" view="$view"}} + {{/foreach}} +{{else}} +{{sugar_button module="$module" id="SAVE" view="$view"}} +{{sugar_button module="$module" id="CANCEL" view="$view"}} +{{/if}} +{{if empty($form.hideAudit) || !$form.hideAudit}} +{{sugar_button module="$module" id="Audit" view="$view"}} +{{/if}} +{{/if}} +
{{$ADMIN_EDIT}}
\ No newline at end of file diff --git a/modules/Accounts/views/view.edit.php b/modules/Accounts/views/view.edit.php new file mode 100644 index 00000000..368c4c0b --- /dev/null +++ b/modules/Accounts/views/view.edit.php @@ -0,0 +1,49 @@ +useForSubpanel = true; + $this->useModuleQuickCreateTemplate = true; + } + +} \ No newline at end of file diff --git a/modules/Administration/Async.php b/modules/Administration/Async.php index 1d4aeb3e..d644e10e 100644 --- a/modules/Administration/Async.php +++ b/modules/Administration/Async.php @@ -129,7 +129,7 @@ switch($_REQUEST['adminAction']) { foreach($ids as $id) { if(!empty($id)) { $bean = new $beanList[$target](); - $bean->retrieve($id); + $bean->retrieve($id,true,false); $bean->new_with_id = false; $bean->save(); // cleanBean() is called on save() $count++; diff --git a/modules/Administration/SupportPortal.php b/modules/Administration/SupportPortal.php index bb0077d5..0b48d141 100644 --- a/modules/Administration/SupportPortal.php +++ b/modules/Administration/SupportPortal.php @@ -212,11 +212,9 @@ switch ($_REQUEST['view']) { } //$send_module = $sendModuleMap[strtolower($send_module)]; } - $sendUrl = "http://www.sugarcrm.com/crm/product_doc.php?edition={$send_edition}&version={$send_version}&lang={$send_lang}&module={$send_module}&help_action={$send_action}&status={$dev_status}&key={$send_key}&anchor={$send_anchor}"; - if(!empty($send_anchor)){ - $sendUrl .= "&anchor=".$send_anchor; - } - $iframe_url = $sendUrl; + + + $iframe_url = get_help_url($send_edition, $send_version, $send_lang, $send_module, $send_action, $dev_status, $send_key, $send_anchor); header("Location: {$iframe_url}"); diff --git a/modules/Administration/UpgradeWizard_prepare.php b/modules/Administration/UpgradeWizard_prepare.php index 56ff765e..c4f573c1 100644 --- a/modules/Administration/UpgradeWizard_prepare.php +++ b/modules/Administration/UpgradeWizard_prepare.php @@ -106,7 +106,7 @@ if(!empty($GLOBALS['sugar_config']['moduleInstaller']['packageScan']) && $instal } // assumption -- already validated manifest.php at time of upload -require_once( "$unzip_dir/manifest.php" ); +require( "$unzip_dir/manifest.php" ); diff --git a/modules/Audit/Audit.php b/modules/Audit/Audit.php index 8cc2e174..16093640 100644 --- a/modules/Audit/Audit.php +++ b/modules/Audit/Audit.php @@ -148,6 +148,13 @@ class Audit extends SugarBean { $temp_list[$field['name']]=$timedate->to_display_date($temp_list[$field['name']], false); } } + elseif(($field['name'] == 'before_value_string' || $field['name'] == 'after_value_string') && ($row['data_type'] == "datetimecombo")) { + if (!empty($temp_list[$field['name']]) && $temp_list[$field['name']] != 'NULL') { + $temp_list[$field['name']]=$timedate->to_display_date_time($temp_list[$field['name']]); + } else { + $temp_list[$field['name']] = ''; + } + } elseif($field['name'] == 'field_name') { global $mod_strings; diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index 03cef523..548b8130 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -347,8 +347,8 @@ class Calendar { else $sign = "+"; - if($this->view == 'month'){ - $day = $this->date_time->get($sign."1 month")->get_day_begin(1); + if($this->view == 'month'){ + $day = $this->date_time->get_day_by_index_this_month(0)->get($sign."1 month")->get_day_begin(1); }else if($this->view == 'week' || $this->view == 'shared'){ $day = CalendarUtils::get_first_day_of_week($this->date_time); $day = $day->get($sign."7 days"); diff --git a/modules/Calendar/tpls/shared_users.tpl b/modules/Calendar/tpls/shared_users.tpl index b653ac9b..4e09e7c1 100644 --- a/modules/Calendar/tpls/shared_users.tpl +++ b/modules/Calendar/tpls/shared_users.tpl @@ -37,7 +37,7 @@ *}
-
+
{/literal}{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINUTES}', + 'customCode' => '{literal}{/literal}{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINUTES}', ), array ( diff --git a/modules/Calls/tpls/footer.tpl b/modules/Calls/tpls/footer.tpl index ca5e1a5e..2453d899 100644 --- a/modules/Calls/tpls/footer.tpl +++ b/modules/Calls/tpls/footer.tpl @@ -85,6 +85,19 @@ callsLoader.addModule({ requires: [] }); callsLoader.insert(); +YAHOO.util.Event.onContentReady("{/literal}{{$form_name}}{literal}",function() { + var durationHours = document.getElementById('duration_hours'); + if (durationHours) { + document.getElementById('duration_minutes').tabIndex = durationHours.tabIndex; + } + + var reminderChecked = document.getElementsByName('reminder_checked'); + for(i=0;i diff --git a/modules/Calls/vardefs.php b/modules/Calls/vardefs.php index 3405431b..c5db6349 100644 --- a/modules/Calls/vardefs.php +++ b/modules/Calls/vardefs.php @@ -237,6 +237,14 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'source'=>'non-db', 'vname'=>'LBL_LEADS', ), + // Bug #42619 Missed back-relation from Project module + 'project'=> array ( + 'name' => 'project', + 'type' => 'link', + 'relationship' => 'projects_calls', + 'source' => 'non-db', + 'vname' => 'LBL_PROJECTS' + ), 'case' => array ( 'name' => 'case', diff --git a/modules/CampaignTrackers/EditView.html b/modules/CampaignTrackers/EditView.html index c3013d7c..f6c70cda 100644 --- a/modules/CampaignTrackers/EditView.html +++ b/modules/CampaignTrackers/EditView.html @@ -50,7 +50,7 @@ - + {APP.LBL_REQUIRED_SYMBOL} {APP.NTC_REQUIRED} {ADMIN_EDIT} diff --git a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php index ffa45e40..a65ec03a 100644 --- a/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php +++ b/modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.php @@ -70,7 +70,8 @@ class TopCampaignsDashlet extends Dashlet $qry = "SELECT C.name AS campaign_name, SUM(O.amount) AS revenue, C.id as campaign_id " . "FROM campaigns C, opportunities O " . "WHERE C.id = O.campaign_id " . - "AND O.sales_stage = 'Closed Won' " . + "AND O.sales_stage = 'Closed Won' " . + "AND O.deleted = 0 " . "GROUP BY C.name,C.id ORDER BY revenue desc"; $result = $this->seedBean->db->limitQuery($qry, 0, 10); diff --git a/modules/Campaigns/Delete.php b/modules/Campaigns/Delete.php index 2e9cce39..bfc00d7d 100644 --- a/modules/Campaigns/Delete.php +++ b/modules/Campaigns/Delete.php @@ -44,28 +44,18 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ if(!isset($_REQUEST['record'])) +{ sugar_die("A record number must be specified to delete the campaign."); - - +} $focus = new Campaign(); $focus->retrieve($_REQUEST['record']); -if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { +if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { //deletes all data associated with the test run. - $query = "UPDATE emails SET emails.deleted=1 WHERE id IN ( - SELECT related_id FROM campaign_log INNER JOIN prospect_lists - ON campaign_log.list_id = prospect_lists.id - AND prospect_lists.list_type='test' - AND campaign_log.campaign_id = '{$focus->id}')"; - $focus->db->query($query); - - $query="DELETE FROM emailman WHERE list_id IN ( - SELECT prospect_list_id FROM prospect_list_campaigns INNER JOIN prospect_lists - ON prospect_list_campaigns.prospect_list_id = prospect_lists.id - AND prospect_lists.list_type='test' - AND prospect_list_campaigns.campaign_id = '{$focus->id}')"; - $focus->db->query($query); + require_once('modules/Campaigns/DeleteTestCampaigns.php'); + $deleteTest = new DeleteTestCampaigns(); + $deleteTest->deleteTestRecords($focus); } else { if(!$focus->ACLAccess('Delete')){ ACLController::displayNoAccess(true); @@ -73,6 +63,7 @@ if (isset($_REQUEST['mode']) and $_REQUEST['mode']=='Test') { } $focus->mark_deleted($_REQUEST['record']); } + $return_id=!empty($_REQUEST['return_id'])?$_REQUEST['return_id']:$focus->id; require_once ('include/formbase.php'); handleRedirect($return_id, $_REQUEST['return_module']); \ No newline at end of file diff --git a/modules/Campaigns/DeleteTestCampaigns.php b/modules/Campaigns/DeleteTestCampaigns.php new file mode 100644 index 00000000..cec7899b --- /dev/null +++ b/modules/Campaigns/DeleteTestCampaigns.php @@ -0,0 +1,85 @@ +id)) + { + return; + } + + $res = $focus->db->query("SELECT DISTINCT campaign_log.related_id emailid, prospect_lists.id as listid FROM campaign_log + JOIN prospect_lists on campaign_log.list_id = prospect_lists.id + WHERE campaign_log.campaign_id = '{$focus->id}' AND prospect_lists.list_type='test'"); + $test_ids = array(); + $test_list_ids = array(); + while($row = $focus->db->fetchByAssoc($res)) { + $test_ids[] = $row['emailid']; + $test_list_ids[$row['listid']] = true; + } + $test_list_ids = array_keys($test_list_ids); + unset($res); + if(!empty($test_ids)) { + $focus->db->query("UPDATE emails SET deleted=1 WHERE id IN ('".join("','", $test_ids)."')"); + } + + if(!empty($test_list_ids)) { + $query = "DELETE FROM emailman WHERE campaign_id = '{$focus->id}' AND list_id IN ('".join("','", $test_list_ids)."')"; + $focus->db->query($query); + + $query = "UPDATE campaign_log SET deleted=1 WHERE campaign_id = '{$focus->id}' AND list_id IN ('".join("','", $test_list_ids)."')"; + + $focus->db->query($query); + } +} + +} \ No newline at end of file diff --git a/modules/Campaigns/GenerateWebToLeadForm.php b/modules/Campaigns/GenerateWebToLeadForm.php index 5cc5ac7c..9522c081 100644 --- a/modules/Campaigns/GenerateWebToLeadForm.php +++ b/modules/Campaigns/GenerateWebToLeadForm.php @@ -167,6 +167,12 @@ for($i= 0; $i<$columns;$i++){ else{ $field_type= $lead->field_defs[$colsFirstField]['type']; } + + //bug: 47574 - make sure, that webtolead_email1 field has same required attribute as email1 field + if($colsFirstField == 'webtolead_email1' && isset($lead->field_defs['email1']) && isset($lead->field_defs['email1']['required'])){ + $lead->field_defs['webtolead_email1']['required'] = $lead->field_defs['email1']['required']; + } + $field_required = ''; if(isset($lead->field_defs[$colsFirstField]['required']) && $lead->field_defs[$colsFirstField]['required'] != null && $lead->field_defs[$colsFirstField]['required'] != 0) @@ -195,6 +201,12 @@ for($i= 0; $i<$columns;$i++){ else{ $field1_type= $lead->field_defs[$colsSecondField]['type']; } + + //bug: 47574 - make sure, that webtolead_email1 field has same required attribute as email1 field + if($colsSecondField == 'webtolead_email1' && isset($lead->field_defs['email1']) && isset($lead->field_defs['email1']['required'])){ + $lead->field_defs['webtolead_email1']['required'] = $lead->field_defs['email1']['required']; + } + $field1_required = ''; if(isset($lead->field_defs[$colsSecondField]['required']) && $lead->field_defs[$colsSecondField]['required'] != null && $lead->field_defs[$colsSecondField]['required'] != 0){ @@ -315,7 +327,11 @@ for($i= 0; $i<$columns;$i++){ else{ $Web_To_Lead_Form_html .= "$field_label"; } - $Web_To_Lead_Form_html .= ""; + if ( $field_name=='email1'||$field_name=='email2' ){ + $Web_To_Lead_Form_html .= ""; + } else { + $Web_To_Lead_Form_html .= ""; + } } if ( $field_type == 'text' ) { $Web_To_Lead_Form_html .= "$field_label"; @@ -439,7 +455,12 @@ for($i= 0; $i<$columns;$i++){ else{ $Web_To_Lead_Form_html .= "$field1_label"; } - $Web_To_Lead_Form_html .= ""; + if ( $field1_name=='email1'||$field1_name=='email2' ){ + $Web_To_Lead_Form_html .= ""; + } else { + $Web_To_Lead_Form_html .= ""; + } + } if ( $field1_type == 'text' ) { $Web_To_Lead_Form_html .= "$field1_label"; @@ -559,13 +580,13 @@ $Web_To_Lead_Form_html .=" \ No newline at end of file diff --git a/modules/Campaigns/WebToLeadCapture.php b/modules/Campaigns/WebToLeadCapture.php index 3178c65a..ef4488a3 100644 --- a/modules/Campaigns/WebToLeadCapture.php +++ b/modules/Campaigns/WebToLeadCapture.php @@ -63,8 +63,18 @@ if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) { $camp_query = "select name,id from campaigns where id='$campaign_id'"; $camp_query .= " and deleted=0"; $camp_result=$campaign->db->query($camp_query); - $camp_data=$campaign->db->fetchByAssoc($camp_result); - + $camp_data = $campaign->db->fetchByAssoc($camp_result); + // Bug 41292 - have to select marketing_id for new lead + $db = DBManagerFactory::getInstance(); + $marketing = new EmailMarketing(); + $marketing_query = $marketing->create_new_list_query( + 'date_start desc, date_modified desc', + "campaign_id = '{$campaign_id}' and status = 'active' and date_start < " . $db->convert('', 'today'), + array('id') + ); + $marketing_result = $db->limitQuery($marketing_query, 0, 1, true); + $marketing_data = $db->fetchByAssoc($marketing_result); + // .Bug 41292 if (isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id'])) { $current_user = new User(); $current_user->retrieve($_REQUEST['assigned_user_id']); @@ -84,6 +94,11 @@ if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) { } $GLOBALS['check_notify'] = true; + //bug: 47574 - make sure, that webtolead_email1 field has same required attribute as email1 field + if(isset($lead->required_fields['email1'])){ + $lead->required_fields['webtolead_email1'] = $lead->required_fields['email1']; + } + //bug: 42398 - have to unset the id from the required_fields since it is not populated in the $_POST unset($lead->required_fields['id']); unset($lead->required_fields['team_name']); @@ -102,16 +117,34 @@ if (isset($_POST['campaign_id']) && !empty($_POST['campaign_id'])) { $camplog->target_type = $lead->module_dir; $campaign_log->activity_date=$timedate->now(); $camplog->target_id = $lead->id; + if(isset($marketing_data['id'])) + { + $camplog->marketing_id = $marketing_data['id']; + } $camplog->save(); //link campaignlog and lead - if(isset($_POST['webtolead_email1']) && $_POST['webtolead_email1'] != null){ + if (isset($_POST['email1']) && $_POST['email1'] != null) + { + $lead->email1 = $_POST['email1']; + } + //in case there are old forms used webtolead_email1 + elseif (isset($_POST['webtolead_email1']) && $_POST['webtolead_email1'] != null) + { $lead->email1 = $_POST['webtolead_email1']; - } - if(isset($_POST['webtolead_email2']) && $_POST['webtolead_email2'] != null){ + } + + if (isset($_POST['email2']) && $_POST['email2'] != null) + { + $lead->email2 = $_POST['email2']; + } + //in case there are old forms used webtolead_email2 + elseif (isset($_POST['webtolead_email2']) && $_POST['webtolead_email2'] != null) + { $lead->email2 = $_POST['webtolead_email2']; - } + } + $lead->load_relationship('campaigns'); $lead->campaigns->add($camplog->id); if(!empty($GLOBALS['check_notify'])) { @@ -221,4 +254,4 @@ if (!empty($_POST['redirect'])) { echo $mod_strings['LBL_SERVER_IS_CURRENTLY_UNAVAILABLE']; -?> \ No newline at end of file +?> diff --git a/modules/Campaigns/WebToLeadCreation.php b/modules/Campaigns/WebToLeadCreation.php index fefb7f0c..56e92513 100644 --- a/modules/Campaigns/WebToLeadCreation.php +++ b/modules/Campaigns/WebToLeadCreation.php @@ -137,11 +137,16 @@ $xtpl->assign("CANCEL_BUTTON", $cancel_buttons_html ); $field_defs_js = "var field_defs = {'Contacts':["; +//bug: 47574 - make sure, that webtolead_email1 field has same required attribute as email1 field +if(isset($lead->field_defs['webtolead_email1']) && isset($lead->field_defs['email1']) && isset($lead->field_defs['email1']['required'])){ + $lead->field_defs['webtolead_email1']['required'] = $lead->field_defs['email1']['required']; +} + $count= 0; foreach($lead->field_defs as $field_def) { $email_fields = false; - if($field_def['name']== 'webtolead_email1' || $field_def['name']== 'webtolead_email2') + if($field_def['name']== 'email1' || $field_def['name']== 'email2') { $email_fields = true; } @@ -190,7 +195,7 @@ $xtpl->assign("WEB_POST_URL",$web_post_url); //$xtpl->assign("LEAD_SELECT_FIELDS",'MOD.LBL_SELECT_LEAD_FIELDS'); require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array('account_name' => $qsd->getQSParent(), 'assigned_user_name' => $qsd->getQSUser(), 'campaign_name' => $qsd->getQSCampaigns(), @@ -305,4 +310,4 @@ function get_webtolead_title( ) { return $GLOBALS['current_view']->getModuleTitle($show_help); -} \ No newline at end of file +} diff --git a/modules/Campaigns/WizardEmailSetup.html b/modules/Campaigns/WizardEmailSetup.html index fde50b50..8d12fcbd 100644 --- a/modules/Campaigns/WizardEmailSetup.html +++ b/modules/Campaigns/WizardEmailSetup.html @@ -170,7 +170,7 @@ {$MOD.LBL_LOCATION_TRACK} {$APP.LBL_REQUIRED_SYMBOL} - {$MOD.LBL_DEFAULT_LOCATION} {$MOD.LBL_CUSTOM_LOCATION} + {$MOD.LBL_DEFAULT_LOCATION} {$MOD.LBL_CUSTOM_LOCATION} diff --git a/modules/Campaigns/WizardMarketing.html b/modules/Campaigns/WizardMarketing.html index c5a460f3..c0a45911 100644 --- a/modules/Campaigns/WizardMarketing.html +++ b/modules/Campaigns/WizardMarketing.html @@ -376,6 +376,8 @@ function determine_back(){ {$JAVASCRIPT} diff --git a/modules/Campaigns/WizardNewsletter.php b/modules/Campaigns/WizardNewsletter.php index 233a50d9..c0175046 100644 --- a/modules/Campaigns/WizardNewsletter.php +++ b/modules/Campaigns/WizardNewsletter.php @@ -96,7 +96,7 @@ if (empty($_REQUEST['return_id'])) { $ss->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName('wizform'); $sqs_objects = array('parent_name' => $qsd->getQSParent(), 'assigned_user_name' => $qsd->getQSUser(), diff --git a/modules/Campaigns/metadata/detailviewdefs.php b/modules/Campaigns/metadata/detailviewdefs.php index 174a4c49..abf5b60a 100644 --- a/modules/Campaigns/metadata/detailviewdefs.php +++ b/modules/Campaigns/metadata/detailviewdefs.php @@ -37,15 +37,16 @@ $viewdefs['Campaigns']['DetailView'] = array( 'templateMeta' => array('form' => array('buttons' => array('EDIT', 'DUPLICATE', 'DELETE', - array('customCode'=>''), - array('customCode'=>''), - array('customCode'=>''), - array('customCode'=>''), + array('customCode'=>''), + array('customCode'=>''), + array('customCode'=>''), + array('customCode'=>''), array('customCode'=>''), ), - 'links' => array('', - '', - '', + 'links' => array('', + '', + '', + ), ), 'maxColumns' => '2', @@ -154,5 +155,4 @@ $viewdefs['Campaigns']['DetailView'] = array( ), ) -); -?> \ No newline at end of file +); \ No newline at end of file diff --git a/modules/Campaigns/metadata/subpaneldefs.php b/modules/Campaigns/metadata/subpaneldefs.php index cd884722..ade40f2c 100644 --- a/modules/Campaigns/metadata/subpaneldefs.php +++ b/modules/Campaigns/metadata/subpaneldefs.php @@ -129,7 +129,7 @@ $layout_defs['Campaigns'] = array( 'sort_order' => 'desc', 'sort_by' => 'campaign_log.id' ), - 'invalid email' => array( + 'invalid_email' => array( 'order' => 160, 'module' => 'CampaignLog', 'get_subpanel_data'=>"function:track_log_entries", @@ -139,7 +139,7 @@ $layout_defs['Campaigns'] = array( 'sort_order' => 'desc', 'sort_by' => 'campaign_log.id' ), - 'send error' => array( + 'send_error' => array( 'order' => 170, 'module' => 'CampaignLog', 'get_subpanel_data'=>"function:track_log_entries", diff --git a/modules/Campaigns/views/view.detail.php b/modules/Campaigns/views/view.detail.php index 764a6603..4e59e446 100644 --- a/modules/Campaigns/views/view.detail.php +++ b/modules/Campaigns/views/view.detail.php @@ -127,8 +127,10 @@ class CampaignsViewDetail extends ViewDetail { } //only show email marketing subpanel for email/newsletter campaigns if ($this->bean->campaign_type != 'Email' && $this->bean->campaign_type != 'NewsLetter' ) { - //exclude subpanels that are not prospectlists, emailmarketing, or tracked urls + //exclude emailmarketing subpanel if not on an email or newsletter campaign $subpanel->subpanel_definitions->exclude_tab('emailmarketing'); + // Bug #49893 - 20120120 - Captivea (ybi) - Remove trackers subpanels if not on an email/newsletter campaign (useless subpannl) + $subpanel->subpanel_definitions->exclude_tab('tracked_urls'); } } //show filtered subpanel list diff --git a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php index 226d3234..2e6e3bf0 100644 --- a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php +++ b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php @@ -108,7 +108,10 @@ class PipelineBySalesStageDashlet extends DashletGenericChart 'query' => 'true', 'searchFormTab' => 'advanced_search', ); - $sugarChart->url_params = array( ); + //fixing bug #27097: The opportunity list is not correct after drill-down + //should send to url additional params: start range value and end range value + $sugarChart->url_params = array('start_range_date_closed' => $this->pbss_date_start, + 'end_range_date_closed' => $this->pbss_date_end); $sugarChart->group_by = $this->constructGroupBy(); $sugarChart->setData($this->getChartData($this->constructQuery())); $sugarChart->is_currency = true; diff --git a/modules/Charts/DynamicAction.php b/modules/Charts/DynamicAction.php index c65e56d9..34497f9f 100644 --- a/modules/Charts/DynamicAction.php +++ b/modules/Charts/DynamicAction.php @@ -36,7 +36,6 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); ********************************************************************************/ - if(isset($_GET['DynamicAction']) && $_GET['DynamicAction'] == "saveImage") { $filename = pathinfo($_POST['filename'], PATHINFO_BASENAME); $ext = pathinfo($filename, PATHINFO_EXTENSION); diff --git a/modules/Configurator/tpls/EditView.tpl b/modules/Configurator/tpls/EditView.tpl index da2ea720..9262d254 100644 --- a/modules/Configurator/tpls/EditView.tpl +++ b/modules/Configurator/tpls/EditView.tpl @@ -48,7 +48,7 @@ - +     @@ -63,11 +63,11 @@ {$MOD.LIST_ENTRIES_PER_LISTVIEW}: - + {$MOD.LIST_ENTRIES_PER_SUBPANEL}: - + @@ -173,15 +173,15 @@ {else} {assign var='proxy_on_checked' value=''} {/if} - +
- + - + {if !empty($settings.proxy_auth)} @@ -189,7 +189,7 @@ {else} {assign var='proxy_auth_checked' value=''} {/if} - +
{$MOD.LBL_PROXY_HOST}{$APP.LBL_REQUIRED_SYMBOL} {$MOD.LBL_PROXY_PORT}{$APP.LBL_REQUIRED_SYMBOL}
{$MOD.LBL_PROXY_AUTH}
@@ -197,9 +197,9 @@ - + - +
{$MOD.LBL_PROXY_USERNAME}{$APP.LBL_REQUIRED_SYMBOL} {$MOD.LBL_PROXY_PASSWORD}{$APP.LBL_REQUIRED_SYMBOL}
diff --git a/modules/Configurator/tpls/adminwizard.tpl b/modules/Configurator/tpls/adminwizard.tpl index e9249a6e..daf79275 100644 --- a/modules/Configurator/tpls/adminwizard.tpl +++ b/modules/Configurator/tpls/adminwizard.tpl @@ -277,7 +277,7 @@ function disableReturnSubmission(e) { @@ -326,7 +326,7 @@ function disableReturnSubmission(e) { - + diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php b/modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php index 93f67a1b..742363ab 100644 --- a/modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/InsideViewLogicHook.php @@ -193,6 +193,8 @@ class InsideViewLogicHook { $smarty->assign('logo_collapsed',getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_collapsed.png')); $smarty->assign('AJAX_URL',$url); + $smarty->assign('APP', $GLOBALS['app_strings']); + if ( $GLOBALS['current_user']->getPreference('allowInsideView','Connectors') != 1 ) { $smarty->assign('showInsideView',false); diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php b/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php index 454afe79..4fe44802 100644 --- a/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php @@ -41,6 +41,9 @@ require_once('include/connectors/sources/ext/rest/rest.php'); class ext_rest_insideview extends ext_rest { protected $_enable_in_wizard = false; protected $_enable_in_hover = false; + protected $_enable_in_admin_properties = false; + protected $_enable_in_admin_mapping = false; + protected $_enable_in_admin_search = false; protected $_has_testing_enabled = false; protected $orgId; diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl b/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl index 334a32b4..2cf9076f 100644 --- a/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl @@ -41,7 +41,6 @@ function allowInsideView() {ldelim} document.getElementById('insideViewFrame').src = "{$AJAX_URL}"; document.getElementById('insideViewConfirm').style.display = 'none'; document.getElementById('insideViewFrame').style.display = 'block'; -document.getElementById('insideViewDiv').style.height='430px'; YAHOO.util.Connect.asyncRequest('GET', 'index.php?module=Connectors&action=CallConnectorFunc&source_id=ext_rest_insideview&source_func=allowInsideView', {ldelim}{rdelim}, null); {rdelim} SUGAR.util.doWhen("typeof(markSubPanelLoaded) != 'undefined' && document.getElementById('subpanel_insideview')", function() {ldelim} @@ -76,28 +75,29 @@ function toggleGettingStartedButton(){ldelim} - - +
+

- - - - - - - + InsideView

- + + + + + + + {sugar_getimage name='basic_search' attr='border="0 align="absmiddle""' ext='.gif' alt=$APP.LBL_HIDE } +
-
- + -
+
-
+
{$connector_language.iv_description0} {$connector_language.LBL_TOS1} and {$connector_language.LBL_TOS3}.
diff --git a/modules/Connectors/views/view.modifydisplay.php b/modules/Connectors/views/view.modifydisplay.php index c996b7bf..7707ae8d 100644 --- a/modules/Connectors/views/view.modifydisplay.php +++ b/modules/Connectors/views/view.modifydisplay.php @@ -70,8 +70,16 @@ class ViewModifyDisplay extends SugarView public function display() { require_once('include/connectors/utils/ConnectorUtils.php'); - $sources = ConnectorUtils::getConnectors(); - $this->ss->assign('SOURCES', $sources); + $connectors = ConnectorUtils::getConnectors(true); + foreach($connectors as $id=>$source) + { + $s = SourceFactory::getSource($id); + if(!$s->isEnabledInAdminDisplay()) + { + unset($connectors[$id]); + } + } + $this->ss->assign('SOURCES', $connectors); $this->ss->assign('mod', $GLOBALS['mod_strings']); $this->ss->assign('APP', $GLOBALS['app_strings']); $this->ss->assign('theme', $GLOBALS['theme']); diff --git a/modules/Connectors/views/view.modifymapping.php b/modules/Connectors/views/view.modifymapping.php index 40f65cc3..169b5f5c 100644 --- a/modules/Connectors/views/view.modifymapping.php +++ b/modules/Connectors/views/view.modifymapping.php @@ -78,8 +78,10 @@ class ViewModifyMapping extends SugarView foreach($connectors as $id=>$source) { $s = SourceFactory::getSource($id); $mapping = $s->getMapping(); - if(empty($mapping)) { - unset($connectors[$id]); + + if(!$s->isEnabledInAdminMapping() || empty($mapping)) + { + unset($connectors[$id]); } } diff --git a/modules/Connectors/views/view.modifyproperties.php b/modules/Connectors/views/view.modifyproperties.php index 7186fa44..ade4ae48 100644 --- a/modules/Connectors/views/view.modifyproperties.php +++ b/modules/Connectors/views/view.modifyproperties.php @@ -85,7 +85,7 @@ class ViewModifyProperties extends SugarView $connector_strings = ConnectorUtils::getConnectorStrings($id); $fields = $s->getRequiredConfigFields(); - if(empty($fields)){ + if(!$s->isEnabledInAdminProperties() || empty($fields)){ unset($connectorsToShow[$id]); }else{ if(empty($required_fields)){ diff --git a/modules/Connectors/views/view.modifysearch.php b/modules/Connectors/views/view.modifysearch.php index 0c7f4bbb..1e966f13 100644 --- a/modules/Connectors/views/view.modifysearch.php +++ b/modules/Connectors/views/view.modifysearch.php @@ -77,10 +77,11 @@ class ViewModifySearch extends SugarView $this->ss->assign('APP', $app_strings); $connectors = ConnectorUtils::getConnectors(); foreach($connectors as $id=>$source) { - $s = SourceFactory::getSource($id); - if(!$s->isEnabledInWizard()) { - unset($connectors[$id]); - } + $s = SourceFactory::getSource($id); + if(!$s->isEnabledInAdminSearch() || !$s->isEnabledInWizard()) + { + unset($connectors[$id]); + } } $this->ss->assign('SOURCES', $connectors); diff --git a/modules/Contacts/BusinessCard.php b/modules/Contacts/BusinessCard.php index 4f2af64d..9ed78314 100644 --- a/modules/Contacts/BusinessCard.php +++ b/modules/Contacts/BusinessCard.php @@ -314,7 +314,7 @@ $encoded_contact_popup_request_data = $json->encode($popup_request_data); //Account require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName('BusinessCard'); $sqs_objects = array('BusinessCard_display_account_name' => $qsd->getQSParent()); $sqs_objects['BusinessCard_display_account_name']['populate_list'] = array('display_account_name', 'selectedAccount'); diff --git a/modules/Contacts/ContactOpportunityRelationshipEdit.html b/modules/Contacts/ContactOpportunityRelationshipEdit.html index 55bf4993..1c60884f 100644 --- a/modules/Contacts/ContactOpportunityRelationshipEdit.html +++ b/modules/Contacts/ContactOpportunityRelationshipEdit.html @@ -47,13 +47,13 @@ diff --git a/modules/EmailMarketing/EmailMarketing.php b/modules/EmailMarketing/EmailMarketing.php index 7846654a..4f7c0a6f 100644 --- a/modules/EmailMarketing/EmailMarketing.php +++ b/modules/EmailMarketing/EmailMarketing.php @@ -73,8 +73,8 @@ class EmailMarketing extends SugarBean } - function retrieve($id) { - parent::retrieve($id); + function retrieve($id, $encode=true, $deleted=true) { + parent::retrieve($id,$encode,$deleted); global $timedate; $date_start_array=explode(" ",trim($this->date_start)); diff --git a/modules/EmailTemplates/EditView.php b/modules/EmailTemplates/EditView.php index c7e1a864..168310c5 100644 --- a/modules/EmailTemplates/EditView.php +++ b/modules/EmailTemplates/EditView.php @@ -170,7 +170,7 @@ $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id- $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear','',null,null,'.gif',$mod_strings['LBL_ID_FF_CLEAR'])); //Assign qsd script require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array( 'EditView_assigned_user_name' => $qsd->getQSUser()); $quicksearch_js = ''; @@ -274,24 +274,32 @@ if(true) { } } + // create option of "Contact/Lead/Task" from corresponding module + // translations + $lblContactAndOthers = implode('/', array( + isset($app_list_strings['moduleListSingular']['Contacts']) ? $app_list_strings['moduleListSingular']['Contacts'] : 'Contact', + isset($app_list_strings['moduleListSingular']['Leads']) ? $app_list_strings['moduleListSingular']['Leads'] : 'Lead', + isset($app_list_strings['moduleListSingular']['Prospects']) ? $app_list_strings['moduleListSingular']['Prospects'] : 'Target', + )); + // The insert variable drodown should be conditionally displayed. // If it's campaign then hide the Account. if($has_campaign) { $dropdown=""; $xtpl->assign("DROPDOWN",$dropdown); $xtpl->assign("DEFAULT_MODULE",'Contacts'); //$xtpl->assign("CAMPAIGN_POPUP_JS", ''); } else { $dropdown=""; $xtpl->assign("DROPDOWN",$dropdown); $xtpl->assign("DEFAULT_MODULE",'Accounts'); @@ -358,4 +366,4 @@ $javascript->setFormName('EditView'); $javascript->setSugarBean($focus); $javascript->addAllFields(''); echo $javascript->getScript(); -?> \ No newline at end of file +?> diff --git a/modules/EmailTemplates/language/en_us.lang.php b/modules/EmailTemplates/language/en_us.lang.php index e91bb63a..3fd9bad6 100644 --- a/modules/EmailTemplates/language/en_us.lang.php +++ b/modules/EmailTemplates/language/en_us.lang.php @@ -51,7 +51,6 @@ $mod_strings = array ( 'LBL_BODY' => 'Body:', 'LBL_CLOSE' => 'Close:', 'LBL_COLON' => ':', - 'LBL_CONTACT_AND_OTHERS' => 'Contact/Lead/Target', 'LBL_DESCRIPTION' => 'Description:', 'LBL_EDIT_ALT_TEXT' => 'Edit Plain Text', 'LBL_EMAIL_ATTACHMENT' => 'Email Attachment', @@ -116,4 +115,4 @@ $mod_strings = array ( 'LBL_SELECT' => 'Select' /*for 508 compliance fix*/, 'LBL_ID_FF_CLEAR' => 'Clear' /*for 508 compliance fix*/, ); -?> \ No newline at end of file +?> diff --git a/modules/EmailTemplates/vardefs.php b/modules/EmailTemplates/vardefs.php index d7be3bf8..079affe2 100644 --- a/modules/EmailTemplates/vardefs.php +++ b/modules/EmailTemplates/vardefs.php @@ -40,7 +40,7 @@ $dictionary['EmailTemplate'] = array( 'fields' => array( 'id' => array( 'name' => 'id', - 'vname' => 'LBL_NAME', + 'vname' => 'LBL_ID', 'type' => 'id', 'required' => true, 'reportable'=>false, diff --git a/modules/Emails/EditView.php b/modules/Emails/EditView.php index 7efb47b3..a16625cd 100644 --- a/modules/Emails/EditView.php +++ b/modules/Emails/EditView.php @@ -393,7 +393,7 @@ $xtpl->assign('PRINT_URL', 'index.php?'.$GLOBALS['request_string']); /////////////////////////////////////////////////////////////////////////////// //// QUICKSEARCH CODE require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array('EditView_parent_name' => $qsd->getQSParent(), 'EditView_assigned_user_name' => $qsd->getQSUser(), ); diff --git a/modules/Emails/Email.php b/modules/Emails/Email.php index da6ca66f..5670f04c 100644 --- a/modules/Emails/Email.php +++ b/modules/Emails/Email.php @@ -559,7 +559,7 @@ class Email extends SugarBean { $this->description = $this->decodeDuringSend($this->description); /* from account */ - $replyToAddress = $current_user->emailAddress->getReplyToAddress($current_user); + $replyToAddress = $current_user->emailAddress->getReplyToAddress($current_user, true); $replyToName = ""; if(empty($request['fromAccount'])) { $defaults = $current_user->getPreferredEmail(); @@ -591,7 +591,7 @@ class Email extends SugarBean { { if (empty($replyToAddress)) { - $replyToAddress = $current_user->emailAddress->getReplyToAddress($current_user); + $replyToAddress = $current_user->emailAddress->getReplyToAddress($current_user, true); } // if if (empty($replyToName)) { @@ -934,12 +934,13 @@ class Email extends SugarBean { } // end email2send /** - * Generates a comma sperated name and addresses to be used in compose email screen for contacts or leads - * from listview + * Generates a config-specified separated name and addresses to be used in compose email screen for + * contacts or leads from listview + * By default, use comma, but allow for non-standard delimeters as specified in email_address_separator * * @param $module string module name * @param $idsArray array of record ids to get the email address for - * @return string comma delimited list of email addresses + * @return string (config-specified) delimited list of email addresses */ public function getNamePlusEmailAddressesForCompose($module, $idsArray) { @@ -988,7 +989,24 @@ class Email extends SugarBean { } } - return join(",", array_values($returndata)); + // broken out of method to facilitate unit testing + return $this->_arrayToDelimitedString($returndata); + } + + /** + * @param Array $arr - list of strings + * @return string the list of strings delimited by email_address_separator + */ + function _arrayToDelimitedString($arr) + { + // bug 51804: outlook does not respect the correct email address separator (',') , so let + // clients override the default. + $separator = (isset($GLOBALS['sugar_config']['email_address_separator']) && + !empty($GLOBALS['sugar_config']['email_address_separator'])) ? + $GLOBALS['sugar_config']['email_address_separator'] : + ','; + + return join($separator, array_values($arr)); } /** @@ -1018,7 +1036,12 @@ class Email extends SugarBean { $GLOBALS['log']->debug('-------------------------------> Email called save()'); // handle legacy concatenation of date and time fields - if(empty($this->date_sent)) $this->date_sent = $this->date_start." ".$this->time_start; + //Bug 39503 - SugarBean is not setting date_sent when seconds missing + if(empty($this->date_sent)) { + global $timedate; + $date_sent_obj = $timedate->fromString($this->date_start." ".$this->time_start); + $this->date_sent = $date_sent_obj->asDb(); + } parent::save($check_notify); diff --git a/modules/Emails/EmailUI.php b/modules/Emails/EmailUI.php index 1dd3e6b0..13ac1b7e 100644 --- a/modules/Emails/EmailUI.php +++ b/modules/Emails/EmailUI.php @@ -127,7 +127,7 @@ class EmailUI { //Get the quickSearch js needed for assigned user id on Search Tab require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName('advancedSearchForm'); $quicksearchAssignedUser = "if(typeof sqs_objects == 'undefined'){var sqs_objects = new Array;}"; $quicksearchAssignedUser .= "sqs_objects['advancedSearchForm_assigned_user_name']=" . json_encode($qsd->getQSUser()) . ";"; @@ -1339,7 +1339,7 @@ eoq; require_once("include/EditView/EditView2.php"); require_once("include/TemplateHandler/TemplateHandler.php"); require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName($formName); global $app_strings; diff --git a/modules/Emails/EmailUIAjax.php b/modules/Emails/EmailUIAjax.php index f4b45141..1d1e04fe 100644 --- a/modules/Emails/EmailUIAjax.php +++ b/modules/Emails/EmailUIAjax.php @@ -687,11 +687,11 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); case "getSingleMessage": $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: getSingleMessage"); if(isset($_REQUEST['uid']) && !empty($_REQUEST['uid']) && isset($_REQUEST['ieId']) && !empty($_REQUEST['ieId'])) { + // this method needs to guarantee UTF-8 charset - encoding detection + // and conversion is unreliable, and can break valid UTF-8 text $out = $email->et->getSingleMessage($ie); - //Bug: - //echo $json->encode($out); - //header("Content-Type: application/json; charset=UTF-8"); - echo $json->encode(utf8_recursive_encode($out)); + + echo $json->encode($out); } else { echo "error: no UID"; } diff --git a/modules/Emails/javascript/EmailUI.js b/modules/Emails/javascript/EmailUI.js index 2902c8f5..ee40cb76 100644 --- a/modules/Emails/javascript/EmailUI.js +++ b/modules/Emails/javascript/EmailUI.js @@ -3209,7 +3209,7 @@ SE.listView = { refreshGrid : function() { SE.grid.getDataSource().sendRequest( - SUGAR.util.paramsToUrl(SE.grid.params), + encodeParamsToUrl(SE.grid.params), SE.grid.onDataReturnInitializeTable, SE.grid ); @@ -3542,4 +3542,18 @@ function setSigEditButtonVisibility() { editButt.style.visibility = "hidden"; deleteButt.style.visibility = "hidden"; } -} \ No newline at end of file +} + +//this function is used by emailUI.js and grid.js to create an encoded url from param values +//basically same as SUGAR.util.paramsToUrl plus the encoding +function encodeParamsToUrl(params) { + var parts = []; + for (var i in params) + { + if (params.hasOwnProperty(i)) + { + parts.push(encodeURIComponent(i) + '=' + encodeURIComponent(params[i])); + } + } + return parts.join("&"); +} diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index 45249f11..cfc78db5 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -1743,7 +1743,7 @@ SE.composeLayout = { // make async call to delete cached file AjaxObject.target = ''; - AjaxObject.startRequest('', urlStandard + "&emailUIAction=removeUploadedAttachment&file="+file); + AjaxObject.startRequest('', urlStandard + "&emailUIAction=removeUploadedAttachment&file="+unescape(file)); }, /** @@ -1899,7 +1899,7 @@ SE.composeLayout = { if(form.attachments.value != '') { form.attachments.value += "::"; } - form.attachments.value += node.value; + form.attachments.value += unescape(node.value); } } } diff --git a/modules/Emails/javascript/ajax.js b/modules/Emails/javascript/ajax.js index 8b44f6ab..5a2fa94c 100644 --- a/modules/Emails/javascript/ajax.js +++ b/modules/Emails/javascript/ajax.js @@ -398,6 +398,7 @@ var AjaxObject = { document.getElementById('email_attachment').value = ''; var ret = YAHOO.lang.JSON.parse(o.responseText); + ret.name = escape(ret.name); var idx = SUGAR.email2.composeLayout.currentInstanceId; var overall = document.getElementById('addedFiles' + idx); var index = overall.childNodes.length; diff --git a/modules/Emails/javascript/grid.js b/modules/Emails/javascript/grid.js index ebda3a87..d32f467a 100644 --- a/modules/Emails/javascript/grid.js +++ b/modules/Emails/javascript/grid.js @@ -201,7 +201,7 @@ function gridInit() { nextPageLinkLabel: "", lastPageLinkLabel: "" }), - initialRequest:encodeURIComponent(SUGAR.util.paramsToUrl(params)), + initialRequest:encodeParamsToUrl(params), width: "800px", height: "400px" }); diff --git a/modules/Emails/javascript/init.js b/modules/Emails/javascript/init.js index 51821897..810a7ec8 100644 --- a/modules/Emails/javascript/init.js +++ b/modules/Emails/javascript/init.js @@ -50,6 +50,7 @@ function email2init() { tinyMCE.init({ convert_urls : false, theme_advanced_toolbar_align : tinyConfig.theme_advanced_toolbar_align, + valid_children : tinyConfig.valid_children, width: tinyConfig.width, theme: tinyConfig.theme, theme_advanced_toolbar_location : tinyConfig.theme_advanced_toolbar_location, diff --git a/modules/Emails/templates/outboundDialog.tpl b/modules/Emails/templates/outboundDialog.tpl index ae9a4411..d13e7b4c 100644 --- a/modules/Emails/templates/outboundDialog.tpl +++ b/modules/Emails/templates/outboundDialog.tpl @@ -83,7 +83,7 @@ diff --git a/modules/Employees/WapAuthenticate.php b/modules/Employees/WapAuthenticate.php index 55d98b08..8145571b 100644 --- a/modules/Employees/WapAuthenticate.php +++ b/modules/Employees/WapAuthenticate.php @@ -57,13 +57,7 @@ $focus->load_user($user_password); if ($focus->is_authenticated()) { // save the user information into the session // go to the home screen - if (!empty($_POST['login_record'])) { - $login_direction = "module={$_POST['login_module']}&action={$_POST['login_action']}&record={$_POST['login_record']}"; - } else { - $login_direction = "action=index&module=Home"; - } - - header("Location: index.php?{$login_direction}"); + header("Location: ".$GLOBALS['app']->getLoginRedirect()); unset($_SESSION['login_password']); unset($_SESSION['login_error']); unset($_SESSION['login_user_name']); diff --git a/modules/Employees/views/view.edit.php b/modules/Employees/views/view.edit.php index 063454f0..9a764a4a 100644 --- a/modules/Employees/views/view.edit.php +++ b/modules/Employees/views/view.edit.php @@ -47,7 +47,7 @@ class EmployeesViewEdit extends ViewEdit { if(is_admin($GLOBALS['current_user'])) { $json = getJSONobj(); require_once('include/QuickSearchDefaults.php'); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array('EditView_reports_to_name' => $qsd->getQSUser()); $sqs_objects['EditView_reports_to_name']['populate_list'] = array('reports_to_name', 'reports_to_id'); $quicksearch_js = ''; diff --git a/modules/Home/QuickSearch.php b/modules/Home/QuickSearch.php new file mode 100644 index 00000000..3b7c66ef --- /dev/null +++ b/modules/Home/QuickSearch.php @@ -0,0 +1,634 @@ + array('Accounts'), // module to use + * 'field_list' => array('name', 'id'), // fields to select + * 'group' => 'or', // how the conditions should be combined + * 'conditions' => array(array( // array of where conditions to use + * 'name' => 'name', // field + * 'op' => 'like_custom', // operation + * 'end' => '%', // end of the query + * 'value' => 'a', // query value + * ) + * ), + * 'order' => 'name', // order by + * 'limit' => '30', // limit, number of records to return + * ) + * @return array list of elements returned + */ + public function query($args) + { + $args = $this->prepareArguments($args); + $args = $this->updateQueryArguments($args); + $data = $this->getRawResults($args); + + return $this->getFormattedJsonResults($data, $args); + } + + /** + * get_contact_array + * + */ + public function get_contact_array($args) + { + $args = $this->prepareArguments($args); + $args = $this->updateContactArrayArguments($args); + $data = $this->getRawResults($args); + $results = $this->prepareResults($data, $args); + + return $this->getFilteredJsonResults($results); + } + + /** + * Returns the list of users, faster than using query method for Users module + * + * @param array $args arguments used to construct query, see query() for example + * @return array list of users returned + */ + public function get_user_array($args) + { + $condition = $args['conditions'][0]['value']; + $results = $this->getUserResults($condition); + + return $this->getJsonEncodedData($results); + } + + + /** + * Returns search results from external API + * + * @param array $args + * @return array + */ + public function externalApi($args) + { + require_once('include/externalAPI/ExternalAPIFactory.php'); + $data = array(); + try { + $api = ExternalAPIFactory::loadAPI($args['api']); + $data['fields'] = $api->searchDoc($_REQUEST['query']); + $data['totalCount'] = count($data['fields']); + } catch(Exception $ex) { + $GLOBALS['log']->error($ex->getMessage()); + } + + return $this->getJsonEncodedData($data); + } + + /** + * Internal function to construct where clauses + * + * @param Object $focus + * @param array $args + * @return string + */ + protected function constructWhere($focus, $args) + { + global $db, $locale, $current_user; + + $table = $focus->getTableName(); + if (!empty($table)) { + $table .= "."; + } + $conditionArray = array(); + + if (!is_array($args['conditions'])) { + $args['conditions'] = array(); + } + + foreach($args['conditions'] as $condition) + { + switch ($condition['op']) + { + case self::CONDITION_CONTAINS: + array_push( + $conditionArray, + sprintf( + "%s like '%%%s%%'", + $db->quote($table . $condition['name']), + $db->quote($condition['value'] + ))); + break; + + case self::CONDITION_LIKE_CUSTOM: + $like = ''; + if (!empty($condition['begin'])) { + $like .= $db->quote($condition['begin']); + } + $like .= $db->quote($condition['value']); + + if (!empty($condition['end'])) { + $like .= $db->quote($condition['end']); + } + + if ($focus instanceof Person){ + $nameFormat = $locale->getLocaleFormatMacro($current_user); + + if (strpos($nameFormat,'l') > strpos($nameFormat,'f')) { + array_push( + $conditionArray, + db_concat(rtrim($table, '.'), array('first_name','last_name')) . sprintf(" like '%s'", $like) + ); + } else { + array_push( + $conditionArray, + db_concat(rtrim($table, '.'), array('last_name','first_name')) . sprintf(" like '%s'", $like) + ); + } + } + else { + array_push( + $conditionArray, + $db->quote($table . $condition['name']) . sprintf(" like '%s'", $like) + ); + } + break; + + case self::CONDITION_EQUAL: + if ($condition['value']) { + if (empty($args['whereExtra'])) { + $args['whereExtra'] = ''; + } + $args['whereExtra'] .= sprintf("(%s = '%s')", $db->quote($condition['name']), $db->quote($condition['value'])); + } + break; + + default: + array_push( + $conditionArray, + $db->quote($table.$condition['name']) . sprintf(" like '%s%%", $db->quote($condition['value'])) + ); + } + } + + $whereClause = sprintf('(%s)', implode(" {$args['group']} ", $conditionArray)); + + if ($table == 'users.') { + $whereClause .= sprintf(" AND %sstatus='Active'", $table); + } + + // Need to include the default whereStatement + if (!empty($args['whereExtra'])) { + if (!empty($whereClause)) { + $whereClause .= ' AND '; + } + $whereClause .= html_entity_decode($args['whereExtra'], ENT_QUOTES); + } + + return $whereClause; + } + + /** + * Returns formatted data + * + * @param array $results + * @param array $args + * @return array + */ + protected function formatResults($results, $args) + { + global $sugar_config; + + $app_list_strings = null; + $data['totalCount'] = count($results); + $data['fields'] = array(); + + for ($i = 0; $i < count($results); $i++) { + $data['fields'][$i] = array(); + $data['fields'][$i]['module'] = $results[$i]->object_name; + + //C.L.: Bug 43395 - For Quicksearch, do not return values with salutation and title formatting + if($results[$i] instanceof Person) + { + $results[$i]->createLocaleFormattedName = false; + } + $listData = $results[$i]->get_list_view_data(); + + foreach ($args['field_list'] as $field) { + // handle enums + if ((isset($results[$i]->field_name_map[$field]['type']) && $results[$i]->field_name_map[$field]['type'] == 'enum') + || (isset($results[$i]->field_name_map[$field]['custom_type']) && $results[$i]->field_name_map[$field]['custom_type'] == 'enum')) { + + // get fields to match enum vals + if(empty($app_list_strings)) { + if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '') $current_language = $_SESSION['authenticated_user_language']; + else $current_language = $sugar_config['default_language']; + $app_list_strings = return_app_list_strings_language($current_language); + } + + // match enum vals to text vals in language pack for return + if(!empty($app_list_strings[$results[$i]->field_name_map[$field]['options']])) { + $results[$i]->$field = $app_list_strings[$results[$i]->field_name_map[$field]['options']][$results[$i]->$field]; + } + } + + + if (isset($listData[$field])) { + $data['fields'][$i][$field] = $listData[$field]; + } else if (isset($results[$i]->$field)) { + $data['fields'][$i][$field] = $results[$i]->$field; + } else { + $data['fields'][$i][$field] = ''; + } + } + } + + if (is_array($data['fields'])) { + foreach ($data['fields'] as $i => $recordIn) { + if (!is_array($recordIn)) { + continue; + } + + foreach ($recordIn as $col => $dataIn) { + if (!is_scalar($dataIn)) { + continue; + } + + $data['fields'][$i][$col] = html_entity_decode($dataIn, ENT_QUOTES, 'UTF-8'); + } + } + } + + return $data; + } + + /** + * Filter duplicate results from the list + * + * @param array $list + * @return array + */ + protected function filterResults($list) + { + $fieldsFiltered = array(); + foreach ($list['fields'] as $field) { + $found = false; + foreach ($fieldsFiltered as $item) { + if ($item === $field) { + $found = true; + break; + } + } + + if (!$found) { + $fieldsFiltered[] = $field; + } + } + + $list['totalCount'] = count($fieldsFiltered); + $list['fields'] = $fieldsFiltered; + + return $list; + } + + /** + * Returns raw search results. Filters should be applied later. + * + * @param array $args + * @param boolean $singleSelect + * @return array + */ + protected function getRawResults($args, $singleSelect = false) + { + $orderBy = !empty($args['order']) ? $args['order'] : ''; + $limit = !empty($args['limit']) ? $args['limit'] : ''; + $data = array(); + + foreach ($args['modules'] as $module) { + $focus = SugarModule::get($module)->loadBean(); + + $orderBy = ($args['order_by_name'] && $focus instanceof Person && $args['order'] == 'name') ? 'last_name' : $orderBy; + + if ($focus->ACLAccess('ListView', true)) { + $where = ($args['use_default_where']) ? $this->constructWhere($focus, $args) : $args['whereExtra']; + $data = $this->updateData($data, $focus, $orderBy, $where, $limit, $singleSelect); + } + } + + return $data; + } + + /** + * Returns search results with all fixes applied + * + * @param array $data + * @param array $args + * @return array + */ + protected function prepareResults($data, $args) + { + $results['totalCount'] = $count = count($data); + $results['fields'] = array(); + + for ($i = 0; $i < $count; $i++) { + $field = array(); + $field['module'] = $data[$i]->object_name; + + $field = $this->overrideContactId($field, $data[$i], $args); + $field = $this->updateContactName($field, $args); + + $results['fields'][$i] = $this->prepareField($field, $args); + } + + return $results; + } + + /** + * Returns user search results + * + * @param string $condition + * @return array + */ + protected function getUserResults($condition) + { + $users = $this->getUserArray($condition); + + $results = array(); + $results['totalCount'] = count($users); + $results['fields'] = array(); + + foreach ($users as $id => $name) { + array_push( + $results['fields'], + array( + 'id' => (string) $id, + 'user_name' => $name, + 'module' => 'Users' + )); + } + + return $results; + } + + /** + * Merges current module search results to given list and returns it + * + * @param array $data + * @param SugarBean $focus + * @param string $orderBy + * @param string $where + * @param string $limit + * @param boolean $singleSelect + * @return array + */ + protected function updateData($data, $focus, $orderBy, $where, $limit, $singleSelect = false) + { + $result = $focus->get_list($orderBy, $where, 0, $limit, -1, 0, $singleSelect); + + return array_merge($data, $result['list']); + } + + /** + * Updates search result with proper contact name + * + * @param array $result + * @param array $args + * @return string + */ + protected function updateContactName($result, $args) + { + global $locale; + + $result[$args['field_list'][0]] = $locale->getLocaleFormattedName( + $result['first_name'], + $result['last_name'], + $result['salutation'] + ); + + return $result; + } + + /** + * Overrides contact_id and reports_to_id params (to 'id') + * + * @param array $result + * @param object $data + * @param array $args + * @return array + */ + protected function overrideContactId($result, $data, $args) + { + foreach ($args['field_list'] as $field) { + $result[$field] = (preg_match('/reports_to_id$/s',$field) + || preg_match('/contact_id$/s',$field)) + ? $data->id // "reports_to_id" to "id" + : $data->$field; + } + + return $result; + } + + /** + * Returns prepared arguments. Should be redefined in child classes. + * + * @param array $arguments + * @return array + */ + protected function prepareArguments($args) + { + global $sugar_config; + + // override query limits + if ($sugar_config['list_max_entries_per_page'] < ($args['limit'] + 1)) { + $sugar_config['list_max_entries_per_page'] = ($args['limit'] + 1); + } + + $defaults = array( + 'whereExtra' => '', + 'order_by_name' => false, + 'use_default_where' => true, + ); + + return array_merge($defaults, $args); + } + + /** + * Returns prepared field array. Should be redefined in child classes. + * + * @param array $field + * @param array $args + * @return array + */ + protected function prepareField($field, $args) + { + return $field; + } + + /** + * Returns user array + * + * @param string $condition + * @return array + */ + protected function getUserArray($condition) + { + return (showFullName()) + // utils.php, if system is configured to show full name + ? getUserArrayFromFullName($condition, true) + : get_user_array(false, 'Active', '', false, $condition,' AND portal_only=0 ',false); + } + + /** + * Returns additional where condition for non private teams + * + * @param array $args + * @return string + */ + protected function getNonPrivateTeamsWhere($args) + { + global $db; + + $where = sprintf( + "(teams.name like '%s%%' or teams.name_2 like '%s%%')", + $db->quote($args['conditions'][0]['value']), + $db->quote($args['conditions'][0]['value']) + ); + + $where .= (!empty($args['conditions'][1]) && $args['conditions'][1]['name'] == 'user_id') + ? sprintf( + " AND teams.id in (select team_id from team_memberships where user_id = '%s')", + $args['conditions'][1]['value'] + ) + : ' AND teams.private = 0'; + + return $where; + } + + /** + * Returns JSON encoded data + * + * @param array $data + * @return string + */ + protected function getJsonEncodedData($data) + { + $json = getJSONobj(); + + return $json->encodeReal($data); + } + + /** + * Returns formatted JSON encoded search results + * + * @param array $args + * @param array $results + * @return string + */ + protected function getFormattedJsonResults($results, $args) + { + $results = $this->formatResults($results, $args); + + return $this->getJsonEncodedData($results); + } + + /** + * Returns filtered JSON encoded search results + * + * @param array $results + * @return string + */ + protected function getFilteredJsonResults($results) + { + $results = $this->filterResults($results); + + return $this->getJsonEncodedData($results); + } + + /** + * Returns updated arguments array + * + * @param array $args + * @return array + */ + protected function updateQueryArguments($args) + { + $args['order_by_name'] = true; + + return $args; + } + + /** + * Returns updated arguments array for contact query + * + * @param array $args + * @return array + */ + protected function updateContactArrayArguments($args) + { + return $args; + } + + /** + * Returns updated arguments array for team query + * + * @param array $args + * @return array + */ + protected function updateTeamArrayArguments($args) + { + $args['whereExtra'] = $this->getNonPrivateTeamsWhere($args); + $args['modules'] = array('Teams'); + $args['use_default_where'] = false; + + return $args; + } +} diff --git a/modules/Home/SubpanelCreates.php b/modules/Home/SubpanelCreates.php index 93a63092..e5124ce0 100644 --- a/modules/Home/SubpanelCreates.php +++ b/modules/Home/SubpanelCreates.php @@ -75,4 +75,3 @@ if(file_exists('modules/'. $_REQUEST['target_module'] . '/EditView.php')) { } } -?> diff --git a/modules/Home/UnifiedSearchAdvanced.php b/modules/Home/UnifiedSearchAdvanced.php index eab6910c..4c027aeb 100644 --- a/modules/Home/UnifiedSearchAdvanced.php +++ b/modules/Home/UnifiedSearchAdvanced.php @@ -48,6 +48,12 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class UnifiedSearchAdvanced { var $query_string = ''; + + /* path to search form */ + var $searchFormPath = 'include/SearchForm/SearchForm2.php'; + + /*search form class name*/ + var $searchFormClass = 'SearchForm'; function __construct(){ if(!empty($_REQUEST['query_string'])){ @@ -288,8 +294,9 @@ class UnifiedSearchAdvanced { */ require_once $beanFiles[$beanName] ; $seed = new $beanName(); - require_once 'include/SearchForm/SearchForm2.php' ; - $searchForm = new SearchForm ( $seed, $moduleName ) ; + + require_once $this->searchFormPath; + $searchForm = new $this->searchFormClass ( $seed, $moduleName ) ; $searchForm->setup (array ( $moduleName => array() ) , $unifiedSearchFields , '' , 'saved_views' /* hack to avoid setup doing further unwanted processing */ ) ; $where_clauses = $searchForm->generateSearchWhere() ; @@ -309,7 +316,12 @@ class UnifiedSearchAdvanced { { $where = '(('. implode(' ) OR ( ', $where_clauses) . '))'; } - + else + { + /* Clear $where from prev. module + if in current module $where_clauses */ + $where = ''; + } $displayColumns = array(); foreach($listViewDefs[$seed->module_dir] as $colName => $param) { diff --git a/modules/Home/quicksearchQuery.php b/modules/Home/quicksearchQuery.php index f5a7b57d..680ecf42 100644 --- a/modules/Home/quicksearchQuery.php +++ b/modules/Home/quicksearchQuery.php @@ -35,316 +35,30 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ - require_once('include/SugarObjects/templates/person/Person.php'); - - -/** - * quicksearchQuery class, handles AJAX calls from quicksearch.js - * - * @copyright 2004-2007 SugarCRM Inc. - * @license http://www.sugarcrm.com/crm/products/sugar-professional-eula.html SugarCRM Professional End User License - * @since Class available since Release 4.5.1 - */ -class quicksearchQuery { - /** - * Internal function to construct where clauses - */ - function constructWhere(&$query_obj, $focus) { - $table = $focus->getTableName(); - if (! empty($table)) { - $table .= "."; - } - $cond_arr = array(); - - if (!is_array($query_obj['conditions'])) { - $query_obj['conditions'] = array(); - } - - foreach($query_obj['conditions'] as $condition) { - if($condition['op'] == 'contains') { - array_push($cond_arr,$GLOBALS['db']->quote($table.$condition['name'])." like '%".$GLOBALS['db']->quote($condition['value'])."%'"); - } else if($condition['op'] == 'like_custom') { - $like = ''; - if(!empty($condition['begin'])) $like .= $GLOBALS['db']->quote($condition['begin']); - $like .= $GLOBALS['db']->quote($condition['value']); - if(!empty($condition['end'])) $like .= $GLOBALS['db']->quote($condition['end']); - - if ($focus instanceof Person){ - $nameFormat = $GLOBALS['locale']->getLocaleFormatMacro($GLOBALS['current_user']); - if ( strpos($nameFormat,'l') > strpos($nameFormat,'f') ) { - array_push($cond_arr,db_concat(rtrim($table,'.'),array('first_name','last_name')) . " like '$like'"); - } - else { - array_push($cond_arr,db_concat(rtrim($table,'.'),array('last_name','first_name')) . " like '$like'"); - } - } - else { - array_push($cond_arr,$GLOBALS['db']->quote($table.$condition['name'])." like '$like'"); - } - } else { // starts_with - array_push($cond_arr,$GLOBALS['db']->quote($table.$condition['name'])." like '".$GLOBALS['db']->quote($condition['value'])."%'"); - } - } - - $whereClause = '('.implode(" {$query_obj['group']} ",$cond_arr).')'; - - if($table == 'users.') - $whereClause .= " AND {$table}status='Active'"; - - // Need to include the default whereStatement - if(!empty($query_obj['whereExtra'])){ - if(!empty($whereClause))$whereClause .= ' AND '; - $whereClause .= html_entity_decode($query_obj['whereExtra'],ENT_QUOTES); - } - - return $whereClause; - } - - /** - * Query a module for a list of items - * - * @param array $args - * example for querying Account module with 'a': - * array ('modules' => array('Accounts'), // module to use - * 'field_list' => array('name', 'id'), // fields to select - * 'group' => 'or', // how the conditions should be combined - * 'conditions' => array(array( // array of where conditions to use - * 'name' => 'name', // field - * 'op' => 'like_custom', // operation - * 'end' => '%', // end of the query - * 'value' => 'a', // query value - * ) - * ), - * 'order' => 'name', // order by - * 'limit' => '30', // limit, number of records to return - * ) - * @return array list of elements returned - */ - function query($args) { - $json = getJSONobj(); - global $sugar_config; - global $beanFiles, $beanList; - - if($sugar_config['list_max_entries_per_page'] < ($args['limit'] + 1)) // override query limits - $sugar_config['list_max_entries_per_page'] = ($args['limit'] + 1); - - $list_return = array(); - - foreach($args['modules'] as $module) { - require_once($beanFiles[$beanList[$module]]); - $focus = new $beanList[$module]; - - $query_orderby = ''; - if (!empty($args['order'])) { - $query_orderby = $args['order']; - if ($focus instanceof Person && $args['order'] == 'name') { - $query_orderby = 'last_name'; - } - } - $query_limit = ''; - if (!empty($args['limit'])) { - $query_limit = $args['limit']; - } - - $query_where = $this->constructWhere($args, $focus); - - $list_arr = array(); - if($focus->ACLAccess('ListView', true)) - { - $curlist = $focus->get_list($query_orderby, $query_where, 0, $query_limit, -1, 0); - $list_return = array_merge($list_return,$curlist['list']); - } - } - $list_arr = $this->formatResults($args, $list_return); - return $json->encodeReal($list_arr); - } - - protected function formatResults($args, $list_return){ - global $sugar_config; - $app_list_strings = null; - $list_arr['totalCount']=count($list_return); - $list_arr['fields']= array(); - for($i = 0; $i < count($list_return); $i++) { - $list_arr['fields'][$i]= array(); - $list_arr['fields'][$i]['module']= $list_return[$i]->object_name; - - //C.L.: Bug 43395 - For Quicksearch, do not return values with salutation and title formatting - if($list_return[$i] instanceof Person) - { - $list_return[$i]->createLocaleFormattedName = false; - } - - $listData = $list_return[$i]->get_list_view_data(); - - foreach($args['field_list'] as $field) { - // handle enums - if( (isset($list_return[$i]->field_name_map[$field]['type']) && $list_return[$i]->field_name_map[$field]['type'] == 'enum') || - (isset($list_return[$i]->field_name_map[$field]['custom_type']) && $list_return[$i]->field_name_map[$field]['custom_type'] == 'enum')) { - - // get fields to match enum vals - if(empty($app_list_strings)) { - if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '') $current_language = $_SESSION['authenticated_user_language']; - else $current_language = $sugar_config['default_language']; - $app_list_strings = return_app_list_strings_language($current_language); - } - - // match enum vals to text vals in language pack for return - if(!empty($app_list_strings[$list_return[$i]->field_name_map[$field]['options']])) { - $list_return[$i]->$field = $app_list_strings[$list_return[$i]->field_name_map[$field]['options']][$list_return[$i]->$field]; - } - } - - - if (isset($listData[$field])) - { - $list_arr['fields'][$i][$field] = $listData[$field]; - } - else if (isset($list_return[$i]->$field)) - { - $list_arr['fields'][$i][$field] = $list_return[$i]->$field; - } - else { - $list_arr['fields'][$i][$field] = ""; - } - } - } - if(is_array($list_arr['fields'])) { - foreach ( $list_arr['fields'] as $i => $recordIn ) { - if(!is_array($recordIn)){ - continue; - } - foreach( $recordIn as $col => $dataIn ) { - if ( !is_scalar($dataIn) ) { - continue; - } - $list_arr['fields'][$i][$col] = html_entity_decode($dataIn,ENT_QUOTES,'UTF-8'); - } - } - } - return $list_arr; - } - - /** - * get_contact_array - * - */ - function get_contact_array($args) { - $json = getJSONobj(); - global $sugar_config, $beanFiles, $beanList, $locale; - - if($sugar_config['list_max_entries_per_page'] < ($args['limit'] + 1)) // override query limits - $sugar_config['list_max_entries_per_page'] = ($args['limit'] + 1); - - $list_return = array(); - - foreach($args['modules'] as $module) { - require_once($beanFiles[$beanList[$module]]); - $focus = new $beanList[$module]; - - $query_orderby = ''; - if (!empty($args['order'])) { - $query_orderby = $args['order']; - } - $query_limit = ''; - if (!empty($args['limit'])) { - $query_limit = $args['limit']; - } - $query_where = $this->constructWhere($args, $focus); - $list_arr = array(); - if($focus->ACLAccess('ListView', true)) { - $curlist = $focus->get_list($query_orderby, $query_where, 0, $query_limit, -1, 0); - $list_return = array_merge($list_return,$curlist['list']); - } - } - $list_arr['totalCount']=count($list_return); - $list_arr['fields']= array(); - for($i = 0; $i < count($list_return); $i++) { - $list_arr['fields'][$i]= array(); - $list_arr['fields'][$i]['module']= $list_return[$i]->object_name; - $contactName = ""; - foreach($args['field_list'] as $field) { - // We are overriding the contact_id param and the reports_to_id param to change to 'id' - if(preg_match('/reports_to_id$/s',$field) || preg_match('/contact_id$/s',$field)) { // We are overriding the reports_to_id param to change to 'id' - $list_arr['fields'][$i][$field] = $list_return[$i]->id; - } - else { - $list_arr['fields'][$i][$field] = $list_return[$i]->$field; - } - } //foreach - - $contactName = $locale->getLocaleFormattedName($list_arr['fields'][$i]['first_name'], - $list_arr['fields'][$i]['last_name'], - $list_arr['fields'][$i]['salutation']); - - $list_arr['fields'][$i][$args['field_list'][0]] = $contactName; - } //for - - $str = $json->encodeReal($list_arr); - return $str; - } - - - /** - * Returns the list of users, faster than using query method for Users module - * - * @param array $args arguments used to construct query, see query() for example - * - * @return array list of users returned - */ - function get_user_array($args) { - global $json; - $json = getJSONobj(); - - $response = array(); - - if(showFullName()) { // utils.php, if system is configured to show full name - $user_array = getUserArrayFromFullName($args['conditions'][0]['value'], true); - } else { - $user_array = get_user_array(false, "Active", '', false, $args['conditions'][0]['value'],' AND portal_only=0 ',false); - } - $response['totalCount']=count($user_array); - $response['fields']=array(); - $i=0; - foreach($user_array as $id=>$name) { - array_push($response['fields'], array('id' => (string) $id, 'user_name' => $name, 'module' => 'Users')); - $i++; - } - - return $json->encodeReal($response); - } - - - function externalApi($data) { - require_once('include/externalAPI/ExternalAPIFactory.php'); - - $api = ExternalAPIFactory::loadAPI($data['api']); - - $json = getJSONobj(); - - $listArray['fields'] = $api->searchDoc($_REQUEST['query']); - $listArray['totalCount'] = count($listArray['fields']); - - $listJson = $json->encodeReal($listArray); - - return $listJson; - } +$filePath = 'modules/Home/QuickSearch.php'; +if (file_exists('custom/' . $filePath)) +{ + require_once('custom/' . $filePath); + $quicksearchQuery = new quicksearchQueryCustom(); +} +else +{ + require_once($filePath); + $quicksearchQuery = new quicksearchQuery(); } $json = getJSONobj(); $data = $json->decode(html_entity_decode($_REQUEST['data'])); if(isset($_REQUEST['query']) && !empty($_REQUEST['query'])){ foreach($data['conditions'] as $k=>$v){ - if(empty($data['conditions'][$k]['value'])){ - $data['conditions'][$k]['value']=$_REQUEST['query']; - } + if (empty($data['conditions'][$k]['value']) && ($data['conditions'][$k]['op'] != quicksearchQuery::CONDITION_EQUAL)) + { + $data['conditions'][$k]['value']=$_REQUEST['query']; + } } } - -$quicksearchQuery = new quicksearchQuery(); $method = !empty($data['method']) ? $data['method'] : 'query'; if(method_exists($quicksearchQuery, $method)) { echo $quicksearchQuery->$method($data); } - -?> \ No newline at end of file diff --git a/modules/Import/CsvAutoDetect.php b/modules/Import/CsvAutoDetect.php index 7fd7c5b2..998686d3 100644 --- a/modules/Import/CsvAutoDetect.php +++ b/modules/Import/CsvAutoDetect.php @@ -272,24 +272,30 @@ class CsvAutoDetect { // process only the first row foreach ($this->_parser->data[0] as $val) { - foreach ($bean->field_defs as $field_name=>$defs) { - // check if the CSV item matches field name - if (!strcasecmp($val, $field_name)) { - $match_count++; - break; - } - // check if the CSV item is part of the label or vice versa - else if (isset($defs['vname']) && isset($mod_strings[$defs['vname']])) { - if (stripos(trim($mod_strings[$defs['vname']],':'), $val) !== false || stripos($val, trim($mod_strings[$defs['vname']],':')) !== false) { + // bug51433 - everything relies on $val having a value so if it's empty, + // we can skip this iteration and not get warnings + if( !empty( $val ) ) + { + foreach ($bean->field_defs as $field_name=>$defs) { + + // check if the CSV item matches field name + if (!strcasecmp($val, $field_name)) { $match_count++; break; } - } - else if (isset($defs['vname']) && isset($GLOBALS['app_strings'][$defs['vname']])) { - if (stripos(trim($GLOBALS['app_strings'][$defs['vname']],':'), $val) !== false || stripos($val, trim($GLOBALS['app_strings'][$defs['vname']],':')) !== false) { - $match_count++; - break; + // check if the CSV item is part of the label or vice versa + else if (isset($defs['vname']) && isset($mod_strings[$defs['vname']])) { + if (stripos(trim($mod_strings[$defs['vname']],':'), $val) !== false || stripos($val, trim($mod_strings[$defs['vname']],':')) !== false) { + $match_count++; + break; + } + } + else if (isset($defs['vname']) && isset($GLOBALS['app_strings'][$defs['vname']])) { + if (stripos(trim($GLOBALS['app_strings'][$defs['vname']],':'), $val) !== false || stripos($val, trim($GLOBALS['app_strings'][$defs['vname']],':')) !== false) { + $match_count++; + break; + } } } } diff --git a/modules/Import/ImportCacheFiles.php b/modules/Import/ImportCacheFiles.php index 440f592c..4f00a3c5 100644 --- a/modules/Import/ImportCacheFiles.php +++ b/modules/Import/ImportCacheFiles.php @@ -82,6 +82,23 @@ class ImportCacheFiles return "upload://import"; } + + /** + * convertFileName + * + * This function returns the name of an upload file link converted as a url in e.g. href + * + * @param string $file_name String value of the upload file name + * @return string The converted URL of the file name + */ + public static function convertFileNameToUrl($file_name) + { + require_once('include/upload_file.php'); + $file_name = str_replace('upload://import', UploadStream::getDir() . '/import', $file_name); + return $file_name; + } + + /** * Returns the filename for a temporary file * diff --git a/modules/Import/Importer.php b/modules/Import/Importer.php index 17426bc8..689cf0b6 100644 --- a/modules/Import/Importer.php +++ b/modules/Import/Importer.php @@ -47,37 +47,37 @@ class Importer /** * @var ImportFieldSanitizer */ - private $ifs; + protected $ifs; /** * @var Currency */ - private $defaultUserCurrency; + protected $defaultUserCurrency; /** * @var importColumns */ - private $importColumns; + protected $importColumns; /** * @var importSource */ - private $importSource; + protected $importSource; /** * @var $isUpdateOnly */ - private $isUpdateOnly; + protected $isUpdateOnly; /** * @var $bean */ - private $bean; + protected $bean; /** * @var sugarToExternalSourceFieldMap */ - private $sugarToExternalSourceFieldMap = array(); + protected $sugarToExternalSourceFieldMap = array(); public function __construct($importSource, $bean) diff --git a/modules/Import/sources/ImportDataSource.php b/modules/Import/sources/ImportDataSource.php index 048a1b4a..97fd1c76 100644 --- a/modules/Import/sources/ImportDataSource.php +++ b/modules/Import/sources/ImportDataSource.php @@ -274,7 +274,7 @@ abstract class ImportDataSource implements Iterator //foreach column, strip the 'colnum_' prefix to the get the column key value foreach($colnums as $column_key) { - if(strpos($column_key,'colnum_') == 0) + if(strpos($column_key,'colnum_') === 0) { $colkey = substr($column_key,7); } diff --git a/modules/Import/views/view.last.php b/modules/Import/views/view.last.php index e78471dd..ff4f395c 100644 --- a/modules/Import/views/view.last.php +++ b/modules/Import/views/view.last.php @@ -107,9 +107,9 @@ class ImportViewLast extends ImportView $this->ss->assign("dupeCount",$dupeCount); $this->ss->assign("createdCount",$createdCount); $this->ss->assign("updatedCount",$updatedCount); - $this->ss->assign("errorFile",ImportCacheFiles::getErrorFileName()); - $this->ss->assign("errorrecordsFile",ImportCacheFiles::getErrorRecordsWithoutErrorFileName()); - $this->ss->assign("dupeFile",ImportCacheFiles::getDuplicateFileName()); + $this->ss->assign("errorFile",ImportCacheFiles::convertFileNameToUrl(ImportCacheFiles::getErrorFileName())); + $this->ss->assign("errorrecordsFile",ImportCacheFiles::convertFileNameToUrl(ImportCacheFiles::getErrorRecordsWithoutErrorFileName())); + $this->ss->assign("dupeFile",ImportCacheFiles::convertFileNameToUrl(ImportCacheFiles::getDuplicateFileName())); if ( $this->bean->object_name == "Prospect" ) { diff --git a/modules/Import/views/view.step2.php b/modules/Import/views/view.step2.php index 8d322e19..5ef34f7e 100644 --- a/modules/Import/views/view.step2.php +++ b/modules/Import/views/view.step2.php @@ -55,8 +55,7 @@ class ImportViewStep2 extends ImportView */ public function display() { - global $mod_strings, $app_list_strings, $app_strings, $current_user, $import_bean_map; - global $import_mod_strings; + global $mod_strings, $app_list_strings, $app_strings, $current_user, $import_bean_map, $import_mod_strings; $this->instruction = 'LBL_SELECT_UPLOAD_INSTRUCTION'; $this->ss->assign('INSTRUCTION', $this->getInstruction()); @@ -80,22 +79,6 @@ class ImportViewStep2 extends ImportView $displayBackBttn = isset($_REQUEST['action']) && $_REQUEST['action'] != 'index'? TRUE : FALSE; $this->ss->assign("displayBackBttn", $displayBackBttn); - $importSource = isset($_REQUEST['source']) ? $_REQUEST['source'] : 'csv' ; - //Start custom mapping - // show any custom mappings - if (sugar_is_dir('custom/modules/Import') && $dir = opendir('custom/modules/Import')) - { - while (($file = readdir($dir)) !== false) - { - if (sugar_is_file("custom/modules/Import/{$file}") && strpos($file,".php") !== false) - { - require_once("custom/modules/Import/{$file}"); - $classname = str_replace('.php','',$file); - $mappingClass = new $classname; - $custom_mappings[] = $mappingClass->name; - } - } - } // get user defined import maps $is_admin = is_admin($current_user); if($is_admin) diff --git a/modules/Import/views/view.step3.php b/modules/Import/views/view.step3.php index 49c98f09..950cffbe 100644 --- a/modules/Import/views/view.step3.php +++ b/modules/Import/views/view.step3.php @@ -94,21 +94,15 @@ class ImportViewStep3 extends ImportView } else { - // Try to see if we have a custom mapping we can use - // based upon the where the records are coming from - // and what module we are importing into - $classname = 'ImportMap' . ucfirst($_REQUEST['source']); - if ( file_exists("modules/Import/maps/{$classname}.php") ) - require_once("modules/Import/maps/{$classname}.php"); - elseif ( file_exists("custom/modules/Import/maps/{$classname}.php") ) - require_once("custom/modules/Import/maps/{$classname}.php"); - else { - require_once("custom/modules/Import/maps/ImportMapOther.php"); - $classname = 'ImportMapOther'; + $classname = $this->getMappingClassName(ucfirst($_REQUEST['source'])); + + //Set the $_REQUEST['source'] to be 'other' for ImportMapOther special case + if($classname == 'ImportMapOther') + { $_REQUEST['source'] = 'other'; } - if ( class_exists($classname) ) + if (class_exists($classname)) { $mapping_file = new $classname; $ignored_fields = $mapping_file->getIgnoredFields($_REQUEST['import_module']); @@ -117,9 +111,9 @@ class ImportViewStep3 extends ImportView } } - $delimeter = $this->getRequestDelimiter(); + $delimiter = $this->getRequestDelimiter(); - $this->ss->assign("CUSTOM_DELIMITER", $delimeter); + $this->ss->assign("CUSTOM_DELIMITER", $delimiter); $this->ss->assign("CUSTOM_ENCLOSURE", ( !empty($_REQUEST['custom_enclosure']) ? $_REQUEST['custom_enclosure'] : "" )); //populate import locale values from import mapping if available, these values will be used througout the rest of the code path @@ -127,7 +121,7 @@ class ImportViewStep3 extends ImportView $uploadFileName = $_REQUEST['file_name']; // Now parse the file and look for errors - $importFile = new ImportFile( $uploadFileName, $delimeter, html_entity_decode($_REQUEST['custom_enclosure'],ENT_QUOTES), FALSE); + $importFile = new ImportFile( $uploadFileName, $delimiter, html_entity_decode($_REQUEST['custom_enclosure'],ENT_QUOTES), FALSE); if ( !$importFile->fileExists() ) { $this->_showImportError($mod_strings['LBL_CANNOT_OPEN'],$_REQUEST['import_module'],'Step2'); @@ -413,7 +407,10 @@ class ImportViewStep3 extends ImportView } // include anything needed for quicksearch to work require_once("include/TemplateHandler/TemplateHandler.php"); - $quicksearch_js = TemplateHandler::createQuickSearchCode($fields,$fields,'importstep3'); + // Bug #46879 : createQuickSearchCode() function in IBM RTC call function getQuickSearchDefaults() to get instance and then getQSDLookup() function + // if we call this function as static it replaces context and use ImportViewStep3 as $this in getQSDLookup() + $template_handler = new TemplateHandler(); + $quicksearch_js = $template_handler->createQuickSearchCode($fields,$fields,'importstep3'); $this->ss->assign("QS_JS", $quicksearch_js); $this->ss->assign("JAVASCRIPT", $this->_getJS($required)); @@ -427,6 +424,50 @@ class ImportViewStep3 extends ImportView } + + /** + * getMappingClassName + * + * This function returns the name of a mapping class used to generate the mapping of an import source. + * It first checks to see if an equivalent custom source map exists in custom/modules/Imports/maps directory + * and returns this class name if found. Searches are made for sources with a ImportMapCustom suffix first + * and then ImportMap suffix. + * + * If no such custom file is found, the method then checks the modules/Imports/maps directory for a source + * mapping file. + * + * Lastly, if a source mapping file is still not located, it checks in + * custom/modules/Import/maps/ImportMapOther.php file exists, it uses the ImportMapOther class. + * + * @see display() + * @param string $source String name of the source mapping prefix + * @return string name of the mapping class name + */ + protected function getMappingClassName($source) + { + // Try to see if we have a custom mapping we can use + // based upon the where the records are coming from + // and what module we are importing into + $name = 'ImportMap' . $source; + $customName = 'ImportMapCustom' . $source; + + if (file_exists("custom/modules/Import/maps/{$customName}.php")) + { + require_once("custom/modules/Import/maps/{$customName}.php"); + return $customName; + } else if (file_exists("custom/modules/Import/maps/{$name}.php")) { + require_once("custom/modules/Import/maps/{$name}.php"); + } else if (file_exists("modules/Import/maps/{$name}.php")) { + require_once("modules/Import/maps/{$name}.php"); + } else if (file_exists('custom/modules/Import/maps/ImportMapOther.php')) { + require_once('custom/modules/Import/maps/ImportMapOther.php'); + return 'ImportMapOther'; + } + + return $name; + } + + protected function getRequestDelimiter() { $delimiter = !empty($_REQUEST['custom_delimiter']) ? $_REQUEST['custom_delimiter'] : ","; diff --git a/modules/InboundEmail/EditView.php b/modules/InboundEmail/EditView.php index 327e96f6..3dd2b819 100644 --- a/modules/InboundEmail/EditView.php +++ b/modules/InboundEmail/EditView.php @@ -378,4 +378,4 @@ else if( $focus->is_personal == '1') $xtpl->parse("main"); $xtpl->out("main"); -?> \ No newline at end of file +?> diff --git a/modules/InboundEmail/InboundEmail.js b/modules/InboundEmail/InboundEmail.js index edfa0687..efc7893d 100644 --- a/modules/InboundEmail/InboundEmail.js +++ b/modules/InboundEmail/InboundEmail.js @@ -54,7 +54,7 @@ ie_id=(typeof document.getElementById(formName).ie_id!='undefined')?document.get +'&email_user='+words[0] +'&protocol='+protocol +'&port='+port -+'&email_password='+words[1] ++'&email_password='+encodeURIComponent(words[1]) +'&mailbox='+words[2] +'&ssl='+ssl +'&ie_id='+ie_id @@ -81,7 +81,7 @@ function getFoldersListForInboundAccount(module_name,action,pageTarget,width,hei +'&email_user='+words[0] +'&protocol='+protocol +'&port='+port -+'&email_password='+words[1] ++'&email_password='+encodeURIComponent(words[1]) +'&mailbox='+words[2] +'&ssl='+ssl +'&personal='+isPersonal diff --git a/modules/InboundEmail/InboundEmail.php b/modules/InboundEmail/InboundEmail.php index a9ed96c2..eb03f571 100644 --- a/modules/InboundEmail/InboundEmail.php +++ b/modules/InboundEmail/InboundEmail.php @@ -205,8 +205,8 @@ class InboundEmail extends SugarBean { * @param string id * @return object Bean */ - function retrieve($id) { - $ret = parent::retrieve($id); + function retrieve($id, $encode=true, $deleted=true) { + $ret = parent::retrieve($id,$encode,$deleted); $this->email_password = blowfishDecode(blowfishGetKey('InboundEmail'), $this->email_password); $this->retrieveMailBoxFolders(); return $ret; @@ -338,7 +338,7 @@ class InboundEmail extends SugarBean { $r = $this->db->query($q); $a = $this->db->fetchByAssoc($r); $ret = array(); - $raw = utf8_encode($a['raw_source']); + $raw = $this->convertToUtf8($a['raw_source']); if (empty($raw)) { $raw = $app_strings['LBL_EMAIL_ERROR_VIEW_RAW_SOURCE']; } @@ -347,7 +347,7 @@ class InboundEmail extends SugarBean { $uid = $this->getCorrectMessageNoForPop3($uid); } $raw = imap_fetchheader($this->conn, $uid, FT_UID+FT_PREFETCHTEXT); - $raw .= utf8_encode(imap_body($this->conn, $uid, FT_UID)); + $raw .= $this->convertToUtf8(imap_body($this->conn, $uid, FT_UID)); } // else $raw = to_html($raw); $raw = nl2br($raw); @@ -356,6 +356,26 @@ class InboundEmail extends SugarBean { return $raw; } + + /** + * helper method to convert text to utf-8 if necessary + * + * @param string $input text + * @return string output text + */ + function convertToUtf8($input) + { + $charset = $GLOBALS['locale']->detectCharset($input, true); + + // we haven't a clue due to missing package?, just return as itself + if ($charset === FALSE) { + return $input; + } + + // convert if we can or must + return $this->handleCharsetTranslation($input, $charset); + } + /** * constructs a nicely formatted version of email headers. * @param int $uid @@ -758,10 +778,16 @@ class InboundEmail extends SugarBean { $cols .= "{$colDef['name']}"; } foreach($insert as $overview) { - if(in_array($overview->imap_uid, $uids)) { - $update[] = $overview; - continue; - } + if(in_array($overview->imap_uid, $uids)) + { + // fixing bug #49543: setting 'mbox' property for the following updating of other items in this box + if (!isset($overview->mbox)) + { + $overview->mbox = $mbox; + } + $update[] = $overview; + continue; + } $values = ''; @@ -774,9 +800,13 @@ class InboundEmail extends SugarBean { if( isset($colDef['len']) && !empty($colDef['len']) && isset($colDef['type']) && !empty($colDef['type']) && $colDef['type'] == 'varchar' - ) { - $overview->$colDef['name'] = substr($overview->$colDef['name'], 0, $colDef['len']); - } + ) + { + if (isset($overview->$colDef['name'])) + { + $overview->$colDef['name'] = substr($overview->$colDef['name'], 0, $colDef['len']); + } + } switch($colDef['name']) { case "imap_uid": @@ -858,10 +888,20 @@ class InboundEmail extends SugarBean { break; default: - if(!empty($set)) { - $set .= ","; - } - $set .= "{$colDef['name']} = ".$this->db->quoted($overview->$colDef['name']); + if(!empty($set)) + { + $set .= ","; + } + $value = ''; + if (isset($overview->$colDef['name'])) + { + $value = $this->db->quoted($overview->$colDef['name']); + } + else + { + $value = $this->db->quoted($value); + } + $set .= "{$colDef['name']} = " . $value; break; } } @@ -1269,6 +1309,8 @@ class InboundEmail extends SugarBean { global $current_user; global $app_strings; + $result = 1; + $GLOBALS['log']->info("INBOUNDEMAIL: checking mailbox [ {$mailbox} ]"); $this->mailbox = $mailbox; $this->connectMailserver(); @@ -1311,11 +1353,15 @@ class InboundEmail extends SugarBean { // prefetch emails if($prefetch == true) { $GLOBALS['log']->info("[EMAIL] Start fetching emails for mailbox [{$mailbox}] for user [{$current_user->user_name}]"); - $this->fetchCheckedEmails($fetchedOverview); + if(!$this->fetchCheckedEmails($fetchedOverview)) + { + $result = 0; + } $GLOBALS['log']->info("[EMAIL] Done fetching emails for mailbox [{$mailbox}] for user [{$current_user->user_name}]"); } } else { $GLOBALS['log']->info("INBOUNDEMAIL: no results for mailbox [ {$mailbox} ]"); + $result = 1; } /** @@ -1339,6 +1385,7 @@ class InboundEmail extends SugarBean { $this->getOverviewsFromCacheFile($uids, $mailbox, true); } } + return $result; } /** @@ -1599,7 +1646,6 @@ class InboundEmail extends SugarBean { } else { $this->connectMailserver(); $mailboxes = $this->getMailboxes(true); - $mailboxes[] = 'INBOX'; sort($mailboxes); $GLOBALS['log']->info("INBOUNDEMAIL: checking account [ {$this->name} ]"); @@ -1819,11 +1865,13 @@ class InboundEmail extends SugarBean { } else { $GLOBALS['log']->debug("*** INBOUNDEMAIL: prefetch has a message with no UID"); } + return true; } else { $GLOBALS['log']->debug("INBOUNDEMAIL: skipping email prefetch - size too large [ {$overview->size} ]"); } } } + return false; } /** @@ -2653,10 +2701,8 @@ class InboundEmail extends SugarBean { $c = new aCase(); if($caseId = $this->getCaseIdFromCaseNumber($email->name, $c)) { $c->retrieve($caseId); - $c->load_relationship('emails'); - $c->emails->add($email->id); - $email->retrieve($email->id); + //assign the case info to parent id and parent type so that the case can be linked to the email on Email Save $email->parent_type = "Cases"; $email->parent_id = $caseId; // assign the email to the case owner @@ -3094,15 +3140,19 @@ class InboundEmail extends SugarBean { $text = $this->handleTranserEncoding($text, $flip[strtoupper($upperCaseKeyDecodeHeader[strtoupper('Content-Transfer-Encoding')])]); } - $msgPart = $text; - if(is_array($upperCaseKeyDecodeHeader['CONTENT-TYPE']) && isset($upperCaseKeyDecodeHeader['CONTENT-TYPE']['charset']) && !empty($upperCaseKeyDecodeHeader[$upperCaseKeyDecodeHeader['CONTENT-TYPE']]['charset'])) { - $msgPart = $this->handleCharsetTranslation($text, $upperCaseKeyDecodeHeader['CONTENT-TYPE']['charset']); + if(is_array($upperCaseKeyDecodeHeader['CONTENT-TYPE']) && isset($upperCaseKeyDecodeHeader['CONTENT-TYPE']['charset']) && !empty($upperCaseKeyDecodeHeader['CONTENT-TYPE']['charset'])) { + // we have an explicit content type, use it + $msgPart = $this->handleCharsetTranslation($text, $upperCaseKeyDecodeHeader['CONTENT-TYPE']['charset']); } else { - $msgPart = utf8_encode($text); + // make a best guess as to what our content type is + $msgPart = $this->convertToUtf8($text); } } // end else clause $msgPart = $this->customGetMessageText($msgPart); + // Bug 50241: can't process properly. Strip tag first. + $msgPart = preg_replace("/<\?xml[^>]*>/","",$msgPart); + /* cn: bug 9176 - htmlEntitites hide XSS attacks. * decode to pass refreshed HTML to HTML_Safe */ if ($type == 'PLAIN') @@ -3149,7 +3199,7 @@ class InboundEmail extends SugarBean { for($i=1; $iconn, $msgNo, '\\SEEN'); + $r = imap_setflag_full($this->conn, $msgNo, '\\SEEN'); // if delete_seen, mark msg as deleted if($this->delete_seen == 1 && !$forDisplay) { @@ -4502,7 +4552,9 @@ eoq; // $sub2 is XX] xxxxxxxxxxxxxx $sub3 = substr($sub2, 0, strpos($sub2, $close)); - $r = $this->db->query("SELECT id FROM cases WHERE case_number = '{$sub3}'", true); + // filter out deleted records in order to create a new case + // if email is related to deleted one (bug #49840) + $r = $this->db->query("SELECT id FROM cases WHERE case_number = '{$sub3}' and deleted = 0", true); $a = $this->db->fetchByAssoc($r); if(!empty($a['id'])) { return $a['id']; @@ -4593,7 +4645,7 @@ eoq; $this->stored_options = base64_encode(serialize($storedOptions)); $this->save(); } else { - $ret = imap_search($this->conn, 'UNDELETED UNSEEN'); + $ret = imap_search($this->conn, 'UNDELETED UNSEEN'); } $GLOBALS['log']->debug('-----> getNewMessageIds() got '.count($ret).' new Messages'); @@ -6218,6 +6270,131 @@ eoq; return $service; } + + /** + * Get Email messages IDs from server which aren't in database + * @return array Ids of messages, which aren't still in database + */ + public function getNewEmailsForSyncedMailbox() + { + // ids's count limit for batch processing + $limit = 20; + $msgIds = imap_search($this->conn, 'ALL UNDELETED'); + $result = array(); + try{ + if(count($msgIds) > 0) + { + /* + * @var collect results of queries and message headers + */ + $tmpMsgs = array(); + $repeats = 0; + $counter = 0; + + // sort IDs to get lastest on top + arsort($msgIds); + $GLOBALS['log']->debug('-----> getNewEmailsForSyncedMailbox() got '.count($msgIds).' Messages'); + foreach($msgIds as $k => &$msgNo) + { + $uid = imap_uid($this->conn, $msgNo); + $header = imap_headerinfo($this->conn, $msgNo); + $fullHeader = imap_fetchheader($this->conn, $msgNo); + $message_id = $header->message_id; + $deliveredTo = $this->id; + $matches = array(); + preg_match('/(delivered-to:|x-real-to:){1}\s*(\S+)\s*\n{1}/im', $fullHeader, $matches); + if(count($matches)) + { + $deliveredTo = $matches[2]; + } + if(empty($message_id) || !isset($message_id)) + { + $GLOBALS['log']->debug('*********** NO MESSAGE_ID.'); + $message_id = $this->getMessageId($header); + } + + // generate compound messageId + $this->compoundMessageId = trim($message_id) . trim($deliveredTo); + // if the length > 255 then md5 it so that the data will be of smaller length + if (strlen($this->compoundMessageId) > 255) + { + $this->compoundMessageId = md5($this->compoundMessageId); + } // if + + if (empty($this->compoundMessageId)) + { + break; + } // if + $counter++; + $potentials = clean_xss($this->compoundMessageId, false); + + if(is_array($potentials) && !empty($potentials)) + { + foreach($potentials as $bad) + { + $this->compoundMessageId = str_replace($bad, "", $this->compoundMessageId); + } + } + array_push($tmpMsgs, array('msgNo' => $msgNo, 'msgId' => $this->compoundMessageId, 'exists' => 0)); + if($counter == $limit) + { + $counter = 0; + $query = array(); + foreach(array_slice($tmpMsgs, -$limit, $limit) as $k1 => $v1) + { + $query[] = $v1['msgId']; + } + $query = 'SELECT count(emails.message_id) as cnt, emails.message_id AS mid FROM emails WHERE emails.message_id IN ("' . implode('","', $query) . '") and emails.deleted = 0 group by emails.message_id'; + $r = $this->db->query($query); + $tmp = array(); + while($a = $this->db->fetchByAssoc($r)) + { + $tmp[html_entity_decode($a['mid'])] = $a['cnt']; + } + foreach($tmpMsgs as $k1 => $v1) + { + if(isset($tmp[$v1['msgId']]) && $tmp[$v1['msgId']] > 0) + { + $tmpMsgs[$k1]['exists'] = 1; + } + } + foreach($tmpMsgs as $k1 => $v1) + { + if($v1['exists'] == 0) + { + $repeats = 0; + array_push($result, $v1['msgNo']); + }else{ + $repeats++; + } + } + if($repeats > 0) + { + if($repeats >= $limit) + { + break; + } + else + { + $tmpMsgs = array_splice($tmpMsgs, -$repeats, $repeats); + } + } + else + { + $tmpMsgs = array(); + } + } + } + unset($msgNo); + } + }catch(Exception $ex) + { + $GLOBALS['log']->fatal($ex->getMessage()); + } + $GLOBALS['log']->debug('-----> getNewEmailsForSyncedMailbox() got '.count($result).' unsynced messages'); + return $result; + } + } // end class definition diff --git a/modules/InboundEmail/Save.php b/modules/InboundEmail/Save.php index 679b0085..e4abf478 100644 --- a/modules/InboundEmail/Save.php +++ b/modules/InboundEmail/Save.php @@ -159,6 +159,7 @@ if( isset($_REQUEST['is_auto_import']) && $_REQUEST['is_auto_import'] == 'on' ) $groupFolderId = $focus->createAutoImportSugarFolder(); $focus->groupfolder_id = $groupFolderId; } + $stored_options['isAutoImport'] = true; } else { @@ -173,6 +174,7 @@ else $f->retrieve($focus->fetched_row['groupfolder_id']); $f->delete(); } + $stored_options['isAutoImport'] = false; } if (!empty($focus->groupfolder_id)) diff --git a/modules/Leads/Lead.php b/modules/Leads/Lead.php index 328c8738..58dc3c4a 100644 --- a/modules/Leads/Lead.php +++ b/modules/Leads/Lead.php @@ -595,6 +595,6 @@ class Lead extends Person { return $return_array; } + } -?> diff --git a/modules/Leads/LeadsVarDefHandler.php b/modules/Leads/LeadsVarDefHandler.php new file mode 100644 index 00000000..9336e664 --- /dev/null +++ b/modules/Leads/LeadsVarDefHandler.php @@ -0,0 +1,54 @@ +meta_array_name == 'rel_filter') + unset($options_array['oldcalls'], $options_array['oldmeetings']); + return $options_array; + } +} \ No newline at end of file diff --git a/modules/Leads/metadata/editviewdefs.php b/modules/Leads/metadata/editviewdefs.php index b510530d..78d716a2 100644 --- a/modules/Leads/metadata/editviewdefs.php +++ b/modules/Leads/metadata/editviewdefs.php @@ -83,7 +83,7 @@ $viewdefs['Leads']['EditView'] = array( ), array ( - array('name'=>'account_name', 'type'=>'varchar', 'validateDependency'=>false,'customCode' => ''), + array('name'=>'account_name', 'type'=>'varchar', 'validateDependency'=>false,'customCode' => ''), 'website', ), diff --git a/modules/Leads/tpls/QuickCreate.tpl b/modules/Leads/tpls/QuickCreate.tpl index fba753f5..cb97f724 100644 --- a/modules/Leads/tpls/QuickCreate.tpl +++ b/modules/Leads/tpls/QuickCreate.tpl @@ -1,5 +1,4 @@ {* - /********************************************************************************* * SugarCRM Community Edition is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. @@ -35,62 +34,53 @@ * "Powered by SugarCRM". ********************************************************************************/ - - - *} - - -
- - - - - - - - - - - - - - - - +
- - info("Contact opportunity relationship"); $json = getJSONobj(); require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array('opportunity_name' => $qsd->getQSParent()); $sqs_objects['opportunity_name']['populate_list'] = array('opportunity_name', 'opportunity_id'); $quicksearch_js = ''; @@ -112,4 +112,4 @@ $javascript->addToValidateBinaryDependency('opportunity_name', 'alpha', $app_str echo $javascript->getScript(); -?> \ No newline at end of file +?> diff --git a/modules/Contacts/metadata/popupdefs.php b/modules/Contacts/metadata/popupdefs.php index 86240212..82532713 100644 --- a/modules/Contacts/metadata/popupdefs.php +++ b/modules/Contacts/metadata/popupdefs.php @@ -53,7 +53,7 @@ $popupMeta = array( array('formBase' => 'ContactFormBase.php', 'formBaseClass' => 'ContactFormBase', 'getFormBodyParams' => array('','','ContactSave'), - 'createButton' => $mod_strings['LNK_NEW_CONTACT'] + 'createButton' => 'LNK_NEW_CONTACT' ), 'listviewdefs' => array( 'NAME' => array( diff --git a/modules/Contacts/metadata/popupdefsEmail.php b/modules/Contacts/metadata/popupdefsEmail.php index 0c58dbf7..fae3156d 100644 --- a/modules/Contacts/metadata/popupdefsEmail.php +++ b/modules/Contacts/metadata/popupdefsEmail.php @@ -52,7 +52,7 @@ $popupMeta = array('moduleMain' => 'Contact', array('formBase' => 'ContactFormBase.php', 'formBaseClass' => 'ContactFormBase', 'getFormBodyParams' => array('','','ContactSave'), - 'createButton' => $mod_strings['LNK_NEW_CONTACT'] + 'createButton' => 'LNK_NEW_CONTACT' ), 'templateForm' => 'modules/Contacts/Email_picker.html', ); diff --git a/modules/Contacts/vardefs.php b/modules/Contacts/vardefs.php index 84df079d..9f177d4b 100644 --- a/modules/Contacts/vardefs.php +++ b/modules/Contacts/vardefs.php @@ -108,7 +108,7 @@ array ( 'source' => 'non-db', 'importable' => 'false', 'duplicate_merge'=> 'disabled', - 'studio' => array('listview' => false), + 'studio' => false, ), 'opportunity_role_id' => array( @@ -441,7 +441,7 @@ array ( 'source' => 'non-db', 'importable' => 'false', 'duplicate_merge'=> 'disabled', - 'studio' => array('listview' => false), + 'studio' => false, ), 'm_accept_status_fields' => array ( @@ -456,7 +456,7 @@ array ( 'importable' => 'false', 'hideacl'=>true, 'duplicate_merge'=> 'disabled', - 'studio' => array('listview' => false), + 'studio' => false, ), 'accept_status_id' => array( diff --git a/modules/Currencies/Currency.php b/modules/Currencies/Currency.php index 770e989e..8a968d8f 100644 --- a/modules/Currencies/Currency.php +++ b/modules/Currencies/Currency.php @@ -183,7 +183,7 @@ class Currency extends SugarBean return ''; } - function retrieve($id, $encode = true){ + function retrieve($id, $encode = true, $deleted = true){ if($id == '-99'){ $this->name = $this->getDefaultCurrencyName(); $this->symbol = $this->getDefaultCurrencySymbol(); @@ -195,7 +195,7 @@ class Currency extends SugarBean $this->hide = ''; }else{ - parent::retrieve($id, $encode); + parent::retrieve($id, $encode, $deleted); } if(!isset($this->name) || $this->deleted == 1){ $this->name = $this->getDefaultCurrencyName(); diff --git a/modules/DocumentRevisions/DocumentRevision.php b/modules/DocumentRevisions/DocumentRevision.php index 90bb5f24..7baa2105 100644 --- a/modules/DocumentRevisions/DocumentRevision.php +++ b/modules/DocumentRevisions/DocumentRevision.php @@ -138,8 +138,8 @@ class DocumentRevision extends SugarBean { return "$this->filename"; } - function retrieve($id, $encode=false){ - $ret = parent::retrieve($id, $encode); + function retrieve($id, $encode=false, $deleted=true){ + $ret = parent::retrieve($id, $encode,$deleted); return $ret; } diff --git a/modules/Documents/Delete.php b/modules/Documents/Delete.php index 64a7c851..c3ea3c8c 100644 --- a/modules/Documents/Delete.php +++ b/modules/Documents/Delete.php @@ -62,12 +62,26 @@ if(!$focus->ACLAccess('Delete')){ if (isset($_REQUEST['object']) && $_REQUEST['object']="documentrevision") { //delete document revision. $focus = new DocumentRevision(); - UploadFile::unlink_file($_REQUEST['revision_id'],$_REQUEST['filename']); - +} else { + //delete document and its revisions. + $focus = new Document(); + $focus->retrieve($_REQUEST['record']); + + $focus->load_relationships('revisions'); + $revisions= $focus->get_linked_beans('revisions','DocumentRevision'); + + if (!empty($revisions) && is_array($revisions)) { + foreach($revisions as $key=>$thisversion) { + UploadFile::unlink_file($thisversion->id,$thisversion->filename); + //mark the version deleted. + $thisversion->mark_deleted($thisversion->id); + } + } + + } $focus->mark_deleted($_REQUEST['record']); - header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']); ?> diff --git a/modules/Documents/language/en_us.lang.php b/modules/Documents/language/en_us.lang.php index f42246e6..5374189a 100644 --- a/modules/Documents/language/en_us.lang.php +++ b/modules/Documents/language/en_us.lang.php @@ -151,6 +151,7 @@ $mod_strings = array ( 'ERR_DELETE_LATEST_VERSION'=> 'You are not allowed to delete the latest revision of a document.', 'LNK_NEW_MAIL_MERGE' => 'Mail Merge', 'LBL_MAIL_MERGE_DOCUMENT' => 'Mail Merge Template:', + 'ERR_MISSING_FILE' => 'This document is missing a file, most likely due to an error during upload. Please retry uploading the file or contact your administrator.', 'LBL_TREE_TITLE' => 'Documents', //sub-panel vardefs. @@ -175,6 +176,8 @@ $mod_strings = array ( 'LBL_SEARCH_EXTERNAL_DOCUMENT' => 'File Name', 'LBL_EXTERNAL_DOCUMENT_NOTE' => 'The first 20 most recently modified files are displayed in descending order in the list below. Use the Search to find other files.', 'LBL_LIST_EXT_DOCUMENT_NAME' => 'File Name', + 'ERR_INVALID_EXTERNAL_API_ACCESS' => 'The user attempted to access an invalid external API ({0})', + 'ERR_INVALID_EXTERNAL_API_LOGIN' => 'The login check failed for external API ({0})', // Links around the world 'LBL_ACCOUNTS_SUBPANEL_TITLE' => 'Accounts', diff --git a/modules/Documents/tpls/view.extdoc.tpl b/modules/Documents/tpls/view.extdoc.tpl index ea80cdc1..1c44b8c8 100644 --- a/modules/Documents/tpls/view.extdoc.tpl +++ b/modules/Documents/tpls/view.extdoc.tpl @@ -42,6 +42,7 @@ function submitListViewDCMenu(submitElem) { var callback = { success: function(o) { + var contentElem = document.getElementById('dcSearch'); while ( typeof(contentElem) != 'undefined' && contentElem.className != 'dccontent' ) { contentElem = contentElem.parentNode; @@ -54,7 +55,7 @@ window.history.go(0); } }; {/literal} -window.opener.YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, "module=Documents&action=extdoc&isPopup={$isPopup}&elemBaseName={$elemBaseName}&apiName={$apiName}&button=Search&name_basic="+document.getElementById('dcSearch').value); +YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, "module=Documents&action=extdoc&isPopup={$isPopup}&elemBaseName={$elemBaseName}&apiName={$apiName}&button=Search&name_basic="+document.getElementById('dcSearch').value); {literal} } {/literal} diff --git a/modules/Documents/views/view.detail.php b/modules/Documents/views/view.detail.php index 3a02efc0..9dbd44a2 100644 --- a/modules/Documents/views/view.detail.php +++ b/modules/Documents/views/view.detail.php @@ -52,4 +52,18 @@ class DocumentsViewDetail extends ViewDetail return $params; } + + public function display() + { + //check to see if the file field is empty. This should not occur and would only happen when an error has ocurred during upload, or from db manipulation of record. + if(empty($this->bean->filename)){ + //print error to screen + $this->errors[] = $GLOBALS['mod_strings']['ERR_MISSING_FILE']; + $this->displayErrors(); + } + + + parent::display(); + } + } diff --git a/modules/Documents/views/view.extdoc.php b/modules/Documents/views/view.extdoc.php index 9263d87e..54f63683 100644 --- a/modules/Documents/views/view.extdoc.php +++ b/modules/Documents/views/view.extdoc.php @@ -51,6 +51,8 @@ class DocumentsViewExtdoc extends SugarView public function display(){ + global $mod_strings; + if ( isset($_REQUEST['name_basic']) ) { $file_search = trim($_REQUEST['name_basic']); } else { @@ -61,8 +63,9 @@ class DocumentsViewExtdoc extends SugarView $apiName = 'LotusLive'; } else { $tmpApi = ExternalAPIFactory::loadAPI($_REQUEST['apiName'],true); - if ( $tmpApi === false ) { - $GLOBALS['log']->error('The user attempted to access an invalid external API ('.$_REQUEST['apiName'].')'); + if ( $tmpApi === false ) + { + $GLOBALS['log']->error(string_format($mod_strings['ERR_INVALID_EXTERNAL_API_ACCESS'], array($_REQUEST['apiName']))); return; } $apiName = $_REQUEST['apiName']; @@ -75,39 +78,59 @@ class DocumentsViewExtdoc extends SugarView $isPopup = false; } - // Need to manually attempt to fetch the EAPM record, we don't want to give them the signup screen when they just have a deactivated account. - - if ( !$eapmBean = EAPM::getLoginInfo($apiName,true) ) { - $smarty = new Sugar_Smarty(); - echo $smarty->fetch('include/externalAPI/'.$apiName.'/'.$apiName.'Signup.'.$GLOBALS['current_language'].'.tpl'); - return; - } - - - $api = ExternalAPIFactory::loadAPI($apiName,true); - $api->loadEAPM($eapmBean); - - $quickCheck = $api->quickCheckLogin(); - if ( ! $quickCheck['success'] ) { - $errorMessage = string_format(translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'), array($apiName)); - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - $errorMessage .= ''; - - $errorMessage .= '
 '; - $errorMessage .= ''; - $errorMessage .= ''; - echo $errorMessage; - return; - } + // bug50952 - must actually make sure we can log in, not just that we've got a EAPM record + // getLoginInfo only checks to see if user has logged in correctly ONCE to ExternalAPI + // Need to manually attempt to fetch the EAPM record, we don't want to give them the signup screen when they just have a deactivated account. + $eapmBean = EAPM::getLoginInfo($apiName,true); + $api = ExternalAPIFactory::loadAPI($apiName,true); + $validSession = true; + + if(!empty($eapmBean)) + { + try { + $api->loadEAPM($eapmBean); + // $api->checkLogin() does the same thing as quickCheckLogin plus actually makes sure the user CAN log in to the API currently + $loginCheck = $api->checkLogin($eapmBean); + if(isset($loginCheck['success']) && !$loginCheck['success']) + { + $validSession = false; + } + } catch(Exception $ex) { + $validSession = false; + $GLOBALS['log']->error(string_format($mod_strings['ERR_INVALID_EXTERNAL_API_LOGIN'], array($apiName))); + } + } + + if (!$validSession || empty($eapmBean)) + { + // Bug #49987 : Documents view.extdoc.php doesn't allow custom override + $tpl_file = get_custom_file_if_exists('include/externalAPI/'.$apiName.'/'.$apiName.'Signup.'.$GLOBALS['current_language'].'.tpl'); + + if (file_exists($tpl_file)) + { + $smarty = new Sugar_Smarty(); + echo $smarty->fetch($tpl_file); + } else { + $output = string_format(translate('LBL_ERR_FAILED_QUICKCHECK','EAPM'), array($apiName)); + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + $output .= ''; + + $output .= '
 '; + $output .= ''; + $output .= '
'; + echo $output; + } + + return; + } $searchDataLower = $api->searchDoc($file_search,true); - // In order to emulate the list views for the SugarFields, I need to uppercase all of the key names. $searchData = array(); diff --git a/modules/DynamicFields/DynamicField.php b/modules/DynamicFields/DynamicField.php index 96794447..a427a062 100644 --- a/modules/DynamicFields/DynamicField.php +++ b/modules/DynamicFields/DynamicField.php @@ -95,9 +95,10 @@ class DynamicField { * Builds the cache for custom fields based on the vardefs * * @param STRING $module + * @param boolean saveCache Boolean value indicating whether or not to pass saveCache value to saveToVardef, defaults to true * @return unknown */ - function buildCache($module = false) { + function buildCache($module = false, $saveCache=true) { //We can't build the cache while installing as the required database tables may not exist. if (!empty($GLOBALS['installing']) && $GLOBALS['installing'] == true|| empty($GLOBALS['db'])) return false; @@ -142,13 +143,13 @@ class DynamicField { } if (empty ( $module )) { foreach ( $results as $module => $result ) { - $this->saveToVardef ( $module, $result ); + $this->saveToVardef ( $module, $result, $saveCache); } } else { if (! empty ( $results [$module] )) { - $this->saveToVardef ( $module, $results [$module] ); + $this->saveToVardef ( $module, $results [$module], $saveCache); }else{ - $this->saveToVardef ( $module, false ); + $this->saveToVardef ( $module, false, $saveCache); } } @@ -179,8 +180,9 @@ class DynamicField { * * @param string $module * @param array $result + * @param boolean saveCache Boolean value indicating whether or not to call VardefManager::saveCache, defaults to true */ - function saveToVardef($module,$result) { + function saveToVardef($module,$result,$saveCache=true) { global $beanList; @@ -221,12 +223,18 @@ class DynamicField { } //if } } - $manager = new VardefManager ( ); - $manager->saveCache ( $this->module, $object ); + + $manager = new VardefManager(); + if($saveCache) + { + $manager->saveCache ($this->module, $object); + } + // Everything works off of vardefs, so let's have it save the users vardefs // to the employees module, because they both use the same table behind // the scenes - if ( $module == 'Users' ) { + if ($module == 'Users') + { $manager->loadVardef('Employees', 'Employee', true); return; } diff --git a/modules/DynamicFields/FieldViewer.php b/modules/DynamicFields/FieldViewer.php index 9ffa4375..e673bd83 100644 --- a/modules/DynamicFields/FieldViewer.php +++ b/modules/DynamicFields/FieldViewer.php @@ -41,7 +41,7 @@ class FieldViewer{ function getLayout($vardef){ if(empty($vardef['type']))$vardef['type'] = 'varchar'; - $mod = return_module_language($GLOBALS['current_language'], 'EditCustomFields'); + $mod = return_module_language($GLOBALS['current_language'], 'DynamicFields'); $this->ss->assign('vardef', $vardef); $this->ss->assign('MOD', $mod); $this->ss->assign('APP', $GLOBALS['app_strings']); diff --git a/modules/DynamicFields/templates/Fields/TemplateCurrency.php b/modules/DynamicFields/templates/Fields/TemplateCurrency.php index 71f18550..c4972009 100644 --- a/modules/DynamicFields/templates/Fields/TemplateCurrency.php +++ b/modules/DynamicFields/templates/Fields/TemplateCurrency.php @@ -43,6 +43,7 @@ class TemplateCurrency extends TemplateRange { var $max_size = 25; var $len = 26 ; + var $precision = 6; var $type='currency'; function delete($df){ @@ -68,6 +69,12 @@ class TemplateCurrency extends TemplateRange //$df->addLabel($currency_id->vname); } + function get_field_def(){ + $def = parent::get_field_def(); + $def['precision'] = (!empty($this->precision)) ? $this->precision : 6; + return $def; + } + function get_db_type() { $precision = (!empty($this->precision)) ? $this->precision : 6; diff --git a/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php b/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php index 47382e13..a25d658b 100644 --- a/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php +++ b/modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php @@ -159,7 +159,8 @@ class TemplateDatetimecombo extends TemplateRange foreach($this->vardef_map as $vardef=>$field){ if(isset($_REQUEST[$vardef])){ - $this->$vardef = $_REQUEST[$vardef]; + // Bug #48826 + $this->$vardef = is_string($_REQUEST[$vardef]) && in_array($vardef, $this->decode_from_request_fields_map) ? html_entity_decode($_REQUEST[$vardef]) : $_REQUEST[$vardef]; if($vardef != $field){ $this->$field = $this->$vardef; } diff --git a/modules/DynamicFields/templates/Fields/TemplateField.php b/modules/DynamicFields/templates/Fields/TemplateField.php index f24d77ed..a8f3f744 100644 --- a/modules/DynamicFields/templates/Fields/TemplateField.php +++ b/modules/DynamicFields/templates/Fields/TemplateField.php @@ -102,6 +102,9 @@ class TemplateField{ 'label_value'=>'label_value', 'unified_search'=>'unified_search', ); + // Bug #48826 + // fields to decode from post request + var $decode_from_request_fields_map = array('formula', 'dependency'); /* HTML FUNCTIONS */ @@ -424,8 +427,10 @@ class TemplateField{ function populateFromPost(){ foreach($this->vardef_map as $vardef=>$field){ + if(isset($_REQUEST[$vardef])){ - $this->$vardef = $_REQUEST[$vardef]; + // Bug #48826 + $this->$vardef = is_string($_REQUEST[$vardef]) && in_array($vardef, $this->decode_from_request_fields_map) ? html_entity_decode($_REQUEST[$vardef]) : $_REQUEST[$vardef]; // Bug 49774, 49775: Strip html tags from 'formula' and 'dependency'. // Add to the list below if we need to do the same for other fields. @@ -440,6 +445,7 @@ class TemplateField{ $this->$vardef = htmlentities(remove_xss($help)); } + if($vardef != $field){ $this->$field = $this->$vardef; } diff --git a/modules/DynamicFields/templates/Fields/TemplateMultiEnum.php b/modules/DynamicFields/templates/Fields/TemplateMultiEnum.php index 6b089169..d41475ce 100644 --- a/modules/DynamicFields/templates/Fields/TemplateMultiEnum.php +++ b/modules/DynamicFields/templates/Fields/TemplateMultiEnum.php @@ -132,7 +132,7 @@ class TemplateMultiEnum extends TemplateEnum{ else { // we have a packed representation containing one or both of default and dependency - if ( isset ( $unpacked [ 'default' ] ) && !isset($this->no_default)) + if ( isset ( $unpacked [ 'default' ] ) && !isset($this->no_default)) $def [ 'default' ] = $unpacked [ 'default' ] ; if ( isset ( $unpacked [ 'dependency' ] ) ) $def [ 'dependency' ] = $unpacked [ 'dependency' ] ; @@ -152,11 +152,11 @@ class TemplateMultiEnum extends TemplateEnum{ { if ( is_array ( $this->default ) ) $this->default = encodeMultienumValue($this->default); - $this->ext4 = ( isset ( $this->dependency ) ) ? serialize ( array ( 'default' => $this->default , 'dependency' => $this->dependency ) ) : $this->default ; + $this->ext4 = ( isset ( $this->dependency ) ) ? serialize ( array ( 'default' => $this->default , 'dependency' => html_entity_decode($this->dependency) ) ) : $this->default ; } else { if ( isset ( $this->dependency ) ) - $this->ext4 = serialize ( array ( 'dependency' => $this->dependency ) ) ; + $this->ext4 = serialize ( array ( 'dependency' => html_entity_decode($this->dependency) ) ) ; } parent::save($df); } diff --git a/modules/EmailMan/EmailMan.php b/modules/EmailMan/EmailMan.php index 1b0c0080..c7e50b8e 100644 --- a/modules/EmailMan/EmailMan.php +++ b/modules/EmailMan/EmailMan.php @@ -100,7 +100,7 @@ class EmailMan extends SugarBean{ LEFT JOIN accounts ON accounts.id = $this->table_name.related_id and $this->table_name.related_type ='Accounts' LEFT JOIN prospects ON prospects.id = $this->table_name.related_id and $this->table_name.related_type ='Prospects' LEFT JOIN prospect_lists ON prospect_lists.id = $this->table_name.list_id - LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.deleted=0 + LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.primary_address = 1 and email_addr_bean_rel.deleted=0 LEFT JOIN campaigns ON campaigns.id = $this->table_name.campaign_id LEFT JOIN email_marketing ON email_marketing.id = $this->table_name.marketing_id "; @@ -152,7 +152,7 @@ class EmailMan extends SugarBean{ LEFT JOIN accounts ON accounts.id = $this->table_name.related_id and $this->table_name.related_type ='Accounts' LEFT JOIN prospects ON prospects.id = $this->table_name.related_id and $this->table_name.related_type ='Prospects' LEFT JOIN prospect_lists ON prospect_lists.id = $this->table_name.list_id - LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.deleted=0 + LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.primary_address = 1 and email_addr_bean_rel.deleted=0 LEFT JOIN campaigns ON campaigns.id = $this->table_name.campaign_id LEFT JOIN email_marketing ON email_marketing.id = $this->table_name.marketing_id "; @@ -200,7 +200,7 @@ class EmailMan extends SugarBean{ LEFT JOIN accounts ON accounts.id = $this->table_name.related_id and $this->table_name.related_type ='Accounts' LEFT JOIN prospects ON prospects.id = $this->table_name.related_id and $this->table_name.related_type ='Prospects' LEFT JOIN prospect_lists ON prospect_lists.id = $this->table_name.list_id - LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.deleted=0 + LEFT JOIN email_addr_bean_rel ON email_addr_bean_rel.bean_id = $this->table_name.related_id and $this->table_name.related_type = email_addr_bean_rel.bean_module and email_addr_bean_rel.primary_address = 1 and email_addr_bean_rel.deleted=0 LEFT JOIN campaigns ON campaigns.id = $this->table_name.campaign_id LEFT JOIN email_marketing ON email_marketing.id = $this->table_name.marketing_id "; @@ -793,7 +793,7 @@ class EmailMan extends SugarBean{ //will be removed for the next release. if(!isset($btracker)) $btracker=false; if ($btracker) { - $mail->Body .= "

" . $tracker_text . "

"; + $mail->Body .= "

" . $tracker_text . "

"; } else { if (!empty($tracker_url)) { $mail->Body = str_replace('TRACKER_URL_START', "", $mail->Body); @@ -806,10 +806,10 @@ class EmailMan extends SugarBean{ //do not add the default remove me link if the campaign has a trackerurl of the opotout link if ($this->has_optout_links==false) { - $mail->Body .= "
{$mod_strings['TXT_REMOVE_ME']}
{$mod_strings['TXT_REMOVE_ME_CLICK']}"; + $mail->Body .= "
{$mod_strings['TXT_REMOVE_ME']}{$mod_strings['TXT_REMOVE_ME_CLICK']}"; } // cn: bug 11979 - adding single quote to comform with HTML email RFC - $mail->Body .= "
"; + $mail->Body .= "
"; $mail->AltBody = $template_data['body']; if ($btracker) { diff --git a/modules/EmailMan/tpls/config.tpl b/modules/EmailMan/tpls/config.tpl index c567c37d..5c0554bb 100644 --- a/modules/EmailMan/tpls/config.tpl +++ b/modules/EmailMan/tpls/config.tpl @@ -134,7 +134,7 @@ function change_state(radiobutton) { @@ -183,8 +183,8 @@ function change_state(radiobutton) {
- - + +    
- - - - -
- - - {$APP.LBL_REQUIRED_SYMBOL} {$APP.NTC_REQUIRED}
- + + +
- - - - - - - - - - - - - - - - - - - -

{$MOD.LBL_CONTACT_INFORMATION}

{$MOD.LBL_FIRST_NAME} {$MOD.LBL_OFFICE_PHONE}
{$MOD.LBL_LAST_NAME} {$APP.LBL_REQUIRED_SYMBOL}{$MOD.LBL_EMAIL_ADDRESS}
{$MOD.LBL_LEAD_SOURCE}
- - \ No newline at end of file + +{if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"} + +{else} + +{/if} + + + + + + +{if !empty($smarty.request.return_module)} + + +{/if} + +{{if isset($form.hidden)}} +{{foreach from=$form.hidden item=field}} +{{$field}} +{{/foreach}} +{{/if}} + +{* -- Begin QuickCreate Specific -- *} + + +{* -- End QuickCreate Specific -- *} + +{{if empty($form.button_location) || $form.button_location == 'top'}} +{{if !empty($form) && !empty($form.buttons)}} + {{foreach from=$form.buttons key=val item=button}} + {{sugar_button module="$module" id="$button" view="$view"}} + {{/foreach}} +{{else}} +{{sugar_button module="$module" id="SAVE" view="$view"}} +{{sugar_button module="$module" id="CANCEL" view="$view"}} +{{/if}} +{{if empty($form.hideAudit) || !$form.hideAudit}} +{{sugar_button module="$module" id="Audit" view="$view"}} +{{/if}} +{{/if}} +
{{$ADMIN_EDIT}}
\ No newline at end of file diff --git a/modules/Leads/vardefs.php b/modules/Leads/vardefs.php index 9e4f2976..22a0db78 100644 --- a/modules/Leads/vardefs.php +++ b/modules/Leads/vardefs.php @@ -307,7 +307,7 @@ $dictionary['Lead'] = array('table' => 'leads','audited'=>true, 'unified_search' 'source' => 'non-db', 'importable' => 'false', 'duplicate_merge'=> 'disabled', - 'studio' => array('listview' => false), + 'studio' => false, ), 'm_accept_status_fields' => array ( @@ -322,7 +322,7 @@ $dictionary['Lead'] = array('table' => 'leads','audited'=>true, 'unified_search' 'importable' => 'false', 'hideacl'=>true, 'duplicate_merge'=> 'disabled', - 'studio' => array('listview' => false), + 'studio' => false, ), 'accept_status_id' => array( diff --git a/modules/Leads/views/view.convertlead.php b/modules/Leads/views/view.convertlead.php index aa9a6b74..a7da2395 100644 --- a/modules/Leads/views/view.convertlead.php +++ b/modules/Leads/views/view.convertlead.php @@ -110,7 +110,7 @@ class ViewConvertLead extends SugarView echo $this->getModuleTitle(); require_once("include/QuickSearchDefaults.php"); - $qsd = new QuickSearchDefaults(); + $qsd = QuickSearchDefaults::getQuickSearchDefaults(); $qsd->setFormName("ConvertLead"); $this->contact = new Contact(); @@ -148,8 +148,17 @@ class ViewConvertLead extends SugarView { continue; } + + $bean = $beanList[$module]; $focus = new $bean(); + + // skip if we aren't allowed to save this bean + if (!$focus->ACLAccess('save')) + { + continue; + } + $focus->fill_in_additional_detail_fields(); foreach($focus->field_defs as $field => $def) { @@ -211,6 +220,8 @@ class ViewConvertLead extends SugarView } echo "
"; echo ($qsd->getQSScriptsJSONAlreadyDefined()); + // need to re-assign bean as it gets overridden by $ev->display + $smarty->assign("bean", $this->focus); $smarty->display("modules/Leads/tpls/ConvertLeadFooter.tpl"); } diff --git a/modules/Leads/views/view.edit.php b/modules/Leads/views/view.edit.php new file mode 100644 index 00000000..0e20da75 --- /dev/null +++ b/modules/Leads/views/view.edit.php @@ -0,0 +1,49 @@ +useForSubpanel = true; + $this->useModuleQuickCreateTemplate = true; + } + +} \ No newline at end of file diff --git a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php index bca0d524..38f69316 100644 --- a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php +++ b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php @@ -80,7 +80,7 @@ class MyMeetingsDashlet extends DashletGeneric { //join with meeting_users table to process related users $this->seedBean->listview_inner_join = array('LEFT JOIN meetings_users m_u on m_u.meeting_id = meetings.id'); //set the custom query to retrieve invitees AND assigned meetings - $lvsParams['custom_where'] = ' AND (meetings.assigned_user_id = \'' . $current_user->id . '\' OR m_u.user_id = \'' . $current_user->id . '\') AND m_u.deleted=0 '; + $lvsParams['custom_where'] = ' AND (meetings.assigned_user_id = \'' . $current_user->id . '\' OR (m_u.user_id = \'' . $current_user->id . '\' AND m_u.deleted=0)) '; } $this->myItemsOnly = false; diff --git a/modules/Meetings/metadata/editviewdefs.php b/modules/Meetings/metadata/editviewdefs.php index ef16a05c..c403ec8e 100644 --- a/modules/Meetings/metadata/editviewdefs.php +++ b/modules/Meetings/metadata/editviewdefs.php @@ -127,7 +127,7 @@ function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.E array ( 'name' => 'duration_hours', 'label' => 'LBL_DURATION', - 'customCode' => '{literal}{/literal}
{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINS}
', + 'customCode' => '{literal}{/literal}
{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINS}
', ), array ( 'name' => 'location', diff --git a/modules/Meetings/tpls/footer.tpl b/modules/Meetings/tpls/footer.tpl index bab41021..4583e2d5 100644 --- a/modules/Meetings/tpls/footer.tpl +++ b/modules/Meetings/tpls/footer.tpl @@ -88,6 +88,19 @@ meetingsLoader.addModule({ requires: [] }); meetingsLoader.insert(); +YAHOO.util.Event.onContentReady("{/literal}{{$form_name}}{literal}",function() { + var durationHours = document.getElementById('duration_hours'); + if (durationHours) { + document.getElementById('duration_minutes').tabIndex = durationHours.tabIndex; + } + + var reminderChecked = document.getElementsByName('reminder_checked'); + for(i=0;i diff --git a/modules/ModuleBuilder/MB/MBPackage.php b/modules/ModuleBuilder/MB/MBPackage.php index 8fa5c043..21bb6e92 100644 --- a/modules/ModuleBuilder/MB/MBPackage.php +++ b/modules/ModuleBuilder/MB/MBPackage.php @@ -296,10 +296,10 @@ function buildInstall($path){ } function populateFromPost(){ - $this->description = $_REQUEST['description']; - $this->author = $_REQUEST['author']; - $this->key = $_REQUEST['key']; - $this->readme = $_REQUEST['readme']; + $this->description = trim($_REQUEST['description']); + $this->author = trim($_REQUEST['author']); + $this->key = trim($_REQUEST['key']); + $this->readme = trim($_REQUEST['readme']); } function rename($new_name){ diff --git a/modules/ModuleBuilder/MB/MBVardefs.php b/modules/ModuleBuilder/MB/MBVardefs.php index f21274df..67ffe0cb 100644 --- a/modules/ModuleBuilder/MB/MBVardefs.php +++ b/modules/ModuleBuilder/MB/MBVardefs.php @@ -121,6 +121,7 @@ class MBVardefs{ return $this->vardef; } + function addFieldVardef($vardef) { if(!isset($vardef['default']) || strlen($vardef['default']) == 0) diff --git a/modules/ModuleBuilder/Module/StudioModule.php b/modules/ModuleBuilder/Module/StudioModule.php index 09303d2a..dd997e12 100644 --- a/modules/ModuleBuilder/Module/StudioModule.php +++ b/modules/ModuleBuilder/Module/StudioModule.php @@ -49,7 +49,9 @@ class StudioModule function __construct ($module) { - $this->sources = array ( 'editviewdefs.php' => array ( 'name' => translate ('LBL_EDITVIEW') , 'type' => MB_EDITVIEW , 'image' => 'EditView' ) , + //Sources can be used to override the file name mapping for a specific view or the parser for a view. + //The + $this->sources = array ( 'editviewdefs.php' => array ( 'name' => translate ('LBL_EDITVIEW') , 'type' => MB_EDITVIEW , 'image' => 'EditView' ) , 'detailviewdefs.php' => array ( 'name' => translate('LBL_DETAILVIEW') , 'type' => MB_DETAILVIEW , 'image' => 'DetailView' ) , 'listviewdefs.php' => array ( 'name' => translate('LBL_LISTVIEW') , 'type' => MB_LISTVIEW , 'image' => 'ListView' ) ) ; @@ -174,7 +176,8 @@ class StudioModule $views = array () ; foreach ( $this->sources as $file => $def ) { - if (file_exists ( "modules/{$this->module}/metadata/$file" )) + if (file_exists ( "modules/{$this->module}/metadata/$file" ) + || file_exists ( "custom/modules/{$this->module}/metadata/$file" )) { $views [ str_replace ( '.php', '' , $file) ] = $def ; } @@ -198,7 +201,8 @@ class StudioModule $layouts = array ( ) ; foreach ( $views as $def ) { - $layouts [ $def['name'] ] = array ( 'name' => $def['name'] , 'action' => "module=ModuleBuilder&action=editLayout&view={$def['type']}&view_module={$this->module}" , 'imageTitle' => $def['image'] , 'help' => "viewBtn{$def['type']}" , 'size' => '48' ) ; + $view = !empty($def['view']) ? $def['view'] : $def['type']; + $layouts [ $def['name'] ] = array ( 'name' => $def['name'] , 'action' => "module=ModuleBuilder&action=editLayout&view={$view}&view_module={$this->module}" , 'imageTitle' => $def['image'] , 'help' => "viewBtn{$def['type']}" , 'size' => '48' ) ; } if($this->isValidDashletModule($this->module)){ @@ -291,13 +295,18 @@ class StudioModule $GLOBALS [ 'log' ]->debug ( "StudioModule->getSubpanels(): getting subpanels for " . $this->module ) ; + // counter to add a unique key to assoc array below + $ct=0; foreach ( SubPanel::getModuleSubpanels ( $this->module ) as $name => $label ) { if ($name == 'users') continue ; $subname = sugar_ucfirst ( (! empty ( $label )) ? translate ( $label, $this->module ) : $name ) ; $action = "module=ModuleBuilder&action=editLayout&view=ListView&view_module={$this->module}&subpanel={$name}&subpanelLabel=" . urlencode($subname); - $nodes [ $subname ] = array ( + + // bug47452 - adding a unique number to the $nodes[ key ] so if you have 2+ panels + // with the same subname they will not cancel each other out + $nodes [ $subname . $ct++ ] = array ( 'name' => $name , 'label' => $subname , 'action' => $action, @@ -371,9 +380,17 @@ class StudioModule $bean_class = new $class(); //create new subpanel definition instance and get list of tabs - $spd = new SubPanelDefinitions($bean_class) ; - if ( isset($spd->layout_defs['subpanel_setup'][strtolower($subpanel)]['module']) ){ - $spd_arr[] = $mod_name; + $spd = new SubPanelDefinitions($bean_class); + if (isset($spd->layout_defs['subpanel_setup'])) + { + foreach ($spd->layout_defs['subpanel_setup'] as $panelname) + { + if ($panelname['module'] == $subpanel) + { + $spd_arr[] = array('mod_name' => $mod_name, + 'panel_name' => $panelname['get_subpanel_data']); + } + } } } return $spd_arr; @@ -403,9 +420,11 @@ class StudioModule foreach($data as $parentModule){ //If this module type doesn't support a given metadata type, we will get an exception from getParser() try { - $parser = ParserFactory::getParser( MB_LISTVIEW , $parentModule, null , $this->module) ; - if ($parser->removeField ( $fieldName ) ) - $parser->handleSave(false) ; + $parser = ParserFactory::getParser(MB_LISTVIEW, $parentModule['mod_name'], null, $parentModule['panel_name']); + if ($parser->removeField($fieldName)) + { + $parser->handleSave(false); + } } catch(Exception $e){} } } @@ -423,7 +442,18 @@ class StudioModule return $sources; } - + + public function getViewType($view) + { + foreach($this->sources as $file => $def) + { + if (!empty($def['view']) && $def['view'] == $view && !empty($def['type'])) + { + return $def['type']; + } + } + return $view; + } } diff --git a/modules/ModuleBuilder/Module/StudioModuleFactory.php b/modules/ModuleBuilder/Module/StudioModuleFactory.php index 6970ab77..c6b31721 100644 --- a/modules/ModuleBuilder/Module/StudioModuleFactory.php +++ b/modules/ModuleBuilder/Module/StudioModuleFactory.php @@ -38,18 +38,31 @@ require_once 'modules/ModuleBuilder/Module/StudioModule.php' ; class StudioModuleFactory { - function getStudioModule($module) + protected static $loadedMods = array(); + + public static function getStudioModule($module) { - $studioModClass = "{$module}StudioModule"; - if (file_exists("modules/{$module}/{$studioModClass}.php")) + if (!empty(self::$loadedMods[$module])) + return self::$loadedMods[$module]; + + $studioModClass = "{$module}StudioModule"; + if (file_exists("custom/modules/{$module}/{$studioModClass}.php")) + { + require_once "custom/modules/{$module}/{$studioModClass}.php"; + $sm = new $studioModClass($module); + + } else if (file_exists("modules/{$module}/{$studioModClass}.php")) { require_once "modules/{$module}/{$studioModClass}.php"; - return new $studioModClass($module); - } + $sm = new $studioModClass($module); + + } else { - return new StudioModule($module); + $sm = new StudioModule($module); } + self::$loadedMods[$module] = $sm; + return $sm; } } ?> \ No newline at end of file diff --git a/modules/ModuleBuilder/controller.php b/modules/ModuleBuilder/controller.php index 4c3f21ca..34946233 100644 --- a/modules/ModuleBuilder/controller.php +++ b/modules/ModuleBuilder/controller.php @@ -36,6 +36,7 @@ require_once ('modules/ModuleBuilder/MB/ModuleBuilder.php') ; require_once ('modules/ModuleBuilder/parsers/ParserFactory.php') ; +require_once ('modules/ModuleBuilder/Module/StudioModuleFactory.php'); require_once 'modules/ModuleBuilder/parsers/constants.php' ; class ModuleBuilderController extends SugarController @@ -102,31 +103,49 @@ class ModuleBuilderController extends SugarController function action_editLayout () { - switch ( strtolower ( $_REQUEST [ 'view' ] )) + $view = strtolower ( $_REQUEST [ 'view' ] ); + $found = false; + //Check the StudioModule first for mapping overrides + if(empty($_REQUEST [ 'view_package' ] )|| $_REQUEST [ 'view_package' ] == "studio") { - case MB_EDITVIEW : - case MB_DETAILVIEW : - case MB_QUICKCREATE : - $this->view = 'layoutView' ; - break ; - case MB_LISTVIEW : - $this->view = 'listView' ; - break ; - case MB_BASICSEARCH : - case MB_ADVANCEDSEARCH : - $this->view = 'searchView' ; - break ; - case MB_DASHLET : - case MB_DASHLETSEARCH : - $this->view = 'dashlet' ; - break ; - case MB_POPUPLIST : - case MB_POPUPSEARCH : - $this->view = 'popupview' ; - break ; - default : - $GLOBALS [ 'log' ]->fatal ( 'Action = editLayout with unknown view=' . $_REQUEST [ 'view' ] ) ; + $sm = StudioModuleFactory::getStudioModule($_REQUEST [ 'view_module' ]); + foreach($sm->sources as $file => $def) + { + if (!empty($def['type']) && !empty($def['view']) && $def['view'] == $view ) + { + $view = $def['type']; + } + } + } + if (!$found) + { + switch ( $view) + { + case MB_EDITVIEW : + case MB_DETAILVIEW : + case MB_QUICKCREATE : + $this->view = 'layoutView' ; + break ; + case MB_LISTVIEW : + $this->view = 'listView' ; + break ; + case MB_BASICSEARCH : + case MB_ADVANCEDSEARCH : + $this->view = 'searchView' ; + break ; + case MB_DASHLET : + case MB_DASHLETSEARCH : + $this->view = 'dashlet' ; + break ; + case MB_POPUPLIST : + case MB_POPUPSEARCH : + $this->view = 'popupview' ; + break ; + default : + $GLOBALS [ 'log' ]->fatal ( 'Action = editLayout with unknown view=' . $_REQUEST [ 'view' ] ) ; + } } + } diff --git a/modules/ModuleBuilder/javascript/ModuleBuilder.js b/modules/ModuleBuilder/javascript/ModuleBuilder.js index 90b7fde5..3d966ff6 100644 --- a/modules/ModuleBuilder/javascript/ModuleBuilder.js +++ b/modules/ModuleBuilder/javascript/ModuleBuilder.js @@ -1005,7 +1005,7 @@ if (typeof(ModuleBuilder) == 'undefined') { paramsToUrl : function (params) { url = ""; for (i in params) { - url += i + "=" + params[i] + "&"; + url += i + "=" + params[i] + "&"; } return url; }, diff --git a/modules/ModuleBuilder/javascript/SimpleList.js b/modules/ModuleBuilder/javascript/SimpleList.js index 56461171..72bf910b 100644 --- a/modules/ModuleBuilder/javascript/SimpleList.js +++ b/modules/ModuleBuilder/javascript/SimpleList.js @@ -120,11 +120,11 @@ if(typeof(SimpleList) == 'undefined'){ if(drop_value.value == ""){ html += "[" + SUGAR.language.get('ModuleBuilder', 'LBL_BLANK') + "]"; }else{ - html += "["+escape(drop_value.value)+"]"; + html += "["+drop_value.value+"]"; } html += ""; html += ""; html += ""+SimpleList.editImage+""; html += " "+SimpleList.deleteImage+""; diff --git a/modules/ModuleBuilder/language/en_us.lang.php b/modules/ModuleBuilder/language/en_us.lang.php index b9d64fa9..f82211d9 100644 --- a/modules/ModuleBuilder/language/en_us.lang.php +++ b/modules/ModuleBuilder/language/en_us.lang.php @@ -110,8 +110,8 @@ $mod_strings = array( 'modify' => 'All of the fields that can be displayed in the ListView appear here.

The Default column contains the fields that are displayed in the ListView by default.

The Available column contains fields that a user can select in the Search to create a custom ListView.

The Hidden column contains fields that can be added to the Default or Available column.' , 'savebtn' => 'Click Save & Deploy to save changes you made and to make them active within the module.', - 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.', - 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.', + 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.

Restore within View History restores the field placement within previously saved layouts. To change field labels, click the Edit icon next to each field.', + 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.

Restore Default only restores the field placement within the original layout. To change field labels, click the Edit icon next to each field.', 'Hidden' => 'Hidden fields not currently available for users to see in ListViews.', 'Available' => 'Available fields are not shown by default, but can be added to ListViews by users.', 'Default' => 'Default fields appear in ListViews that are not customized by users.' @@ -120,8 +120,8 @@ $mod_strings = array( 'modify' => 'All of the fields that can be displayed in the ListView appear here.

The Default column contains the fields that are displayed in the ListView by default.

The Hidden column contains fields that can be added to the Default or Available column.' , 'savebtn' => 'Click Save & Deploy to save changes you made and to make them active within the module.', - 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.', - 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.', + 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.

Restore within View History restores the field placement within previously saved layouts. To change field labels, click the Edit icon next to each field.', + 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.

Restore Default only restores the field placement within the original layout. To change field labels, click the Edit icon next to each field.', 'Hidden' => 'Hidden fields not currently available for users to see in ListViews.', 'Default' => 'Default fields appear in ListViews that are not customized by users.' ), @@ -130,8 +130,8 @@ $mod_strings = array( , 'savebtn' => 'Clicking Save & Deploy will save all changes and make them active', 'Hidden' => 'Hidden fields do not appear in the Search.', - 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.', - 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.', + 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.

Restore within View History restores the field placement within previously saved layouts. To change field labels, click the Edit icon next to each field.', + 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.

Restore Default only restores the field placement within the original layout. To change field labels, click the Edit icon next to each field.', 'Default' => 'Default fields appear in the Search.' ), 'layoutEditor'=>array( @@ -143,8 +143,8 @@ $mod_strings = array( 'default' => 'The Layout area contains the fields that are currently displayed within the EditView.

The Toolbox contains the Recycle Bin and the fields and layout elements that can be added to the layout.

Make changes to the layout by dragging and dropping elements and fields between the Toolbox and the Layout and within the layout itself.

To remove a field from the layout, drag the field to the Recycle Bin. The field will then be available in the Toolbox to add to the layout.' , 'saveBtn' => 'Click Save to preserve the changes you made to the layout since the last time you saved it.

The changes will not be displayed in the module until you Deploy the saved changes.', - 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.', - 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.', + 'historyBtn'=> 'Click View History to view and restore a previously saved layout from the history.

Restore within View History restores the field placement within previously saved layouts. To change field labels, click the Edit icon next to each field.', + 'historyDefault'=> 'Click Restore Default to restore a view to its original layout.

Restore Default only restores the field placement within the original layout. To change field labels, click the Edit icon next to each field.', 'publishBtn'=> 'Click Save & Deploy to save all changes you made to the layout since the last time you saved it, and to make the changes active in the module.

The layout will immediately be displayed in the module.', 'toolbox' => 'The Toolbox contains the Recycle Bin, additional layout elements and the set of available fields to add to the layout.

The layout elements and fields in the Toolbox can be dragged and dropped into the layout, and the layout elements and fields can be dragged and dropped from the layout into the Toolbox.

The layout elements are Panels and Rows. Adding a new row or a new panel to the layout provides additional locations in the layout for fields.

Drag and drop any of the fields in the Toolbox or layout onto a occupied field position to swap the locations of the two fields.

The Filler field creates blank space in the layout where it is placed.', 'panels' => 'The Layout area provides a view of how the layout will appear within the module when the changes made to the layout are deployed.

You can reposition fields, rows and panels by dragging and dropping them in the desired location.

Remove elements by dragging and dropping them in the Recycle Bin in the Toolbox, or add new elements and fields by dragging them from the Toolboxs and dropping them in the desired location in the layout.', diff --git a/modules/ModuleBuilder/parsers/ParserFactory.php b/modules/ModuleBuilder/parsers/ParserFactory.php index f61fd48a..7c62e305 100644 --- a/modules/ModuleBuilder/parsers/ParserFactory.php +++ b/modules/ModuleBuilder/parsers/ParserFactory.php @@ -52,12 +52,30 @@ class ParserFactory * @return AbstractMetaDataParser */ - function getParser ( $view , $moduleName , $packageName = null , $subpanelName = null ) + public static function getParser ( $view , $moduleName , $packageName = null , $subpanelName = null ) { $GLOBALS [ 'log' ]->info ( "ParserFactory->getParser($view,$moduleName,$packageName,$subpanelName )" ) ; - if ( empty ( $packageName ) || ( $packageName == 'studio' ) ) - $packageName = null ; - switch ( strtolower ( $view )) + $sm = null; + $lView = strtolower ( $view ); + if ( empty ( $packageName ) || ( $packageName == 'studio' ) ) + { + $packageName = null ; + //For studio modules, check for view parser overrides + $parser = self::checkForStudioParserOverride($view, $moduleName, $packageName); + if ($parser) return $parser; + $sm = StudioModuleFactory::getStudioModule($moduleName); + //If we didn't find a specofic parser, see if there is a view to type mapping + foreach($sm->sources as $file => $def) + { + if (!empty($def['view']) && $def['view'] == $view && !empty($def['type'])) + { + $lView = strtolower($def['type']); + break; + } + } + } + + switch ( $lView) { case MB_EDITVIEW : case MB_DETAILVIEW : @@ -93,28 +111,69 @@ class ParserFactory require_once 'modules/ModuleBuilder/parsers/parser.visibility.php' ; return new ParserVisibility ( $moduleName, $packageName ) ; default : - $prefix = ''; - if(!is_null ( $packageName )){ - $prefix = empty($packageName) ? 'build' :'modify'; - } - $fileName = "modules/ModuleBuilder/parsers/parser." . strtolower ( $prefix . $view ) . ".php" ; - if (file_exists ( $fileName )) - { - require_once $fileName ; - $class = 'Parser' . $prefix . ucfirst ( $view ) ; - if (class_exists ( $class )) - { - $GLOBALS [ 'log' ]->debug ( 'Using ModuleBuilder Parser ' . $fileName ) ; - $parser = new $class ( ) ; - return $parser ; - } - } + $parser = self::checkForParserClass($view, $moduleName, $packageName); + if ($parser) + return $parser; } - $GLOBALS [ 'log' ]->fatal ( get_class ( $this ) . ": cannot create ModuleBuilder Parser $fileName" ) ; + $GLOBALS [ 'log' ]->fatal ("ParserFactory: cannot create ModuleBuilder Parser $view" ) ; } + protected static function checkForParserClass($view, $moduleName, $packageName, $nameOverride = false) + { + $prefix = ''; + if(!is_null ( $packageName )){ + $prefix = empty($packageName) ? 'build' :'modify'; + } + $fileNames = array( + "custom/modules/$moduleName/parsers/parser." . strtolower ( $prefix . $view ) . ".php", + "modules/$moduleName/parsers/parser." . strtolower ( $prefix . $view ) . ".php", + "custom/modules/ModuleBuilder/parsers/parser." . strtolower ( $prefix . $view ) . ".php", + "modules/ModuleBuilder/parsers/parser." . strtolower ( $prefix . $view ) . ".php", + ); + foreach($fileNames as $fileName) + { + if (file_exists ( $fileName )) + { + require_once $fileName ; + $class = 'Parser' . $prefix . ucfirst ( $view ) ; + if (class_exists ( $class )) + { + $GLOBALS [ 'log' ]->debug ( 'Using ModuleBuilder Parser ' . $fileName ) ; + $parser = new $class ( ) ; + return $parser ; + } + } + } + return false; + } + + protected static function checkForStudioParserOverride($view, $moduleName, $packageName) + { + require_once('modules/ModuleBuilder/Module/StudioModuleFactory.php'); + $sm = StudioModuleFactory::getStudioModule($moduleName); + foreach($sm->sources as $file => $def) + { + if (!empty($def['view']) && $def['view'] == strtolower($view) && !empty($def['parser'])) + { + $pName = $def['parser']; + $path = "module/ModuleBuilder/parsers/views/{$pName}.php"; + if (file_exists("custom/$path")) + require_once("custom/$path"); + else if (file_exists($path)) + require_once($path); + if (class_exists ( $pName )) + return new $pName($view, $moduleName, $packageName); + //If it wasn't defined directly, check for a generic parser name for the view + $parser = self::checkForParserClass($view, $moduleName, $packageName); + if ($parser) + return $parser; + } + } + return false; + } + } ?> \ No newline at end of file diff --git a/modules/ModuleBuilder/parsers/parser.label.php b/modules/ModuleBuilder/parsers/parser.label.php index 295eaad8..153928dd 100644 --- a/modules/ModuleBuilder/parsers/parser.label.php +++ b/modules/ModuleBuilder/parsers/parser.label.php @@ -206,7 +206,7 @@ class ParserLabel extends ModuleBuilderParser { if (! isset ( $mod_strings [ $key ] ) || strcmp ( $value, $mod_strings [ $key ] ) != 0) { - $mod_strings [$key] = htmlentities(html_entity_decode_utf8($value, ENT_QUOTES ), ENT_QUOTES ); // must match encoding used in view.labels.php + $mod_strings [$key] = to_html(strip_tags(from_html($value))); // must match encoding used in view.labels.php $changed = true ; } } diff --git a/modules/ModuleBuilder/parsers/parser.modifylistview.php b/modules/ModuleBuilder/parsers/parser.modifylistview.php index b5091141..2b4129fb 100644 --- a/modules/ModuleBuilder/parsers/parser.modifylistview.php +++ b/modules/ModuleBuilder/parsers/parser.modifylistview.php @@ -286,7 +286,7 @@ class ParserModifyListView extends ModuleBuilderParser if (isset ( $_REQUEST [ strtolower ( $fieldname ) . 'width' ] )) { $width = substr ( $_REQUEST [ strtolower ( $fieldname ) . 'width' ], 6, 3 ) ; - if (strpos ( $width, "%" ) != false) + if (strpos ( $width, "%" ) !== false) { $width = substr ( $width, 0, 2 ) ; } diff --git a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php index 473bf3ce..8bb2dbd2 100644 --- a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php +++ b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php @@ -568,7 +568,7 @@ class AbstractRelationship * @param string $ensureUnique * @return string Valid column name trimmed to right length and with invalid characters removed */ - static function getValidDBName ($name, $ensureUnique = false) + static function getValidDBName ($name, $ensureUnique = true) { require_once 'modules/ModuleBuilder/parsers/constants.php' ; diff --git a/modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php b/modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php index 213b3f5e..d0fc76b4 100644 --- a/modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php @@ -129,5 +129,27 @@ abstract class AbstractMetaDataParser return $newAry; } + /** + * Used to determine if a field property is true or false given that it could be + * the boolean value or a string value such use 'false' or '0' + * @static + * @param $val + * @return bool + */ + protected static function isTrue($val) + { + if (is_string($val)) + { + $str = strtolower($val); + return ($str != '0' && $str != 'false' && $str != ""); + } + //For non-string types, juse use PHP's normal boolean conversion + else{ + return ($val == true); + } + + return true; + } + } ?> \ No newline at end of file diff --git a/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php b/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php index 4a226af2..5d28b4f5 100644 --- a/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php +++ b/modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php @@ -61,10 +61,6 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl { // BEGIN ASSERTIONS - if (! isset ( $this->_fileVariables [ $view ] )) - { - sugar_die ( get_class ( $this ) . ": View $view is not supported" ) ; - } if (! isset ( $GLOBALS [ 'beanList' ] [ $moduleName ] )) { sugar_die ( get_class ( $this ) . ": Modulename $moduleName is not a Deployed Module" ) ; @@ -78,6 +74,18 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl $this->module_dir = $module->seed->module_dir; $fielddefs = $module->getFields(); + //Load any custom views + $sm = StudioModuleFactory::getStudioModule($moduleName); + foreach($sm->sources as $file => $def) + { + if (!empty($def['view'])) { + $viewVar = "viewdefs"; + if (!empty($def['type']) && !empty($this->_fileVariables[$def["type"]])) + $viewVar = $this->_fileVariables[$def["type"]]; + $this->_fileVariables[$def['view']] = $viewVar; + } + } + $loaded = null ; foreach ( array ( MB_BASEMETADATALOCATION , MB_CUSTOMMETADATALOCATION , MB_WORKINGMETADATALOCATION , MB_HISTORYMETADATALOCATION ) as $type ) { @@ -292,7 +300,12 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl public static function getFileName ($view , $moduleName , $type = MB_CUSTOMMETADATALOCATION) { - $pathMap = array ( MB_BASEMETADATALOCATION => '' , MB_CUSTOMMETADATALOCATION => 'custom/' , MB_WORKINGMETADATALOCATION => 'custom/working/' , MB_HISTORYMETADATALOCATION => 'custom/history/' ) ; + $pathMap = array ( + MB_BASEMETADATALOCATION => '' , + MB_CUSTOMMETADATALOCATION => 'custom/' , + MB_WORKINGMETADATALOCATION => 'custom/working/' , + MB_HISTORYMETADATALOCATION => 'custom/history/' + ) ; $type = strtolower ( $type ) ; $filenames = array ( @@ -308,6 +321,16 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl MB_QUICKCREATE => 'quickcreatedefs', ) ; + //In a deployed module, we can check for a studio module with file name overrides. + $sm = StudioModuleFactory::getStudioModule($moduleName); + foreach($sm->sources as $file => $def) + { + if (!empty($def['view'])) { + $filenames[$def['view']] = substr($file, 0, strlen($file) - 4); + } + + } + // BEGIN ASSERTIONS if (! isset ( $pathMap [ $type ] )) { @@ -353,9 +376,12 @@ class DeployedMetaDataImplementation extends AbstractMetaDataImplementation impl } else { $newkey = $key; $newval = $val; - foreach ($replacements as $var => $rep) { - $newkey = str_replace($var, $rep, $newkey); - $newval = str_replace($var, $rep, $newval); + if(is_string($val)) + { + foreach ($replacements as $var => $rep) { + $newkey = str_replace($var, $rep, $newkey); + $newval = str_replace($var, $rep, $newval); + } } $ret[$newkey] = $newval; } diff --git a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php index e6f4a8d5..5a482c73 100644 --- a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php @@ -64,11 +64,6 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat $view = strtolower ( $view ) ; - // BEGIN ASSERTIONS - if (! isset ( self::$variableMap [ $view ] ) ) - sugar_die ( get_class ( $this ) . ": View $view is not supported" ) ; - // END ASSERTIONS - $this->FILLER = array ( 'name' => MBConstants::$FILLER['name'] , 'label' => translate ( MBConstants::$FILLER['label'] ) ) ; $this->_moduleName = $moduleName ; @@ -85,9 +80,12 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat } $viewdefs = $this->implementation->getViewdefs () ; + if (!isset(self::$variableMap [ $view ])) + self::$variableMap [ $view ] = $view; - if (! isset ( $viewdefs [ self::$variableMap [ $view ] ] )) - sugar_die ( get_class ( $this ) . ": missing variable " . self::$variableMap [ $view ] . " in layout definition" ) ; + if (!isset($viewdefs [ self::$variableMap [ $view ]])){ + sugar_die ( get_class ( $this ) . ": incorrect view variable for $view" ) ; + } $viewdefs = $viewdefs [ self::$variableMap [ $view ] ] ; if (! isset ( $viewdefs [ 'templateMeta' ] )) @@ -556,18 +554,12 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat //Use the previous viewdef if this field was on it. else if (isset($previousViewDef[$fieldname])) { - $newRow [ $colID - $offset ] = $previousViewDef[$fieldname]; - //We should copy over the tabindex if it is set. - if (isset ($fielddefs [ $fieldname ]) && !empty($fielddefs [ $fieldname ]['tabindex'])) - $newRow [ $colID - $offset ]['tabindex'] = $fielddefs [ $fieldname ]['tabindex']; + $newRow[$colID - $offset] = $this->getNewRowItem($previousViewDef[$fieldname], $fielddefs[$fieldname]); } //next see if the field was on the original layout. else if (isset ($this->_originalViewDef [ $fieldname ])) { - $newRow [ $colID - $offset ] = $this->_originalViewDef [ $fieldname ] ; - //We should copy over the tabindex if it is set. - if (isset ($fielddefs [ $fieldname ]) && !empty($fielddefs [ $fieldname ]['tabindex'])) - $newRow [ $colID - $offset ]['tabindex'] = $fielddefs [ $fieldname ]['tabindex']; + $newRow[$colID - $offset] = $this->getNewRowItem($this->_originalViewDef[$fieldname], $fielddefs[$fieldname]); } //Otherwise make up a viewdef for it from field_defs else if (isset ($fielddefs [ $fieldname ])) @@ -588,6 +580,36 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat return $panels ; } + /* + * fixing bug #44428: Studio | Tab Order causes layout errors + * @param string|array $source it can be a string which contain just a name of field + * or an array with field attributes including name + * @param array $fielddef stores field defs from request + * @return string|array definition of new row item + */ + function getNewRowItem($source, $fielddef) + { + //We should copy over the tabindex if it is set. + $newRow = array(); + if (isset ($fielddef) && !empty($fielddef['tabindex'])) + { + if (is_array($source)) + { + $newRow = $source; + } + else + { + $newRow['name'] = $source; + } + $newRow['tabindex'] = $fielddef['tabindex']; + } + else + { + $newRow = $source; + } + return $newRow; + } + /* * Convert from the standard MetaData format to our internal format * Replace NULL with (filler) and missing entries with (empty) @@ -677,7 +699,7 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat { $panels = $viewdef['panels']; } else { - $panels = $viewdef[self::$variableMap [ $this->_view ] ]['panels']; + $panels = $viewdef[self::$variableMap [ $this->_view ] ]['panels']; } $ret = array(); diff --git a/modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php b/modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php index d2a22268..a44b636c 100644 --- a/modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php @@ -46,7 +46,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); // Columns is used by the view to construct the listview - each column is built by calling the named function public $columns = array ( 'LBL_DEFAULT' => 'getDefaultFields' , 'LBL_AVAILABLE' => 'getAdditionalFields' , 'LBL_HIDDEN' => 'getAvailableFields' ) ; - public static $reserveProperties = array('moduleMain', 'varName' , 'orderBy', 'whereClauses', 'searchInputs', 'create'); + public static $reserveProperties = array('moduleMain', 'varName' , 'orderBy', 'whereClauses', 'searchInputs', 'create','addToReserve'); public static $defsMap = array(MB_POPUPSEARCH => 'searchdefs' , MB_POPUPLIST => 'listviewdefs'); @@ -174,7 +174,13 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); { $popupMeta['listviewdefs'] = array_change_key_case($this->_viewdefs , CASE_UPPER ); } - $allProperties = array_merge(self::$reserveProperties , array('searchdefs', 'listviewdefs')); + + //provide a way for users to add to the reserve properties list via the 'addToReserve' element + $totalReserveProps = self::$reserveProperties; + if(!empty($popupMeta['addToReserve'])){ + $totalReserveProps = array_merge(self::$reserveProperties,$popupMeta['addToReserve']); + } + $allProperties = array_merge($totalReserveProps , array('searchdefs', 'listviewdefs')); $out .= "\$popupMeta = array (\n"; foreach( $allProperties as $p){ diff --git a/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php b/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php index bcf5e5f9..033333c9 100644 --- a/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php @@ -98,9 +98,16 @@ class SubpanelMetaDataParser extends ListLayoutMetaDataParser require_once 'modules/ModuleBuilder/parsers/parser.label.php' ; $labelParser = new ParserLabel ( $_REQUEST['view_module'] , isset ( $_REQUEST [ 'view_package' ] ) ? $_REQUEST [ 'view_package' ] : null ) ; $labelParser->addLabels($selected_lang, array($_REQUEST['subpanel_title_key'] => remove_xss(from_html($_REQUEST['subpanel_title']))), $_REQUEST['view_module']); - } - } - + } + } + // Bug 46291 - Missing widget_class for edit_button and remove_button + foreach ( $this->_viewdefs as $key => $def ) + { + if (isset ( $this->_fielddefs [ $key ] [ 'widget_class' ])) + { + $this->_viewdefs [ $key ] [ 'widget_class' ] = $this->_fielddefs [ $key ] [ 'widget_class' ]; + } + } $defs = $this->restoreInvisibleFields($this->_invisibleFields,$this->_viewdefs); // unlike our parent, do not force the field names back to upper case $defs = $this->makeRelateFieldsAsLink($defs); $this->implementation->deploy ($defs); @@ -173,7 +180,8 @@ class SubpanelMetaDataParser extends ListLayoutMetaDataParser { foreach($defs as $index => $fieldData) { - if (isset($fieldData['type']) && $fieldData['type'] == 'relate') + if ((isset($fieldData['type']) && $fieldData['type'] == 'relate') + || (isset($fieldData['link']) && self::isTrue($fieldData['link']))) { $defs[$index]['widget_class'] = 'SubPanelDetailViewLink'; $defs[$index]['target_module'] = isset($this->_fielddefs[$index]['module']) ? $this->_fielddefs[$index]['module'] : $this->_moduleName; diff --git a/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl b/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl index 8dd17f99..ae993e6c 100644 --- a/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl +++ b/modules/ModuleBuilder/tpls/MBModule/dropdown.tpl @@ -99,7 +99,7 @@ {if (!isset($val) || $val =='')}[{$MOD.LBL_BLANK}]{else}[{$val}]{/if} diff --git a/modules/ModuleBuilder/tpls/MBPackage/package.tpl b/modules/ModuleBuilder/tpls/MBPackage/package.tpl index 99dedb8a..4606f1fe 100644 --- a/modules/ModuleBuilder/tpls/MBPackage/package.tpl +++ b/modules/ModuleBuilder/tpls/MBPackage/package.tpl @@ -148,7 +148,7 @@ addForm('CreatePackage'); addToValidate('CreatePackage', 'name', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_NAME}{literal}'); addToValidateIsInArray('CreatePackage', 'name', 'in_array', false, '{/literal}{$mod_strings.LBL_JS_VALIDATE_PACKAGE_NAME}','{$package_labels}'{literal}, 'u=='); -addToValidate('CreatePackage', 'key', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_KEY}{literal}'); +addToValidate('CreatePackage', 'key', 'DBNameRaw', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_KEY}{literal}'); ModuleBuilder.helpRegister('CreatePackage'); ModuleBuilder.helpRegisterByID('CreatePackage','td'); diff --git a/modules/ModuleBuilder/views/view.labels.php b/modules/ModuleBuilder/views/view.labels.php index 04183b88..45e374ff 100644 --- a/modules/ModuleBuilder/views/view.labels.php +++ b/modules/ModuleBuilder/views/view.labels.php @@ -96,10 +96,7 @@ class ViewLabels extends ViewModulefields } require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ; - $variableMap = array ( MB_EDITVIEW => 'EditView' , MB_DETAILVIEW => 'DetailView' , MB_QUICKCREATE => 'QuickCreate' ) ; - if($editModule == 'KBDocuments'){ - $variableMap = array(); - } + $variableMap = $this->getVariableMap($editModule); foreach($variableMap as $key => $value){ $gridLayoutMetaDataParserTemp = new GridLayoutMetaDataParser ( $value, $editModule) ; foreach ( $gridLayoutMetaDataParserTemp->getLayout() as $panel) @@ -177,4 +174,33 @@ class ViewLabels extends ViewModulefields $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_SECTION_EDLABELS'], $html); echo $ajax->getJavascript(); } + + // fixing bug #39749: Quick Create in Studio + function getVariableMap($module) + { + $variableMap = array(MB_EDITVIEW => 'EditView', + MB_DETAILVIEW => 'DetailView', + MB_QUICKCREATE => 'QuickCreate'); + + $hideQuickCreateForModules = array('KBDocuments', + 'ProjectTask', + 'Campaigns', + 'Quotes', + 'ProductTemplates'); + + if(in_array($module, $hideQuickCreateForModules)) + { + if(isset($variableMap['quickcreate'])) + { + unset($variableMap['quickcreate']); + } + } + + if($module == 'KBDocuments') + { + $variableMap = array(); + } + + return $variableMap; + } } diff --git a/modules/ModuleBuilder/views/view.layoutview.php b/modules/ModuleBuilder/views/view.layoutview.php index 6823f9b7..a8b6f1a8 100644 --- a/modules/ModuleBuilder/views/view.layoutview.php +++ b/modules/ModuleBuilder/views/view.layoutview.php @@ -60,11 +60,14 @@ class ViewLayoutView extends ViewEdit if ($this->fromModuleBuilder) { $this->package = $_REQUEST [ 'view_package' ] ; + $this->type = $this->editLayout; } else { global $app_list_strings ; $moduleNames = array_change_key_case ( $app_list_strings [ 'moduleList' ] ) ; $this->translatedEditModule = $moduleNames [ strtolower ( $this->editModule ) ] ; + $this->sm = StudioModuleFactory::getStudioModule($this->editModule); + $this->type = $this->sm->getViewType($this->editLayout); } } @@ -120,6 +123,7 @@ class ViewLayoutView extends ViewEdit { $smarty->assign ( 'layouttitle', translate ( 'LBL_CURRENT_LAYOUT', 'ModuleBuilder' ) ) ; + //Check if we need to synch edit view to other layouts if($this->editLayout == MB_DETAILVIEW || $this->editLayout == MB_QUICKCREATE){ $parser2 = ParserFactory::getParser(MB_EDITVIEW,$this->editModule,$this->package); if($this->editLayout == MB_DETAILVIEW){ @@ -245,11 +249,30 @@ class ViewLayoutView extends ViewEdit $ajax = new AjaxCompose ( ) ; - $viewType; $translatedViewType = '' ; if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) ) $translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ; + else if (isset($this->sm)) + { + foreach($this->sm->sources as $file => $def) + { + if (!empty($def['view']) && $def['view'] == $this->editLayout && !empty($def['name'])) + { + $translatedViewType = $def['name']; + } + } + if(empty($translatedViewType)) + { + $label = "LBL_" . strtoupper($this->editLayout); + $translated = translate($label, $this->editModule); + if ($translated != $label) + $translatedViewType = $translated; + } + } + + + if ($this->fromModuleBuilder) { diff --git a/modules/ModuleBuilder/views/view.listview.php b/modules/ModuleBuilder/views/view.listview.php index c9d677dc..b588fa95 100644 --- a/modules/ModuleBuilder/views/view.listview.php +++ b/modules/ModuleBuilder/views/view.listview.php @@ -129,8 +129,13 @@ class ViewListView extends ViewEdit $ajax->addCrumb ( translate ( 'LBL_AVAILABLE_SUBPANELS', 'ModuleBuilder' ), '' ) ; if ($this->subpanelLabel) { - $ajax->addCrumb ( $this->subpanelLabel, '' ) ; - $this->translatedViewType = $this->subpanelLabel . " " . translate("LBL_SUBPANEL", "ModuleBuilder"); + $subpanelLabel = $this->subpanelLabel; + // If the subpanel title has changed, use that for the label instead + if( !empty($_REQUEST['subpanel_title'] ) && $_REQUEST['subpanelLabel'] != $_REQUEST['subpanel_title'] ) + $subpanelLabel = $_REQUEST['subpanel_title']; + + $ajax->addCrumb( $subpanelLabel, '' ); + $this->translatedViewType = $subpanelLabel . " " . translate("LBL_SUBPANEL", "ModuleBuilder"); } else { $ajax->addCrumb ( $this->subpanel, '' ) ; @@ -151,8 +156,13 @@ class ViewListView extends ViewEdit $ajax->addCrumb ( translate ( 'LBL_SUBPANELS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=subpanels&view_module=' . $this->editModule . '")' ) ; if ($this->subpanelLabel) { - $ajax->addCrumb ( $this->subpanelLabel, '' ) ; - $this->translatedViewType = $this->subpanelLabel . " " . translate("LBL_SUBPANEL", "ModuleBuilder"); + $subpanelLabel = $this->subpanelLabel; + // If the subpanel title has changed, use that for the label instead + if( !empty($_REQUEST['subpanel_title'] ) && $_REQUEST['subpanelLabel'] != $_REQUEST['subpanel_title'] ) + $subpanelLabel = $_REQUEST['subpanel_title']; + + $ajax->addCrumb( $subpanelLabel, '' ); + $this->translatedViewType = $subpanelLabel . " " . translate("LBL_SUBPANEL", "ModuleBuilder"); } else { $ajax->addCrumb ( $this->subpanel, '' ) ; diff --git a/modules/ModuleBuilder/views/view.wizard.php b/modules/ModuleBuilder/views/view.wizard.php index e263a903..e29e1374 100644 --- a/modules/ModuleBuilder/views/view.wizard.php +++ b/modules/ModuleBuilder/views/view.wizard.php @@ -256,7 +256,7 @@ class ModuleBuilderViewWizard extends SugarView //$GLOBALS['log']->debug(print_r($nodes,true)); foreach ( $nodes as $module ) { - $this->buttons [ $module [ 'name' ] ] = array ( 'action' => $module [ 'action' ] , 'imageTitle' => ucfirst ( $module [ 'module' ] . "_32" ) , 'size' => '32' ) ; + $this->buttons [ $module [ 'name' ] ] = array ( 'action' => $module [ 'action' ] , 'imageTitle' => ucfirst ( $module [ 'module' ] . "_32" ) , 'size' => '32', 'linkId' => 'studiolink_'.$module [ 'module' ] ) ; } } diff --git a/modules/Opportunities/OpportunityFormBase.php b/modules/Opportunities/OpportunityFormBase.php index 1264fe53..f24a9295 100644 --- a/modules/Opportunities/OpportunityFormBase.php +++ b/modules/Opportunities/OpportunityFormBase.php @@ -402,7 +402,7 @@ EOQ; require_once('include/QuickSearchDefaults.php'); -$qsd = new QuickSearchDefaults(); +$qsd = QuickSearchDefaults::getQuickSearchDefaults(); $sqs_objects = array('qc_account_name' => $qsd->getQSParent()); $sqs_objects['qc_account_name']['populate_list'] = array('qc_account_name', 'qc_account_id'); $quicksearch_js = ''; @@ -464,4 +464,4 @@ function handleSave($prefix,$redirect=true, $useRequired=false){ } } -?> \ No newline at end of file +?> diff --git a/modules/Opportunities/vardefs.php b/modules/Opportunities/vardefs.php index 250cb823..838d3c11 100644 --- a/modules/Opportunities/vardefs.php +++ b/modules/Opportunities/vardefs.php @@ -164,6 +164,7 @@ $dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, ' 'duplicate_merge'=>'0', 'audited'=>true, 'comment' => 'Formatted amount of the opportunity', + 'studio' => array('wirelesseditview'=>false, 'wirelessdetailview'=>false, 'editview'=>false, 'detailview'=>false, 'quickcreate'=>false,), ), 'currency_id' => array ( diff --git a/modules/Project/metadata/editviewdefs.php b/modules/Project/metadata/editviewdefs.php index c1fe5f5e..e3d8e53a 100644 --- a/modules/Project/metadata/editviewdefs.php +++ b/modules/Project/metadata/editviewdefs.php @@ -51,13 +51,13 @@ $viewdefs['Project']['EditView'] = 'SAVE', array( 'customCode' => '{if !empty($smarty.request.return_action) && $smarty.request.return_action == "ProjectTemplatesDetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }'. - ' '. + ' '. '{elseif !empty($smarty.request.return_action) && $smarty.request.return_action == "DetailView" && (!empty($fields.id.value) || !empty($smarty.request.return_id)) }'. - ' '. + ' '. '{elseif $is_template}'. - ' '. + ' '. '{else}'. - ' '. + ' '. '{/if}', ), ), diff --git a/modules/Project/metadata/listviewdefs.php b/modules/Project/metadata/listviewdefs.php index e30059f5..8361e1bf 100644 --- a/modules/Project/metadata/listviewdefs.php +++ b/modules/Project/metadata/listviewdefs.php @@ -74,7 +74,7 @@ $listViewDefs['ProjectTemplates'] = array( 'label' => 'LBL_LIST_NAME', 'link' => true, 'default' => true, - 'customCode'=>'{$NAME}'), + 'customCode'=>'{$NAME}'), 'ESTIMATED_START_DATE' => array( 'width' => '20', 'label' => 'LBL_DATE_START', diff --git a/modules/ProjectTask/ProjectTask.php b/modules/ProjectTask/ProjectTask.php index 313b42e5..36935391 100644 --- a/modules/ProjectTask/ProjectTask.php +++ b/modules/ProjectTask/ProjectTask.php @@ -85,6 +85,7 @@ class ProjectTask extends SugarBean { 'email_id' => 'emails', ); + ////////////////////////////////////////////////////////////////// // METHODS ////////////////////////////////////////////////////////////////// @@ -116,8 +117,16 @@ class ProjectTask extends SugarBean { } } - function save($check_notify = FALSE){ - $id = parent::save($check_notify); + function save($check_notify = FALSE) + { + //Bug 46012. When saving new Project Tasks instance in a workflow, make sure we set a project_task_id value + //associated with the Project if there is no project_task_id specified. + if ($this->in_workflow && empty($this->id) && empty($this->project_task_id) && !empty($this->project_id)) + { + $this->project_task_id = $this->getNumberOfTasksInProject($this->project_id) + 1; + } + + $id = parent::save($check_notify); $this->updateParentProjectTaskPercentage(); return $id; } @@ -512,6 +521,35 @@ class ProjectTask extends SugarBean { return $projectTasksBeans; } + + + /** + * getNumberOfTasksInProject + * + * Returns the count of project_tasks for the given project_id + * + * This is a private helper function to get the number of project tasks for a given project_id. + * + * @param $project_id integer value of the project_id associated with this ProjectTask instance + * @return total integer value of the count of project tasks, 0 if none found + */ + private function getNumberOfTasksInProject($project_id='') + { + if(!empty($project_id)) + { + $query = "SELECT count(project_task_id) AS total FROM project_task WHERE project_id = '{$project_id}'"; + $result = $this->db->query($query, true); + if($result) + { + $row = $this->db->fetchByAssoc($result); + if(!empty($row['total'])) + { + return $row['total']; + } + } + } + return 0; + } } function getUtilizationDropdown($focus, $field, $value, $view) { diff --git a/modules/ProjectTask/views/view.list.php b/modules/ProjectTask/views/view.list.php index f7414da9..bf2e0371 100644 --- a/modules/ProjectTask/views/view.list.php +++ b/modules/ProjectTask/views/view.list.php @@ -203,7 +203,7 @@ class ProjectTaskViewList extends ViewList{ $searchForm = new SearchForm($this->seed, $this->module, $this->action); - $searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs); + $searchForm->setup($searchdefs, $searchFields, 'SearchFormGeneric.tpl', $view, $listViewDefs); $searchForm->lv = $lv; } diff --git a/modules/ProspectLists/ProspectList.php b/modules/ProspectLists/ProspectList.php index 40cb507e..0f681889 100644 --- a/modules/ProspectLists/ProspectList.php +++ b/modules/ProspectLists/ProspectList.php @@ -177,7 +177,8 @@ class ProspectList extends SugarBean { LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=l.id AND ear.deleted=0 LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 - AND l.deleted=0"; + AND l.deleted=0 + AND (ear.deleted=0 OR ear.deleted IS NULL)"; $users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name,u.title AS title, '' AS salutation, u.address_street AS primary_address_street,u.address_city AS primary_address_city, u.address_state AS primary_address_state, u.address_postalcode AS primary_address_postalcode, u.address_country AS primary_address_country, @@ -189,7 +190,8 @@ class ProspectList extends SugarBean { LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=u.id AND ear.deleted=0 LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 - AND u.deleted=0"; + AND u.deleted=0 + AND (ear.deleted=0 OR ear.deleted IS NULL)"; $contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name,c.title AS title, c.salutation AS salutation, c.primary_address_street AS primary_address_street,c.primary_address_city AS primary_address_city, c.primary_address_state AS primary_address_state, c.primary_address_postalcode AS primary_address_postalcode, c.primary_address_country AS primary_address_country, @@ -201,7 +203,8 @@ FROM prospect_lists_prospects plp LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=c.id AND ear.deleted=0 LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 - AND c.deleted=0"; + AND c.deleted=0 + AND (ear.deleted=0 OR ear.deleted IS NULL)"; $prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,p.title AS title, p.salutation AS salutation, p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, p.primary_address_state AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country, @@ -213,7 +216,8 @@ FROM prospect_lists_prospects plp LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=p.id AND ear.deleted=0 LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 - AND p.deleted=0"; + AND p.deleted=0 + AND (ear.deleted=0 OR ear.deleted IS NULL)"; $accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name,'' AS title, '' AS salutation, a.billing_address_street AS primary_address_street,a.billing_address_city AS primary_address_city, a.billing_address_state AS primary_address_state, a.billing_address_postalcode AS primary_address_postalcode, a.billing_address_country AS primary_address_country, @@ -225,7 +229,8 @@ FROM prospect_lists_prospects plp LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=a.id AND ear.deleted=0 LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 - AND a.deleted=0"; + AND a.deleted=0 + AND (ear.deleted=0 OR ear.deleted IS NULL)"; $order_by = "ORDER BY related_type, id, primary_address DESC"; $query = "$leads_query UNION ALL $users_query UNION ALL $contacts_query UNION ALL $prospects_query UNION ALL $accounts_query $order_by"; return $query; diff --git a/modules/ProspectLists/metadata/popupdefs.php b/modules/ProspectLists/metadata/popupdefs.php index 85ae77d9..d9476070 100644 --- a/modules/ProspectLists/metadata/popupdefs.php +++ b/modules/ProspectLists/metadata/popupdefs.php @@ -54,7 +54,7 @@ $popupMeta = array('moduleMain' => 'ProspectList', array('formBase' => 'ProspectListFormBase.php', 'formBaseClass' => 'ProspectListFormBase', 'getFormBodyParams' => array('','','ProspectListSave'), - 'createButton' => $mod_strings['LNK_NEW_PROSPECT_LIST'] + 'createButton' => 'LNK_NEW_PROSPECT_LIST' ), 'listviewdefs' => array( 'NAME' => array( diff --git a/modules/Prospects/Menu.php b/modules/Prospects/Menu.php index 0acf2c77..95bef889 100644 --- a/modules/Prospects/Menu.php +++ b/modules/Prospects/Menu.php @@ -47,4 +47,4 @@ global $mod_strings, $app_strings; if(ACLController::checkAccess('Prospects', 'edit', true))$module_menu[]= Array("index.php?module=Prospects&action=EditView&return_module=Prospects&return_action=DetailView", $mod_strings['LNK_NEW_PROSPECT'],"CreateProspects"); if(ACLController::checkAccess('Prospects', 'list', true))$module_menu[]= Array("index.php?module=Prospects&action=index&return_module=Prospects&return_action=index", $mod_strings['LNK_PROSPECT_LIST'],"Prospects"); -if(ACLController::checkAccess('Prospects', 'import', true))$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Prospects&return_module=Prospects&return_action=index", $mod_strings['LNK_IMPORT_PROSPECT'],"Import"); \ No newline at end of file +if(ACLController::checkAccess('Prospects', 'import', true))$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Prospects&return_module=Prospects&return_action=index", $mod_strings['LNK_IMPORT_PROSPECTS'],"Import"); \ No newline at end of file diff --git a/modules/Prospects/metadata/popupdefs.php b/modules/Prospects/metadata/popupdefs.php index 2c1fe571..54123ca8 100644 --- a/modules/Prospects/metadata/popupdefs.php +++ b/modules/Prospects/metadata/popupdefs.php @@ -54,7 +54,7 @@ $popupMeta = array('moduleMain' => 'Prospect', array('formBase' => 'ProspectFormBase.php', 'formBaseClass' => 'ProspectFormBase', 'getFormBodyParams' => array('','','ProspectSave'), - 'createButton' => $mod_strings['LNK_NEW_PROSPECT'] + 'createButton' => 'LNK_NEW_PROSPECT' ) ); diff --git a/modules/Prospects/tpls/QuickCreate.tpl b/modules/Prospects/tpls/QuickCreate.tpl new file mode 100644 index 00000000..84ed7312 --- /dev/null +++ b/modules/Prospects/tpls/QuickCreate.tpl @@ -0,0 +1,93 @@ +{* +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + +*} +
+ + + + + +
+ +{if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"} + +{else} + +{/if} + + + + + + +{if !empty($smarty.request.return_module)} + + +{/if} + +{{if isset($form.hidden)}} +{{foreach from=$form.hidden item=field}} +{{$field}} +{{/foreach}} +{{/if}} + +{* -- Begin QuickCreate Specific -- *} +{if $smarty.request.action != 'SubpanelEdits'} + + + + + +{/if} + + +{* -- End QuickCreate Specific -- *} + +{{if empty($form.button_location) || $form.button_location == 'top'}} +{{if !empty($form) && !empty($form.buttons)}} + {{foreach from=$form.buttons key=val item=button}} + {{sugar_button module="$module" id="$button" view="$view"}} + {{/foreach}} +{{else}} +{{sugar_button module="$module" id="SAVE" view="$view"}} +{{sugar_button module="$module" id="CANCEL" view="$view"}} +{{/if}} +{{if empty($form.hideAudit) || !$form.hideAudit}} +{{sugar_button module="$module" id="Audit" view="$view"}} +{{/if}} +{{/if}} +{{$ADMIN_EDIT}}
\ No newline at end of file diff --git a/modules/Prospects/views/view.edit.php b/modules/Prospects/views/view.edit.php new file mode 100644 index 00000000..676a2b70 --- /dev/null +++ b/modules/Prospects/views/view.edit.php @@ -0,0 +1,49 @@ +useForSubpanel = true; + $this->useModuleQuickCreateTemplate = true; + } + +} \ No newline at end of file diff --git a/modules/Schedulers/EditView.php b/modules/Schedulers/EditView.php index 78ae53ea..d782e0cb 100644 --- a/modules/Schedulers/EditView.php +++ b/modules/Schedulers/EditView.php @@ -196,13 +196,13 @@ $xtpl = new XTemplate('modules/Schedulers/EditView.html'); //// PARSING FOR BASIC SETUP // Days of the week $xtpl->assign('USE_ADV_BOOL', 'false'); -$xtDays = array(0 => 'MON', - 1 => 'TUE', - 2 => 'WED', - 3 => 'THU', - 4 => 'FRI', - 5 => 'SAT', - 6 => 'SUN'); +$xtDays = array(1 => 'MON', + 2 => 'TUE', + 3 => 'WED', + 4 => 'THU', + 5 => 'FRI', + 6 => 'SAT', + 0 => 'SUN'); if($exInterval[4] == '*') { $xtpl->assign('ALL', "CHECKED"); diff --git a/modules/Schedulers/Save.php b/modules/Schedulers/Save.php index 477254ee..b663b221 100644 --- a/modules/Schedulers/Save.php +++ b/modules/Schedulers/Save.php @@ -90,13 +90,13 @@ $focus->name = $_REQUEST['name']; //// USE_ADV override if($_REQUEST['use_adv'] == 'false') { // days of week - $xtDays = array(0 => 'mon', - 1 => 'tue', - 2 => 'wed', - 3 => 'thu', - 4 => 'fri', - 5 => 'sat', - 6 => 'sun'); + $xtDays = array(1 => 'mon', + 2 => 'tue', + 3 => 'wed', + 4 => 'thu', + 5 => 'fri', + 6 => 'sat', + 0 => 'sun'); if( (isset($_REQUEST['mon']) && $_REQUEST['mon'] == 'true') && (isset($_REQUEST['tue']) && $_REQUEST['tue'] == 'true') && diff --git a/modules/Schedulers/Scheduler.php b/modules/Schedulers/Scheduler.php index 3ebc3f24..0a037f38 100644 --- a/modules/Schedulers/Scheduler.php +++ b/modules/Schedulers/Scheduler.php @@ -202,8 +202,8 @@ class Scheduler extends SugarBean { $r2 = $this->db->query($q2); if($r2 != null) { $a2 = $this->db->fetchByAssoc($r2); // we only care about the newest - $a2['execute_time'] = $this->db->fromConvert($a2['execute_time'],'datetime'); if($a2 != null) { + $a2['execute_time'] = $this->db->fromConvert($a2['execute_time'],'datetime'); $GLOBALS['log']->debug("-----> Scheduler found [ {$a['name']} ] 'In Progress' with most recent Execute Time at [ {$a2['execute_time']} GMT-0 ]"); $execTime = TimeDate::getInstance()->fromDB($a2['execute_time'])->ts; @@ -334,7 +334,7 @@ class Scheduler extends SugarBean { } // check the day to be in scope: - if(!in_array(($today['wday']+6)%7, $dayName)) {//$dayName starts from Monday, while $today['wday'] starts from Sunday + if(!in_array($today['wday'], $dayName)) { return false; } } else { @@ -628,13 +628,13 @@ class Scheduler extends SugarBean { function handleIntervalType($type, $value, $mins, $hours) { global $mod_strings; /* [0]:min [1]:hour [2]:day of month [3]:month [4]:day of week */ - $days = array ( 0 => $mod_strings['LBL_MON'], - 1 => $mod_strings['LBL_TUE'], - 2 => $mod_strings['LBL_WED'], - 3 => $mod_strings['LBL_THU'], - 4 => $mod_strings['LBL_FRI'], - 5 => $mod_strings['LBL_SAT'], - 6 => $mod_strings['LBL_SUN'], + $days = array ( 1 => $mod_strings['LBL_MON'], + 2 => $mod_strings['LBL_TUE'], + 3 => $mod_strings['LBL_WED'], + 4 => $mod_strings['LBL_THU'], + 5 => $mod_strings['LBL_FRI'], + 6 => $mod_strings['LBL_SAT'], + 0 => $mod_strings['LBL_SUN'], '*' => $mod_strings['LBL_ALL']); switch($type) { case 0: // minutes @@ -767,7 +767,7 @@ class Scheduler extends SugarBean { $this->datesArray[$i] = $i; } - $this->dayInt = array('*',1,2,3,4,5,6,7); + $this->dayInt = array('*',1,2,3,4,5,6,0); $this->dayLabel = array('*',$mod_strings['LBL_MON'],$mod_strings['LBL_TUE'],$mod_strings['LBL_WED'],$mod_strings['LBL_THU'],$mod_strings['LBL_FRI'],$mod_strings['LBL_SAT'],$mod_strings['LBL_SUN']); $this->monthsInt = array(0,1,2,3,4,5,6,7,8,9,10,11,12); $this->monthsLabel = $app_list_strings['dom_cal_month_long']; diff --git a/modules/Schedulers/_AddJobsHere.php b/modules/Schedulers/_AddJobsHere.php index 6ac3d0bd..6cb1b54b 100644 --- a/modules/Schedulers/_AddJobsHere.php +++ b/modules/Schedulers/_AddJobsHere.php @@ -366,7 +366,7 @@ function trimTracker() continue; } - $timeStamp = db_convert("'". $timedate->asDb($timedate->getNow()->get("+"+$prune_interval+" days")) ."'" ,"datetime"); + $timeStamp = db_convert("'". $timedate->asDb($timedate->getNow()->get("-".$prune_interval." days")) ."'" ,"datetime"); if($tableName == 'tracker_sessions') { $query = "DELETE FROM $tableName WHERE date_end < $timeStamp"; } else { diff --git a/modules/Studio/TabGroups/TabGroupHelper.php b/modules/Studio/TabGroups/TabGroupHelper.php index c259a9cd..fe2fb8ec 100644 --- a/modules/Studio/TabGroups/TabGroupHelper.php +++ b/modules/Studio/TabGroups/TabGroupHelper.php @@ -86,7 +86,7 @@ class TabGroupHelper{ continue; $labelID = (!empty($params['tablabelid_' . $index]))?$params['tablabelid_' . $index]: 'LBL_GROUPTAB' . $count . '_'. time(); - $labelValue = remove_xss(from_html($params['tablabel_' . $index])); + $labelValue = remove_xss(strip_tags(from_html($params['tablabel_' . $index]))); $app_strings = return_application_language($grouptab_lang); if(empty($app_strings[$labelID]) || $app_strings[$labelID] != $labelValue){ $contents = return_custom_app_list_strings_file_contents($grouptab_lang); diff --git a/modules/Studio/parsers/StudioParser.php b/modules/Studio/parsers/StudioParser.php index a9835ec7..a020b4e8 100644 --- a/modules/Studio/parsers/StudioParser.php +++ b/modules/Studio/parsers/StudioParser.php @@ -338,7 +338,7 @@ EOQ; create_function( '$matches', '$name = str_replace(array("[", "]"), "", $matches[1]); - if((strpos($name, "LBL_") == 0) && (strpos($name, "_basic") == 0)) { + if((strpos($name, "LBL_") === 0) && (strpos($name, "_basic") === 0)) { return str_replace($name, $name . "_basic", $matches[0]); } return $matches[0];' diff --git a/modules/Studio/wizards/RenameModules.php b/modules/Studio/wizards/RenameModules.php index 4d312c51..2e4db309 100644 --- a/modules/Studio/wizards/RenameModules.php +++ b/modules/Studio/wizards/RenameModules.php @@ -780,7 +780,17 @@ class RenameModules $replace = call_user_func($modifier, $replace); } - return str_replace($search, $replace, $oldStringValue); + // Bug 47957 + // If nothing was replaced - try to replace original string + $result = ''; + $replaceCount = 0; + $result = str_replace($search, $replace, $oldStringValue, $replaceCount); + if(!$replaceCount){ + $replaceKey = 'key_' . $replacementMetaData['type']; + $search = html_entity_decode_utf8($replacementLabels[$replaceKey], ENT_QUOTES); + $result = str_replace($search, $replace, $oldStringValue, $replaceCount); + } + return $result; } diff --git a/modules/Tasks/Task.php b/modules/Tasks/Task.php index fc7219e9..6da557f4 100644 --- a/modules/Tasks/Task.php +++ b/modules/Tasks/Task.php @@ -280,10 +280,12 @@ class Task extends SugarBean { $dbtime = $timedate->to_db($task_fields['DATE_START']); } - $task_fields['TIME_DUE'] = $timedate->to_display_time($dbtime); - $task_fields['DATE_DUE'] = $timedate->to_display_date($dbtime); - - $this->formatStartAndDueDates($task_fields, $dbtime, $override_date_for_subpanel); + if(!empty($dbtime)) + { + $task_fields['TIME_DUE'] = $timedate->to_display_time($dbtime); + $task_fields['DATE_DUE'] = $timedate->to_display_date($dbtime); + $this->formatStartAndDueDates($task_fields, $dbtime, $override_date_for_subpanel); + } if (!empty($this->priority)) $task_fields['PRIORITY'] = $app_list_strings['task_priority_dom'][$this->priority]; @@ -295,30 +297,6 @@ class Task extends SugarBean { $task_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline","title=".translate('LBL_LIST_CLOSE','Tasks')." border='0'",null,null,'.gif',translate('LBL_LIST_CLOSE','Tasks')).""; } - - if(!empty($task_fields['DATE_DUE'])) - { - $date_due = $task_fields['DATE_DUE']; - $dd = $timedate->to_db_date_time($this->date_due, $this->time_due); - - if ($dd < $today){ - $task_fields['DATE_DUE']= "".$date_due.""; - if($override_date_for_subpanel){ - $task_fields['DATE_START']= "".$date_due.""; - } - }else if( $dd == $today ){ - $task_fields['DATE_DUE'] = "".$date_due.""; - if($override_date_for_subpanel){ - $task_fields['DATE_START'] = "".$date_due.""; - } - }else{ - $task_fields['DATE_DUE'] = "".$date_due.""; - if($override_date_for_subpanel){ - $task_fields['DATE_START'] = "".$date_due.""; - } - } - } - //make sure we grab the localized version of the contact name, if a contact is provided if (!empty($this->contact_id)) { // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs diff --git a/modules/UpgradeWizard/end.php b/modules/UpgradeWizard/end.php index df392439..91147d00 100644 --- a/modules/UpgradeWizard/end.php +++ b/modules/UpgradeWizard/end.php @@ -251,10 +251,10 @@ if(function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) rebuildSprites(true); } -//Run RepairSearchFields.php file -if($_SESSION['current_db_version'] < '620' && function_exists('repairSearchFields')) +//Run repairUpgradeHistoryTable +if($_SESSION['current_db_version'] < '650' && function_exists('repairUpgradeHistoryTable')) { - repairSearchFields($path); + repairUpgradeHistoryTable(); } require_once('modules/Administration/upgrade_custom_relationships.php'); diff --git a/modules/UpgradeWizard/language/en_us.lang.php b/modules/UpgradeWizard/language/en_us.lang.php index 777a2293..fdb7635f 100644 --- a/modules/UpgradeWizard/language/en_us.lang.php +++ b/modules/UpgradeWizard/language/en_us.lang.php @@ -123,6 +123,7 @@ $mod_strings = array( 'LBL_UW_COMPLIANCE_TITLE' => 'Server Settings Check', 'LBL_UW_COMPLIANCE_TITLE2' => 'Detected Settings', 'LBL_UW_COMPLIANCE_XML' => 'XML Parsing', + 'LBL_UW_COMPLIANCE_ZIPARCHIVE' => 'Zip Support', 'LBL_UW_COPIED_FILES_TITLE' => 'Files Copied Successfully', 'LBL_UW_CUSTOM_TABLE_SCHEMA_CHANGE' => 'Custom Table Schema Changes', diff --git a/modules/UpgradeWizard/silentUpgrade_step2.php b/modules/UpgradeWizard/silentUpgrade_step2.php index d2c62c60..7b80861d 100644 --- a/modules/UpgradeWizard/silentUpgrade_step2.php +++ b/modules/UpgradeWizard/silentUpgrade_step2.php @@ -522,10 +522,10 @@ if(function_exists('rebuildSprites') && function_exists('imagecreatetruecolor')) rebuildSprites(true); } -//Run RepairSearchFields.php file -if($origVersion < '620' && function_exists('repairSearchFields')) +//Run repairUpgradeHistoryTable +if($origVersion < '650' && function_exists('repairUpgradeHistoryTable')) { - repairSearchFields($path); + repairUpgradeHistoryTable(); } /////////////////////////////////////////////////////////////////////////////// diff --git a/modules/UpgradeWizard/systemCheck.php b/modules/UpgradeWizard/systemCheck.php index a09ca4cf..22a02e6e 100644 --- a/modules/UpgradeWizard/systemCheck.php +++ b/modules/UpgradeWizard/systemCheck.php @@ -166,6 +166,7 @@ $checks = array( 'safeModeStatus' => $mod_strings['LBL_UW_COMPLIANCE_SAFEMODE'], 'callTimeStatus' => $mod_strings['LBL_UW_COMPLIANCE_CALLTIME'], 'memory_msg' => $mod_strings['LBL_UW_COMPLIANCE_MEMORY'], + 'ZipStatus' => $mod_strings['LBL_UW_COMPLIANCE_ZIPARCHIVE'], //commenting mbstring overload. //'mbstring.func_overload' => $mod_strings['LBL_UW_COMPLIANCE_MBSTRING_FUNC_OVERLOAD'], ); diff --git a/modules/UpgradeWizard/uw_utils.php b/modules/UpgradeWizard/uw_utils.php index 9b3ed99c..5d9f73ff 100644 --- a/modules/UpgradeWizard/uw_utils.php +++ b/modules/UpgradeWizard/uw_utils.php @@ -1080,6 +1080,16 @@ function checkSystemCompliance() { $ret['memory_msg'] = "{$installer_mod_strings['LBL_CHECKSYS_OK']} ({$memory_limit})"; } } + // zip support + if (!class_exists("ZipArchive")) + { + $ret['ZipStatus'] = "{$installer_mod_strings['ERR_CHECKSYS_ZIP']}"; + $ret['error_found'] = true; + } else { + $ret['ZipStatus'] = "{$installer_mod_strings['LBL_CHECKSYS_OK']}"; + } + + /* mbstring.func_overload $ret['mbstring.func_overload'] = ''; @@ -4395,3 +4405,36 @@ function repairSearchFields($globString='modules/*/metadata/SearchFields.php', $ logThis('End repairSearchFields', $path); } } + +/** + * repairUpgradeHistoryTable + * + * This is a helper function used in the upgrade process to fix upgrade_history entries so that the filename column points + * to the new upload directory location introduced in 6.4 versions + */ +function repairUpgradeHistoryTable() +{ + require_once('modules/Configurator/Configurator.php'); + new Configurator(); + global $sugar_config; + + //Now upgrade the upgrade_history table entries + $results = $GLOBALS['db']->query('SELECT id, filename FROM upgrade_history'); + $upload_dir = $sugar_config['cache_dir'].'upload/'; + + //Create regular expression string to + $match = '/^' . str_replace('/', '\/', $upload_dir) . '(.*?)$/'; + + while(($row = $GLOBALS['db']->fetchByAssoc($results))) + { + $file = str_replace('//', '/', $row['filename']); //Strip out double-paths that may exist + + if(!empty($file) && preg_match($match, $file, $matches)) + { + //Update new file location to use the new $sugar_config['upload_dir'] value + $new_file_location = $sugar_config['upload_dir'] . $matches[1]; + $GLOBALS['db']->query("UPDATE upgrade_history SET filename = '{$new_file_location}' WHERE id = '{$row['id']}'"); + } + } + +} diff --git a/modules/Users/Authenticate.php b/modules/Users/Authenticate.php index 06bd71c7..c716623e 100644 --- a/modules/Users/Authenticate.php +++ b/modules/Users/Authenticate.php @@ -46,7 +46,7 @@ if (!defined('SUGAR_PHPUNIT_RUNNER')) { session_regenerate_id(false); } global $mod_strings; - +$login_vars = $GLOBALS['app']->getLoginVars(false); $authController->login($_REQUEST['user_name'], $_REQUEST['user_password']); // authController will set the authenticated_user_id session variable if(isset($_SESSION['authenticated_user_id'])) { @@ -62,45 +62,34 @@ if(isset($_SESSION['authenticated_user_id'])) { global $current_user; global $sugar_config; - - $GLOBALS['module'] = !empty($_REQUEST['login_module']) ? '?module='.$_REQUEST['login_module'] : '?module='.( !empty($sugar_config['default_module']) ? $sugar_config['default_module'] : 'Home' ); - $GLOBALS['action'] = !empty($_REQUEST['login_action']) ? '&action='.$_REQUEST['login_action'] : '&action='.( !empty($sugar_config['default_action']) ? $sugar_config['default_action'] : 'index' ); - $GLOBALS['record']= !empty($_REQUEST['login_record']) ? '&record='.$_REQUEST['login_record'] : ''; - - // awu: $module is somehow undefined even though the super globals is set, so we set the local variable here - $module = $GLOBALS['module']; - $action = $GLOBALS['action']; - $record = $GLOBALS['record']; - global $current_user; - //C.L. Added $hasHistory check to respect the login_XXX settings if they are set - $hasHistory = (!empty($_REQUEST['login_module']) - || !empty($_REQUEST['login_action']) - || !empty($_REQUEST['login_record']) - || !empty($sugar_config['default_module']) - || !empty($sugar_config['default_action']) - ); - if(isset($current_user) && !$hasHistory){ - $modListHeader = query_module_access_list($current_user); - //try to get the user's tabs - $tempList = $modListHeader; - $idx = array_shift($tempList); - if(!empty($modListHeader[$idx])){ - $module = '?module='.$modListHeader[$idx]; - $action = '&action=index'; - $record = ''; - } - } + if(isset($current_user) && empty($login_vars)) { + if(!empty($GLOBALS['sugar_config']['default_module']) && !empty($GLOBALS['sugar_config']['default_action'])) { + $url = "index.php?module={$GLOBALS['sugar_config']['default_module']}&action={$GLOBALS['sugar_config']['default_action']}"; + } else { + $modListHeader = query_module_access_list($current_user); + //try to get the user's tabs + $tempList = $modListHeader; + $idx = array_shift($tempList); + if(!empty($modListHeader[$idx])){ + $url = "index.php?module={$modListHeader[$idx]}&action=index"; + } + } + } else { + $url = $GLOBALS['app']->getLoginRedirect(); + } } else { // Login has failed - $module ="?module=Users"; - $action="&action=Login"; - $record=""; + $url ="index.php?module=Users&action=Login"; + if(!empty($login_vars)) + { + $url .= '&' . http_build_query($login_vars); + } } // construct redirect url -$url = 'Location: index.php'.$module.$action.$record; +$url = 'Location: '.$url; //adding this for bug: 21712. if(!empty($GLOBALS['app'])) { diff --git a/modules/Users/Changenewpassword.php b/modules/Users/Changenewpassword.php index 5f9110cf..d43c7ee7 100644 --- a/modules/Users/Changenewpassword.php +++ b/modules/Users/Changenewpassword.php @@ -111,7 +111,7 @@ if (isset($_REQUEST['guid'])) $expired='0'; if($pwd_settings['linkexpiration']){ $delay=$pwd_settings['linkexpirationtime']*$pwd_settings['linkexpirationtype']; - $stim = strtotime($row['date_generated']); + $stim = strtotime($row['date_generated']) + date('Z'); $expiretime = TimeDate::getInstance()->fromTimestamp($stim)->get("+$delay minutes")->asDb(); $timenow = TimeDate::getInstance()->nowDb(); if ($timenow > $expiretime) diff --git a/modules/Users/GeneratePassword.php b/modules/Users/GeneratePassword.php index b400568d..19ed94b2 100644 --- a/modules/Users/GeneratePassword.php +++ b/modules/Users/GeneratePassword.php @@ -122,11 +122,8 @@ if(isset( $_POST['Users0emailAddress0'])){ /////// /////////////////////////////////////////////////// - - // if i need to generate a password (not a link) - if (!isset($_POST['link'])){ - $password = User::generatePassword(); - } + // if i need to generate a password (not a link) + $password = !isset($_POST['link']) ? User::generatePassword() : ''; /////////////////////////////////////////////////// /////// Create URL @@ -139,7 +136,7 @@ if (isset($_POST['link']) && $_POST['link'] == '1'){ $time_now=TimeDate::getInstance()->nowDb(); //$q2="UPDATE `users_password_link` SET `deleted` = '1' WHERE `username` = '".$username."'"; //$usr->db->query($q2); - $q = "INSERT INTO users_password_link (id, username, date_generated) VALUES('".$guid."','".$username."',' ".$time_now."' ) "; + $q = "INSERT INTO users_password_link (id, username, date_generated) VALUES('".$guid."','".$username."','".$time_now."') "; $usr->db->query($q); } /////// diff --git a/modules/Users/Login.php b/modules/Users/Login.php index 1198d4c3..d43cc373 100644 --- a/modules/Users/Login.php +++ b/modules/Users/Login.php @@ -46,16 +46,8 @@ if (isset($_SESSION['authenticated_user_id'])) { ob_clean(); // fixing bug #46837: Previosly links/URLs to records in Sugar from MSO Excel/Word were referred to the home screen and not the record - // It used to appear when default browser was not MS IE - $nav = ''; - $nav .= (isset($_GET['login_module'])) ? '&module='.$_GET['login_module'] : ''; - $nav .= (isset($_GET['login_action'])) ? '&action='.$_GET['login_action'] : ''; - $nav .= (isset($_GET['login_record'])) ? '&record='.$_GET['login_record'] : ''; - - ($nav == '') - ? header("Location: index.php?module=Home&action=index") - : header("Location: index.php?".substr($nav, 1)); - + // It used to appear when default browser was not MS IE + header("Location: ".$GLOBALS['app']->getLoginRedirect()); sugar_cleanup(true); return; } @@ -99,13 +91,11 @@ if(isset($_REQUEST['loginErrorMessage'])) { } } - -if (isset($_GET['login_module'])) - $sugar_smarty->assign('LOGIN_MODULE', $_GET['login_module']); -if (isset($_GET['login_action'])) - $sugar_smarty->assign('LOGIN_ACTION', $_GET['login_action']); -if (isset($_GET['login_record'])) - $sugar_smarty->assign('LOGIN_RECORD', $_GET['login_record']); +$lvars = $GLOBALS['app']->getLoginVars(); +$sugar_smarty->assign("LOGIN_VARS", $lvars); +foreach($lvars as $k => $v) { + $sugar_smarty->assign(strtoupper($k), $v); +} // Retrieve username from the session if possible. if(isset($_SESSION["login_user_name"])) { diff --git a/modules/Users/Save.php b/modules/Users/Save.php index cb1978d6..abcdf6d6 100644 --- a/modules/Users/Save.php +++ b/modules/Users/Save.php @@ -75,7 +75,7 @@ $focus->retrieve($_POST['record']); if(empty($focus->user_name)) { $newUser = true; - clear_register_value('user_array'); + clear_register_value('user_array',$focus->object_name); } else { $newUser = false; } diff --git a/modules/Users/User.php b/modules/Users/User.php index 98d97ca7..e687792d 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -562,8 +562,8 @@ class User extends Person { * @return object User bean * @return null null if no User found */ - function retrieve($id, $encode = true) { - $ret = parent::retrieve($id, $encode); + function retrieve($id, $encode = true, $deleted = true) { + $ret = parent::retrieve($id, $encode, $deleted); if ($ret) { if (isset ($_SESSION)) { $this->loadPreferences(); diff --git a/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php b/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php index e4dd1fa0..25b0f296 100644 --- a/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php +++ b/modules/Users/authentication/SAMLAuthenticate/SAMLAuthenticateUser.php @@ -67,12 +67,10 @@ class SAMLAuthenticateUser extends SugarAuthenticateUser{ if(empty($_POST['SAMLResponse']))return parent::authenticateUser($name, $password); $GLOBALS['log']->debug('have saml data.'); // JMH - // Look for custom versions of config files - if (file_exists('custom/modules/Users/authentication/SAMLAuthenticate/settings.php')) - require 'custom/modules/Users/authentication/SAMLAuthenticate/settings.php'; - else - require 'modules/Users/authentication/SAMLAuthenticate/settings.php'; - require 'modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php'; + // Look for custom versions of settings.php if it exists + require(get_custom_file_if_exists('modules/Users/authentication/SAMLAuthenticate/settings.php')); + + require('modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php'); $samlresponse = new SamlResponse(get_saml_settings(), $_POST['SAMLResponse']); @@ -111,16 +109,12 @@ class SAMLAuthenticateUser extends SugarAuthenticateUser{ } else { - if (IsSet($settings->customCreateFunction)) - { - // we don't have anything for this yet, so just call whatever function may be - // defined in the custom settings file - // call_user_func($settings->customCreateFunction); - } - else - { - return $this->createUser($samlresponse->get_nameid(), $xpath, $settings); - } + if (isset($settings->customCreateFunction)) + { + call_user_func($settings->customCreateFunction, $this, $samlresponse->get_nameid(), $xpath, $settings); + } else { + return $this->createUser($samlresponse->get_nameid(), $xpath, $settings); + } } // comment out the following two lines for testing - John H. (task 9069) } @@ -226,18 +220,11 @@ class SAMLAuthenticateUser extends SugarAuthenticateUser{ **/ function getAdditionalFieldsToSelect($samlresponse, $settings) { - $additionalFields = ""; - if (IsSet($settings->saml_settings)) - { - if (IsSet($settings->saml_settings['update'])) - { - if (count($settings->saml_settings['update']) > 0) - { - $additionalFields = ", " . implode(",", $this->getCustomFields($settings, 'update')); - } - } + if (isset($settings->saml_settings) && isset($settings->saml_settings['update']) && count($settings->saml_settings['update']) > 0) + { + return ',' . implode(',', $this->getCustomFields($settings, 'update')); } - return $additionalFields; + return ''; } diff --git a/modules/Users/authentication/SAMLAuthenticate/index.php b/modules/Users/authentication/SAMLAuthenticate/index.php index 58203725..eb6a81fa 100644 --- a/modules/Users/authentication/SAMLAuthenticate/index.php +++ b/modules/Users/authentication/SAMLAuthenticate/index.php @@ -25,8 +25,8 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************/ -require 'modules/Users/authentication/SAMLAuthenticate/settings.php'; -require 'modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php'; +require(get_custom_file_if_exists('modules/Users/authentication/SAMLAuthenticate/settings.php')); +require('modules/Users/authentication/SAMLAuthenticate/lib/onelogin/saml.php'); $authrequest = new SamlAuthRequest(get_saml_settings()); $url = $authrequest->create(); diff --git a/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php b/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php index 0014e7d3..f6478c62 100644 --- a/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php +++ b/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php @@ -247,13 +247,9 @@ class SugarAuthenticate{ //CHECK IF USER IS CROSSING SITES if (($user_unique_key != $server_unique_key) && (!in_array($action, $allowed_actions)) && (!isset ($_SESSION['login_error']))) { - session_destroy(); - $post_login_nav = ''; - if (!empty ($record) && !empty ($action) && !empty ($module)) { - $post_login_nav = "&login_module=".$module."&login_action=".$action."&login_record=".$record; - } $GLOBALS['log']->debug('Destroying Session User has crossed Sites'); - header("Location: index.php?action=Login&module=Users".$post_login_nav); + session_destroy(); + header("Location: index.php?action=Login&module=Users".$GLOBALS['app']->getLoginRedirect()); sugar_cleanup(true); } if (!$this->userAuthenticate->loadUserOnSession($_SESSION['authenticated_user_id'])) { @@ -353,7 +349,7 @@ class SugarAuthenticate{ /** * pre_login - * + * * This function allows the SugarAuthenticate subclasses to perform some pre login initialization as needed */ function pre_login() diff --git a/modules/Users/login.tpl b/modules/Users/login.tpl index 4f2bb784..c5c500f5 100644 --- a/modules/Users/login.tpl +++ b/modules/Users/login.tpl @@ -83,12 +83,12 @@ var LBL_HIDEOPTIONS = '{sugar_translate module="Users" label="LBL_HIDEOPTIONS"}' - - - + {foreach from=$LOGIN_VARS key=key item=var} + + {/foreach} - +   @@ -99,8 +99,8 @@ var LBL_HIDEOPTIONS = '{sugar_translate module="Users" label="LBL_HIDEOPTIONS"}' {if !empty($SELECT_LANGUAGE)} - - + + {sugar_translate module="Users" label="LBL_LANGUAGE"}: @@ -109,7 +109,7 @@ var LBL_HIDEOPTIONS = '{sugar_translate module="Users" label="LBL_HIDEOPTIONS"}' {/if}   -
  +
 
diff --git a/modules/Users/reassignUserRecords.php b/modules/Users/reassignUserRecords.php index 43b31531..30a6c35f 100644 --- a/modules/Users/reassignUserRecords.php +++ b/modules/Users/reassignUserRecords.php @@ -106,15 +106,7 @@ if(!isset($_POST['fromuser']) && !isset($_GET['execute'])){
diff --git a/modules/Users/tpls/wizard.tpl b/modules/Users/tpls/wizard.tpl index 2907debb..872737af 100644 --- a/modules/Users/tpls/wizard.tpl +++ b/modules/Users/tpls/wizard.tpl @@ -435,6 +435,7 @@ var SugarWizard = new function() {if $REQUIRED_EMAIL_ADDRESS} {literal} if ( document.getElementById('email1').value == '' ) { + document.getElementById('email1').focus(); add_error_style('UserWizard',form.email1.name, '{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS} {$MOD.LBL_EMAIL}{literal}' ); isError = true; diff --git a/modules/Users/vardefs.php b/modules/Users/vardefs.php index 789b9555..74ae9f9e 100644 --- a/modules/Users/vardefs.php +++ b/modules/Users/vardefs.php @@ -524,7 +524,7 @@ $dictionary['User'] = array( 'link_type' => 'relationship_info', 'source' => 'non-db', 'importable' => 'false', - 'studio' => array('listview' => false, 'searchview'=>false), + 'studio' => false, ) , 'm_accept_status_fields' => array( 'name' => 'm_accept_status_fields', @@ -539,7 +539,7 @@ $dictionary['User'] = array( 'link_type' => 'relationship_info', 'source' => 'non-db', 'importable' => 'false', - 'studio' => array('listview' => false, 'searchview'=>false), + 'studio' => false, ) , 'accept_status_id' => array( 'name' => 'accept_status_id', diff --git a/modules/Users/views/view.wizard.php b/modules/Users/views/view.wizard.php index 29cde671..694a0540 100644 --- a/modules/Users/views/view.wizard.php +++ b/modules/Users/views/view.wizard.php @@ -164,12 +164,9 @@ class ViewWizard extends SugarView $this->ss->assign("CURRENCY", $selectCurrency); } - $currenciesVars = ""; - $i=0; - foreach($locale->currencies as $id => $arrVal) { - $currenciesVars .= "currencies[{$i}] = '{$arrVal['symbol']}';\n"; - $i++; - } + $currenciesArray = $locale->currencies; + $currenciesVars = $this->correctCurrenciesSymbolsSort($currenciesArray); + $currencySymbolsJs = <<ss->assign('langHeader', get_language_header()); $this->ss->display($this->getCustomFilePathIfExists('modules/Users/tpls/wizard.tpl')); } + + /** + * Function to sort currencies in array alphabetically, except for US Dollar which must remain as first element + * in the array. + * + * @param array $currenciesArray Array of currencies to sort + * @return array|string Array of sorted currencies with the US Dollar as the first + */ + public function correctCurrenciesSymbolsSort($currenciesArray) + { + $baseCurrencyId = '-99'; + $newCurrenciesArray = array (); + + $newCurrenciesArray[] = $currenciesArray[$baseCurrencyId]['symbol']; + array_shift($currenciesArray); + $currenciesArray = array_csort($currenciesArray); + foreach ($currenciesArray as $value) + { + $newCurrenciesArray[] = $value['symbol']; + } + return $this->pushCurrencyArrayToString($newCurrenciesArray); + } + + /** + * Generates javascript array from a php array + * + * @see correctCurrenciesSymbolsSort + * @param $array + * @return array|string Javascript code snippet of currencies array + */ + public function pushCurrencyArrayToString($array) + { + $return = ''; + foreach($array as $key => $value) + { + $return .= "currencies[{$key}] = '{$value}';\n"; + } + return $return; + } } + diff --git a/service/core/REST/SugarRestRSS.php b/service/core/REST/SugarRestRSS.php index 1ee448e6..b8efadfa 100644 --- a/service/core/REST/SugarRestRSS.php +++ b/service/core/REST/SugarRestRSS.php @@ -142,7 +142,7 @@ EORSS; /** * @see SugarRest::fault() */ - public function fault($faultObject) + public function fault($errorObject) { ob_clean(); $this->generateResponseHeader(); diff --git a/service/v4_1/SugarWebServiceImplv4_1.php b/service/v4_1/SugarWebServiceImplv4_1.php index aebbb7b8..5cf2c0d1 100644 --- a/service/v4_1/SugarWebServiceImplv4_1.php +++ b/service/v4_1/SugarWebServiceImplv4_1.php @@ -73,7 +73,7 @@ class SugarWebServiceImplv4_1 extends SugarWebServiceImplv4 * @param Number $deleted -- false if deleted records should not be include, true if deleted records should be included. * @param String $order_by -- field to order the result sets by * @param Number $offset -- where to start in the return - * @param Number $limit -- numbet of results to return (defaults to all) + * @param Number $limit -- number of results to return (defaults to all) * @return Array 'entry_list' -- Array - The records that were retrieved * 'relationship_list' -- Array - The records link field data. The example is if asked about accounts contacts email address then return data would look like Array ( [0] => Array ( [name] => email_addresses [records] => Array ( [0] => Array ( [0] => Array ( [name] => id [value] => 3fb16797-8d90-0a94-ac12-490b63a6be67 ) [1] => Array ( [name] => email_address [value] => hr.kid.qa@example.com ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 1 ) ) [1] => Array ( [0] => Array ( [name] => id [value] => 403f8da1-214b-6a88-9cef-490b63d43566 ) [1] => Array ( [name] => email_address [value] => kid.hr@example.name ) [2] => Array ( [name] => opt_out [value] => 0 ) [3] => Array ( [name] => primary_address [value] => 0 ) ) ) ) ) * @exception 'SoapFault' -- The SOAP error, if any diff --git a/soap/SoapHelperFunctions.php b/soap/SoapHelperFunctions.php index dfc601c4..d8a1c0f8 100644 --- a/soap/SoapHelperFunctions.php +++ b/soap/SoapHelperFunctions.php @@ -975,19 +975,18 @@ function add_create_account($seed) $arr = array(); - - - $query = "select id, deleted from {$focus->table_name} WHERE name='".$seed->db->quote($account_name)."'"; + $query = "select id, deleted from {$focus->table_name} "; + $query .= " WHERE name='".$seed->db->quote($account_name)."'"; $query .=" ORDER BY deleted ASC"; $result = $seed->db->query($query, true); $row = $seed->db->fetchByAssoc($result, false); // we found a row with that id - if (isset($row['id']) && $row['id'] != -1) + if (!empty($row['id'])) { // if it exists but was deleted, just remove it entirely - if ( isset($row['deleted']) && $row['deleted'] == 1) + if ( !empty($row['deleted'])) { $query2 = "delete from {$focus->table_name} WHERE id='". $seed->db->quote($row['id'])."'"; $result2 = $seed->db->query($query2, true); @@ -1000,7 +999,7 @@ function add_create_account($seed) } // if we didnt find the account, so create it - if (! isset($focus->id) || $focus->id == '') + if (empty($focus->id)) { $focus->name = $account_name; diff --git a/soap/SoapSugarUsers.php b/soap/SoapSugarUsers.php index f711817f..f52bb00f 100644 --- a/soap/SoapSugarUsers.php +++ b/soap/SoapSugarUsers.php @@ -1514,15 +1514,17 @@ function search_by_module($user_name, $password, $search_string, $modules, $offs $count++; } }else{ - $where .= 'ea.email_address IN ('; - foreach($search_terms as $term){ - $where .= "'".$GLOBALS['db']->quote($term)."'"; - if($count < $termCount){ - $where .= ","; - } - $count++; - } - $where .= ')'; + $where .= '('; + foreach ($search_terms as $term) + { + $where .= "ea.email_address LIKE '".$GLOBALS['db']->quote($term)."'"; + if ($count < $termCount) + { + $where .= " OR "; + } + $count++; + } + $where .= ')'; } $tmpQuery .= $where; $tmpQuery .= ") AND $seed->table_name.deleted = 0"; diff --git a/sugar_version.php b/sugar_version.php index a67b0b1a..6fd93b5f 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.4.2'; -$sugar_db_version = '6.4.2'; +$sugar_version = '6.4.3'; +$sugar_db_version = '6.4.3'; $sugar_flavor = 'CE'; -$sugar_build = '7526'; -$sugar_timestamp = '2012-03-12 10:44am'; +$sugar_build = '7673'; +$sugar_timestamp = '2012-04-04 07:50pm'; ?> diff --git a/tests/ModuleInstall/PackageManager/Bug44896Test.php b/tests/ModuleInstall/PackageManager/Bug44896Test.php new file mode 100755 index 00000000..3eb3384b --- /dev/null +++ b/tests/ModuleInstall/PackageManager/Bug44896Test.php @@ -0,0 +1,131 @@ +createTempModule(); + } + + public function tearDown() + { + if (is_dir(Bug44896PackageManger::$location)) { + rmdir_recursive(dirname(Bug44896PackageManger::$location)); + } + } + + public function testCheckedArrayKey() + { + $package = new PackageManager(); + $returnJson = $package->getPackagesInStaging('module'); + foreach ($returnJson as $module) { + $this->assertArrayHasKey('unFile', $module, 'Key "unFile" is missing in return array'); + } + } + +} + +class Bug44896PackageManger +{ + static $manifest_location = "upload/upgrades/module/Bug44896-manifest.php"; + static $zip_location = "upload/upgrades/module/Bug44896.zip"; + static $location = "upload/upgrades/module/"; + + public function __construct() + { + $this->manifest_content = << + array ( + '6.4.0' + ), + 'acceptable_sugar_flavors' => + array( + 'ENT' + ), + 'readme'=>'', + 'key'=>'tf1', + 'author' => '', + 'description' => '', + 'icon' => '', + 'is_uninstallable' => false, + 'name' => 'Bug44896', + 'published_date' => '2010-10-20 22:10:01', + 'type' => 'module', + 'version' => '1287612601', + 'remove_tables' => 'prompt', + ); +\$installdefs = array ( + 'id' => 'asdfqq', + 'copy' => + array ( + 0 => array ( + 'from' => '/Extension/modules/Cases/Ext/Vardefs/dummy_extension2.php', + 'to' => 'custom/Extension/modules/Cases/Ext/Vardefs/dummy_extension2.php', + ), + ), +); + +EOQ; + } + + public function createTempModule() + { + if (!is_file(self::$manifest_location)) + { + file_put_contents(self::$manifest_location, $this->manifest_content); + zip_files_list(self::$zip_location, array(self::$manifest_location)); + } + } +} \ No newline at end of file diff --git a/tests/SugarTestUserUtilities.php b/tests/SugarTestUserUtilities.php index a106d123..2ca1181d 100755 --- a/tests/SugarTestUserUtilities.php +++ b/tests/SugarTestUserUtilities.php @@ -74,7 +74,7 @@ class SugarTestUserUtilities return $user; } - public function removeAllCreatedAnonymousUsers() + public static function removeAllCreatedAnonymousUsers() { $user_ids = self::getCreatedUserIds(); if ( count($user_ids) > 0 ) { diff --git a/tests/data/Relationships/Bug50910Test.php b/tests/data/Relationships/Bug50910Test.php new file mode 100755 index 00000000..16b89c03 --- /dev/null +++ b/tests/data/Relationships/Bug50910Test.php @@ -0,0 +1,75 @@ +commit(); + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + if(!empty($this->emailAddress)) + { + $GLOBALS['db']->query("DELETE FROM emails WHERE id='{$this->emailAddress->id}'"); + $GLOBALS['db']->query("DELETE FROM emails_beans WHERE email_id='{$this->emailAddress->id}'"); + $GLOBALS['db']->query("DELETE FROM emails_email_addr_rel WHERE email_id='{$this->emailAddress->id}'"); + } + } + + public function testSugarRelationshipsAddRow() + { + global $current_user; + // create email address instance + $this->emailAddress = new EmailAddress(); + $this->emailAddress->email_address = 'Bug59010Test@test.com'; + $this->emailAddress->save(); + + // create relation between user and email address with empty additional data to test if the addRow function + // properly handles empty values with not generating incorrect SQL + $current_user->load_relationship('email_addresses'); + $current_user->email_addresses->add(array($this->emailAddress), array()); + $this->assertNotEmpty($current_user->email_addresses); + + } +} \ No newline at end of file diff --git a/tests/include/Bug46822Test.php b/tests/include/Bug46822Test.php new file mode 100755 index 00000000..5acb6158 --- /dev/null +++ b/tests/include/Bug46822Test.php @@ -0,0 +1,72 @@ + '%', 'infront' => false, 'search' => 'test*test2', 'expected' => 'test*test2%'), + array( 'wildcard' => '*', 'infront' => false, 'search' => 'test*test2', 'expected' => 'test%test2%'), + array( 'wildcard' => '%', 'infront' => true, 'search' => 'test*test2', 'expected' => '%test*test2%'), + array( 'wildcard' => '*', 'infront' => true, 'search' => 'test*test2', 'expected' => '%test%test2%'), + ); + } + + /** + * @dataProvider SearchStringProvider + */ + public function testSQLLikeString($wildcard_char, $infront, $search, $expected) + { + $GLOBALS['sugar_config']['search_wildcard_char'] = $wildcard_char; + $GLOBALS['sugar_config']['search_wildcard_infront'] = $infront; + + $str = sql_like_string($search, '%'); + + $this->assertEquals($expected, $str, 'Incorrect new SQL string.'); + + // reset to defaults + $GLOBALS['sugar_config']['search_wildcard_char'] = '%'; + $GLOBALS['sugar_config']['search_wildcard_infront'] = false; + } +} diff --git a/tests/include/Bug50285Test.php b/tests/include/Bug50285Test.php new file mode 100755 index 00000000..d7c455f5 --- /dev/null +++ b/tests/include/Bug50285Test.php @@ -0,0 +1,82 @@ +assertNotNull(get_image("select", '')); + } catch (Exception $e) { + $this->fail('Call to get_image function with minimal parameters causes exception: '.$e->getMessage()); + } + } + + // This will fail without fix for Bug50285 + public function testGetImageFunctionWithSomeParameters() { + try { + $this->assertNotNull(get_image("select", '', null, null, ".gif")); + } catch (Exception $e) { + $this->fail('Call to get_image function without full parameters causes exception: '.$e->getMessage()); + } + } + + // This should always pass + public function testGetImageFunctionWithAllParameters() { + try { + $this->assertNotNull(get_image("select", '', null, null, ".gif", "test alt text")); + } catch (Exception $e) { + $this->fail('Call to get_image function with all parameters causes exception: '.$e->getMessage()); + } + } + + +} + +?> + \ No newline at end of file diff --git a/tests/include/Bug50678Test.php b/tests/include/Bug50678Test.php new file mode 100755 index 00000000..2cc07b36 --- /dev/null +++ b/tests/include/Bug50678Test.php @@ -0,0 +1,100 @@ +_backupConfig = $sugar_config; + + if(!empty($sugar_config['custom_help_url'])) { + unset ($sugar_config['custom_help_url']); + } + if(!empty($sugar_config['custom_help_base_url'])) { + unset ($sugar_config['custom_help_base_url']); + } + } + + public function tearDown() + { + global $sugar_config; + $sugar_config = $this->_backupConfig; + } + + public function testGetDefaultHelpURL() { + global $sugar_config; + + $this->assertSame('http://www.sugarcrm.com/crm/product_doc.php?edition=arg0&version=arg1&lang=arg2&module=arg3&help_action=arg4&status=arg5&key=arg6', + get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6')); + $this->assertSame('http://www.sugarcrm.com/crm/product_doc.php?edition=arg0&version=arg1&lang=arg2&module=arg3&help_action=arg4&status=arg5&key=arg6&anchor=arg7', + get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6', 'arg7')); + } + + public function testGetCustomHelpURL() { + global $sugar_config; + + $url = 'http://example.com'; + + $sugar_config['custom_help_url'] = $url; + + $this->assertSame($url, get_help_url()); + $this->assertSame($url, get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6')); + $this->assertSame($url, get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6', 'arg7')); + } + + public function testGetCustomBaseHelpURL() { + global $sugar_config; + + $url = 'http://example.com'; + + $sugar_config['custom_help_base_url'] = $url; + + $this->assertSame($url."?edition=arg0&version=arg1&lang=arg2&module=arg3&help_action=arg4&status=arg5&key=arg6", + get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6')); + $this->assertSame($url."?edition=arg0&version=arg1&lang=arg2&module=arg3&help_action=arg4&status=arg5&key=arg6&anchor=arg7", + get_help_url('arg0', 'arg1', 'arg2', 'arg3', 'arg4', 'arg5', 'arg6', 'arg7')); + } + +} + +?> + \ No newline at end of file diff --git a/tests/include/ListView/ListViewDisplayTest.php b/tests/include/ListView/ListViewDisplayTest.php index 3add0e37..e2232935 100755 --- a/tests/include/ListView/ListViewDisplayTest.php +++ b/tests/include/ListView/ListViewDisplayTest.php @@ -39,15 +39,27 @@ require_once 'include/ListView/ListViewDisplay.php'; class ListViewDisplayTest extends Sugar_PHPUnit_Framework_TestCase { + private $save_query; + public function setUp() { $this->_lvd = new ListViewDisplayMock(); $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); + global $sugar_config; + if(isset($sugar_config['save_query'])) + { + $this->save_query = $sugar_config['save_query']; + } } public function tearDown() { + global $sugar_config; + if(!empty($this->save_query)) + { + $sugar_config['save_query'] = $this->save_query; + } SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); unset($GLOBALS['app_strings']); diff --git a/tests/include/ListView/ListViewTest.php b/tests/include/ListView/ListViewTest.php new file mode 100755 index 00000000..3d420387 --- /dev/null +++ b/tests/include/ListView/ListViewTest.php @@ -0,0 +1,87 @@ +_lv = new ListView(); + $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); + } + + public function tearDown() + { + unset($this->_lv); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + unset($GLOBALS['app_strings']); + } + + public function sortOrderProvider() + { + // test data in order (request,session,subpaneldefs,default,expected return) + return array ( + array('asc' ,'desc' ,'desc' ,'desc' ,'asc'), + array('desc','asc' ,'asc' ,'asc' ,'desc'), + array(null ,'asc' ,'desc' ,'desc' ,'asc'), + array(null ,'desc' ,'asc' ,'asc' ,'desc'), + array(null ,null ,'asc' ,'desc' ,'asc'), + array(null ,null ,'desc' ,'asc' ,'desc'), + array(null ,null ,null ,'asc' ,'asc'), + array(null ,null ,null ,'desc' ,'desc') + ) ; + } + /** + * @group bug48665 + * @dataProvider sortOrderProvider + */ + public function testCalculateSortOrder($req,$sess,$subpdefs,$default,$expected) + { + $sortOrder = array( + 'request' => $req, + 'session' => $sess, + 'subpaneldefs' => $subpdefs, + 'default' => $default, + ); + $actual = $this->_lv->calculateSortOrder($sortOrder); + $this->assertEquals($expected, $actual, 'Sort order is wrong'); + } + +} diff --git a/tests/include/Localization/Bug35413Test.php b/tests/include/Localization/Bug35413Test.php index 9f0aaf4c..33ee7cca 100755 --- a/tests/include/Localization/Bug35413Test.php +++ b/tests/include/Localization/Bug35413Test.php @@ -40,6 +40,9 @@ require_once('include/Localization/Localization.php'); /** * Bug #35413 * Other character sets not displayed properly + * + * Bug #45059 + * Non UTF-8 Emails sent without Character Encoding are not translated properly */ class Bug35413Test extends Sugar_PHPUnit_Framework_TestCase { @@ -62,7 +65,30 @@ class Bug35413Test extends Sugar_PHPUnit_Framework_TestCase '7cjT7cjU0+3IwcbExNE=', 'يبسيبشسيبءئؤؤر', 'windows-1256' + ), + array( // params related to 45059 ticket + 'GyRCJWYhPCU2TD4bKEI=', + 'ユーザ名', + 'ISO-2022-JP' + ), + array ( + 'RnJvbTog6eXh7CD55eTt', + 'From: יובל שוהם', + 'ISO-8859-8' + ), + array ( + 'srvSqtaxytPEsMn6yMu1xNHbvqYK', + "不要直视陌生人的眼睛\n", + 'GB2312' + ), + //Not a good test case + /* + array ( // what happens when we post a dummy charset? + base64_encode("12345"), + "12345", + " " ) + */ ); } @@ -70,7 +96,7 @@ class Bug35413Test extends Sugar_PHPUnit_Framework_TestCase * Test convert base64 $source to string and convert string from $encoding to utf8. It has to return $utf8string. * * @dataProvider stringsProvider - * @ticket 35413 + * @ticket 35413, 45059 * @param string $source base64 encoded string in native charset * @param string $utf8string previous string in utf8 * @param string $encoding encoding of native string @@ -79,6 +105,7 @@ class Bug35413Test extends Sugar_PHPUnit_Framework_TestCase { $source = base64_decode($source); $translateCharsetResult = $this->_localization->translateCharset($source, $encoding, 'UTF-8'); + $this->assertEquals($utf8string, $translateCharsetResult, 'Strings have to be the same'); } } \ No newline at end of file diff --git a/tests/include/Localization/Bug49619.txt b/tests/include/Localization/Bug49619.txt new file mode 100755 index 00000000..6bcc623b --- /dev/null +++ b/tests/include/Localization/Bug49619.txt @@ -0,0 +1 @@ +Çѱ¹¾î/Á¶¼±¸» diff --git a/tests/include/Localization/Bug50887Test.php b/tests/include/Localization/Bug50887Test.php new file mode 100755 index 00000000..0c420dd2 --- /dev/null +++ b/tests/include/Localization/Bug50887Test.php @@ -0,0 +1,63 @@ +user = $GLOBALS['current_user']; + + $this->user->setPreference('default_decimal_seperator', '.'); + $this->loc = new Localization(); + } + + public function tearDown() + { + unset($GLOBALS['current_user']); + } + + public function testGetDecimalSeparator() { + $this->assertSame('.', $this->loc->getDecimalSeparator($this->user)); + } +} + +?> + \ No newline at end of file diff --git a/tests/include/Localization/LocalizationTest.php b/tests/include/Localization/LocalizationTest.php index d8e9efc1..c1d0b65f 100755 --- a/tests/include/Localization/LocalizationTest.php +++ b/tests/include/Localization/LocalizationTest.php @@ -139,6 +139,22 @@ class LocalizationTest extends Sugar_PHPUnit_Framework_TestCase $this->assertEquals($string,$convertedString); } + public function testConvertKS_C_56011987AsCP949() + { + if ( !function_exists('iconv') ) { + $this->markTestSkipped('Requires iconv'); + } + + $string = file_get_contents(dirname(__FILE__)."/Bug49619.txt"); + + $convertedString = $this->_locale->translateCharset($string,'KS_C_5601-1987','UTF-8', true); + $this->assertNotEquals($string,$convertedString); + + // test for this working by being able to convert back and the string match + $convertedString = $this->_locale->translateCharset($convertedString,'UTF-8','KS_C_5601-1987',true); + $this->assertEquals($string,$convertedString); + } + public function testCanDetectAsciiEncoding() { $string = 'string'; diff --git a/tests/include/MVC/View/SugarViewTest.php b/tests/include/MVC/View/SugarViewTest.php index 111463d3..4b79933f 100755 --- a/tests/include/MVC/View/SugarViewTest.php +++ b/tests/include/MVC/View/SugarViewTest.php @@ -39,17 +39,26 @@ require_once 'include/MVC/View/SugarView.php'; class SugarViewTest extends Sugar_PHPUnit_Framework_TestCase { + private $_backup = array(); + + /** + * @var SugarViewTestMock + */ + private $_view; + public function setUp() { $this->_view = new SugarViewTestMock(); $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Users'); + $this->_backup['currentTheme'] = SugarThemeRegistry::current(); } public function tearDown() { unset($GLOBALS['mod_strings']); unset($GLOBALS['app_strings']); + SugarThemeRegistry::set($this->_backup['currentTheme']->dirName); } public function testGetModuleTab() @@ -198,6 +207,20 @@ class SugarViewTest extends Sugar_PHPUnit_Framework_TestCase $this->_view->getBreadCrumbSymbol() ); } + + public function testGetSugarConfigJS() + { + global $sugar_config; + + $sugar_config['js_available'] = array('default_action'); + + $js_array = $this->_view->getSugarConfigJS(); + + // this should return 3 objects + $this->assertEquals(3, count($js_array)); + + $this->assertEquals('SUGAR.config.default_action = "index";', $js_array[2]); + } } class SugarViewTestMock extends SugarView @@ -211,4 +234,9 @@ class SugarViewTestMock extends SugarView { return parent::_initSmarty(); } + + public function getSugarConfigJS() + { + return parent::getSugarConfigJS(); + } } diff --git a/tests/include/Popup/Bug36329Test.php b/tests/include/Popup/Bug36329Test.php index 014bb45a..b41ddc9d 100755 --- a/tests/include/Popup/Bug36329Test.php +++ b/tests/include/Popup/Bug36329Test.php @@ -48,7 +48,10 @@ class Bug36329Test extends Sugar_PHPUnit_Framework_OutputTestCase public function setUp() { global $sugar_config; - $this->save_query = isset($sugar_config['save_query']) ? true : false; + if(isset($sugar_config['save_query'])) + { + $this->save_query = $sugar_config['save_query']; + } $this->current_language = $GLOBALS['current_language']; global $current_user; @@ -72,8 +75,8 @@ class Bug36329Test extends Sugar_PHPUnit_Framework_OutputTestCase public function tearDown() { global $sugar_config; - if(!$this->save_query) { - unset($sugar_config['save_query']); + if(!empty($this->save_query)) { + $sugar_config['save_query'] = $this->save_query; } $GLOBALS['current_language'] = $this->current_language; diff --git a/tests/include/QuickSearchDefaultsTest.php b/tests/include/QuickSearchDefaultsTest.php new file mode 100755 index 00000000..40c7abcc --- /dev/null +++ b/tests/include/QuickSearchDefaultsTest.php @@ -0,0 +1,47 @@ +assertInstanceOf('QuickSearchDefaults', $qsd, 'Object retrieved'); + } +} diff --git a/tests/include/SearchForm/FileLocatorTest.php b/tests/include/SearchForm/FileLocatorTest.php new file mode 100755 index 00000000..16586a70 --- /dev/null +++ b/tests/include/SearchForm/FileLocatorTest.php @@ -0,0 +1,147 @@ +form = new SearchFormMock($acc, "Accounts"); + } + + public function tearDown() + { + unset($GLOBALS['app_strings']); + unset($GLOBALS['current_user']); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + if(!empty($this->tempfiles)) { + foreach($this->tempfiles as $file) { + @unlink($file); + } + } + } + + + /** + * Check file locator + */ + public function testFileLocatorOptions() + { + $options = $this->form->getOptions(); + $this->assertNotEmpty($options['locator_class_params'][0]); + $this->assertContains("custom/modules/Accounts/tpls/SearchForm", $options['locator_class_params'][0]); + $this->assertContains("modules/Accounts/tpls/SearchForm", $options['locator_class_params'][0]); + } + + /** + * Check file locator + */ + public function testFileLocatorSetOptions() + { + $paths = array('a', 'b', 'c'); + + $options = array( + 'locator_class' => 'FileLocator', + 'locator_class_params' => array( + $paths + ) + ); + $this->form->setOptions($options); + $options = $this->form->getOptions(); + $this->assertEquals($paths, $options['locator_class_params'][0]); + } + + /** + * Check file locator + */ + public function testFileLocatorOptionsCtor() + { + $paths = array('a', 'b', 'c'); + + $options = array( + 'locator_class' => 'FileLocator', + 'locator_class_params' => array( + $paths + ) + ); + $this->form = new SearchForm(new Account(), "Accounts", 'index', $options); + $options = $this->form->getOptions(); + $this->assertEquals($paths, $options['locator_class_params'][0]); + } + + public function testFileLocatorFindSystemFile() + { + $this->assertEquals("include/SearchForm/tpls/SearchFormGenericAdvanced.tpl", + $this->form->locateFile('SearchFormGenericAdvanced.tpl'), + "Wrong file location" + ); + } + + public function testFileLocatorFindCustomFile() + { + sugar_mkdir('custom/include/SearchForm/tpls/', 0755, true); + sugar_mkdir('custom/modules/Accounts/tpls/SearchForm', 0755, true); + $this->tempfiles[]= 'custom/include/SearchForm/tpls/FileLocatorTest.tpl'; + file_put_contents('custom/include/SearchForm/tpls/FileLocatorTest.tpl', "unittest"); + $this->assertEquals("custom/include/SearchForm/tpls/FileLocatorTest.tpl", + $this->form->locateFile('FileLocatorTest.tpl'), + "Wrong file location" + ); + + $this->tempfiles[] = "custom/modules/Accounts/tpls/SearchForm/FileLocatorTest.tpl"; + file_put_contents('custom/modules/Accounts/tpls/SearchForm/FileLocatorTest.tpl', "unittest"); + $this->assertEquals("custom/modules/Accounts/tpls/SearchForm/FileLocatorTest.tpl", + $this->form->locateFile('FileLocatorTest.tpl'), + "Wrong file location" + ); + } +} + +class SearchFormMock extends SearchForm +{ + public function locateFile($file) + { + return parent::locateFile($file); + } +} diff --git a/tests/include/SubPanel/Bug44344Test.php b/tests/include/SubPanel/Bug44344Test.php new file mode 100755 index 00000000..a11100aa --- /dev/null +++ b/tests/include/SubPanel/Bug44344Test.php @@ -0,0 +1,186 @@ +setPreference('max_tabs', '7'); + + // create vardef to add new relation account - cases + $this->addNewRelationships(); + + // add new tabgroup whit cases module + unset($GLOBALS['tabStructure']); + $this->group_label = 'LBL_GROUPTAB_'.mktime(); + $GLOBALS['tabStructure'][$this->group_label] = array( + 'label' => $this->group_label, + 'modules' => array('Cases') + ); + + $this->account = SugarTestAccountUtilities::createAccount(); + } + + public function tearDown() + { + SugarTestAccountUtilities::removeAllCreatedAccounts(); + unset($this->account); + + unset($GLOBALS['tabStructure']); + unset($this->subPanel, $this->group_label); + unset($GLOBALS['dictionary']["accounts_cases_10000"]); + + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + + unset($GLOBALS['beanFiles']); + unset($GLOBALS['beanList']); + } + + /** + * add new relation accounts_cases_10000 (Account to Cases: one-to-many) + * @return void + */ + private function addNewRelationships() + { + $GLOBALS['dictionary']["accounts_cases_10000"] = array ( + 'true_relationship_type' => 'one-to-many', + 'from_studio' => true, + 'relationships' => + array ( + 'accounts_cases_10000' => + array ( + 'lhs_module' => 'Accounts', + 'lhs_table' => 'accounts', + 'lhs_key' => 'id', + 'rhs_module' => 'Cases', + 'rhs_table' => 'cases', + 'rhs_key' => 'id', + 'relationship_type' => 'many-to-many', + 'join_table' => 'accounts_cases_10000_c', + 'join_key_lhs' => 'accounts_cases_10000accounts_ida', + 'join_key_rhs' => 'accounts_cases_10000cases_idb', + ), + ), + 'table' => 'accounts_cases_10000_c', + 'fields' => + array ( + 0 => array ('name' => 'id', 'type' => 'varchar', 'len' => 36), + 1 => array ('name' => 'date_modified', 'type' => 'datetime'), + 2 => array ('name' => 'deleted', 'type' => 'bool', 'len' => '1', 'default' => '0', 'required' => true), + 3 => array ('name' => 'accounts_cases_10000accounts_ida', 'type' => 'varchar', 'len' => 36), + 4 => array ('name' => 'accounts_cases_10000cases_idb', 'type' => 'varchar', 'len' => 36), + ), + 'indices' => + array ( + 0 => array ('name' => 'accounts_cases_10000spk', 'type' => 'primary', 'fields' => array (0 => 'id')), + 1 => array ('name' => 'accounts_cases_10000_ida1', 'type' => 'index', 'fields' => array (0 => 'accounts_cases_10000accounts_ida')), + 2 => array ('name' => 'accounts_cases_10000_alt', 'type' => 'alternate_key', 'fields' => array (0 => 'accounts_cases_10000cases_idb')), + ), + ); + } + + /** + * generate mock layout_defs for SubPanelDefinitions object + * add two subpanels: cases (default relation) and accounts_cases_10000 (test created relation) + * @return array + */ + private function getLayoutDefs() + { + $layout_defs = array(); + + $layout_defs["subpanel_setup"]['cases'] = array( + 'order' => 100, + 'sort_order' => 'desc', + 'sort_by' => 'case_number', + 'module' => 'Cases', + 'subpanel_name' => 'ForAccounts', + 'get_subpanel_data' => 'cases', + 'add_subpanel_data' => 'case_id', + 'title_key' => 'LBL_CASES_SUBPANEL_TITLE', + 'top_buttons' => array( + array('widget_class' => 'SubPanelTopButtonQuickCreate'), + array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect') + ), + ); + + $layout_defs["subpanel_setup"]['accounts_cases_10000'] = array ( + 'order' => 100, + 'module' => 'Cases', + 'subpanel_name' => 'default', + 'sort_order' => 'asc', + 'sort_by' => 'id', + 'title_key' => 'LBL_ACCOUNTS_CASES_FROM_CASES_TITLE', + 'get_subpanel_data' => 'accounts_cases_10000', + ); + return $layout_defs; + } + + /** + * @group 44344 + * @outputBuffering enabled + */ + public function testSubPanelTilesTabsGetTabs() + { + $tabs = array('cases', 'accounts_cases_10000'); + $this->subPanel = new SubPanelTilesTabs($this->account, '', $this->getLayoutDefs()); + + // get tabs by selected group ($this->group_label) + $returned_tabs = $this->subPanel->getTabs($tabs, true, $this->group_label); + + foreach ( $tabs as $tab ) + { + $this->assertContains($tab, $returned_tabs); + } + } +} \ No newline at end of file diff --git a/tests/include/SugarFields/Fields/Base/Bug50117Test.php b/tests/include/SugarFields/Fields/Base/Bug50117Test.php new file mode 100755 index 00000000..189f9ea8 --- /dev/null +++ b/tests/include/SugarFields/Fields/Base/Bug50117Test.php @@ -0,0 +1,92 @@ + 'Accepted', + ); + $vardef = array( + 'name' => 'accept_status_name', + 'type' => 'enum', + 'source' => 'non-db', + 'vname' => 'LBL_LIST_ACCEPT_STATUS', + 'options' => 'dom_meeting_accept_status', + 'massupdate' => false, + 'studio' => Array + ( + 'listview' => false, + 'searchview' => false, + ) + ); + $displayParams = array( + 'vname' => 'LBL_LIST_ACCEPT_STATUS', + 'width' => '11%', + 'sortable' => false, + 'linked_field' => 'users', + 'linked_field_set' => 'users', + 'name' => 'accept_status_name', + 'module' => 'Users', + ); + $col = 1; + + $this->_listViewSmartyOutput1 = trim($enumField->getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col)); + + $vardef['name'] = 'just_another_name'; + $parentFieldArray['JUST_ANOTHER_NAME'] = 'None'; + + $this->_listViewSmartyOutput2 = trim($enumField->getListViewSmarty($parentFieldArray, $vardef, $displayParams, $col)); + } + + /** + * @bug 50117 + */ + public function testListViewSmarty() + { + $this->assertEquals("Accepted", $this->_listViewSmartyOutput1); + $this->assertEquals("None", $this->_listViewSmartyOutput2); + } +} diff --git a/tests/include/SugarFields/Fields/Datetime/Bug28260Test.php b/tests/include/SugarFields/Fields/Datetime/Bug28260Test.php new file mode 100755 index 00000000..16b3e0a6 --- /dev/null +++ b/tests/include/SugarFields/Fields/Datetime/Bug28260Test.php @@ -0,0 +1,88 @@ +user = $GLOBALS['current_user']; + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($this->user); + unset($GLOBALS['current_user']); + } + + public function _providerEmailTemplateFormat() + { + return array( + array('10/11/2010 13:00','10/11/2010 13:00', 'm/d/Y', 'H:i' ), + array('11/10/2010 13:00','11/10/2010 13:00', 'd/m/Y', 'H:i' ), + array('2010-10-11 13:00:00','10/11/2010 13:00', 'm/d/Y', 'H:i' ), + array('2010-10-11 13:00:00','11/10/2010 13:00', 'd/m/Y', 'H:i' ), + array('2010-10-11 13:00:00','10-11-2010 13:00', 'm-d-Y', 'H:i' ), + array('2010-10-11 13:00:00','11-10-2010 13:00', 'd-m-Y', 'H:i' ), + array('2010-10-11 13:00:00','2010-10-11 13:00', 'Y-m-d', 'H:i' ) + ); + } + + /** + * @dataProvider _providerEmailTemplateFormat + */ + public function testEmailTemplateFormat($unformattedValue, $expectedValue, $dateFormat, $timeFormat) + { + $GLOBALS['sugar_config']['default_date_format'] = $dateFormat; + $GLOBALS['sugar_config']['default_time_format'] = $timeFormat; + $GLOBALS['current_user']->setPreference('datef', $dateFormat); + $GLOBALS['current_user']->setPreference('timef', $timeFormat); + + require_once('include/SugarFields/SugarFieldHandler.php'); + $sfr = SugarFieldHandler::getSugarField('datetime'); + $formattedValue = $sfr->getEmailTemplateValue($unformattedValue,array('type'=>'datetime'), array('notify_user' => $this->user)); + + $this->assertSame($expectedValue, $formattedValue); + } +} \ No newline at end of file diff --git a/tests/include/SugarFields/Fields/Relate/Bug47722Test.php b/tests/include/SugarFields/Fields/Relate/Bug47722Test.php new file mode 100755 index 00000000..dd1c9474 --- /dev/null +++ b/tests/include/SugarFields/Fields/Relate/Bug47722Test.php @@ -0,0 +1,81 @@ +contact = SugarTestContactUtilities::createContact(); + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + SugarTestContactUtilities::removeAllCreatedContacts(); + } + + /** + * @group 47722 + */ + public function testImportSanitize() + { + $vardef = array('module' => 'Contacts', + 'id_name' => 'contact_id_c', + 'name' => 'test_rel_cont_c'); + $value = $this->contact->first_name .' '. $this->contact->last_name; + $focus = new Lead(); + $settings = new ImportFieldSanitize(); + + $sfr = new SugarFieldRelate('relate'); + $value = $sfr->importSanitize($value, $vardef, $focus, $settings); + $this->assertEquals($focus->$vardef['id_name'], $this->contact->id); + } +} +?> \ No newline at end of file diff --git a/tests/include/SugarTheme/SugarThemeRegistryTest.php b/tests/include/SugarTheme/SugarThemeRegistryTest.php index a7f477e1..1218be55 100755 --- a/tests/include/SugarTheme/SugarThemeRegistryTest.php +++ b/tests/include/SugarTheme/SugarThemeRegistryTest.php @@ -58,6 +58,7 @@ class SugarThemeRegistryTest extends Sugar_PHPUnit_Framework_TestCase SugarTestThemeUtilities::removeAllCreatedAnonymousThemes(); if ( isset($this->_oldDefaultTheme) ) { $GLOBALS['sugar_config']['default_theme'] = $this->_oldDefaultTheme; + SugarThemeRegistry::set($GLOBALS['sugar_config']['default_theme']); } } diff --git a/tests/include/ValidDBNameTest.php b/tests/include/ValidDBNameTest.php index 389753dc..1038ea81 100755 --- a/tests/include/ValidDBNameTest.php +++ b/tests/include/ValidDBNameTest.php @@ -101,12 +101,20 @@ class ValidDBNameTest extends Sugar_PHPUnit_Framework_TestCase $this->assertFalse(isValidDBName('#sugarCRM_ver6', 'mssql')); } - public function testLongNameAffected() + public function longNameProvider() { - $this->assertNotEquals( - getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_opportunities', true), - getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1_opportunities', true) - ); + return array( + array("eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_opportunities", "eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1_opportunities"), + array("abc_auctions_abc_contactauctions", "abc_auctionsleadsources_abc_contact_auctions") + ); + } + + /** + * @dataProvider longNameProvider + */ + public function testLongNameAffected($name_1, $name_2) + { + $this->assertNotEquals(getValidDBName($name_1), getValidDBName($name_2)); } } diff --git a/tests/include/connectors/Bug50800Test.php b/tests/include/connectors/Bug50800Test.php new file mode 100755 index 00000000..b90c6010 --- /dev/null +++ b/tests/include/connectors/Bug50800Test.php @@ -0,0 +1,94 @@ +custom_path.'/connectors.php')) + { + $this->custom_contents = file_get_contents($this->custom_path.'/connectors.php'); + unlink($this->custom_path.'/connectors.php'); + } else { + mkdir_recursive($this->custom_path); + } + } + + function tearDown() { + //remove connector file + unlink($this->custom_path.'/connectors.php'); + + if(!empty($this->custom_contents)) + { + file_put_contents($this->custom_path.'/connectors.php', $this->custom_contents); + } + + } + + function testConnectorFailsStringGracefully() + { + //now write a connector file with a string instead of an array for the connector var + file_put_contents($this->custom_path.'/connectors.php',"assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $cu->getConnectors(true), 'ConnectorsUtils::getConnectors() failed to return an array when $connectors is a string'); + } + + function testConnectorFailsNullGracefully() + { + //now write a connector file with missing array info instead of an array for the connector var + file_put_contents($this->custom_path.'/connectors.php',"assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $cu->getConnectors(true), 'ConnectorsUtils::getConnectors() failed to return an array when connectors array was missing. '); + } +} +?> \ No newline at end of file diff --git a/tests/include/database/Bug51161Test.php b/tests/include/database/Bug51161Test.php new file mode 100755 index 00000000..5123abbf --- /dev/null +++ b/tests/include/database/Bug51161Test.php @@ -0,0 +1,168 @@ +_db = DBManagerFactory::getInstance(); + $this->useOutputBuffering = false; + } + + public function tearDown() + { + + } + + + public function providerBug51161() + { + $returnArray = array( + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'varchar', + 'len' => '34', + ), + ), + '/foo\s+$baseType\(34\)/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'nvarchar', + 'len' => '35', + ), + ), + '/foo\s+$baseType\(35\)/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'char', + 'len' => '23', + ), + ), + '/foo\s+$baseType\(23\)/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'text', + 'len' => '1024', + ), + ), + '/foo\s+$baseType\(1024\)/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'clob', + ), + ), + '/foo\s+$colType/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'clob', + 'len' => '1024', + ), + ), + '/foo\s+$baseType\(1024\)/i', + 1 + ), + array( + array( + 'foo' => array ( + 'name' => 'foo', + 'type' => 'blob', + 'len' => '1024', + ), + ), + '/foo\s+$baseType\(1024\)/i', + 1 + ), + ); + + return $returnArray; + } + + /** + * @dataProvider providerBug51161 + */ + + public function testBug51161($fieldDef,$successRegex, $times) + { + // Allowing type part variables in passed in regular expression so that database specific mappings + // can be accounted for in the test + $ftype = $this->_db->getFieldType($fieldDef['foo']); + $colType = $this->_db->getColumnType($ftype); + $successRegex = preg_replace('/\$colType/', $colType, $successRegex); + if($type = $this->_db->getTypeParts($colType)){ + if(isset($type['baseType'])) + $successRegex = preg_replace('/\$baseType/', $type['baseType'], $successRegex); + if(isset($type['len'])) + $successRegex = preg_replace('/\$len/', $type['len'], $successRegex); + if(isset($type['scale'])) + $successRegex = preg_replace('/\$scale/', $type['scale'], $successRegex); + if(isset($type['arg'])) + $successRegex = preg_replace('/\$arg/', $type['arg'], $successRegex); + } + $result = $this->_db->createTableSQLParams('test', $fieldDef, array()); + $this->assertEquals($times, preg_match($successRegex, $result), "Resulting statement: $result failed to match /$successRegex/"); + } +} diff --git a/tests/include/database/Bug51311Test.php b/tests/include/database/Bug51311Test.php new file mode 100755 index 00000000..1d6e52c7 --- /dev/null +++ b/tests/include/database/Bug51311Test.php @@ -0,0 +1,131 @@ + 'contents', + 'dbType' => 'longtext', + 'type' => 'nvarchar', + 'vname' => 'LBL_DESCRIPTION', + 'isnull' => true, + ), + 'user_preferences', + 'max' + ), + + array( + array ( + 'name' => 'contents', + 'dbType' => 'text', + 'type' => 'nvarchar', + 'vname' => 'LBL_DESCRIPTION', + 'isnull' => true, + ), + 'user_preferences', + 'max' + ), + + array( + array ( + 'name' => 'contents', + 'dbType' => 'image', + 'type' => 'image', + 'vname' => 'LBL_DESCRIPTION', + 'isnull' => true, + ), + 'user_preferences', + '2147483647' + ), + + array( + array ( + 'name' => 'contents', + 'dbType' => 'ntext', + 'type' => 'image', + 'vname' => 'LBL_DESCRIPTION', + 'isnull' => true, + ), + 'user_preferences', + '2147483646' + ), + + array( + array ( + 'name' => 'contents', + 'dbType' => 'nvarchar', + 'type' => 'nvarchar', + 'vname' => 'LBL_DESCRIPTION', + 'isnull' => true, + ), + 'user_preferences', + '255' + ), + ); + } + + + /** + * @dataProvider providerBug51311 + */ + public function testFreeTDSMassageFieldDef($fieldDef, $tablename, $len) + { + $manager = new FreeTDSManager(); + $manager->massageFieldDef($fieldDef, $tablename); + $this->assertEquals($len, $fieldDef['len']); + } + + /** + * @dataProvider providerBug51311 + */ + public function testSqlSrvMassageFieldDef($fieldDef, $tablename, $len) + { + $manager = new SqlsrvManager(); + $manager->massageFieldDef($fieldDef, $tablename); + $this->assertEquals($len, $fieldDef['len']); + } + + +} \ No newline at end of file diff --git a/tests/include/generic/SugarWidgets/Bug45716.php b/tests/include/generic/SugarWidgets/Bug45716.php new file mode 100755 index 00000000..e7df86ac --- /dev/null +++ b/tests/include/generic/SugarWidgets/Bug45716.php @@ -0,0 +1,934 @@ + + array ( + 'name' => 'account_id', + 'vname' => 'LBL_ACCOUNT_ID', + 'type' => 'id', + 'source' => 'non-db', + 'audited' => true, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:account_id_c' => + array ( + 'required' => false, + 'source' => 'custom_fields', + 'name' => 'account_id_c', + 'vname' => 'LBL_LIST_RELATED_TO', + 'type' => 'id', + 'massupdate' => '0', + 'default' => NULL, + 'comments' => '', + 'help' => '', + 'importable' => 'true', + 'duplicate_merge' => 'disabled', + 'duplicate_merge_dom_value' => '0', + 'audited' => false, + 'reportable' => false, + 'unified_search' => false, + 'calculated' => false, + 'len' => '36', + 'size' => '20', + 'id' => 'Opportunitiesaccount_id_c', + 'custom_module' => 'Opportunities', + 'module' => 'Opportunities', + 'real_table' => 'opportunities_cstm', + ), + 'self:account_link_c' => + array ( + 'dependency' => '', + 'required' => false, + 'source' => 'non-db', + 'name' => 'account_link_c', + 'vname' => 'LBL_ACCOUNT_LINK', + 'type' => 'relate', + 'massupdate' => '0', + 'default' => NULL, + 'comments' => '', + 'help' => '', + 'importable' => 'true', + 'duplicate_merge' => 'disabled', + 'duplicate_merge_dom_value' => '0', + 'audited' => false, + 'reportable' => true, + 'unified_search' => false, + 'calculated' => false, + 'len' => '255', + 'size' => '20', + 'id_name' => 'account_id_c', + 'ext2' => 'Accounts', + 'module' => 'Opportunities', + 'rname' => 'name', + 'quicksearch' => 'enabled', + 'studio' => 'visible', + 'id' => 'Opportunitiesaccount_link_c', + 'custom_module' => 'Opportunities', + 'real_table' => 'opportunities_cstm', + 'secondary_table' => 'accounts', + ), + 'self:account_name' => + array ( + 'name' => 'account_name', + 'rname' => 'name', + 'id_name' => 'account_id', + 'vname' => 'LBL_ACCOUNT_NAME', + 'type' => 'relate', + 'table' => 'accounts', + 'join_name' => 'accounts', + 'isnull' => 'true', + 'module' => 'Opportunities', + 'dbType' => 'varchar', + 'link' => 'accounts', + 'len' => '255', + 'source' => 'non-db', + 'unified_search' => true, + 'required' => true, + 'importable' => 'required', + 'real_table' => 'opportunities', + ), + 'self:accounts' => + array ( + 'name' => 'accounts', + 'type' => 'link', + 'relationship' => 'accounts_opportunities', + 'source' => 'non-db', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'Account', + 'vname' => 'LBL_ACCOUNTS', + 'real_table' => 'opportunities', + ), + 'self:amount' => + array ( + 'name' => 'amount', + 'vname' => 'LBL_AMOUNT', + 'type' => 'currency', + 'dbType' => 'double', + 'comment' => 'Unconverted amount of the opportunity', + 'importable' => 'required', + 'duplicate_merge' => '1', + 'required' => true, + 'options' => 'numeric_range_search_dom', + 'enable_range_search' => true, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:amount_usdollar' => + array ( + 'name' => 'amount_usdollar', + 'vname' => 'LBL_AMOUNT_USDOLLAR', + 'type' => 'currency', + 'group' => 'amount', + 'dbType' => 'double', + 'disable_num_format' => true, + 'duplicate_merge' => '0', + 'audited' => true, + 'comment' => 'Formatted amount of the opportunity', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:assigned_user_id' => + array ( + 'name' => 'assigned_user_id', + 'rname' => 'user_name', + 'id_name' => 'assigned_user_id', + 'vname' => 'LBL_ASSIGNED_TO_ID', + 'group' => 'assigned_user_name', + 'type' => 'relate', + 'table' => 'users', + 'module' => 'Opportunities', + 'reportable' => true, + 'isnull' => 'false', + 'dbType' => 'id', + 'audited' => true, + 'comment' => 'User ID assigned to record', + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:assigned_user_link' => + array ( + 'name' => 'assigned_user_link', + 'type' => 'link', + 'relationship' => 'opportunities_assigned_user', + 'vname' => 'LBL_ASSIGNED_TO_USER', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'User', + 'source' => 'non-db', + 'duplicate_merge' => 'enabled', + 'rname' => 'user_name', + 'id_name' => 'assigned_user_id', + 'table' => 'users', + 'real_table' => 'opportunities', + ), + 'self:assigned_user_name' => + array ( + 'name' => 'assigned_user_name', + 'link' => 'assigned_user_link', + 'vname' => 'LBL_ASSIGNED_TO_NAME', + 'rname' => 'user_name', + 'type' => 'relate', + 'reportable' => false, + 'source' => 'non-db', + 'table' => 'users', + 'id_name' => 'assigned_user_id', + 'module' => 'Opportunities', + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:calls' => + array ( + 'name' => 'calls', + 'type' => 'link', + 'relationship' => 'opportunity_calls', + 'source' => 'non-db', + 'vname' => 'LBL_CALLS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:campaign_id' => + array ( + 'name' => 'campaign_id', + 'comment' => 'Campaign that generated lead', + 'vname' => 'LBL_CAMPAIGN_ID', + 'rname' => 'id', + 'type' => 'id', + 'dbType' => 'id', + 'table' => 'campaigns', + 'isnull' => 'true', + 'module' => 'Opportunities', + 'reportable' => false, + 'massupdate' => false, + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:campaign_link' => + array ( + 'name' => 'campaign_link', + 'type' => 'link', + 'relationship' => 'opportunities_campaign', + 'vname' => 'LBL_CAMPAIGNS', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'Campaign', + 'source' => 'non-db', + 'reportable' => false, + 'real_table' => 'opportunities', + ), + 'self:campaign_name' => + array ( + 'name' => 'campaign_name', + 'rname' => 'name', + 'id_name' => 'campaign_id', + 'vname' => 'LBL_CAMPAIGN', + 'type' => 'relate', + 'link' => 'campaign_opportunities', + 'isnull' => 'true', + 'table' => 'campaigns', + 'module' => 'Opportunities', + 'source' => 'non-db', + 'real_table' => 'opportunities', + ), + 'self:campaign_opportunities' => + array ( + 'name' => 'campaign_opportunities', + 'type' => 'link', + 'vname' => 'LBL_CAMPAIGN_OPPORTUNITY', + 'relationship' => 'campaign_opportunities', + 'source' => 'non-db', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:campaigns' => + array ( + 'name' => 'campaigns', + 'type' => 'link', + 'relationship' => 'opportunities_campaign', + 'module' => 'Opportunities', + 'bean_name' => 'CampaignLog', + 'source' => 'non-db', + 'vname' => 'LBL_CAMPAIGNS', + 'reportable' => false, + 'real_table' => 'opportunities', + ), + 'self:contacts' => + array ( + 'name' => 'contacts', + 'type' => 'link', + 'relationship' => 'opportunities_contacts', + 'source' => 'non-db', + 'module' => 'Opportunities', + 'bean_name' => 'Contact', + 'rel_fields' => + array ( + 'contact_role' => + array ( + 'type' => 'enum', + 'options' => 'opportunity_relationship_type_dom', + ), + ), + 'vname' => 'LBL_CONTACTS', + 'real_table' => 'opportunities', + ), + 'self:contracts' => + array ( + 'name' => 'contracts', + 'type' => 'link', + 'vname' => 'LBL_CONTRACTS', + 'relationship' => 'contracts_opportunities', + 'source' => 'non-db', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:created_by' => + array ( + 'name' => 'created_by', + 'rname' => 'user_name', + 'id_name' => 'modified_user_id', + 'vname' => 'LBL_CREATED', + 'type' => 'assigned_user_name', + 'table' => 'users', + 'isnull' => 'false', + 'dbType' => 'id', + 'group' => 'created_by_name', + 'comment' => 'User who created record', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:created_by_link' => + array ( + 'name' => 'created_by_link', + 'type' => 'link', + 'relationship' => 'opportunities_created_by', + 'vname' => 'LBL_CREATED_USER', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'User', + 'source' => 'non-db', + 'real_table' => 'opportunities', + ), + 'self:created_by_name' => + array ( + 'name' => 'created_by_name', + 'vname' => 'LBL_CREATED', + 'type' => 'relate', + 'reportable' => false, + 'link' => 'created_by_link', + 'rname' => 'user_name', + 'source' => 'non-db', + 'table' => 'users', + 'id_name' => 'created_by', + 'module' => 'Opportunities', + 'duplicate_merge' => 'disabled', + 'importable' => 'false', + 'real_table' => 'opportunities', + ), + 'self:currencies' => + array ( + 'name' => 'currencies', + 'type' => 'link', + 'relationship' => 'opportunity_currencies', + 'source' => 'non-db', + 'vname' => 'LBL_CURRENCIES', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:currency_id' => + array ( + 'name' => 'currency_id', + 'type' => 'id', + 'group' => 'currency_id', + 'vname' => 'LBL_CURRENCY', + 'function' => + array ( + 'name' => 'getCurrencyDropDown', + 'returns' => 'html', + ), + 'reportable' => false, + 'comment' => 'Currency used for display purposes', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:currency_name' => + array ( + 'name' => 'currency_name', + 'rname' => 'name', + 'id_name' => 'currency_id', + 'vname' => 'LBL_CURRENCY_NAME', + 'type' => 'relate', + 'isnull' => 'true', + 'table' => 'currencies', + 'module' => 'Opportunities', + 'source' => 'non-db', + 'function' => + array ( + 'name' => 'getCurrencyNameDropDown', + 'returns' => 'html', + ), + 'studio' => 'false', + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:currency_symbol' => + array ( + 'name' => 'currency_symbol', + 'rname' => 'symbol', + 'id_name' => 'currency_id', + 'vname' => 'LBL_CURRENCY_SYMBOL', + 'type' => 'relate', + 'isnull' => 'true', + 'table' => 'currencies', + 'module' => 'Opportunities', + 'source' => 'non-db', + 'function' => + array ( + 'name' => 'getCurrencySymbolDropDown', + 'returns' => 'html', + ), + 'studio' => 'false', + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:currency_target_c' => + array ( + 'required' => false, + 'source' => 'custom_fields', + 'name' => 'currency_target_c', + 'vname' => 'LBL_CURRENCY_TARGET', + 'type' => 'currency', + 'massupdate' => '0', + 'default' => NULL, + 'comments' => '', + 'help' => '', + 'importable' => 'false', + 'duplicate_merge' => 'disabled', + 'duplicate_merge_dom_value' => '0', + 'audited' => false, + 'reportable' => true, + 'unified_search' => false, + 'calculated' => false, + 'len' => '26', + 'size' => '20', + 'enable_range_search' => false, + 'id' => 'Opportunitiescurrency_target_c', + 'custom_module' => 'Opportunities', + 'module' => 'Opportunities', + 'real_table' => 'opportunities_cstm', + ), + 'self:date_closed' => + array ( + 'name' => 'date_closed', + 'vname' => 'LBL_DATE_CLOSED', + 'type' => 'date', + 'audited' => true, + 'comment' => 'Expected or actual date the oppportunity will close', + 'importable' => 'required', + 'required' => true, + 'enable_range_search' => true, + 'options' => 'date_range_search_dom', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:date_entered' => + array ( + 'name' => 'date_entered', + 'vname' => 'LBL_DATE_ENTERED', + 'type' => 'datetime', + 'group' => 'created_by_name', + 'comment' => 'Date record created', + 'enable_range_search' => true, + 'options' => 'date_range_search_dom', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:date_modified' => + array ( + 'name' => 'date_modified', + 'vname' => 'LBL_DATE_MODIFIED', + 'type' => 'datetime', + 'group' => 'modified_by_name', + 'comment' => 'Date record last modified', + 'enable_range_search' => true, + 'options' => 'date_range_search_dom', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:deleted' => + array ( + 'name' => 'deleted', + 'vname' => 'LBL_DELETED', + 'type' => 'bool', + 'default' => '0', + 'reportable' => false, + 'comment' => 'Record deletion indicator', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:description' => + array ( + 'name' => 'description', + 'vname' => 'LBL_DESCRIPTION', + 'type' => 'text', + 'comment' => 'Full text of the note', + 'rows' => 6, + 'cols' => 80, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:documents' => + array ( + 'name' => 'documents', + 'type' => 'link', + 'relationship' => 'documents_opportunities', + 'source' => 'non-db', + 'vname' => 'LBL_DOCUMENTS_SUBPANEL_TITLE', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:emails' => + array ( + 'name' => 'emails', + 'type' => 'link', + 'relationship' => 'emails_opportunities_rel', + 'source' => 'non-db', + 'vname' => 'LBL_EMAILS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:id' => + array ( + 'name' => 'id', + 'vname' => 'LBL_ID', + 'type' => 'id', + 'required' => true, + 'reportable' => true, + 'comment' => 'Unique identifier', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:lead_source' => + array ( + 'name' => 'lead_source', + 'vname' => 'LBL_LEAD_SOURCE', + 'type' => 'enum', + 'options' => 'lead_source_dom', + 'len' => '50', + 'comment' => 'Source of the opportunity', + 'merge_filter' => 'enabled', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:leads' => + array ( + 'name' => 'leads', + 'type' => 'link', + 'relationship' => 'opportunity_leads', + 'source' => 'non-db', + 'vname' => 'LBL_LEADS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:meetings' => + array ( + 'name' => 'meetings', + 'type' => 'link', + 'relationship' => 'opportunity_meetings', + 'source' => 'non-db', + 'vname' => 'LBL_MEETINGS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:modified_by_name' => + array ( + 'name' => 'modified_by_name', + 'vname' => 'LBL_MODIFIED_NAME', + 'type' => 'relate', + 'reportable' => false, + 'source' => 'non-db', + 'rname' => 'user_name', + 'table' => 'users', + 'id_name' => 'modified_user_id', + 'module' => 'Opportunities', + 'link' => 'modified_user_link', + 'duplicate_merge' => 'disabled', + 'real_table' => 'opportunities', + ), + 'self:modified_user_id' => + array ( + 'name' => 'modified_user_id', + 'rname' => 'user_name', + 'id_name' => 'modified_user_id', + 'vname' => 'LBL_MODIFIED', + 'type' => 'assigned_user_name', + 'table' => 'users', + 'isnull' => 'false', + 'group' => 'modified_by_name', + 'dbType' => 'id', + 'reportable' => true, + 'comment' => 'User who last modified record', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:modified_user_link' => + array ( + 'name' => 'modified_user_link', + 'type' => 'link', + 'relationship' => 'opportunities_modified_user', + 'vname' => 'LBL_MODIFIED_USER', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'User', + 'source' => 'non-db', + 'real_table' => 'opportunities', + ), + 'self:name' => + array ( + 'name' => 'name', + 'vname' => 'LBL_OPPORTUNITY_NAME', + 'type' => 'name', + 'dbType' => 'varchar', + 'len' => '50', + 'unified_search' => true, + 'comment' => 'Name of the opportunity', + 'merge_filter' => 'selected', + 'importable' => 'required', + 'required' => true, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:next_step' => + array ( + 'name' => 'next_step', + 'vname' => 'LBL_NEXT_STEP', + 'type' => 'varchar', + 'len' => '100', + 'comment' => 'The next step in the sales process', + 'merge_filter' => 'enabled', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:notes' => + array ( + 'name' => 'notes', + 'type' => 'link', + 'relationship' => 'opportunity_notes', + 'source' => 'non-db', + 'vname' => 'LBL_NOTES', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:opportunity_type' => + array ( + 'name' => 'opportunity_type', + 'vname' => 'LBL_TYPE', + 'type' => 'enum', + 'options' => 'opportunity_type_dom', + 'len' => '255', + 'audited' => true, + 'comment' => 'Type of opportunity (ex: Existing, New)', + 'merge_filter' => 'enabled', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:probability' => + array ( + 'name' => 'probability', + 'vname' => 'LBL_PROBABILITY', + 'type' => 'int', + 'dbType' => 'double', + 'audited' => true, + 'comment' => 'The probability of closure', + 'validation' => + array ( + 'type' => 'range', + 'min' => 0, + 'max' => 100, + ), + 'merge_filter' => 'enabled', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:project' => + array ( + 'name' => 'project', + 'type' => 'link', + 'relationship' => 'projects_opportunities', + 'source' => 'non-db', + 'vname' => 'LBL_PROJECTS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:quotes' => + array ( + 'name' => 'quotes', + 'type' => 'link', + 'relationship' => 'quotes_opportunities', + 'source' => 'non-db', + 'vname' => 'LBL_QUOTES', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:sales_stage' => + array ( + 'name' => 'sales_stage', + 'vname' => 'LBL_SALES_STAGE', + 'type' => 'enum', + 'options' => 'sales_stage_dom', + 'len' => '255', + 'audited' => true, + 'comment' => 'Indication of progression towards closure', + 'merge_filter' => 'enabled', + 'importable' => 'required', + 'required' => true, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:tasks' => + array ( + 'name' => 'tasks', + 'type' => 'link', + 'relationship' => 'opportunity_tasks', + 'source' => 'non-db', + 'vname' => 'LBL_TASKS', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:team_count' => + array ( + 'name' => 'team_count', + 'rname' => 'team_count', + 'id_name' => 'team_id', + 'vname' => 'LBL_TEAMS', + 'join_name' => 'ts1', + 'table' => 'teams', + 'type' => 'relate', + 'required' => 'true', + 'isnull' => 'true', + 'module' => 'Opportunities', + 'link' => 'team_count_link', + 'massupdate' => false, + 'dbType' => 'int', + 'source' => 'non-db', + 'importable' => 'false', + 'reportable' => false, + 'duplicate_merge' => 'disabled', + 'studio' => 'false', + 'hideacl' => true, + 'real_table' => 'opportunities', + ), + 'self:team_count_link' => + array ( + 'name' => 'team_count_link', + 'type' => 'link', + 'relationship' => 'opportunities_team_count_relationship', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'TeamSet', + 'source' => 'non-db', + 'duplicate_merge' => 'disabled', + 'reportable' => false, + 'studio' => 'false', + 'real_table' => 'opportunities', + ), + 'self:team_id' => + array ( + 'name' => 'team_id', + 'vname' => 'LBL_TEAM_ID', + 'group' => 'team_name', + 'reportable' => false, + 'dbType' => 'id', + 'type' => 'team_list', + 'audited' => true, + 'comment' => 'Team ID for the account', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:team_link' => + array ( + 'name' => 'team_link', + 'type' => 'link', + 'relationship' => 'opportunities_team', + 'vname' => 'LBL_TEAMS_LINK', + 'link_type' => 'one', + 'module' => 'Opportunities', + 'bean_name' => 'Team', + 'source' => 'non-db', + 'duplicate_merge' => 'disabled', + 'studio' => 'false', + 'real_table' => 'opportunities', + ), + 'self:team_name' => + array ( + 'name' => 'team_name', + 'db_concat_fields' => + array ( + 0 => 'name', + 1 => 'name_2', + ), + 'sort_on' => 'tj.name', + 'join_name' => 'tj', + 'rname' => 'name', + 'id_name' => 'team_id', + 'vname' => 'LBL_TEAMS', + 'type' => 'relate', + 'required' => 'true', + 'table' => 'teams', + 'isnull' => 'true', + 'module' => 'Opportunities', + 'link' => 'team_link', + 'massupdate' => false, + 'dbType' => 'varchar', + 'source' => 'non-db', + 'len' => 36, + 'custom_type' => 'teamset', + 'real_table' => 'opportunities', + ), + 'self:team_set_id' => + array ( + 'name' => 'team_set_id', + 'rname' => 'id', + 'id_name' => 'team_set_id', + 'vname' => 'LBL_TEAM_SET_ID', + 'type' => 'team_set_id', + 'audited' => true, + 'studio' => 'false', + 'dbType' => 'id', + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + 'self:teams' => + array ( + 'name' => 'teams', + 'type' => 'link', + 'relationship' => 'opportunities_teams', + 'bean_filter_field' => 'team_set_id', + 'rhs_key_override' => true, + 'source' => 'non-db', + 'vname' => 'LBL_TEAMS', + 'link_class' => 'TeamSetLink', + 'link_file' => 'modules/Teams/TeamSetLink.php', + 'studio' => 'false', + 'reportable' => false, + 'module' => 'Opportunities', + 'real_table' => 'opportunities', + ), + ); // END: all_fields + + + + + public $selected_loaded_custom_links = array ( + 'opportunities_cstm' => + array ( + 'join_table_alias' => 'opportunities_cstm', + 'base_table' => 'opportunities', + 'real_table' => 'opportunities_cstm', + ), + 'accounts_account_link_c' => + array ( + 'join_table_alias' => 'accounts1', + 'base_table' => 'accounts', + 'join_id' => 'opportunities_cstm.account_id_c', + ), + ); // END: selected_loaded_custom_links + + + + function getAttribute( $dontcare ) { + return $this; + } +} + +class Bug45716Test extends Sugar_PHPUnit_Framework_TestCase +{ + public function setUp() { + parent::setUp(); + + $GLOBALS['action'] = 'index'; + $GLOBALS['module'] = 'Reports'; + $GLOBALS['app_strings'] = return_application_language('en_us'); + $GLOBALS['app_list_strings'] = return_app_list_strings_language('en_us'); + $GLOBALS['mod_strings'] = return_module_language('en_us','Reports'); + $GLOBALS['db'] = DBManagerFactory::getInstance(); + $GLOBALS['current_user'] = new User(); + $GLOBALS['current_user']->retrieve('1'); + } + + public function tearDown() { + unset($GLOBALS['module']); + unset($GLOBALS['action']); + unset($GLOBALS['mod_strings']); + unset($GLOBALS['current_user']); + parent::tearDown(); + } + + public function testCustomRelatedLink() + { + $layout_def = array ( + 'name' => 'account_id_c', + 'label' => 'Account Link', + 'table_key' => 'self', + 'table_alias' => 'opportunities_cstm', + 'column_key' => 'self:account_link_c', + 'type' => 'relate', + 'fields' => + array ( + 'PRIMARYID' => '10765534-ff52-52ec-5840-4f16faec901f', + 'OPPORTUNITIES_NAME' => 'Trait Institute Inc - 1000 units', + 'OPPORTUNITIES_AMOUNT_UBC8F31' => '52183382.29', + 'OPPORTUNITIES_AMOUNT' => '52183382.29', + 'OPPORTUNITIES_AMOUNT_C9AC638' => '-99', + 'OPPORTUNITIES_CSTM_ACCE36316' => '13ce632e-605e-93ac-c209-4f16fa14e616', + 'ACCOUNTS1_NAME' => 'OTC Holdings', + ), + ); + $fakeLayoutManager = new Bug45716Helper(); + $sugarWidget = new SugarWidgetFieldrelate($fakeLayoutManager); + + $output = $sugarWidget->displayList($layout_def); + + $this->assertContains('record=13ce',$output, 'Missing the id in the output url'); + } +} \ No newline at end of file diff --git a/tests/include/generic/SugarWidgets/Bug49008Test.php b/tests/include/generic/SugarWidgets/Bug49008Test.php index 3c6af6c0..f6a84a35 100755 --- a/tests/include/generic/SugarWidgets/Bug49008Test.php +++ b/tests/include/generic/SugarWidgets/Bug49008Test.php @@ -44,7 +44,6 @@ class Bug49008Test extends PHPUnit_Framework_TestCase public function setUp() { - $this->markTestIncomplete('Need to wrap this up later... too tired'); $this->sugarWidgetField = new SugarWidgetFieldDateTime49008Mock(new LayoutManager()); global $current_user, $timedate; $timedate = TimeDate::getInstance(); @@ -52,8 +51,6 @@ class Bug49008Test extends PHPUnit_Framework_TestCase $current_user->setPreference('timezone', 'America/Los_Angeles'); $current_user->save(); $current_user->db->commit(); - $this->setOutputBuffering = false; - } public function tearDown() @@ -61,10 +58,15 @@ class Bug49008Test extends PHPUnit_Framework_TestCase SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } + /** + * + */ public function testExpandDateLosAngeles() { $start = $this->sugarWidgetField->expandDate('2011-12-17'); + $this->assertRegExp('/\:00\:00/', $start->asDb(), 'Assert for expandDate without end set, we use 00:00:00'); $end = $this->sugarWidgetField->expandDate('2011-12-18', true); + $this->assertRegExp('/\:59\:59/', $end->asDb(), 'Assert for expandDate with end set to true we use 23:59:59'); } } diff --git a/tests/include/utils/SugarFileUtilsTest.php b/tests/include/utils/SugarFileUtilsTest.php index 2ef44ac8..b3f501ef 100755 --- a/tests/include/utils/SugarFileUtilsTest.php +++ b/tests/include/utils/SugarFileUtilsTest.php @@ -167,12 +167,20 @@ class SugarFileUtilsTest extends Sugar_PHPUnit_Framework_TestCase public function testSugarChown() { + if ($GLOBALS['sugar_config']['default_permissions']['user'] == '') + { + $this->markTestSkipped('Can not get UID. Posix extension is required.'); + } $this->assertTrue(sugar_chown($this->_filename)); $this->assertEquals(fileowner($this->_filename),$this->_getCurrentUser()); } public function testSugarChownWithUser() { + if ($this->_getCurrentUser() == '') + { + $this->markTestSkipped('Can not get UID. Posix extension is required.'); + } $this->assertTrue(sugar_chown($this->_filename,$this->_getCurrentUser())); $this->assertEquals(fileowner($this->_filename),$this->_getCurrentUser()); } @@ -186,6 +194,11 @@ class SugarFileUtilsTest extends Sugar_PHPUnit_Framework_TestCase public function testSugarChownWithUserNoDefaultUser() { + if ($this->_getCurrentUser() == '') + { + $this->markTestSkipped('Can not get UID. Posix extension is required.'); + } + $GLOBALS['sugar_config']['default_permissions']['user'] = ''; $this->assertTrue(sugar_chown($this->_filename,$this->_getCurrentUser())); diff --git a/tests/include/utils/ZipTest.php b/tests/include/utils/ZipTest.php index d6d4ed55..6e93fa3d 100755 --- a/tests/include/utils/ZipTest.php +++ b/tests/include/utils/ZipTest.php @@ -43,6 +43,10 @@ class ZipTest extends Sugar_PHPUnit_Framework_TestCase { public function setUp() { + if(!class_exists('ZipArchive')) + { + $this->markTestSkipped('ZipArchive class not loaded'); + } $this->testdir = sugar_cached("tests/include/utils/ziptest"); sugar_mkdir($this->testdir.'/testarchive',null,true); sugar_touch($this->testdir.'/testarchive/testfile1.txt'); diff --git a/tests/modules/Administration/Bug47069Test.php b/tests/modules/Administration/Bug47069Test.php new file mode 100755 index 00000000..d5dc9452 --- /dev/null +++ b/tests/modules/Administration/Bug47069Test.php @@ -0,0 +1,110 @@ +retrieve('1'); + } + + public function tearDown() { + unset($GLOBALS['module']); + unset($GLOBALS['action']); + unset($GLOBALS['mod_strings']); + unset($GLOBALS['current_user']); + unset($_REQUEST); + $GLOBALS['db']->query("DELETE FROM notes WHERE id IN ('".$this->note1->id."','".$this->note2->id."')"); + // Just in case there is a custom table here + if($GLOBALS['db']->tableExists('notes_cstm')) + { + $GLOBALS['db']->query("DELETE FROM notes_cstm WHERE id_c IN ('".$this->note1->id."','".$this->note2->id."')"); + } + parent::tearDown(); + } + + public function testRepairXSSNotDuplicating() + { + $this->note1 = new Note(); + $this->note1->id = create_guid(); + $this->note1->new_with_id = true; + $this->note1->name = "[Bug47069] Not deleted Note"; + $this->note1->description = "This note shouldn't be deleted."; + $this->note1->save(); + + $this->note2 = new Note(); + $this->note2->id = create_guid(); + $this->note2->new_with_id = true; + $this->note2->name = "[Bug47069] Deleted Note"; + $this->note2->description = "This note should be deleted."; + $this->note2->deleted = 1; + $this->note2->save(); + + ob_start(); + $_REQUEST['adminAction'] = 'refreshEstimate'; + $_REQUEST['bean'] = 'Notes'; + require_once('modules/Administration/Async.php'); + $firstEstimate = $out; + ob_end_clean(); + + ob_start(); + $_REQUEST['adminAction'] = 'repairXssExecute'; + $_REQUEST['bean'] = 'Notes'; + $_REQUEST['id'] = json_encode(array($this->note1->id,$this->note2->id)); + require_once('modules/Administration/Async.php'); + ob_end_clean(); + + ob_start(); + $_REQUEST['adminAction'] = 'refreshEstimate'; + $_REQUEST['bean'] = 'Notes'; + require_once('modules/Administration/Async.php'); + $secondEstimate = $out; + ob_end_clean(); + + $this->assertEquals($firstEstimate['count'],$secondEstimate['count'], 'The record count should not increase after a repair XSS'); + } +} \ No newline at end of file diff --git a/tests/modules/Calendar/Bug50567Test.php b/tests/modules/Calendar/Bug50567Test.php new file mode 100755 index 00000000..d37be6b2 --- /dev/null +++ b/tests/modules/Calendar/Bug50567Test.php @@ -0,0 +1,87 @@ +calendar = new Calendar('month'); + $this->calendar->date_time = $timedate->fromString($testDate); + $uri = $this->calendar->get_neighbor_date_str($direction); + $this->assertContains($expectedString, $uri, "Failed to get {$direction} expected URL: {$expectedString} from date: {$testDate}"); + + } +} \ No newline at end of file diff --git a/tests/modules/Calls/CallHelperTest.php b/tests/modules/Calls/CallHelperTest.php index f7946436..4a668a3b 100755 --- a/tests/modules/Calls/CallHelperTest.php +++ b/tests/modules/Calls/CallHelperTest.php @@ -53,7 +53,7 @@ class CallHelperTest extends Sugar_PHPUnit_Framework_TestCase { return array( array('EditView',<< + @@ -69,7 +69,7 @@ EOHTML EOHTML ), array('QuickCreate',<< +