From 02d1f27be9caf2dbbee71b126c60211cdb207623 Mon Sep 17 00:00:00 2001 From: John Mertic Date: Thu, 3 Nov 2011 13:38:55 -0400 Subject: [PATCH] Release 6.4.0beta3 --- .gitignore | 4 +- ModuleInstall/ModuleInstaller.php | 20 +- ModuleInstall/ModuleScanner.php | 56 ++ Zend/Oauth/Config.php | 658 ++++++++++++++++++ data/BeanFactory.php | 24 +- data/Link2.php | 12 +- data/Relationships/M2MRelationship.php | 19 +- data/Relationships/One2MRelationship.php | 69 +- data/Relationships/RelationshipFactory.php | 2 +- data/SugarBean.php | 33 +- download.php | 3 +- export.php | 2 +- files.md5 | 420 +++++------ include/Dashlets/DashletRssFeedTitle.php | 123 ++++ include/ListView/ListView.php | 2 +- include/ListView/ListViewData.php | 27 +- include/ListView/ListViewDisplay.php | 11 +- include/ListView/ListViewGeneric.tpl | 4 +- include/ListView/ListViewNoMassUpdate.tpl | 5 +- include/Localization/Localization.php | 77 +- include/MVC/View/views/view.list.php | 14 +- include/MVC/View/views/view.metadata.php | 2 +- include/MVC/View/views/view.quickcreate.php | 3 - include/MassUpdate.php | 9 +- include/MySugar/MySugar.php | 20 +- include/MySugar/tpls/MySugar.tpl | 2 +- include/OutboundEmail/OutboundEmail.php | 3 + include/Popups/PopupSmarty.php | 20 + include/Popups/tpls/PopupGeneric.tpl | 1 - include/SearchForm/SearchForm.php | 4 +- include/SearchForm/SearchForm2.php | 38 +- .../plugins/function.sugar_translate.php | 9 +- include/SugarCharts/SugarChart.php | 109 ++- .../SugarEmailAddress/SugarEmailAddress.php | 3 + .../templates/forEditView.tpl | 6 +- .../Collection/ViewSugarFieldCollection.php | 11 +- .../Fields/Datetimecombo/EditView.tpl | 4 +- .../Fields/File/SugarFieldFile.php | 62 -- .../Fields/Multienum/SugarFieldMultienum.php | 6 +- .../Fields/Radioenum/SugarFieldRadioenum.php | 67 ++ .../SugarFields/Fields/Relate/SearchView.tpl | 2 +- include/SugarObjects/VardefManager.php | 33 +- include/SugarObjects/forms/PersonFormBase.php | 4 +- .../SugarObjects/templates/person/Person.php | 56 +- .../templates/person/language/en_us.lang.php | 1 + .../templates/person/metadata/searchdefs.php | 1 + .../SugarObjects/templates/person/vardefs.php | 19 +- include/SugarTheme/SugarTheme.php | 3 +- include/SugarTinyMCE.php | 3 +- include/TimeDate.php | 2 + include/database/DBManager.php | 35 +- include/database/MysqlManager.php | 38 +- include/database/MysqliManager.php | 18 +- include/export_utils.php | 107 +-- .../SugarWidgetFielddatepicker.php | 2 + .../SugarWidgets/SugarWidgetFieldenum.php | 2 + .../SugarWidgetFieldsingleenum.php | 3 +- .../SugarWidgetSubPanelEmailLink.php | 2 + ...garWidgetSubPanelTopComposeEmailButton.php | 2 +- include/javascript/ajaxUI.js | 18 +- include/javascript/calendar.js | 3 +- include/javascript/javascript.php | 20 + include/javascript/jsclass_async.js | 2 +- include/javascript/sugar_3.js | 13 +- include/modules.php | 9 + include/upload_file.php | 22 + include/utils.php | 51 +- include/utils/db_utils.php | 2 + include/utils/mvc_utils.php | 2 +- install/confirmSettings.php | 23 +- install/install_utils.php | 30 +- install/language/en_us.lang.php | 2 + install/performSetup.php | 1 + .../SugarEmailAddress/SugarEmailAddress.js | 1 + .../src_files/include/javascript/ajaxUI.js | 31 +- .../src_files/include/javascript/calendar.js | 29 +- .../include/javascript/jsclass_async.js | 4 +- .../src_files/include/javascript/sugar_3.js | 36 +- jssource/src_files/modules/Calendar/Cal.js | 401 ++++++----- .../modules/InboundEmail/InboundEmail.js | 3 +- modules/ACLRoles/EditAllBody.tpl | 4 +- modules/Accounts/Account.php | 6 +- modules/Accounts/metadata/popupdefs.php | 1 + modules/Accounts/vardefs.php | 14 + modules/Activities/Popup_picker.php | 46 +- modules/Administration/Locale.php | 1 + modules/Administration/Locale.tpl | 9 +- .../Administration/language/en_us.lang.php | 6 +- .../templates/ConfigureAjaxUI.tpl | 2 +- modules/Audit/Popup_picker.html | 16 +- modules/Calendar/Cal.css | 268 +++---- modules/Calendar/Cal.js | 122 ++-- modules/Calendar/Calendar.php | 153 ++-- modules/Calendar/CalendarDisplay.php | 252 +++---- modules/Calendar/CalendarGrid.php | 78 ++- modules/Calendar/CalendarUtils.php | 22 +- .../CalendarDashlet/CalendarDashlet.php | 12 +- .../CalendarDashletOptions.tpl | 11 - modules/Calendar/action_view_map.php | 12 +- modules/Calendar/index.php | 33 +- modules/Calendar/language/en_us.lang.php | 195 +++--- modules/Calendar/tpls/empty.tpl | 37 + modules/Calendar/tpls/footer.tpl | 2 +- .../Calendar/tpls/{details.tpl => form.tpl} | 4 +- modules/Calendar/tpls/header.tpl | 6 +- modules/Calendar/tpls/main.tpl | 117 ++-- modules/Calendar/tpls/settings.tpl | 14 +- modules/Calendar/tpls/shared_users.tpl | 125 ++++ .../{view.ajaxgetgr.php => view.getgr.php} | 6 +- ...ajaxgetgrusers.php => view.getgrusers.php} | 6 +- ...ew.ajaxloadform.php => view.quickedit.php} | 9 +- .../{view.ajaxremove.php => view.remove.php} | 6 +- ...ajaxreschedule.php => view.reschedule.php} | 4 +- ...iew.ajaxsave.php => view.saveactivity.php} | 16 +- modules/Calendar/views/view.savesettings.php | 14 +- modules/Calls/Call.php | 18 +- .../MyCallsDashlet/MyCallsDashlet.php | 4 +- modules/Calls/vardefs.php | 2 + modules/CampaignLog/CampaignLog.php | 7 +- modules/Campaigns/EmailQueue.php | 3 +- modules/Campaigns/ProspectLink.php | 123 ++++ modules/Campaigns/Schedule.html | 8 +- modules/Campaigns/Schedule.php | 172 ++--- modules/Campaigns/tpls/campaign-inactive.tpl | 39 ++ modules/Campaigns/vardefs.php | 6 + .../MyPipelineBySalesStageDashlet.php | 2 +- .../PipelineBySalesStageDashlet.php | 2 +- modules/Configurator/tpls/adminwizard.tpl | 6 +- .../Configurator/views/view.adminwizard.php | 1 + .../sources/ext/rest/insideview/config.php | 44 ++ .../ext/rest/insideview/insideview.php | 5 - .../SaveContactOpportunityRelationship.php | 3 +- modules/Contacts/metadata/popupdefs.php | 3 +- modules/Contacts/tpls/QuickCreate.tpl | 2 + modules/Contacts/vardefs.php | 14 + modules/Contacts/views/view.quickcreate.php | 59 ++ modules/Currencies/Currency.php | 34 +- modules/Documents/vardefs.php | 4 +- modules/DynamicFields/DynamicField.php | 12 +- .../Fields/TemplateRelatedTextField.php | 1 + modules/EmailMan/controller.php | 4 +- modules/EmailMarketing/EditView.html | 4 +- modules/EmailMarketing/vardefs.php | 4 + modules/EmailTemplates/Delete.php | 1 + modules/EmailTemplates/EditView.php | 5 + modules/EmailTemplates/Save.php | 1 + modules/Emails/EmailUIAjax.php | 4 +- modules/Emails/javascript/EmailUICompose.js | 13 +- modules/Emails/javascript/ajax.js | 14 +- modules/Emails/javascript/grid.js | 4 +- modules/Home/UnifiedSearchAdvanced.php | 42 +- modules/InboundEmail/DetailView.html | 2 +- modules/InboundEmail/EditView.html | 6 +- modules/InboundEmail/InboundEmail.js | 3 +- modules/Leads/metadata/convertdefs.php | 1 + modules/Leads/metadata/popupdefs.php | 1 + modules/Leads/vardefs.php | 16 +- modules/Leads/views/view.convertlead.php | 227 +++--- modules/MailMerge/Step2.html | 21 +- modules/MailMerge/Step3.php | 2 +- modules/MailMerge/controller.php | 1 - modules/MailMerge/index.php | 3 +- .../MyMeetingsDashlet/MyMeetingsDashlet.php | 2 +- modules/Meetings/Meeting.php | 74 +- modules/Meetings/metadata/editviewdefs.php | 4 +- modules/Meetings/metadata/quickcreatedefs.php | 8 +- modules/Meetings/vardefs.php | 4 + .../ModuleBuilder/Module/StudioBrowser.php | 2 +- modules/ModuleBuilder/Module/StudioModule.php | 6 +- modules/ModuleBuilder/controller.php | 19 +- .../ModuleBuilder/parsers/parser.label.php | 74 ++ .../relationships/AbstractRelationship.php | 61 +- .../relationships/UndeployedRelationships.php | 11 + .../views/GridLayoutMetaDataParser.php | 1 + .../ModuleBuilder/parsers/views/History.php | 91 +-- .../views/ListLayoutMetaDataParser.php | 12 +- .../views/SearchViewMetaDataParser.php | 39 +- modules/ModuleBuilder/tpls/layoutView.tpl | 12 +- modules/ModuleBuilder/views/view.labels.php | 7 +- .../ModuleBuilder/views/view.modulefield.php | 11 +- .../ModuleBuilder/views/view.modulefields.php | 9 +- modules/Notes/metadata/SearchFields.php | 3 +- modules/Notes/metadata/searchdefs.php | 2 +- modules/ProjectTask/ProjectTask.php | 32 + modules/Roles/DeleteUserRelationship.php | 3 +- modules/Roles/SaveUserRelationship.php | 3 +- modules/SavedSearch/SavedSearchSelects.tpl | 2 +- modules/Studio/DropDowns/DropDownHelper.php | 7 + modules/Studio/wizards/RenameModules.php | 2 +- .../SugarFeedDashlet/SugarFeedDashlet.php | 2 +- modules/Tasks/Task.php | 18 +- modules/Tasks/vardefs.php | 5 +- modules/Trackers/BreadCrumbStack.php | 2 +- modules/Trackers/Tracker.php | 2 +- modules/UpgradeWizard/commit.php | 2 +- modules/UpgradeWizard/index.php | 19 +- modules/UpgradeWizard/preflight.php | 4 +- modules/UpgradeWizard/uw_utils.php | 182 ++++- modules/UserPreferences/UserPreference.php | 11 - modules/Users/Login.php | 19 +- modules/Users/User.php | 62 +- modules/Users/UserViewHelper.php | 5 +- modules/Users/tpls/EditViewFooter.tpl | 25 +- modules/Users/tpls/wizard.tpl | 8 +- modules/Users/views/view.wizard.php | 2 + service/core/SoapHelperWebService.php | 4 +- service/core/SugarWebServiceImpl.php | 6 +- service/v3_1/SugarWebServiceUtilv3_1.php | 3 +- sugar_version.php | 8 +- tests/SugarTestContactUtilities.php | 17 +- tests/SugarTestHelper.php | 15 + tests/SugarTestLeadUtilities.php | 17 +- tests/SugarTestMeetingUtilities.php | 24 +- tests/SugarTestObjectUtilities.php | 67 ++ tests/SugarTestProjectTaskUtilities.php | 78 +++ tests/SugarTestProjectUtilities.php | 70 ++ tests/SugarTestViewConvertLeadUtilities.php | 55 ++ tests/data/Bug45896Test.php | 212 ++++++ tests/data/Bug47949Test.php | 76 ++ .../Bug22505Test.php => Bug45525Test.php} | 120 ++-- tests/include/Dashlets/Bug46217Test.php | 95 +++ .../include/ListView/ListViewDisplayTest.php | 5 +- tests/include/Localization/Bug35413Test.php | 84 +++ tests/include/MassUpdate/MassUpdateTest.php | 20 +- tests/include/OutboundEmail/Bug23140Test.php | 95 +-- tests/include/SearchForm/Bug45966Test.php | 4 +- tests/include/SearchForm/Bug46713Test.php | 2 +- tests/include/SearchForm/RangeSearchTest.php | 12 +- .../plugins/FunctionSugarTranslateTest.php | 45 ++ tests/include/SugarCharts/Bug42326Test.php | 2 + tests/include/SugarCharts/Bug44696Test.php | 167 +++++ .../SugarEmailAddress/Bug42279Test.php | 78 +++ .../Radioenum/SugarFieldRadioenumTest.php | 69 ++ .../forms/ContactFormBaseTest.php | 5 + .../SugarObjects/forms/LeadFormBaseTest.php | 5 + tests/include/ValidDBNameTest.php | 20 +- tests/include/database/DBManagerTest.php | 16 +- tests/modules/Calendar/CalendarTest.php | 2 +- tests/modules/Calls/Bug39161Test.php | 23 +- tests/modules/Contacts/Bug36989Test.php | 92 +++ tests/modules/Currencies/CurrencyTest.php | 12 +- tests/modules/Emails/Bug40527Test.php | 3 + tests/modules/Emails/Bug40911Test.php | 3 + tests/modules/Employees/Bug46923Test.php | 5 + tests/modules/Home/Bug42961Test.php | 74 ++ tests/modules/Home/Bug43653Test.php | 1 - .../Home/UnifiedSearchAdvancedTest.php | 32 +- tests/modules/Leads/ConvertLeadTests.php | 28 +- tests/modules/Meetings/Bug45287Test.php | 18 +- tests/modules/Meetings/Bug45287_2Test.php | 21 +- tests/modules/Meetings/Bug46294Test.php | 101 +++ .../parsers/SearchViewMetaDataParserTest.php | 366 ++++++++++ .../parsers/views/HistoryTest.php} | 97 +-- tests/modules/ProjectTask/Bug46350Test.php | 137 ++++ tests/modules/ProspectLists/Bug36422Test.php | 158 ----- tests/modules/ProspectLists/Bug41569Test.php | 158 ----- tests/modules/ProspectLists/Bug43478Test.php | 157 ----- tests/modules/ProspectLists/Bug43805Test.php | 155 ----- tests/modules/Reports/Bug47277Test.php | 52 ++ tests/modules/UpgradeWizard/Bug36845Test.php | 23 +- tests/modules/UpgradeWizard/Bug39757Test.php | 2 +- tests/service/Bug47650Test.php | 91 +++ tests/service/RESTAPI3Test.php | 45 +- tests/service/SOAPAPI1Test.php | 2 +- themes/Sugar5/css/style.css | 2 +- themes/Sugar5/tpls/_head.tpl | 1 + 266 files changed, 6863 insertions(+), 2945 deletions(-) create mode 100644 Zend/Oauth/Config.php create mode 100644 include/Dashlets/DashletRssFeedTitle.php create mode 100644 include/SugarFields/Fields/Radioenum/SugarFieldRadioenum.php rename modules/Calendar/tpls/{details.tpl => form.tpl} (98%) create mode 100644 modules/Calendar/tpls/shared_users.tpl rename modules/Calendar/views/{view.ajaxgetgr.php => view.getgr.php} (96%) rename modules/Calendar/views/{view.ajaxgetgrusers.php => view.getgrusers.php} (96%) rename modules/Calendar/views/{view.ajaxloadform.php => view.quickedit.php} (97%) rename modules/Calendar/views/{view.ajaxremove.php => view.remove.php} (97%) rename modules/Calendar/views/{view.ajaxreschedule.php => view.reschedule.php} (96%) rename modules/Calendar/views/{view.ajaxsave.php => view.saveactivity.php} (98%) create mode 100644 modules/Campaigns/ProspectLink.php create mode 100644 modules/Campaigns/tpls/campaign-inactive.tpl create mode 100644 modules/Connectors/connectors/sources/ext/rest/insideview/config.php create mode 100644 modules/Contacts/views/view.quickcreate.php create mode 100755 tests/SugarTestObjectUtilities.php create mode 100755 tests/SugarTestProjectTaskUtilities.php create mode 100755 tests/SugarTestProjectUtilities.php create mode 100755 tests/SugarTestViewConvertLeadUtilities.php create mode 100755 tests/data/Bug45896Test.php create mode 100755 tests/data/Bug47949Test.php rename tests/include/{SugarFields/Fields/File/Bug22505Test.php => Bug45525Test.php} (50%) create mode 100755 tests/include/Dashlets/Bug46217Test.php create mode 100755 tests/include/Localization/Bug35413Test.php create mode 100755 tests/include/SugarCharts/Bug44696Test.php create mode 100755 tests/include/SugarEmailAddress/Bug42279Test.php create mode 100755 tests/include/SugarFields/Fields/Radioenum/SugarFieldRadioenumTest.php create mode 100755 tests/modules/Contacts/Bug36989Test.php create mode 100755 tests/modules/Home/Bug42961Test.php create mode 100755 tests/modules/Meetings/Bug46294Test.php create mode 100755 tests/modules/ModuleBuilder/parsers/SearchViewMetaDataParserTest.php rename tests/modules/{Home/Bug39610Test.php => ModuleBuilder/parsers/views/HistoryTest.php} (53%) create mode 100755 tests/modules/ProjectTask/Bug46350Test.php delete mode 100755 tests/modules/ProspectLists/Bug36422Test.php delete mode 100755 tests/modules/ProspectLists/Bug41569Test.php delete mode 100755 tests/modules/ProspectLists/Bug43478Test.php delete mode 100755 tests/modules/ProspectLists/Bug43805Test.php create mode 100755 tests/modules/Reports/Bug47277Test.php create mode 100755 tests/service/Bug47650Test.php diff --git a/.gitignore b/.gitignore index de721b98..e6b7e4e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .htaccess -config.php -config_override.php +/config.php +/config_override.php include/javascript/sugar_grp1.js include/javascript/sugar_grp1_yui.js include/javascript/sugar_grp_yui_widgets.js diff --git a/ModuleInstall/ModuleInstaller.php b/ModuleInstall/ModuleInstaller.php index 473bd4a2..90cb6382 100644 --- a/ModuleInstall/ModuleInstaller.php +++ b/ModuleInstall/ModuleInstaller.php @@ -89,14 +89,14 @@ class ModuleInstaller{ } } - // workaround for bug 45812 - refresh vardefs cache before unpacking to avoid partial vardefs in cache - global $beanList; - foreach ($this->modules as $module_name) { - if (!empty($beanList[$module_name])) { - $objectName = $beanList[$module_name]; - VardefManager::loadVardef($module_name, $objectName); - } - } + // workaround for bug 45812 - refresh vardefs cache before unpacking to avoid partial vardefs in cache + global $beanList; + foreach ($this->modules as $module_name) { + if (!empty($beanList[$module_name])) { + $objectName = BeanFactory::getObjectName($module_name); + VardefManager::loadVardef($module_name, $objectName); + } + } global $app_strings, $mod_strings; $this->base_dir = $base_dir; @@ -1220,7 +1220,9 @@ class ModuleInstaller{ //Find all the relatioships/relate fields involving this module. $rels_to_remove = array(); foreach($beanList as $mod => $bean) { - VardefManager::loadVardef($mod, $bean); + //Some modules like cases have a bean name that doesn't match the object name + $bean = BeanFactory::getObjectName($mod); + VardefManager::loadVardef($mod, $bean); //We can skip modules that are in this package as they will be removed anyhow if (!in_array($mod, $this->modulesInPackage) && !empty($dictionary[$bean]) && !empty($dictionary[$bean]['fields'])) { diff --git a/ModuleInstall/ModuleScanner.php b/ModuleInstall/ModuleScanner.php index 427085b5..9e4b32bb 100644 --- a/ModuleInstall/ModuleScanner.php +++ b/ModuleInstall/ModuleScanner.php @@ -60,6 +60,62 @@ class ModuleScanner{ private $validExt = array('png', 'gif', 'jpg', 'css', 'js', 'php', 'txt', 'html', 'htm', 'tpl', 'pdf', 'md5', 'xml'); private $blackList = array( + 'popen', + 'proc_open', + 'escapeshellarg', + 'escapeshellcmd', + 'proc_close', + 'proc_get_status', + 'proc_nice', + 'basename', + 'passthru', + 'clearstatcache', + 'delete', + 'dirname', + 'disk_free_space', + 'disk_total_space', + 'diskfreespace', + 'fclose', + 'feof', + 'fflush', + 'fgetc', + 'fgetcsv', + 'fgets', + 'fgetss', + 'file_exists', + 'file_get_contents', + 'filesize', + 'filetype', + 'flock', + 'fnmatch', + 'fpassthru', + 'fputcsv', + 'fputs', + 'fread', + 'fscanf', + 'fseek', + 'fstat', + 'ftell', + 'ftruncate', + 'fwrite', + 'glob', + 'is_dir', + 'is_file', + 'is_link', + 'is_readable', + 'is_uploaded_file', + 'parse_ini_string', + 'pathinfo', + 'pclose', + 'readfile', + 'readlink', + 'realpath_cache_get', + 'realpath_cache_size', + 'realpath', + 'rewind', + 'set_file_buffer', + 'tmpfile', + 'umask', 'eval', 'exec', 'system', diff --git a/Zend/Oauth/Config.php b/Zend/Oauth/Config.php new file mode 100644 index 00000000..be708ebe --- /dev/null +++ b/Zend/Oauth/Config.php @@ -0,0 +1,658 @@ +toArray(); + } + $this->setOptions($options); + } + } + + /** + * Parse option array or Zend_Config instance and setup options using their + * relevant mutators. + * + * @param array|Zend_Config $options + * @return Zend_Oauth_Config + */ + public function setOptions(array $options) + { + foreach ($options as $key => $value) { + switch ($key) { + case 'consumerKey': + $this->setConsumerKey($value); + break; + case 'consumerSecret': + $this->setConsumerSecret($value); + break; + case 'signatureMethod': + $this->setSignatureMethod($value); + break; + case 'version': + $this->setVersion($value); + break; + case 'callbackUrl': + $this->setCallbackUrl($value); + break; + case 'siteUrl': + $this->setSiteUrl($value); + break; + case 'requestTokenUrl': + $this->setRequestTokenUrl($value); + break; + case 'accessTokenUrl': + $this->setAccessTokenUrl($value); + break; + case 'userAuthorizationUrl': + $this->setUserAuthorizationUrl($value); + break; + case 'authorizeUrl': + $this->setAuthorizeUrl($value); + break; + case 'requestMethod': + $this->setRequestMethod($value); + break; + case 'rsaPrivateKey': + $this->setRsaPrivateKey($value); + break; + case 'rsaPublicKey': + $this->setRsaPublicKey($value); + break; + } + } + if (isset($options['requestScheme'])) { + $this->setRequestScheme($options['requestScheme']); + } + + return $this; + } + + /** + * Set consumer key + * + * @param string $key + * @return Zend_Oauth_Config + */ + public function setConsumerKey($key) + { + $this->_consumerKey = $key; + return $this; + } + + /** + * Get consumer key + * + * @return string + */ + public function getConsumerKey() + { + return $this->_consumerKey; + } + + /** + * Set consumer secret + * + * @param string $secret + * @return Zend_Oauth_Config + */ + public function setConsumerSecret($secret) + { + $this->_consumerSecret = $secret; + return $this; + } + + /** + * Get consumer secret + * + * Returns RSA private key if set; otherwise, returns any previously set + * consumer secret. + * + * @return string + */ + public function getConsumerSecret() + { + if ($this->_rsaPrivateKey !== null) { + return $this->_rsaPrivateKey; + } + return $this->_consumerSecret; + } + + /** + * Set signature method + * + * @param string $method + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception if unsupported signature method specified + */ + public function setSignatureMethod($method) + { + $method = strtoupper($method); + if (!in_array($method, array( + 'HMAC-SHA1', 'HMAC-SHA256', 'RSA-SHA1', 'PLAINTEXT' + )) + ) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception('Unsupported signature method: ' + . $method + . '. Supported are HMAC-SHA1, RSA-SHA1, PLAINTEXT and HMAC-SHA256'); + } + $this->_signatureMethod = $method;; + return $this; + } + + /** + * Get signature method + * + * @return string + */ + public function getSignatureMethod() + { + return $this->_signatureMethod; + } + + /** + * Set request scheme + * + * @param string $scheme + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception if invalid scheme specified, or if POSTBODY set when request method of GET is specified + */ + public function setRequestScheme($scheme) + { + $scheme = strtolower($scheme); + if (!in_array($scheme, array( + Zend_Oauth::REQUEST_SCHEME_HEADER, + Zend_Oauth::REQUEST_SCHEME_POSTBODY, + Zend_Oauth::REQUEST_SCHEME_QUERYSTRING, + )) + ) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $scheme . '\' is an unsupported request scheme' + ); + } + if ($scheme == Zend_Oauth::REQUEST_SCHEME_POSTBODY + && $this->getRequestMethod() == Zend_Oauth::GET + ) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + 'Cannot set POSTBODY request method if HTTP method set to GET' + ); + } + $this->_requestScheme = $scheme; + return $this; + } + + /** + * Get request scheme + * + * @return string + */ + public function getRequestScheme() + { + return $this->_requestScheme; + } + + /** + * Set version + * + * @param string $version + * @return Zend_Oauth_Config + */ + public function setVersion($version) + { + $this->_version = $version; + return $this; + } + + /** + * Get version + * + * @return string + */ + public function getVersion() + { + return $this->_version; + } + + /** + * Set callback URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setCallbackUrl($url) + { + if (!Zend_Uri::check($url)) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $url . '\' is not a valid URI' + ); + } + $this->_callbackUrl = $url; + return $this; + } + + /** + * Get callback URL + * + * @return string + */ + public function getCallbackUrl() + { + return $this->_callbackUrl; + } + + /** + * Set site URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setSiteUrl($url) + { + if (!Zend_Uri::check($url)) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $url . '\' is not a valid URI' + ); + } + $this->_siteUrl = $url; + return $this; + } + + /** + * Get site URL + * + * @return string + */ + public function getSiteUrl() + { + return $this->_siteUrl; + } + + /** + * Set request token URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setRequestTokenUrl($url) + { + if (!Zend_Uri::check($url)) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $url . '\' is not a valid URI' + ); + } + $this->_requestTokenUrl = rtrim($url, '/'); + return $this; + } + + /** + * Get request token URL + * + * If no request token URL has been set, but a site URL has, returns the + * site URL with the string "/request_token" appended. + * + * @return string + */ + public function getRequestTokenUrl() + { + if (!$this->_requestTokenUrl && $this->_siteUrl) { + return $this->_siteUrl . '/request_token'; + } + return $this->_requestTokenUrl; + } + + /** + * Set access token URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setAccessTokenUrl($url) + { + if (!Zend_Uri::check($url)) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $url . '\' is not a valid URI' + ); + } + $this->_accessTokenUrl = rtrim($url, '/'); + return $this; + } + + /** + * Get access token URL + * + * If no access token URL has been set, but a site URL has, returns the + * site URL with the string "/access_token" appended. + * + * @return string + */ + public function getAccessTokenUrl() + { + if (!$this->_accessTokenUrl && $this->_siteUrl) { + return $this->_siteUrl . '/access_token'; + } + return $this->_accessTokenUrl; + } + + /** + * Set user authorization URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setUserAuthorizationUrl($url) + { + return $this->setAuthorizeUrl($url); + } + + /** + * Set authorization URL + * + * @param string $url + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid URLs + */ + public function setAuthorizeUrl($url) + { + if (!Zend_Uri::check($url)) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception( + '\'' . $url . '\' is not a valid URI' + ); + } + $this->_authorizeUrl = rtrim($url, '/'); + return $this; + } + + /** + * Get user authorization URL + * + * @return string + */ + public function getUserAuthorizationUrl() + { + return $this->getAuthorizeUrl(); + } + + /** + * Get authorization URL + * + * If no authorization URL has been set, but a site URL has, returns the + * site URL with the string "/authorize" appended. + * + * @return string + */ + public function getAuthorizeUrl() + { + if (!$this->_authorizeUrl && $this->_siteUrl) { + return $this->_siteUrl . '/authorize'; + } + return $this->_authorizeUrl; + } + + /** + * Set request method + * + * @param string $method + * @return Zend_Oauth_Config + * @throws Zend_Oauth_Exception for invalid request methods + */ + public function setRequestMethod($method) + { + $method = strtoupper($method); + if (!in_array($method, array( + Zend_Oauth::GET, + Zend_Oauth::POST, + Zend_Oauth::PUT, + Zend_Oauth::DELETE, + )) + ) { + require_once 'Zend/Oauth/Exception.php'; + throw new Zend_Oauth_Exception('Invalid method: ' . $method); + } + $this->_requestMethod = $method; + return $this; + } + + /** + * Get request method + * + * @return string + */ + public function getRequestMethod() + { + return $this->_requestMethod; + } + + /** + * Set RSA public key + * + * @param Zend_Crypt_Rsa_Key_Public $key + * @return Zend_Oauth_Config + */ + public function setRsaPublicKey(Zend_Crypt_Rsa_Key_Public $key) + { + $this->_rsaPublicKey = $key; + return $this; + } + + /** + * Get RSA public key + * + * @return Zend_Crypt_Rsa_Key_Public + */ + public function getRsaPublicKey() + { + return $this->_rsaPublicKey; + } + + /** + * Set RSA private key + * + * @param Zend_Crypt_Rsa_Key_Private $key + * @return Zend_Oauth_Config + */ + public function setRsaPrivateKey(Zend_Crypt_Rsa_Key_Private $key) + { + $this->_rsaPrivateKey = $key; + return $this; + } + + /** + * Get RSA private key + * + * @return Zend_Crypt_Rsa_Key_Private + */ + public function getRsaPrivateKey() + { + return $this->_rsaPrivateKey; + } + + /** + * Set OAuth token + * + * @param Zend_Oauth_Token $token + * @return Zend_Oauth_Config + */ + public function setToken(Zend_Oauth_Token $token) + { + $this->_token = $token; + return $this; + } + + /** + * Get OAuth token + * + * @return Zend_Oauth_Token + */ + public function getToken() + { + return $this->_token; + } +} diff --git a/data/BeanFactory.php b/data/BeanFactory.php index d892d7d2..6e260732 100644 --- a/data/BeanFactory.php +++ b/data/BeanFactory.php @@ -70,8 +70,11 @@ class BeanFactory { if (empty(self::$loadedBeans[$module][$id])) { $bean = new $beanClass(); - $bean->retrieve($id); - self::registerBean($module, $bean, $id); + $result = $bean->retrieve($id); + if($result == null) + return FALSE; + else + self::registerBean($module, $bean, $id); } else { self::$hits++; @@ -98,6 +101,23 @@ class BeanFactory { return $beanList[$module]; } + /** + * Returns the object name / dictionary key for a given module. This should normally + * be the same as the bean name, but may not for special case modules (ex. Case vs aCase) + * @static + * @param String $module + * @return bool + */ + public static function getObjectName($module) + { + global $objectList; + if (empty($objectList[$module])) + return self::getBeanName($module); + + return $objectList[$module]; + } + + /** * @static * This function registers a bean with the bean factory so that it can be access from accross the code without doing diff --git a/data/Link2.php b/data/Link2.php index 0a88de35..ee351246 100644 --- a/data/Link2.php +++ b/data/Link2.php @@ -280,6 +280,14 @@ class Link2 { return REL_RHS; } } + //Next try using the id_name and relationship join keys + else if (!empty($this->def['id_name'])) + { + if (isset($this->relationship->def['join_key_lhs']) && $this->def['id_name'] == $this->relationship->def['join_key_lhs']) + return REL_RHS; + else if (isset($this->relationship->def['join_key_rhs']) && $this->def['id_name'] == $this->relationship->def['join_key_rhs']) + return REL_LHS; + } $GLOBALS['log']->error("Unable to get proper side for link {$this->name}"); } @@ -349,7 +357,9 @@ class Link2 { $rel_module = $this->getRelatedModuleName(); foreach ($this->rows as $id => $vals) { - $this->beans[$id] = BeanFactory::getBean($rel_module, $id); + $tmpBean = BeanFactory::getBean($rel_module, $id); + if($tmpBean !== FALSE) + $this->beans[$id] = $tmpBean; } } diff --git a/data/Relationships/M2MRelationship.php b/data/Relationships/M2MRelationship.php index 8aed0559..29097359 100644 --- a/data/Relationships/M2MRelationship.php +++ b/data/Relationships/M2MRelationship.php @@ -47,8 +47,6 @@ class M2MRelationship extends SugarRelationship public function __construct($def) { - global $dictionary; - $this->def = $def; $this->name = $def['name']; @@ -71,7 +69,7 @@ class M2MRelationship extends SugarRelationship */ public function getLinkedDefForModuleByRelationship($module) { - $results = VardefManager::getLinkFieldForRelationship( $module, BeanFactory::getBeanName($module), $this->name); + $results = VardefManager::getLinkFieldForRelationship( $module, BeanFactory::getObjectName($module), $this->name); //Only a single link was found if( isset($results['name']) ) { @@ -98,6 +96,7 @@ class M2MRelationship extends SugarRelationship */ protected function getMostAppropriateLinkedDefinition($links) { + //First priority is to find a link name that matches the relationship name foreach($links as $link) { if( isset($link['name']) && $link['name'] == $this->name ) @@ -105,9 +104,17 @@ class M2MRelationship extends SugarRelationship return $link; } } - //Unable to find an appropriate link, return nothing rather an invalid link. + //Next would be a relationship that has a side defined + foreach($links as $link) + { + if( isset($link['id_name'])) + { + return $link; + } + } + //Unable to find an appropriate link, guess and use the first one $GLOBALS['log']->error("Unable to determine best appropriate link for relationship {$this->name}"); - return FALSE; + return $links[0]; } /** * @param $lhs SugarBean left side bean to add to the relationship. @@ -240,7 +247,7 @@ class M2MRelationship extends SugarRelationship if (empty($_SESSION['disable_workflow']) || $_SESSION['disable_workflow'] != "Yes") { - if (!empty($lhs->$lhsLinkName)) + if ($lhs->$lhsLinkName instanceof Link2) { $lhs->$lhsLinkName->load(); $this->callAfterDelete($lhs, $rhs, $lhsLinkName); diff --git a/data/Relationships/One2MRelationship.php b/data/Relationships/One2MRelationship.php index 8cb32af6..15579810 100644 --- a/data/Relationships/One2MRelationship.php +++ b/data/Relationships/One2MRelationship.php @@ -58,36 +58,41 @@ class One2MRelationship extends M2MRelationship if ($this->selfReferencing) { $links = VardefManager::getLinkFieldForRelationship( - $lhsModule, BeanFactory::getBeanName($lhsModule), $this->name + $lhsModule, BeanFactory::getObjectName($lhsModule), $this->name ); if (empty($links)) { $GLOBALS['log']->fatal("No Links found for relationship {$this->name}"); } - if (!isset($links[0])) //Only one link for a self referencing relationship, this is BAAAD - $this->lhsLinkDef = $this->rhsLinkDef = $links; - else - { - if ((!empty($links[0]['side']) && $links[0]['side'] == "right") - || (!empty($links[0]['link_type']) && $links[0]['link_type'] == "one")) + else { + if (!is_array($links)) //Only one link for a self referencing relationship, this is BAAAD { - //$links[0] is the RHS - $this->lhsLinkDef = $links[1]; - $this->rhsLinkDef = $links[0]; - } else + $this->lhsLinkDef = $this->rhsLinkDef = $links; + } + else if (!empty($links[0]) && !empty($links[1])) { - //$links[0] is the LHS - $this->lhsLinkDef = $links[0]; - $this->rhsLinkDef = $links[1]; + + if ((!empty($links[0]['side']) && $links[0]['side'] == "right") + || (!empty($links[0]['link_type']) && $links[0]['link_type'] == "one")) + { + //$links[0] is the RHS + $this->lhsLinkDef = $links[1]; + $this->rhsLinkDef = $links[0]; + } else + { + //$links[0] is the LHS + $this->lhsLinkDef = $links[0]; + $this->rhsLinkDef = $links[1]; + } } } } else { $this->lhsLinkDef = VardefManager::getLinkFieldForRelationship( - $lhsModule, BeanFactory::getBeanName($lhsModule), $this->name + $lhsModule, BeanFactory::getObjectName($lhsModule), $this->name ); $this->rhsLinkDef = VardefManager::getLinkFieldForRelationship( - $rhsModule, BeanFactory::getBeanName($rhsModule), $this->name + $rhsModule, BeanFactory::getObjectName($rhsModule), $this->name ); if (!isset($this->lhsLinkDef['name']) && isset($this->lhsLinkDef[0])) { @@ -101,6 +106,38 @@ class One2MRelationship extends M2MRelationship $this->rhsLink = $this->rhsLinkDef['name']; } + public function getQuery($link, $params = array()) + { + //Self referenceing one to many relationships use one link for subpanels and normal views. + //This mean we have to reverse it for normal views + if (($link->getSide() == REL_LHS && !$this->selfReferencing) + || $link->getSide() == REL_RHS && $this->selfReferencing + ) { + $knownKey = $this->def['join_key_lhs']; + $targetKey = $this->def['join_key_rhs']; + } + else + { + $knownKey = $this->def['join_key_rhs']; + $targetKey = $this->def['join_key_lhs']; + } + $rel_table = $this->getRelationshipTable(); + + $where = "$rel_table.$knownKey = '{$link->getFocus()->id}'" . $this->getRoleWhere(); + + if (empty($params['return_as_array'])) { + return "SELECT $targetKey id FROM $rel_table WHERE $where AND deleted=0"; + } + else + { + return array( + 'select' => "SELECT $targetKey id", + 'from' => "FROM $rel_table", + 'where' => "WHERE $where AND $rel_table.deleted=0", + ); + } + } + /** * @param $lhs SugarBean left side bean to add to the relationship. * @param $rhs SugarBean right side bean to add to the relationship. diff --git a/data/Relationships/RelationshipFactory.php b/data/Relationships/RelationshipFactory.php index 6121136d..78b8772c 100644 --- a/data/Relationships/RelationshipFactory.php +++ b/data/Relationships/RelationshipFactory.php @@ -164,7 +164,7 @@ class SugarRelationshipFactory { //Reload ALL the module vardefs.... foreach($beanList as $moduleName => $beanName) { - VardefManager::loadVardef($moduleName, $beanName); + VardefManager::loadVardef($moduleName, BeanFactory::getObjectName($moduleName)); } $relationships = array(); diff --git a/data/SugarBean.php b/data/SugarBean.php index 9548698f..61001261 100644 --- a/data/SugarBean.php +++ b/data/SugarBean.php @@ -554,8 +554,14 @@ class SugarBean function getPrimaryFieldDefinition() { $def = $this->getFieldDefinition("id"); - if (!$def) + if(empty($def)) { $def = $this->getFieldDefinition(0); + } + if (empty($def)) { + $defs = $this->field_defs; + reset($defs); + $def = current($defs); + } return $def; } /** @@ -957,8 +963,19 @@ class SugarBean function get_linked_beans($field_name,$bean_name, $sort_array = array(), $begin_index = 0, $end_index = -1, $deleted=0, $optional_where="") { - if($this->load_relationship($field_name)) - return array_values($this->$field_name->getBeans()); + //if bean_name is Case then use aCase + if($bean_name=="Case") + $bean_name = "aCase"; + + if($this->load_relationship($field_name)) { + if ($this->$field_name instanceof Link) { + // some classes are still based on Link, e.g. TeamSetLink + return array_values($this->$field_name->getBeans(new $bean_name(), $sort_array, $begin_index, $end_index, $deleted, $optional_where)); + } else { + // Link2 style + return array_values($this->$field_name->getBeans()); + } + } else return array(); } @@ -2202,7 +2219,7 @@ function save_relationship_changes($is_update, $exclude=array()) * Internal function, do not override. * */ - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1, $show_deleted = 0, $singleSelect=false) + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1, $show_deleted = 0, $singleSelect=false, $select_fields = array()) { $GLOBALS['log']->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); if(isset($_SESSION['show_deleted'])) @@ -2227,7 +2244,7 @@ function save_relationship_changes($is_update, $exclude=array()) } } } - $query = $this->create_new_list_query($order_by, $where,array(),array(), $show_deleted,'',false,null,$singleSelect); + $query = $this->create_new_list_query($order_by, $where,$select_fields,array(), $show_deleted,'',false,null,$singleSelect); return $this->process_list_query($query, $row_offset, $limit, $max, $where); } @@ -3828,6 +3845,7 @@ function save_relationship_changes($is_update, $exclude=array()) // We have some data. while (($row = $bean->db->fetchByAssoc($result)) != null) { + $row = $this->convertRow($row); if(!$isFirstTime) { $bean = new $class(); @@ -4493,10 +4511,7 @@ function save_relationship_changes($is_update, $exclude=array()) function getRelatedFields($module, $id, $fields, $return_array = false){ if(empty($GLOBALS['beanList'][$module]))return ''; - $object = $GLOBALS['beanList'][$module]; - if ($object == 'aCase') { - $object = 'Case'; - } + $object = BeanFactory::getObjectName($module); VardefManager::loadVardef($module, $object); if(empty($GLOBALS['dictionary'][$object]['table']))return ''; diff --git a/download.php b/download.php index b2a81224..9faab64c 100644 --- a/download.php +++ b/download.php @@ -42,7 +42,7 @@ if(empty($_REQUEST['id']) || empty($_REQUEST['type']) || !isset($_SESSION['authe die("Not a Valid Entry Point"); } else { - require_once("data/BeanFactory.php"); + $file_type=''; // bug 45896 ini_set('zlib.output_compression','Off');//bug 27089, if use gzip here, the Content-Length in hearder may be incorrect. // cn: bug 8753: current_user's preferred export charset not being honored $GLOBALS['current_user']->retrieve($_SESSION['authenticated_user_id']); @@ -99,6 +99,7 @@ else { } } // if + if(isset($_REQUEST['ieId']) && isset($_REQUEST['isTempFile'])) { $local_location = sugar_cached("modules/Emails/{$_REQUEST['ieId']}/attachments/{$_REQUEST['id']}"); } elseif(isset($_REQUEST['isTempFile']) && $file_type == "import") { diff --git a/export.php b/export.php index f851552d..9365d912 100644 --- a/export.php +++ b/export.php @@ -85,7 +85,7 @@ header("Content-transfer-encoding: binary"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header("Last-Modified: " . TimeDate::httpTime() ); header("Cache-Control: post-check=0, pre-check=0", false ); -header("Content-Length: ".strlen($content)); +header("Content-Length: ".mb_strlen($GLOBALS['locale']->translateCharset($content, 'UTF-8', $GLOBALS['locale']->getExportCharset()))); print $GLOBALS['locale']->translateCharset($content, 'UTF-8', $GLOBALS['locale']->getExportCharset()); diff --git a/files.md5 b/files.md5 index e023b43c..ffa9d902 100644 --- a/files.md5 +++ b/files.md5 @@ -1,5 +1,5 @@ 'd3f150e4a5bed444763ebe8a81742a95', './.htaccess' => 'd41d8cd98f00b204e9800998ecf8427e', @@ -598,7 +598,7 @@ $md5_string = array ( './themes/Sugar5/tpls/_headerSearch.tpl' => 'bc58be343ded4e485f6dbd55b64b03a3', './themes/Sugar5/tpls/_headerModuleList.tpl' => '35c039f24676294d801c0dbe82deab6c', './themes/Sugar5/tpls/_headerLastViewed.tpl' => '4395b403630b8edfe43d7c9520ea15c4', - './themes/Sugar5/tpls/_head.tpl' => '211ee377873beec6ded5c32a4fdea361', + './themes/Sugar5/tpls/_head.tpl' => '66330925c8d162e5f3c447cb2cf994d6', './themes/Sugar5/tpls/_globalLinks.tpl' => '3e2417ad8677beac17542ee9d67a54aa', './themes/Sugar5/tpls/_companyLogo.tpl' => 'a3cba2107e10a123442c794c2657858b', './themes/Sugar5/themedef.php' => '05894346d1ea22a59e5460af6a2637e9', @@ -1168,11 +1168,11 @@ $md5_string = array ( './themes/Sugar5/images/ACLRoles.gif' => 'dcbf376b885458b1fc8c21de7884284e', './themes/Sugar5/css/yui.css' => 'ea8b1a1a36b7aaba0484e4dacb328ce4', './themes/Sugar5/css/wizard.css' => 'fedb96794c66f593b8cc30f3ae409f08', - './themes/Sugar5/css/style.css' => '657d6c9292d1e022e7ad6572647671b2', + './themes/Sugar5/css/style.css' => 'dcb01c11c61ded82c153b24af710683b', './themes/Sugar5/css/print.css' => '041ba7c460d78a693301c7061139af89', './themes/Sugar5/css/deprecated.css' => '872d2ee2f45eb595825646cb39a82fab', './themes/Sugar5/css/chart.css' => '493edb0e181f685fd595c483d09012fb', - './sugar_version.php' => '395ddc5347aed2c70033f823af56f8c4', + './sugar_version.php' => '9317f6948a3858b2cf3d1f85bb4ac330', './soap/SoapTypes.php' => 'f38a0ac79874c8a3e126d728bd05e00a', './soap/SoapSugarUsers.php' => '661f4efec182f58581bbde94355e52a3', './soap/SoapStudio.php' => '2f424bab502055acae4131df64465e0c', @@ -1193,7 +1193,7 @@ $md5_string = array ( './service/v3_1/soap.php' => 'c43ef120b97861b99202658c57983de6', './service/v3_1/rest.php' => '264d8a7ff0a03bbeb38341753866ef70', './service/v3_1/registry.php' => 'fe17a5dfec64990947dece2ef2d2044d', - './service/v3_1/SugarWebServiceUtilv3_1.php' => '726a5f53669ad6216481ab1fbbeef5ce', + './service/v3_1/SugarWebServiceUtilv3_1.php' => '019ddc348de0866334f99c30fba1c908', './service/v3_1/SugarWebServiceImplv3_1.php' => '4c063a6cafe57242acbb2adc0bc6c94c', './service/v3/soap.php' => '7e157b2fc2f3b124f2783b4375484dc9', './service/v3/rest.php' => '774a7775550af8c6b17aa68149d71577', @@ -1214,13 +1214,13 @@ $md5_string = array ( './service/example/Rest_Proxy.php' => 'f8873a8fe88e4a7be8576f379e4963bc', './service/core/webservice.php' => '6fb48213b39f1b4da200929397c3deb1', './service/core/WSDL.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', - './service/core/SugarWebServiceImpl.php' => 'e84cbf2f9594ed4bd6dac3e3a5c6806a', + './service/core/SugarWebServiceImpl.php' => 'abc82a81ba543f0d0f06b2f7b5369c23', './service/core/SugarWebService.php' => '4b77cfb754dcdebed48f0697b3c9f67a', './service/core/SugarSoapService.php' => '9843f9f203f3e0bc634badeca3be794c', './service/core/SugarRestUtils.php' => 'ddebba71abb25182a7769061862797ae', './service/core/SugarRestServiceImpl.php' => '18ab35c13544baa4fe716711cc541f62', './service/core/SugarRestService.php' => 'd33edebfed9738da84e5b46c25ddf99c', - './service/core/SoapHelperWebService.php' => '1fbeac5c9e42de70c12b8e303e6a9b19', + './service/core/SoapHelperWebService.php' => 'c8d8048d7126c8f9606793651fea4f39', './service/core/REST/SugarRestSerialize.php' => 'f80614ee5bc7e2f4a23460bbcc8c3eb8', './service/core/REST/SugarRestRSS.php' => 'eabfddaa4a65c3643f65ecab9f23c4bd', './service/core/REST/SugarRestJSON.php' => 'b3750c1987e8071bb3ad8296d9b4d5fa', @@ -1294,17 +1294,17 @@ $md5_string = array ( './modules/Users/User.js' => 'be8fb51d9aee4e404de7bbdc6f198ca5', './modules/Users/UserEditView.js' => '3674705fb2233344086519b26e1e9731', './modules/Users/login.js' => '82204ae9a20d3f19aa03a31f5a9e0acd', - './modules/Users/UserViewHelper.php' => '2f125c1b4215f874eef738bc0ab8555f', + './modules/Users/UserViewHelper.php' => 'c5c5547e432b090ec6df101d38003860', './modules/Users/views/view.edit.php' => '34796b7fbd2ac907b72df5a73df27f04', './modules/Users/views/view.detail.php' => 'ab4d4baec926346344d4c4348ef563d4', - './modules/Users/views/view.wizard.php' => '91620b1fff11bd18205ffe0f9d0e2b8b', + './modules/Users/views/view.wizard.php' => '77d5fa043caddf804d268a992e1470c6', './modules/Users/views/view.list.php' => '91fe6e2e3f9a62f0903835f7963129b6', './modules/Users/tpls/EditViewHeader.tpl' => '7ed284e79d874268f5341d0fda0a3523', './modules/Users/tpls/EditViewGroup.tpl' => '6701b6dfade848d869608c67c8ad583b', - './modules/Users/tpls/EditViewFooter.tpl' => '3e8579b28dd5e1b1c5872960348b2587', + './modules/Users/tpls/EditViewFooter.tpl' => '95aae7d9793b4edd06cab370580a66a2', './modules/Users/tpls/DetailViewHeader.tpl' => '953af92a61dc911fe40c1a21eac55e9a', './modules/Users/tpls/DetailViewFooter.tpl' => 'd90848eca17dddecb36b70cc22e5f8a9', - './modules/Users/tpls/wizard.tpl' => '7777ad89b6530526455441f8cbf83a81', + './modules/Users/tpls/wizard.tpl' => '0086eb0ebca4251d0066bb56a92f894b', './modules/Users/reassignUserRecords.php' => 'cab2c3162c707bc2876dcdd6203210cb', './modules/Users/password_utils.php' => '614d9ea87a83d7c210bbfe585908b870', './modules/Users/metadata/studio.php' => '241f516889a0e44f635bc0e52a4b49ab', @@ -1352,7 +1352,7 @@ $md5_string = array ( './modules/Users/UserSignature.php' => '23592719467cc4e04be189c6fa2d30db', './modules/Users/login.tpl' => 'e69da8b41c81f9414d91e40fe9740876', './modules/Users/login.css' => '12d8483e8f6da8e1a95d54b1b50d0ec9', - './modules/Users/User.php' => 'a778eff761889de34d88bbdda3501288', + './modules/Users/User.php' => 'a9fb105a9bc6605a6a9acf7c7a498f87', './modules/Users/SaveTimezone.php' => 'c12559f852fb8d89a269814e808dadc5', './modules/Users/SaveSignature.php' => '2f8bfdb6f88dce867100a761366d0391', './modules/Users/SetTimezone.tpl' => 'f76851063b5129bcae41e7bef962636f', @@ -1367,7 +1367,7 @@ $md5_string = array ( './modules/Users/Menu.php' => '6e9d3948eb98bae4194a0a6544834165', './modules/Users/Error.php' => '62f9d5788e4663b84e030c4eaba3e8b3', './modules/Users/Logout.php' => '5c819754b90e62e2f1739971144b01a6', - './modules/Users/Login.php' => 'ac45d01e07965ad445fc6b74252fdb0e', + './modules/Users/Login.php' => 'b85bd6aab94c05ccc7e4017adca4b82e', './modules/Users/GeneratePassword.php' => 'cd550ab172dc3dcbb715221ec97469a0', './modules/Users/Forms.php' => 'c7a6a1a229dd1111a0f7616ee6c04b97', './modules/Users/Changenewpassword.tpl' => '65a02130fbb6caabd2b662ca70bae9fd', @@ -1379,11 +1379,11 @@ $md5_string = array ( './modules/UserPreferences/index.php' => '993e1ee9cc1e95be441522e211e05429', './modules/UserPreferences/field_arrays.php' => 'd109e5473ca3fe844fcc8787c47b3561', './modules/UserPreferences/controller.php' => '6022bf66d58876257bf96523b5c01953', - './modules/UserPreferences/UserPreference.php' => 'f03e29bf7dd7a75938c2d4f30c313c01', + './modules/UserPreferences/UserPreference.php' => 'ad2793147eb36e2020beb192c1d67a8d', './modules/UpgradeWizard/upgradeWizard.js' => '3ca941da793c30a8a4e913624071166e', './modules/UpgradeWizard/UpgradeRemoval.php' => 'f8f4d6102a0cdc17d48444372a6ed2d8', './modules/UpgradeWizard/uw_main.tpl' => 'ad9854486b35088baf96a8d26b2668df', - './modules/UpgradeWizard/uw_utils.php' => '88a9f311b3233d18ef3ac69ff94a5c2e', + './modules/UpgradeWizard/uw_utils.php' => 'dc1755f7cb199f0f9dbced56f90b5e31', './modules/UpgradeWizard/uw_emptyFunctions.php' => 'fc09ce5db1b1aacd792140ceadc9ccd2', './modules/UpgradeWizard/uw_files.php' => '0b16b9d7181ac363d19aa43b8c50090b', './modules/UpgradeWizard/upload.php' => '0af27a6807f99ff7f688a6d5fe16ee7f', @@ -1400,16 +1400,16 @@ $md5_string = array ( './modules/UpgradeWizard/silentUpgrade.php' => 'a41bbf9eeead4b0cd6fe3ea9a219cc9e', './modules/UpgradeWizard/processing.gif' => 'd7c43fc19181ee59862601bfce100b41', './modules/UpgradeWizard/preflightJson.php' => '84bc340625525ae0cc231efc2768ebb0', - './modules/UpgradeWizard/preflight.php' => 'a08214e3b8dda2a3ca31115f62696aad', + './modules/UpgradeWizard/preflight.php' => '33415dddfe835e3541483bbc6df01c12', './modules/UpgradeWizard/populateColumns.php' => '7c58ba862c5391857d059e75051b5cec', './modules/UpgradeWizard/layouts.php' => '8b414946612a3ac003e246c5356d1e44', './modules/UpgradeWizard/language/en_us.lang.php' => '608590fe2cad45dc9dfab223202b6687', './modules/UpgradeWizard/uw_ajax.php' => '11d0289f45cd288b323ad8ecd01bb9ce', './modules/UpgradeWizard/deleteCache.php' => '79d81392ddc7e71180c7e0a00b5bc93c', - './modules/UpgradeWizard/index.php' => '60b65f2766353f457ea94545b5596049', + './modules/UpgradeWizard/index.php' => '66f470befcc5d1a8ee8b76f640fb27e7', './modules/UpgradeWizard/commitJson.php' => '3ac93b7343984a726d004499c53b315b', './modules/UpgradeWizard/end.php' => 'e8278c3d9bbd8ac1cc4cebdbeebd44ad', - './modules/UpgradeWizard/commit.php' => '5f4f0cf3b7660d97685d2db4f0d74bf1', + './modules/UpgradeWizard/commit.php' => 'ca072d05c1850406cf7cc3129846cc46', './modules/UpgradeWizard/cancel.php' => 'd05ec413b760ae58179c217ffbd20ce2', './modules/UpgradeWizard/UploadFileCheck.php' => 'd4a88e3b6923cf3365fedbf501116dd6', './modules/UpgradeWizard/SugarMerge/SugarMerge.php' => 'ed5f03dd65e4a51843e22a9f79e3b930', @@ -1434,12 +1434,12 @@ $md5_string = array ( './modules/Trackers/config.php' => '0d9d21c011d9f3585e1bcb51047b6982', './modules/Trackers/populateSeedData.php' => 'b3ee5dcf1d99bfa9f9001e9e0c7adffe', './modules/Trackers/TrackerManager.php' => '5158e9662c615adeeae75912673f96a5', - './modules/Trackers/Tracker.php' => '7946d873aaf1e312e0a096603b9865a9', + './modules/Trackers/Tracker.php' => '521667c3c0aa2598aea88a89ab4f7ea4', './modules/Trackers/Trackable.php' => '625d62167dfeec77822ab640f23cc2f6', './modules/Trackers/Metric.php' => 'b2fe3a0da872c9b6b22c208f356dc6f7', - './modules/Trackers/BreadCrumbStack.php' => '7358bcb903cd158938ddce8d855c748a', + './modules/Trackers/BreadCrumbStack.php' => '5bb356798b059c8b882f371d44efa584', './modules/Tasks/views/view.edit.php' => 'b3407d67d7c3cc4b835bd66b2e802c86', - './modules/Tasks/vardefs.php' => 'ef7df7d7714d5c282203ba8a82c1e10b', + './modules/Tasks/vardefs.php' => '6df43948e3ad67518e3a1aaaed4a8d7a', './modules/Tasks/tpls/QuickCreate.tpl' => 'a4238fdefed341897f40e3524fc69da3', './modules/Tasks/metadata/subpaneldefs.php' => 'b55eba643229a90c021abfa15caccf37', './modules/Tasks/metadata/subpanels/default.php' => '6aa5aad5295409fc898bae85d5c501d0', @@ -1457,7 +1457,7 @@ $md5_string = array ( './modules/Tasks/language/en_us.lang.php' => 'c2c0402194c3a21ca3f2fec6642b086a', './modules/Tasks/field_arrays.php' => '9869facdbe32bc0551b9ec7429671848', './modules/Tasks/TasksQuickCreate.php' => '8df028b5cde8de961c6d94574f3c860e', - './modules/Tasks/Task.php' => '9bcc93456b1adb7c5fac420a067ef89f', + './modules/Tasks/Task.php' => 'c16c89c78a582e2d1cef13f7e5f7916c', './modules/Tasks/Save.php' => '87926f8aefc476572a32c4af581298af', './modules/Tasks/MyTasks.php' => 'abab20fa92762e76c50373ef9ec62627', './modules/Tasks/MyTasks.html' => '58c3695222bf9a745f2b2f4f5d52ae90', @@ -1489,7 +1489,7 @@ $md5_string = array ( './modules/SugarFeed/Forms.php' => 'd41d8cd98f00b204e9800998ecf8427e', './modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl' => '5677ff9db468dc1355fb4dd43d6d3985', './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedScript.tpl' => '95aef9663dc3396435295619ceb7ba43', - './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '5ed48afa0bfa84b7de29a1e39b3094c6', + './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php' => '986d66346dd613360c45b9bf745a739a', './modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.meta.php' => 'c318d9d7b4d1b544dae1b8b1cd1bab8a', './modules/SugarFeed/Dashlets/SugarFeedDashlet/Options.tpl' => '0fecf9d27d5f7335751bf5a517bfb843', './modules/SugarFeed/SugarFeed.php' => '1d984482734852f2dd53b38546f24d57', @@ -1500,7 +1500,7 @@ $md5_string = array ( './modules/Studio/studiotabgroups.js' => '0914ad3b4384826e6a49bf231b2e4495', './modules/Studio/ygDDListStudio.js' => '2d3316c51f34ee87cc887b41e6d3539f', './modules/Studio/wizards/RenameModules.tpl' => '79547fcc34b45c255c9b1c2ba74b74cd', - './modules/Studio/wizards/RenameModules.php' => 'ae3733aa1aaca66a6e542ce187dca79b', + './modules/Studio/wizards/RenameModules.php' => '0096e2a6b14fd98bb5a5a94730935c4b', './modules/Studio/wizards/StudioWizard.php' => '4309aae3b3614cf7cf2d160d52c3944f', './modules/Studio/wizards/EditDropDownWizard.php' => '47997b18f2d0eed6613e4e8ee3bec245', './modules/Studio/wizard.php' => '1eb1fe073c5a846796636d94ce0a246c', @@ -1516,7 +1516,7 @@ $md5_string = array ( './modules/Studio/Forms.php' => '1c6572163e238c71c494169b254f5a16', './modules/Studio/DropDowns/EditView.tpl' => 'a9fefd66caae2d917253cf2f83ccb6d9', './modules/Studio/DropDowns/EditView.php' => '3050ebbbb09fb258b20ddc14698781be', - './modules/Studio/DropDowns/DropDownHelper.php' => 'f77d3f993506e5f1e1510f22859c2dbc', + './modules/Studio/DropDowns/DropDownHelper.php' => 'e84c37f71556d3d90145832e04accfee', './modules/SchedulersJobs/vardefs.php' => '23f57bde247519a289ce85fbb6a0d917', './modules/SchedulersJobs/metadata/subpanels/default.php' => 'f3cf4560886a3feb95495607613f83e4', './modules/SchedulersJobs/language/en_us.lang.php' => 'e2ad9c5aa5d9411f633472ad5a833825', @@ -1551,7 +1551,7 @@ $md5_string = array ( './modules/SavedSearch/field_arrays.php' => '0a3131ce56bc5e314f82f99535ba7f0f', './modules/SavedSearch/UpgradeSavedSearch.php' => '1ea269671af4dd80cb2edfcc6c220d6c', './modules/SavedSearch/SearchForm.html' => 'b459847986a5a78033744d2ac2fd83b8', - './modules/SavedSearch/SavedSearchSelects.tpl' => 'c39f005f3f1456d0c403e7b1b5c29aec', + './modules/SavedSearch/SavedSearchSelects.tpl' => 'b7caafc55f6366f78048882c66d6889e', './modules/SavedSearch/SavedSearchForm.tpl' => 'e1b30f7f970a53e8fbdf59c56594992a', './modules/SavedSearch/SavedSearch.php' => 'd892609e356ec70b1c590b9b7f0e8ed0', './modules/SavedSearch/Menu.php' => 'dc4c7a6e251fafed9e02fdedeadb6de1', @@ -1567,7 +1567,7 @@ $md5_string = array ( './modules/Roles/field_arrays.php' => 'fac77f97d3bbdad7feb595b412cf78b5', './modules/Roles/SubPanelViewUsers.php' => '27716881c664be8068f725eab88c8c5b', './modules/Roles/SubPanelViewUsers.html' => '213e193c48ca52f90a3fe922eb7623fb', - './modules/Roles/SaveUserRelationship.php' => '30bb63f6e0da0d768b22004917a1cdab', + './modules/Roles/SaveUserRelationship.php' => '1b8a6e9033af80ebe7902dffdf7c944d', './modules/Roles/Save.php' => '59dae0c9865cbb102cf03080d542834a', './modules/Roles/Role.php' => 'ce677ccbdb0a6a8569a26706ec7388b1', './modules/Roles/Menu.php' => '6c50f81b3d763e5bf50e5152c43fca8f', @@ -1576,7 +1576,7 @@ $md5_string = array ( './modules/Roles/EditView.html' => '35858528fe4641940007ab9c2ecd1f54', './modules/Roles/DetailView.php' => '3d199271d09898288c373a38e391058d', './modules/Roles/DetailView.html' => '9c5d8c267a781c6fa54cbcea8f6b7f27', - './modules/Roles/DeleteUserRelationship.php' => '12f81332f5c5011dc78db89cb2025431', + './modules/Roles/DeleteUserRelationship.php' => 'ac25f89238aca46e7c5ff55a5c48529e', './modules/Roles/Delete.php' => '352ec22d2eb88ab05412ff2cc91e476f', './modules/Releases/vardefs.php' => '6d44d6ed56d9e1da4504451e736fce53', './modules/Releases/language/en_us.lang.php' => 'dc61a98182ccd0d8ac37de859e77dc0f', @@ -1667,7 +1667,7 @@ $md5_string = array ( './modules/ProjectTask/Save.php' => 'd1a87b0fbe38bcd6c3024871b61d3251', './modules/ProjectTask/ProjectTaskQuickCreate.php' => '9e22afc763a7461aae6ac12f0da9672d', './modules/ProjectTask/vardefs.php' => '5b4cf6dad9a98cc9ca0d125f9a72fcaf', - './modules/ProjectTask/ProjectTask.php' => 'dbdc3e71ae3633b9bb6da6eee3123a09', + './modules/ProjectTask/ProjectTask.php' => 'ecc7049210b3c9e5adfd820a9c278c2f', './modules/ProjectTask/Popup_picker.html' => '591b7bfc9bc432e55096a15903b0f038', './modules/ProjectTask/MyProjectTasks.php' => '451fa125ddfc37196fa0de8fc46d3691', './modules/ProjectTask/MyProjectTasks.html' => 'ffd4e103720ddbbc0841c63fdc16128f', @@ -1766,13 +1766,13 @@ $md5_string = array ( './modules/Notes/metadata/subpanels/default.php' => '95de5ea759961356b3221bd39abf977e', './modules/Notes/metadata/subpanels/ForHistory.php' => 'dad1addf6074a5e893cb6e425fbc31c4', './modules/Notes/metadata/studio.php' => '97fb182348172339a2e6c240dcf1e604', - './modules/Notes/metadata/searchdefs.php' => '261de884a79200bd98731c5f540eca03', + './modules/Notes/metadata/searchdefs.php' => '6d29bc0b38ffdb630b5c38e8db242e23', './modules/Notes/metadata/quickcreatedefs.php' => '05506183094fafa139d054e69a907077', './modules/Notes/metadata/listviewdefs.php' => '34550d6fffdc0f5767404e1583b006d3', './modules/Notes/metadata/editviewdefs.php' => 'd3eaf6ef50b35d048f13c534f012ae40', './modules/Notes/metadata/detailviewdefs.php' => 'c9991544e69bc5369b9771a432354a4c', './modules/Notes/metadata/additionalDetails.php' => '47f61f0e9f69fc808d3cfbee124620b8', - './modules/Notes/metadata/SearchFields.php' => 'c210c4f08b81c4fb689f869f9775d744', + './modules/Notes/metadata/SearchFields.php' => '9a8f9bb1cf31a1d0fd3fe74e49364e49', './modules/Notes/language/en_us.lang.php' => '6a71ba542f187bae2546f1522c5e2efa', './modules/Notes/field_arrays.php' => '463c08bd1cf6d96a42d2a1758a5b0e8a', './modules/Notes/controller.php' => '256cbdb7a767232ff340330240ee2a1c', @@ -1796,13 +1796,13 @@ $md5_string = array ( './modules/ModuleBuilder/views/view.popupview.php' => '056d3f984f991eff722dcad241afa8ce', './modules/ModuleBuilder/views/view.package.php' => '94886f989c71b501e16733aa6f635ab7', './modules/ModuleBuilder/views/view.modulelabels.php' => '9e7e14f47b473f7e0e561be07a254deb', - './modules/ModuleBuilder/views/view.modulefields.php' => '3dc928b1ec38715384bcf36a4af860f8', - './modules/ModuleBuilder/views/view.modulefield.php' => '076e9c490428684dfce625fdd698966d', + './modules/ModuleBuilder/views/view.modulefields.php' => '13942607572a7063ff6129084f54caf6', + './modules/ModuleBuilder/views/view.modulefield.php' => 'dc669610d2e3fc73ff7b1524baf779eb', './modules/ModuleBuilder/views/view.module.php' => 'e87f77f4bb936006ad94103cd0f1c453', './modules/ModuleBuilder/views/view.main.php' => '4dc14264211be02eed4a77b0f226fb9e', './modules/ModuleBuilder/views/view.listview.php' => 'db17490df351293fa5296f6e06abc961', './modules/ModuleBuilder/views/view.layoutview.php' => 'bdfa262f82b6f0a82e55bea468760241', - './modules/ModuleBuilder/views/view.labels.php' => 'e528ce648ca02258f6aa71be1e3f1337', + './modules/ModuleBuilder/views/view.labels.php' => '554a7291a1ec6e56608fb2197b4b5b8b', './modules/ModuleBuilder/views/view.home.php' => '37dd89b67de55a72b8426b9bd440c3c7', './modules/ModuleBuilder/views/view.history.php' => '4acec9d2c0348a65ab937e98569d5f41', './modules/ModuleBuilder/views/view.exportcustomizations.php' => 'd3549b1d669a65d83e56bfaa2ba36b40', @@ -1820,7 +1820,7 @@ $md5_string = array ( './modules/ModuleBuilder/tpls/resetModule.tpl' => '61597ccd042c1e6ff988fc904e6519ed', './modules/ModuleBuilder/tpls/main.tpl' => '8862d14b4c6989a99013640a9a1f4c02', './modules/ModuleBuilder/tpls/listView.tpl' => '5888d00e48c9315976540fa4e763e96c', - './modules/ModuleBuilder/tpls/layoutView.tpl' => 'b44ed58ea56362c36e6360f8515af391', + './modules/ModuleBuilder/tpls/layoutView.tpl' => 'e6c485621e29c862d0ab5c753d1698e4', './modules/ModuleBuilder/tpls/labels.tpl' => '61817dbfb8f5e2f55b1d1f32d0fd1e4f', './modules/ModuleBuilder/tpls/index.tpl' => '5da6e65e790795a2ec006451afcb2f05', './modules/ModuleBuilder/tpls/includes.tpl' => '1b4a0701cfd7fe0d5e9f375ad8eb090d', @@ -1854,20 +1854,20 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/views/UndeployedSubpanelImplementation.php' => 'c1f61c27c48ed83a04231cacf2cbadfd', './modules/ModuleBuilder/parsers/views/UndeployedMetaDataImplementation.php' => '87c39c5818423ac119f20c9f44b11de8', './modules/ModuleBuilder/parsers/views/SubpanelMetaDataParser.php' => 'a658fb64f32eae269f0aeec0cc271f22', - './modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php' => '1d264a211116114f0adfd780b9ae9872', + './modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php' => '038ed5309b7968dcad03255a2baa3c99', './modules/ModuleBuilder/parsers/views/PopupMetaDataParser.php' => '7e61b8b2042be68aa084f97950140e18', './modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' => '64976a9f4a851bbb2e597e8a9cbb68b6', './modules/ModuleBuilder/parsers/views/MetaDataImplementationInterface.php' => '3bb6fa231da65dbb1369b536858818f1', - './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => 'c49e5a25670037e3e8b8d081df924ee4', + './modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' => '9b89860ac4b6ddb528db786a5fc5f233', './modules/ModuleBuilder/parsers/views/HistoryInterface.php' => 'c1583f28fddb4c33c920f92a20e2c935', - './modules/ModuleBuilder/parsers/views/History.php' => 'cb762b148ad023d6ec3ba6440ea9df5e', - './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '6f94cc07fe9d6540e3a4658a20bed9d5', + './modules/ModuleBuilder/parsers/views/History.php' => '05dac0ef2a4568eab65e4bc7e51005f6', + './modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' => '6535513b80b93a5e68aba1d160d5dbe9', './modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php' => '24a957dc22e693e21dd18541e3584807', './modules/ModuleBuilder/parsers/views/DeployedMetaDataImplementation.php' => 'f038a0d67cfb341d627e5a1c9e8607c3', './modules/ModuleBuilder/parsers/views/DashletMetaDataParser.php' => '8fca44b08dc035a1d23463b26344df72', './modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' => '720c63061f2e8be613423dd9a706dfbd', './modules/ModuleBuilder/parsers/views/AbstractMetaDataImplementation.php' => '96163c88a133c445b47980379e569b4d', - './modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' => '51d68dda5029b76fe28f5b3aaa4420e3', + './modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' => '1cd3096126ec4b8e4ea3a4cd83c474bb', './modules/ModuleBuilder/parsers/relationships/RelationshipsInterface.php' => '5673bbca1c4d58866069201f7276f957', './modules/ModuleBuilder/parsers/relationships/RelationshipFactory.php' => '60921654dbc6f3dbbb44076036285e04', './modules/ModuleBuilder/parsers/relationships/OneToOneRelationship.php' => '006cc4db77a360eb4b33cf0d5ce15183', @@ -1877,11 +1877,11 @@ $md5_string = array ( './modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' => '830f7e1a2b185482526180e5f17f4bc4', './modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php' => 'e54641d4126d374f494a6f7f76c2176b', './modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php' => 'fc866c0a42469c4ed68c8cbf72d8a181', - './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => '870ead52b543485edc8235a0695adb10', + './modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' => 'de723bb3cc183d2377c1966cb864ca09', './modules/ModuleBuilder/parsers/parser.modifysubpanel.php' => 'b26c368fe0ded3b67f1d83f33795454b', './modules/ModuleBuilder/parsers/parser.modifylistview.php' => 'cb76fbefd131ce1e5d71c19d565df204', './modules/ModuleBuilder/parsers/parser.modifylayoutview.php' => 'd5383c342e65fcde7a628c339d0d6502', - './modules/ModuleBuilder/parsers/parser.label.php' => 'dad85a204ca813eb4de0836e190ca62e', + './modules/ModuleBuilder/parsers/parser.label.php' => '963402aa275964032d0095fbc82065df', './modules/ModuleBuilder/parsers/parser.dropdown.php' => 'b8daa4da875806fb37456c17c4d42840', './modules/ModuleBuilder/parsers/constants.php' => '0d876db28d336cabe3c44a06b8a8f780', './modules/ModuleBuilder/parsers/StandardField.php' => 'de8b8168336744386faa4fcd8eb3a8fa', @@ -1898,12 +1898,12 @@ $md5_string = array ( './modules/ModuleBuilder/javascript/SimpleList.js' => '2ad0e64a2f93f73583edc63092a6ed6a', './modules/ModuleBuilder/javascript/ModuleBuilder.js' => 'f8ee21995b416e7da7e4482e8a769d14', './modules/ModuleBuilder/javascript/JSTransaction.js' => '2f20a4a72eaa8cbdf3053e24c5772ee5', - './modules/ModuleBuilder/controller.php' => '7491b8147a7f768ffdc851c15b4c56a4', + './modules/ModuleBuilder/controller.php' => '3bcdbd55f294d4fefc68275e19ec3c7a', './modules/ModuleBuilder/action_view_map.php' => 'fd1e0b87f5d325f06b2b743afa057999', './modules/ModuleBuilder/Module/StudioTree.php' => 'e29fed9b1f81766bda975d938eecd3ec', './modules/ModuleBuilder/Module/StudioModuleFactory.php' => '5860a0e60d39a69303a39df4ea188336', - './modules/ModuleBuilder/Module/StudioModule.php' => '2874e799f025ab3afcc40c5a0f15ea69', - './modules/ModuleBuilder/Module/StudioBrowser.php' => 'a12897d3293acd37f50cff6663e1ca47', + './modules/ModuleBuilder/Module/StudioModule.php' => '2e713b5adf3e92cb219ff74561d166cd', + './modules/ModuleBuilder/Module/StudioBrowser.php' => '6da2f872826086caad4759599f0f3203', './modules/ModuleBuilder/Module/MainTree.php' => '43824a340ebbce175fac3b60b7641efb', './modules/ModuleBuilder/Module/DropDownTree.php' => 'ab1f94e57c7ec0f1f2b0a37fa158eab5', './modules/ModuleBuilder/Module/DropDownBrowser.php' => '7cd759094f2018b86eb030b2f6286516', @@ -1939,7 +1939,7 @@ $md5_string = array ( './modules/Meetings/JoinExternalMeeting.php' => '8da73502e2d825ec2b10ede8ccf6ba61', './modules/Meetings/views/view.listbytype.php' => '1edb3e6eaf3e66aac1101d02b946e9c7', './modules/Meetings/views/view.edit.php' => '48fdb56b365e914a085aaaed7e9bf4d1', - './modules/Meetings/vardefs.php' => '0c2291574f012c02d2e25d199b78c378', + './modules/Meetings/vardefs.php' => '44281b67a41b527ae812f685c3202593', './modules/Meetings/tpls/extMeetingNotInvited.tpl' => '5d05c208909ebfb8b425c4a9a57265bd', './modules/Meetings/tpls/extMeetingNoStart.tpl' => '01740b23224ca1e36be97c81091acc53', './modules/Meetings/tpls/header.tpl' => 'e443fd4d94fddde4cab75fc0ca33c863', @@ -1951,9 +1951,9 @@ $md5_string = array ( './modules/Meetings/metadata/subpaneldefs.php' => '0c0c904e87130730c0757e495ecf2ea8', './modules/Meetings/metadata/studio.php' => '9597aef6f1a776f39e0515231425a883', './modules/Meetings/metadata/searchdefs.php' => '2bc913f3f67b7fa29cdab7e2623de325', - './modules/Meetings/metadata/quickcreatedefs.php' => '4b0e07d8407f7814747dc20b3e8bf6fb', + './modules/Meetings/metadata/quickcreatedefs.php' => '96f3c52ebf81e0f9dad3a919b0a12032', './modules/Meetings/metadata/listviewdefs.php' => '5973b2f25ca38dba5645037276ee0b9d', - './modules/Meetings/metadata/editviewdefs.php' => 'ea973b104d5d764e8f4f4a8fbc547a82', + './modules/Meetings/metadata/editviewdefs.php' => '8572fd0b90aa512ed92853c06f103890', './modules/Meetings/metadata/detailviewdefs.php' => '7b516d8760f5116e112601c34b6a0e66', './modules/Meetings/metadata/additionalDetails.php' => 'b2b466a61eef5f8369d9587631399b3c', './modules/Meetings/metadata/SearchFields.php' => '8fb6299f50de078c3578938a29e6fc57', @@ -1965,23 +1965,23 @@ $md5_string = array ( './modules/Meetings/Menu.php' => '20e69d57b747825c30e86987d72efb0b', './modules/Meetings/MeetingsQuickCreate.php' => '818e55e261c5e74cb385f835311944fa', './modules/Meetings/MeetingFormBase.php' => '9e386a611a97e4235caf464b6e7448cd', - './modules/Meetings/Meeting.php' => 'c74ae6899effca3e640b62a1878e1295', - './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '48b24ba075e4961dc2779f60182040ff', + './modules/Meetings/Meeting.php' => '03fe84bef84dd89541aa813690c73e33', + './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php' => '9db21e72c0b127b6131a5a7bda551953', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.meta.php' => 'e47f5ffe63b5a0fa7d7de49e41602428', './modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php' => '93411ffd890d557e5f97ed68b946f097', - './modules/MailMerge/controller.php' => '3b45740068261fe6bb95816c3a93d25f', + './modules/MailMerge/controller.php' => '9d91debbcc5b216303e1694655725fbc', './modules/MailMerge/modules_array.php' => 'af9991bc9b3ff44c85e1b3f7b58999b0', './modules/MailMerge/language/en_us.lang.php' => 'e6f3d11d7a85b97fdac6bf01bfd24550', - './modules/MailMerge/index.php' => '21076a939d7bf08f11baf16d6d625a9a', + './modules/MailMerge/index.php' => '542fef22e74fefe27f02a3ec1e6cc943', './modules/MailMerge/get_doc.php' => 'd81b9ec544c28fd1f27e8db046ed88c6', './modules/MailMerge/Step5.php' => '794c0f16757773d574f848bbd68ca8e6', './modules/MailMerge/Step5.html' => 'a379d9b1ace4201f2a160b0dda56c612', './modules/MailMerge/Step4.php' => '33ee46a502b8ec88d0768cb2252bca43', './modules/MailMerge/Step4.html' => 'dd4b428cd3af6e6075af67072d762913', - './modules/MailMerge/Step3.php' => 'c6c0a35a3d8a989a07e7fb7988ad7087', + './modules/MailMerge/Step3.php' => '599bc2a9bc9ed6071f1c5859ff0630d8', './modules/MailMerge/Step3.html' => '24d26c3c8eb46ded0f2adad4da479fea', './modules/MailMerge/Step2.php' => '7d957a63e0f49feb8a32b4c1d67293c5', - './modules/MailMerge/Step2.html' => 'a4ee48db6d6fae60ff56e29604559d4b', + './modules/MailMerge/Step2.html' => 'b0e065374b9bb8e72ad2eeaf975c8993', './modules/MailMerge/Step1.php' => 'b2c49cf59094577152ee556a18afb42c', './modules/MailMerge/Step1.html' => '50790106e834569ff6ded9f0c81880f9', './modules/MailMerge/Save.php' => '6d3ccf9c3fc315c2001314975d9718fb', @@ -1994,8 +1994,8 @@ $md5_string = array ( './modules/Leads/Lead.js' => '63dad96eb6c7c57fbb34dda409f790ce', './modules/Leads/views/view.showduplicates.php' => '682592c431d68a302aa9972f391965c2', './modules/Leads/views/view.list.php' => 'a3eec47b6ee23f343f5c9391c7d25786', - './modules/Leads/views/view.convertlead.php' => '7173b3e9ee31a169bdb3f9c0e5c7fcf8', - './modules/Leads/vardefs.php' => '271033c6ace9737e452ceb0ef9274d3d', + './modules/Leads/views/view.convertlead.php' => '33cb0988689622b021403a14a7021278', + './modules/Leads/vardefs.php' => '5078730cb336b02b2f9b74252fafbdea', './modules/Leads/tpls/ShowDuplicates.tpl' => 'cfb4834b147a8657ca83104ba04f3d83', './modules/Leads/tpls/QuickCreate.tpl' => 'f68b199a7a4b23111fa98042b0670859', './modules/Leads/tpls/DetailViewHeader.tpl' => 'ff0301b5f7beef3671e1174a249048ba', @@ -2010,11 +2010,11 @@ $md5_string = array ( './modules/Leads/metadata/studio.php' => '043ccc5842c87b4b842903076b2828ee', './modules/Leads/metadata/searchdefs.php' => '103018fd4a079a5030b9c26138d41e9d', './modules/Leads/metadata/quickcreatedefs.php' => 'df9000c66248ec1fc8e70669c3e3cd18', - './modules/Leads/metadata/popupdefs.php' => '0499b89c35755acabe82847298303c01', + './modules/Leads/metadata/popupdefs.php' => 'bb36afcc47744719714209a10184d547', './modules/Leads/metadata/listviewdefs.php' => '794b346da02f00cb21dcfbf754afb06e', './modules/Leads/metadata/editviewdefs.php' => '806ab34255a93f0c1f879a480567dcfb', './modules/Leads/metadata/detailviewdefs.php' => '926c6ae71170ef9e89ccb82ec19cb3aa', - './modules/Leads/metadata/convertdefs.php' => '2c811998bbb28ee1af289cf99d071792', + './modules/Leads/metadata/convertdefs.php' => '39e039d6cac50434b4672c21abd6d2c0', './modules/Leads/metadata/additionalDetails.php' => '8f933991ab86127ea4bce9ed1218f939', './modules/Leads/metadata/SearchFields.php' => 'ca3bf623903e74e23acd6ae5fb513952', './modules/Leads/language/en_us.lang.php' => 'ded444c64957e585f0792da243da0d20', @@ -2043,7 +2043,7 @@ $md5_string = array ( './modules/LabelEditor/Forms.php' => 'f7df0073958376f96b903e32125b7747', './modules/LabelEditor/EditView.php' => '327786b586c72cad50de7ca19361b2d7', './modules/LabelEditor/EditView.html' => '5c869e234bee20cc12984742cdea69c3', - './modules/InboundEmail/InboundEmail.js' => '529ec88f22944d28f4d31a011ccc0c23', + './modules/InboundEmail/InboundEmail.js' => '7c0bd299459d2db899895795d9ead2ac', './modules/InboundEmail/vardefs.php' => 'f7aa1b4be9efb3918e9565b85f8ee55c', './modules/InboundEmail/language/en_us.lang.php' => '1cd30a0d96140202dabb97b4c417b9ca', './modules/InboundEmail/index.php' => '1aa418a33d81f3df849d7d7234438c2a', @@ -2059,10 +2059,10 @@ $md5_string = array ( './modules/InboundEmail/InboundEmailTest.php' => '702038f3171c1bb612d4fff7cf0f765e', './modules/InboundEmail/InboundEmail.php' => '810afc4512c721301414dfe8f1616619', './modules/InboundEmail/EditView.php' => 'aef594532aa6ab776c4b3cc30b20a04d', - './modules/InboundEmail/EditView.html' => '78960af35be2cefc319fb81c24e1ee7b', + './modules/InboundEmail/EditView.html' => 'c54721fe95d4c246e2071b5ad695bda6', './modules/InboundEmail/EditGroupFolder.php' => 'fcf8cf5c64d7cdd767bbe17a9eab541c', './modules/InboundEmail/DetailView.php' => 'f838087f2c73b83a2deee755475be859', - './modules/InboundEmail/DetailView.html' => '065eb0891ad5444b24a6b9d38740b8eb', + './modules/InboundEmail/DetailView.html' => '2ac5191bfc333ddebc83f769a73c744f', './modules/InboundEmail/Delete.php' => '682ed772ec388482dbe7a599e9e56104', './modules/Import/views/view.extdupcheck.php' => 'ef219a2512d7a56af80c76eec96e20fa', './modules/Import/views/view.dupcheck.php' => '629960872718fe8eea780a9c688448a4', @@ -2126,7 +2126,7 @@ $md5_string = array ( './modules/Home/UnifiedSearchAdvancedForm.tpl' => '30cfeb2412207a2d7f5fbfa58590d75d', './modules/Home/index.php' => '4f2ecb56aad1e2b4b3329f39c15fd43a', './modules/Home/UnifiedSearchAdvanced.tpl' => '4d77c658b82caabfe76d1e9e6aab7249', - './modules/Home/UnifiedSearchAdvanced.php' => 'f2af5fc75c8a1f388dcd4747b63a938b', + './modules/Home/UnifiedSearchAdvanced.php' => '20bea26a232e111e2ce9896a3e09eaf3', './modules/Home/TrainingPortal.tpl' => '3f983fb55d437688e9b44e79989f50a0', './modules/Home/TrainingPortal.php' => '5da63a36ba5d912e0792c9e33c237ee3', './modules/Home/UnifiedSearch.php' => '1ff91a6fed46f97f9eafc1bda78f7579', @@ -2264,14 +2264,14 @@ $md5_string = array ( './modules/Emails/javascript/viewPrintable.js' => '1bdda43134bb2d9af593440981a353d1', './modules/Emails/javascript/vars.js' => 'd50d29d7a0083c3cc915440de136ecbf', './modules/Emails/javascript/init.js' => '00e6d04a2905243df25b58bc861ade03', - './modules/Emails/javascript/grid.js' => '88f612fbc06230fdd1daef3cb173d785', + './modules/Emails/javascript/grid.js' => '8fcd3e1f3b32469c234ec7b729cbf484', './modules/Emails/javascript/email_popup_helper.js' => 'c43121fb00da2c9599a63c21ba0d82c0', './modules/Emails/javascript/displayOneEmailTemplate.js' => '2674507d7e9e7486d73c8706916ff1d0', './modules/Emails/javascript/composeEmailTemplate.js' => '8bc86775e92150c37d102f04956ca93c', './modules/Emails/javascript/complexLayout.js' => 'fbcdb2d153ed8d495d095067ac792a47', - './modules/Emails/javascript/ajax.js' => 'c79464f6d7676ebe7b738945b18784b7', + './modules/Emails/javascript/ajax.js' => '8fb4c46195d795e262649919edab3306', './modules/Emails/javascript/EmailUIShared.js' => 'df6ecb98436f9ca8186106b9a4496dbf', - './modules/Emails/javascript/EmailUICompose.js' => '3ff124311b25da3a4d1e8aa4e1bd04ff', + './modules/Emails/javascript/EmailUICompose.js' => 'c175292f2edb323c71d7dc4de88d082f', './modules/Emails/javascript/EmailUI.js' => 'd75abb223151ed6ca82de6d342464cf0', './modules/Emails/javascript/Email.js' => '2285d4789cac0c1117eb0f41073be242', './modules/Emails/index.php' => '6aff206a9821e1259275602982d900b8', @@ -2314,7 +2314,7 @@ $md5_string = array ( './modules/Emails/Grab.php' => '1a2ae928706722eb9f4c7ffb4d975d88', './modules/Emails/GenerateQuickComposeFrame.php' => '9fa2162d2750f8dbc20a705909c353b3', './modules/Emails/Save.php' => 'f772736031fef9afd1a69254c8c0d36c', - './modules/Emails/EmailUIAjax.php' => '475ef1f7d5168e158911ec69c7018e1e', + './modules/Emails/EmailUIAjax.php' => '63ee82429eb6d587c26ae696dbdc3632', './modules/Emails/EmailUI.php' => '335e2f0c2a1c4a4dae78ddb211d9851a', './modules/Emails/EmailUI.css' => '6f93388627148bdc54c9458c434d7ec1', './modules/Emails/Email.php' => '4c651dc3c28e5efcceb4e9f08f1ec0ba', @@ -2336,21 +2336,21 @@ $md5_string = array ( './modules/EmailTemplates/metadata/SearchFields.php' => '105fa4840d4292ae01d9c5dc398fb5ba', './modules/EmailTemplates/language/en_us.lang.php' => '94b2ea9e22ae647f2197031c62d14c59', './modules/EmailTemplates/field_arrays.php' => '8abd7a27162510ce083f17e3e4d06125', - './modules/EmailTemplates/Save.php' => '9ce3021887d68e2fe0b8a785752c1ec0', + './modules/EmailTemplates/Save.php' => '570b559351060ec6a81e01a35213be28', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.php' => '106659a099ce46c133d59e0c89a5119d', './modules/EmailTemplates/PopupDocumentsCampaignTemplate.html' => '7023305ac7ef62e9291c6b95f4021cd8', './modules/EmailTemplates/Menu.php' => '4edf25b2e9851ed5f2e8e44bb69b6863', './modules/EmailTemplates/EmailTemplateFormBase.php' => '06cce84096440d18bf26bef5a0b2e70f', './modules/EmailTemplates/EmailTemplate.php' => 'a1b2da557cb1680e5386da341ab42cbb', './modules/EmailTemplates/EditViewMain.html' => '332edd656880ad89d177394e9b3d95e4', - './modules/EmailTemplates/EditView.php' => 'a1a9171bad13f5515fc5ed136d65bc99', + './modules/EmailTemplates/EditView.php' => '3808f83dd0fd2852c308900508986ef9', './modules/EmailTemplates/EditView.html' => 'b0840cb4cfb8d45c7710cf4e58a46d8c', './modules/EmailTemplates/DetailView.php' => '9356cf8f8f806ef2df130bb1e165599f', './modules/EmailTemplates/DetailView.html' => '45aae47f2d182de3335e72abe975e7f2', - './modules/EmailTemplates/Delete.php' => 'be4a379f832093ad36ce54cd95553ac1', + './modules/EmailTemplates/Delete.php' => '954d8dbbe3ee5c5dcf65b3da9eba54ab', './modules/EmailTemplates/CheckDeletable.php' => '6ead90762f5f5ffa27c60af51a5c65d6', './modules/EmailTemplates/AttachFiles.php' => '0a97c00a1e4a44a714d8221d7dfb0b33', - './modules/EmailMarketing/vardefs.php' => 'b119830d58b934ccb4db5084729637b8', + './modules/EmailMarketing/vardefs.php' => '7a4e10e21a7771585ab40dd88433f55f', './modules/EmailMarketing/subpanels/default.php' => '1c5afd467c780943c36634673454d471', './modules/EmailMarketing/metadata/subpanels/default.php' => 'c01c31675c042c645179352beaeedbcf', './modules/EmailMarketing/metadata/subpaneldefs.php' => 'a9267a8ed04649970b0263d97e4016ef', @@ -2363,11 +2363,11 @@ $md5_string = array ( './modules/EmailMarketing/Forms.php' => 'dd23e1fab086a5eafba9a43240237671', './modules/EmailMarketing/EmailMarketing.php' => '33b918ed66881f4ec834e0d06f0583b1', './modules/EmailMarketing/EditView.php' => '06559bea7a3f850b2979159f63233d8b', - './modules/EmailMarketing/EditView.html' => 'c00edca87dadfcf1c9105a15b32fe5a8', + './modules/EmailMarketing/EditView.html' => '49cf3e34bfaa1118864b617db1523b87', './modules/EmailMarketing/DetailView.php' => '34354f70fb63917246723f3ca728eeb4', './modules/EmailMarketing/DetailView.html' => 'fa059c2dc675788d4afb9b7b1e61dbfa', './modules/EmailMarketing/Delete.php' => 'c086cb4ea3c7c61a9feb8e9ff7037aab', - './modules/EmailMan/controller.php' => '4108eee5588ca2719a2861f1c7544b1d', + './modules/EmailMan/controller.php' => '5f99d00336cfc4d58da8174010b4336a', './modules/EmailMan/EmailImage.php' => 'a31ccf962c840f3c613fac8cd397cf86', './modules/EmailMan/views/view.list.php' => 'd5de096088dccaf7dae5527489ab5825', './modules/EmailMan/views/view.config.php' => '57b38635350c47bd0fe995348d940c9b', @@ -2398,7 +2398,7 @@ $md5_string = array ( './modules/DynamicFields/templates/Fields/TemplateURL.php' => '3c417e094a019ff3cd85ed3523a76fcc', './modules/DynamicFields/templates/Fields/TemplateTextArea.php' => '247b92051e3e16288c1756a9418a479f', './modules/DynamicFields/templates/Fields/TemplateText.php' => '70f21f05c1a8bf094eb3a96896ca5080', - './modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php' => '4e006e55a10059bc5bc454b05f637dc8', + './modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php' => '7262e772ab396258636c213db4a08e7a', './modules/DynamicFields/templates/Fields/TemplateRadioEnum.php' => 'd44812c4bc298cd070a8ff6917330268', './modules/DynamicFields/templates/Fields/TemplatePhone.php' => '953cc62e58dc78adc010d9c619c65268', './modules/DynamicFields/templates/Fields/TemplateParentType.php' => '8bf57618db8a2da04325714d07947c3f', @@ -2462,7 +2462,7 @@ $md5_string = array ( './modules/DynamicFields/FieldsMetaData.php' => '31881094e9dfef9a0579622e0768d69f', './modules/DynamicFields/FieldViewer.php' => '53f662eab9401fd5a0b9f90c035fb13a', './modules/DynamicFields/FieldCases.php' => '7e9c75d4fcefca29f24033a0e8687f3c', - './modules/DynamicFields/DynamicField.php' => '41d5860693eabaa07e534cda41481527', + './modules/DynamicFields/DynamicField.php' => '825831644c3bb432423047a273cf7812', './modules/Documents/documents.js' => '8b00857d6e7b1f8dd1dbfbe68a6dee47', './modules/Documents/tpls/view.extdoc.tpl' => '9471a4d4ef93987e9b646f79591b2bc6', './modules/Documents/action_view_map.php' => '0994fe5e38b73c985fff200f9edb2129', @@ -2473,7 +2473,7 @@ $md5_string = array ( './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.php' => '35404688fc59eb3737d89ca7432c3e76', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.meta.php' => '0fd71adbdb97e05acfa9e37f517fd47b', './modules/Documents/Dashlets/MyDocumentsDashlet/MyDocumentsDashlet.data.php' => '3842f658a0da2ca0f18564e6f7683bcd', - './modules/Documents/vardefs.php' => '33fa2c9c8bd1f96fff4374b2142bf671', + './modules/Documents/vardefs.php' => '55f64eee231a92c7ff061e6c447122e1', './modules/Documents/metadata/subpanels/default.php' => '094a811736e4674863bd5c832dd5730d', './modules/Documents/metadata/subpanels/ForContractType.php' => '1aa63508fbea18bbf6ccfaad4bb4737a', './modules/Documents/metadata/subpaneldefs.php' => '70dd233ce8f24edeb4b54a39185d5562', @@ -2518,8 +2518,9 @@ $md5_string = array ( './modules/Currencies/Forms.php' => '6d7619156646796d8463bb1e4e5acd01', './modules/Currencies/EditView.tpl' => 'aeca2c12661eb1731846bec46d17c1f4', './modules/Currencies/EditCurrency.php' => 'dfe9ae276fb02bdae956146ee96edca0', - './modules/Currencies/Currency.php' => '8836a6a317a3b4ba4cb0aea00a5998e0', + './modules/Currencies/Currency.php' => 'ed74e8241b08280c7950aa447257fea5', './modules/Contacts/Contact.js' => 'e503be995847cfaa74b80ec64deea115', + './modules/Contacts/views/view.quickcreate.php' => 'c427b1da2e3880b0ed90af832481170e', './modules/Contacts/views/view.list.php' => 'd5a51ad95c221ddaaaaca33c9b3acd1a', './modules/Contacts/views/view.validportalusername.php' => 'b85ab0a2b014d20d69c3c57c415148c4', './modules/Contacts/views/view.retrieveemail.php' => '6f810a4e68ef0c84d31aa433a03929a7', @@ -2528,7 +2529,7 @@ $md5_string = array ( './modules/Contacts/views/view.detail.php' => '48058ccfb21592ee5abe894b77939ab7', './modules/Contacts/views/view.contactaddresspopup.php' => '6b850ba3f32ae2254e441302c844631f', './modules/Contacts/views/view.closecontactaddresspopup.php' => '760a824c3e06fa3df9827896a2b7fa05', - './modules/Contacts/tpls/QuickCreate.tpl' => 'b91ee44b051c0d9c1bf150d35e30480d', + './modules/Contacts/tpls/QuickCreate.tpl' => '4bf7e17173dd168229867f66773e7cfe', './modules/Contacts/metadata/subpanels/default.php' => 'cf6be79e26a72c1c8e98a6329a48e5dd', './modules/Contacts/metadata/subpanels/ForProject.php' => '9c66e6a62d6da1c489a92ddc9b1f9011', './modules/Contacts/metadata/subpanels/ForOpportunities.php' => '453dbb260034aa88051719eaa07a08bc', @@ -2543,7 +2544,7 @@ $md5_string = array ( './modules/Contacts/metadata/searchdefs.php' => 'fac0439eef3deb008e6efd6221518aab', './modules/Contacts/metadata/quickcreatedefs.php' => '205faf881d1fa51bb15a028b2a7fc694', './modules/Contacts/metadata/popupdefsEmail.php' => 'fd11faf66cef32a132271550332b769f', - './modules/Contacts/metadata/popupdefs.php' => '97388c3cd112007ae91627848db652f6', + './modules/Contacts/metadata/popupdefs.php' => '9feb48397be3aefd8bf5a642240e0fa2', './modules/Contacts/metadata/metafiles.php' => 'fc6c9afb233d2b11c5594c9cd90308a1', './modules/Contacts/metadata/listviewdefs.php' => 'ff21ec25012045a06895707c9b7ed97a', './modules/Contacts/metadata/editviewdefs.php' => 'e28d1eb0d5b947573ecef501dae48892', @@ -2553,11 +2554,11 @@ $md5_string = array ( './modules/Contacts/language/en_us.lang.php' => '6886bd48a2e98a29303a1fa8eeddde9f', './modules/Contacts/field_arrays.php' => '15a260aba13a962b3f6135046f11c4e1', './modules/Contacts/controller.php' => '6607e948d272e5809461876a391cc5a1', - './modules/Contacts/vardefs.php' => 'badb564794817b475799f9be172de8c9', + './modules/Contacts/vardefs.php' => '68937dbe02a4e3842986b5274a169896', './modules/Contacts/SugarFeeds/ContactFeed.php' => '1f16df8e3936e78b160a05091d5fdbc4', './modules/Contacts/ShowDuplicates.php' => '0a422ada0fcce693a540039c7c031b91', './modules/Contacts/ShowDuplicates.html' => '5c3bdbdbdb3ad22334e6b1ac7f844db7', - './modules/Contacts/SaveContactOpportunityRelationship.php' => '7912d8db70fe4a0b2ba89f322bfaac3e', + './modules/Contacts/SaveContactOpportunityRelationship.php' => 'ec59ca27f5916ed5370bb33c66701686', './modules/Contacts/Save.php' => '8463ae2addbf510c8e055b0ad11ec8c7', './modules/Contacts/Popup_picker.php' => '907de8d55538b6c3fe7163b05bd4a96b', './modules/Contacts/Menu.php' => 'f36572cacfa49684129a128ccea372d9', @@ -2604,7 +2605,7 @@ $md5_string = array ( './modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl' => '9da2b0c6e34a31193b3ee221baf9b7a3', './modules/Connectors/connectors/sources/ext/rest/insideview/mapping.php' => '0a0fac88d087b82df90c60abc0945819', './modules/Connectors/connectors/sources/ext/rest/insideview/language/en_us.lang.php' => '197f5401eda3284469c56a4daf6d6570', - './modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php' => '9ff45cceb442a4e671478840a2132b46', + './modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php' => '227f8034bb9acf00512b60b1b19ba07e', './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', @@ -2629,11 +2630,11 @@ $md5_string = array ( './modules/Configurator/views/view.sugarpdfsettings.php' => '434f2730db02bb5038428720f0f5b463', './modules/Configurator/views/view.fontmanager.php' => '1aedd49b5e0e5fcafc9f03dfeccae74d', './modules/Configurator/views/view.edit.php' => '7c5c2241b9ce377945e96f610cd065de', - './modules/Configurator/views/view.adminwizard.php' => '4db03992f4072382fbfd02a46dc96ac3', + './modules/Configurator/views/view.adminwizard.php' => '21c2af7b9d62c5547443e314f1fc5254', './modules/Configurator/views/view.addfontview.php' => '32bb28602335b418eafcd8bafb5e6fa9', './modules/Configurator/views/view.addfontresult.php' => '7f8e39efe3f04777e75361269bcffd16', './modules/Configurator/tpls/fontmanager.tpl' => 'a2988f75a331dd643cd1e5ff21333e73', - './modules/Configurator/tpls/adminwizard.tpl' => 'f687426f0adb6cfc3ce4dc6ef4550304', + './modules/Configurator/tpls/adminwizard.tpl' => '521ae6f409811da8d6abcb10ee9a5a2d', './modules/Configurator/tpls/addFontView.tpl' => '6a0d1ccf644b2e67701edfff831710d6', './modules/Configurator/tpls/addFontResult.tpl' => '1e1475a7d057504ba22a4a30b65b6c36', './modules/Configurator/tpls/SugarpdfSettingsFields.tpl' => '80235a1d08cf36c5dfbd79c7de7152e8', @@ -2659,7 +2660,7 @@ $md5_string = array ( './modules/Charts/chartdefs.php' => '02ee313d69bac35fe9ebfe8f55abbbfd', './modules/Charts/PredefinedChart.php' => '3eadf51c0359527dd34fbe043fbadec5', './modules/Charts/Dashlets/PredefinedChartDashletScript.tpl' => '75bef506d61e81857968f68dc4ebc5f8', - './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => '3a3f370e3931f80c617f6d60bcc8f555', + './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php' => '70fa1f5b702199d4934975af07e0cbab', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.meta.php' => 'bf027380490a70f6bd274f85bf63b1ae', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.en_us.lang.php' => '859ada780282d5c3f76f1bba4ed77f0d', './modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.data.php' => '8a386f2e8fd39071ffdeeb99edd7d4db', @@ -2679,7 +2680,7 @@ $md5_string = array ( './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.en_us.lang.php' => '84dd1947d0b39c89f4954187dbf2b567', './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.data.php' => 'f711fbacb546bb81e5b21020bd2b7a5e', './modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeConfigure.tpl' => '0ec1ce0cb710b0ca4e3f8c1993ff5f34', - './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php' => '3ca2c64778a5f5bc997301c995a9c524', + './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php' => 'd63017e637d5616993bf4579cbe3d9f2', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.meta.php' => '58cec830044248857af942da47d02baf', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.en_us.lang.php' => '08b326839de5d8fee0fd32b845baa51f', './modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.data.php' => 'd2215a74cdd0d9988746deaa59a7bdcf', @@ -2717,12 +2718,14 @@ $md5_string = array ( './modules/Campaigns/DetailView.js' => 'd99f7c99ca8a7886d311b9131616513b', './modules/Campaigns/WebToLead.js' => '079c6e0a443138ff2203ca331e4b55e9', './modules/Campaigns/wizard.js' => '62f337f78016b8ca743aa61489863ad9', + './modules/Campaigns/TrackDetailView.tpl' => '2d7a175836690d054c45437db8f14c1e', + './modules/Campaigns/RoiDetailView.tpl' => '364e8e4bedd22b4a9e947fa451dcd489', './modules/Campaigns/views/view.newsletterlist.php' => '6f52d2669b3d7afb03d6066d14d7631a', './modules/Campaigns/views/view.modulelistmenu.php' => 'dccedba97068890e5009bde081278cd7', './modules/Campaigns/views/view.detail.php' => '4e6a3865fae8f5a0a85b0387548b7d34', './modules/Campaigns/views/view.classic.php' => '0d3eac4f8c4861e67698368ccd62ecea', - './modules/Campaigns/vardefs.php' => '053a1bf0ebd864ddbd5fd0e357390483', - './modules/Campaigns/utils.php' => 'f9be908a84e38ad2ded378c70703203d', + './modules/Campaigns/vardefs.php' => '057bfdeefb37e7eedef8cb6c5656182c', + './modules/Campaigns/tpls/campaign-inactive.tpl' => '660c7ab053441e4d7e1865f056465ec2', './modules/Campaigns/tpls/WizardNewsletter.tpl' => '06aad89520fdba82346116ee0a08e2c1', './modules/Campaigns/tpls/WizardHomeStart.tpl' => '1c2adf197e5b7fe29c1bd8bf83c08dbd', './modules/Campaigns/tpls/WizardCampaignTracker.tpl' => '9511839c6878e5040d1cfc9fd673f58f', @@ -2742,18 +2745,18 @@ $md5_string = array ( './modules/Campaigns/metadata/additionalDetails.php' => '69fe2420d8d41833006e256d4381bc08', './modules/Campaigns/metadata/SearchFields.php' => '37b4e9ef20d3808674a9f3c327363e80', './modules/Campaigns/language/en_us.lang.php' => '4e02fba8509ec0a8c32668f50a03a7fc', - './modules/Campaigns/image.php' => '9c6fef2968f6c2fdcef39d1c1b186a06', + './modules/Campaigns/utils.php' => 'f9be908a84e38ad2ded378c70703203d', './modules/Campaigns/field_arrays.php' => 'ba76f4af9f199301612910fd052284d1', './modules/Campaigns/controller.php' => '0d48f789813067a604ed3a44ae6227b7', './modules/Campaigns/chart.tpl' => '0b05f75e6db080065bcfcce9c39a6e3a', './modules/Campaigns/action_file_map.php' => 'da2561f213e8ea3a051a1495e640f505', + './modules/Campaigns/image.php' => '9c6fef2968f6c2fdcef39d1c1b186a06', './modules/Campaigns/WizardNewsletterSave.php' => '49d229cce8b2adf5f17109f1bcd4b5c3', './modules/Campaigns/WizardNewsletter.php' => '7172baf5a9576b039c08326b8f2effcc', './modules/Campaigns/WizardNewsletter.html' => '331007323fbfc5fce2a73b13eb808d69', './modules/Campaigns/WizardMarketingSave.php' => 'c122b586cb62994b94470fca94ea7e15', './modules/Campaigns/WizardMarketing.php' => '98f5e34fa2d8e532b9cb397b70a99222', './modules/Campaigns/WizardMarketing.html' => '618c04bb831a5c7565117d0ad98fc1c6', - './modules/Campaigns/WizardHome.php' => 'f6a248936311ff214df565d16325907a', './modules/Campaigns/WizardHome.html' => '498f6846c3e963ec60ca0fd9cd7b496b', './modules/Campaigns/WizardEmailSetupSave.php' => 'e58eb32256b562aa5d9a4dda9173cb6c', './modules/Campaigns/WizardEmailSetup.php' => 'a599a67497a6d6b00b96a2880645d149', @@ -2765,16 +2768,16 @@ $md5_string = array ( './modules/Campaigns/WebToLeadCreation.html' => 'f5d9323c9ce1146582e08b8f245affba', './modules/Campaigns/WebToLeadCapture.php' => 'cd02293c21e746cfae1e3b61344550c9', './modules/Campaigns/Tracker.php' => '726e6fc5b58f58cd4b330b61a12d7d21', - './modules/Campaigns/TrackDetailView.tpl' => '2d7a175836690d054c45437db8f14c1e', + './modules/Campaigns/ProspectLink.php' => 'a5de7ebb156d378d6d0b16390f9d19b9', + './modules/Campaigns/WizardHome.php' => 'f6a248936311ff214df565d16325907a', './modules/Campaigns/TrackDetailView.php' => '23121ae42bde87dac892987558606c1e', './modules/Campaigns/Subscriptions.tpl' => 'e26bf231e81bd1835af05b1e3d54b0ea', - './modules/Campaigns/RoiDetailView.tpl' => '364e8e4bedd22b4a9e947fa451dcd489', './modules/Campaigns/Subscriptions.html' => 'a597b43f0772858ca5ea18c6f19a9ea9', './modules/Campaigns/SubPanelViewer.php' => '4c34b75d7cb01766e9845653d41860d7', './modules/Campaigns/SearchForm_NewsLetter.html' => '8ad7f22ed622f85c674c72f47145cacb', './modules/Campaigns/Subscriptions.php' => 'dfb48508303fc1f68bff1a9c83b06a96', - './modules/Campaigns/Schedule.php' => '7a99bbcba282ca73314848daec30c653', - './modules/Campaigns/Schedule.html' => '915b5758057b0e585f19c8d587093673', + './modules/Campaigns/Schedule.php' => '7e428536e4db802f192b8c1e23b65d6a', + './modules/Campaigns/Schedule.html' => '65f155d56ed7d74db179c0995a5840c4', './modules/Campaigns/Save.php' => '1d2216c2c0ef070d32ed5b068325812a', './modules/Campaigns/RoiDetailView.php' => '628c60aa38e3ba278647e2f678b10ad6', './modules/Campaigns/RemoveMe.php' => 'e4791a0df39d1ad2f6ed7d869f74ada7', @@ -2787,7 +2790,7 @@ $md5_string = array ( './modules/Campaigns/Menu.php' => '83af5f3dc4b71a10fd25f11f6dc907c4', './modules/Campaigns/MailMerge.php' => 'b635266e87c4a14f7930e1e988a7e7d0', './modules/Campaigns/GenerateWebToLeadForm.php' => '0644ab1c6739bff48e9e16be6e1e59d0', - './modules/Campaigns/EmailQueue.php' => '1635f40ea97a9cb22f922d6ee0d94652', + './modules/Campaigns/EmailQueue.php' => 'dcb74a2af79fe5087aa9f865a6cea5b2', './modules/Campaigns/Delete.php' => 'c8c0c0b469d8474bb26432ac43ea41c3', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashletConfigure.tpl' => '612ad35fc9906cb2bda949756465b375', './modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl' => '13a08ec95b2d73ce11be435458a75962', @@ -2818,9 +2821,9 @@ $md5_string = array ( './modules/CampaignLog/Popup_picker.php' => '5cfbc593eb62651c9b5fddbb2e365093', './modules/CampaignLog/Popup_picker.html' => '3eb4ded5ac6dd3468075cbd0c89340de', './modules/CampaignLog/Menu.php' => '9a144af6bd83a06aee1415594bd13e35', - './modules/CampaignLog/CampaignLog.php' => 'add555ceb86d529ff211b970876309ce', + './modules/CampaignLog/CampaignLog.php' => '652d94a54244ea9e7cc1e0b2973bd38c', './modules/Calls/views/view.edit.php' => '98773bd63784a336938d8c74b5be8e17', - './modules/Calls/vardefs.php' => 'c77d65af1739cfc6c55ea78c8974dbde', + './modules/Calls/vardefs.php' => 'd18ac4227f5084b3fde7ca7ecc763556', './modules/Calls/tpls/footer.tpl' => 'b669a0602114f8ad2f4d1c0553691051', './modules/Calls/tpls/QuickCreate.tpl' => '6e1a1154e51a910f704010de15cd2173', './modules/Calls/metadata/subpanels/default.php' => '446247ed1b8a39cbfaf65b2b97c61a4e', @@ -2841,41 +2844,42 @@ $md5_string = array ( './modules/Calls/SubPanelViewInvitees.html' => '4aa44ffe3919c55fcb61e17f6b2fb757', './modules/Calls/Save.php' => 'be147699eb6834e0db87fc2e910c1d3a', './modules/Calls/Menu.php' => '4739c2d258953f89a8b84b7f7261c4e2', - './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => 'c59136f20ec2afbd10cde1e00465c5e2', + './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php' => 'f36e16cbb59319ffad25c1b16de3b03c', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.meta.php' => 'e34d7b77796de05737356c6945580966', './modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.data.php' => '577c8b018b6249972abd8ce81061c6af', './modules/Calls/CallsQuickCreate.php' => '1a526db285df01bcdda25ef861e25323', './modules/Calls/CallHelper.php' => '821c104aef4b2d64666fa94bb7cf7d88', './modules/Calls/CallFormBase.php' => 'fadd515607bf5964fe2b6d42e4def0f1', - './modules/Calls/Call.php' => 'eff8776902d9135a03ee8c0b26214659', - './modules/Calendar/Cal.js' => 'a50c420e18a505d8d82cf3dec2cff0ed', - './modules/Calendar/views/view.savesettings.php' => '00bc927a33766c41ae490c339f743fc9', - './modules/Calendar/views/view.ajaxsave.php' => '3ca40b2bab72635d54be31320d2a47ea', - './modules/Calendar/views/view.ajaxreschedule.php' => '43d56d666c16459228057273c2866c58', - './modules/Calendar/views/view.ajaxremove.php' => '9b9d95069b0538e9e44394bd216b1996', - './modules/Calendar/views/view.ajaxloadform.php' => 'a603f610d81d8f2306c067a6842117bc', - './modules/Calendar/views/view.ajaxgetgrusers.php' => 'f70298e957a4ba6719fed218247e303c', - './modules/Calendar/views/view.ajaxgetgr.php' => 'b55c16928789ca8a3bc6be9a9df7bf0a', - './modules/Calendar/tpls/settings.tpl' => '32ec4c45286b4865858d6d6b18d221ba', - './modules/Calendar/tpls/main.tpl' => '3a0f4ac3a8ac477366e960cdfb68ea15', - './modules/Calendar/tpls/header.tpl' => 'e780f30e5ae717994012d873d747787b', - './modules/Calendar/tpls/footer.tpl' => '87f357b689216910e39a81dfb25d198e', - './modules/Calendar/tpls/empty.tpl' => 'd41d8cd98f00b204e9800998ecf8427e', - './modules/Calendar/tpls/details.tpl' => 'a39d782f0f7e65bb60f3ca2d29fac11b', - './modules/Calendar/action_view_map.php' => 'ec00d19649ebf7b198fd2cd58049466b', - './modules/Calendar/language/en_us.lang.php' => '5b3300f855f27ea24e53c61c9f42c895', - './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl' => 'a7efd825258bdb55c6e677b1a5760083', - './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php' => 'cf234b4b2c0cbbffe973f7c105d33a63', + './modules/Calls/Call.php' => 'd2fdff231763a984c03523bbbc87a8ef', + './modules/Calendar/Cal.js' => '4f31ca597d43dd346c56fda89f99b611', + './modules/Calendar/views/view.savesettings.php' => 'da73c38bf9afe16d367f56219ddeccbe', + './modules/Calendar/views/view.saveactivity.php' => '9f6d266b355ada05508cf182f942a068', + './modules/Calendar/views/view.reschedule.php' => '164ef392d77b47cdfd8cb500a6570f42', + './modules/Calendar/views/view.remove.php' => 'bb85c40f56118ab335caabf477b214ff', + './modules/Calendar/views/view.quickedit.php' => '8eaf9923fb91b9697180fe48de7450b0', + './modules/Calendar/views/view.getgrusers.php' => 'd79056186208b2f42f2c08a3761e7d8a', + './modules/Calendar/views/view.getgr.php' => '7d77e39c28a234d5348263ca56f002bd', + './modules/Calendar/tpls/shared_users.tpl' => '6bd3d965882953eea30e01543c9d36b3', + './modules/Calendar/tpls/settings.tpl' => '8001013c7ea0cf896f3098e2fc33a564', + './modules/Calendar/tpls/main.tpl' => '04b93ae96323d39209216393828c893e', + './modules/Calendar/tpls/header.tpl' => 'd553c3f20bd1f9af948aed55142c434d', + './modules/Calendar/tpls/form.tpl' => '75e554447a3f46a1d4c23f9d81480a2e', + './modules/Calendar/tpls/footer.tpl' => 'a04e941fe174fbd7deb92980bd996d6e', + './modules/Calendar/tpls/empty.tpl' => '09ef0a2c4e21c2beb8d113cb82e708dc', + './modules/Calendar/action_view_map.php' => '969e030c32cc29ffaa648a1487cdbb43', + './modules/Calendar/language/en_us.lang.php' => '6c96dcf214647b1f282c4ff830d4118a', + './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl' => '610292b8591fd8ad9cb5e83dc8f83b44', + './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php' => 'c95dbaf9c698d8a7531ac027c0156521', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.meta.php' => '08377a825bcf97addca0875bb1f5521d', './modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.en_us.lang.php' => 'ce06f9f030865f497139b155595a879a', - './modules/Calendar/CalendarUtils.php' => '1b036c220a33676e9d2d565c34ec4b5f', - './modules/Calendar/CalendarGrid.php' => '8c7a80db1a559b5f615d2d61f77ddd0a', - './modules/Calendar/CalendarDisplay.php' => '703de7580efbb0ee4d52809639b5f666', + './modules/Calendar/CalendarUtils.php' => '68df3091e4d3ed617fa39eb8ea10eb4b', + './modules/Calendar/CalendarGrid.php' => 'bb66b0ca377f5c3e55d5edac5219428b', + './modules/Calendar/CalendarDisplay.php' => 'cecb17670ab12fd6bf8271d4436ef03b', './modules/Calendar/CalendarActivity.php' => 'e82fda9439d5d3515ad6c11a4bc0944c', - './modules/Calendar/Cal.css' => 'cdd39266bb1e27941089f51088ea3ffa', - './modules/Calendar/index.php' => 'fd4be8a5fdd5b6a818176e8f66d9d984', + './modules/Calendar/Cal.css' => '9bf206c8318ad33ea96d4c190c5cb2cb', + './modules/Calendar/index.php' => '63605e9cea750df3b02fe0479478939b', './modules/Calendar/Menu.php' => '608adabd8df52c05aee3ac21768ef9e0', - './modules/Calendar/Calendar.php' => '90c7edd80ce75ba5e281617a611e0efa', + './modules/Calendar/Calendar.php' => '9962e619ff1312d4b6c773a4d4710954', './modules/Bugs/views/view.edit.php' => 'f3758cc5fb82c65a163b9dfcb10e7b6b', './modules/Bugs/views/view.detail.php' => 'effc34a9f7844b8339a5b4efa9c3cbfe', './modules/Bugs/vardefs.php' => '38940b2b78c0db9cf131740295315f1b', @@ -2906,7 +2910,7 @@ $md5_string = array ( './modules/Audit/language/en_us.lang.php' => 'c69c8b436958462131186c8aec6119b8', './modules/Audit/field_assoc.php' => 'ba4f04ecaab0283e88000b85ee0b71d0', './modules/Audit/Popup_picker.php' => '7e45167547d83cabe6c0a81d26f8f78b', - './modules/Audit/Popup_picker.html' => '932c746ecc0b9ba81de064b516630d0b', + './modules/Audit/Popup_picker.html' => '14712442d3fd49e729e7f6d490101df6', './modules/Audit/Audit.php' => '8845540806673a78e6026f6e681dad15', './modules/Administration/views/view.languages.php' => '4ffc0f3631a98f9660f11d819af6c6ca', './modules/Administration/views/view.globalsearchsettings.php' => 'c1470c8880921604de9aaea35b7f6324', @@ -2922,7 +2926,7 @@ $md5_string = array ( './modules/Administration/templates/RebuildSprites.tpl' => 'ab831e181f06a83738f21e9fa195d4c2', './modules/Administration/templates/Languages.tpl' => '5ce55a567f9d973a92c3cf78de4448b1', './modules/Administration/templates/GlobalSearchSettings.tpl' => 'a3257fb664878c2fb032b9b65bcf98e4', - './modules/Administration/templates/ConfigureAjaxUI.tpl' => '92e9d52c8becb9acea3ad80d077b3757', + './modules/Administration/templates/ConfigureAjaxUI.tpl' => '93462640aa30cf61ad93467a4ce7373a', './modules/Administration/templates/themeSettings.tpl' => '56d940a49c65279008fcea6bac56c804', './modules/Administration/templates/ShortcutBar.tpl' => '145563f46d1e562e9b73fc3bac4ae0a5', './modules/Administration/templates/RepairXSS.tpl' => '1b1e3329a7ae1a2d7fd3661ad12ebc44', @@ -2933,7 +2937,7 @@ $md5_string = array ( './modules/Administration/ncc_config.php' => '6fcf1f7bd93acbf9b0c7b3a890bdab9d', './modules/Administration/metadata/adminpaneldefs.php' => 'f594a8cc6d424f6f0ccd665bd3fdb770', './modules/Administration/metadata/SearchFields.php' => '6968a40d78da694e44829ec8d00645e8', - './modules/Administration/language/en_us.lang.php' => '1eb7ff1d47b4e401a197dfe3010a5f3c', + './modules/Administration/language/en_us.lang.php' => 'd0c6badb023c84299702c1a0788b087f', './modules/Administration/javascript/Administration.js' => '5c983c8146d2f8e537f0f826d0239834', './modules/Administration/javascript/Async.js' => '6201560d3cc38a32a3300606bce92541', './modules/Administration/index.html' => '2cc05387b7f392ee9891f97ff24e8f66', @@ -2986,14 +2990,14 @@ $md5_string = array ( './modules/Administration/Forms.php' => 'fb76fa135d6210b0e25abf6b2f10376d', './modules/Administration/Upgrade.php' => 'fba0d08d721f8268556d2d15aad7bd92', './modules/Administration/Updater.php' => '6245521e1b0c45638d1fd5cfc3fea19b', - './modules/Administration/Locale.tpl' => '7ec56ae1fca00f2e946ac3cc80adf810', + './modules/Administration/Locale.tpl' => 'd6119afc0722ae325c43a864a2c5cad6', './modules/Administration/ExportCustomFieldStructure.php' => '6f55e973d20ab72b29f0fc74d793ad5b', './modules/Administration/DisplayWarnings.php' => 'aea846eb456dedb029e4f401dabfd22c', './modules/Administration/DiagnosticRun.php' => '81a9f594907f200e23953b0bf8d5ae1e', './modules/Administration/DiagnosticDownload.php' => '068a6e862bb30bcce6006a02ac16ee14', './modules/Administration/DiagnosticDelete.php' => 'b289ca50408d146c38d84a79cc7be646', './modules/Administration/Updater.html' => '3a6361b0cc8e54dbd4065248491eb64c', - './modules/Administration/Locale.php' => '1635d7e207a950bb6f5c26f2aad6cfb0', + './modules/Administration/Locale.php' => '4ea1a817316711f7704122b77111e112', './modules/Administration/Development.php' => '9d992ac01f6c663aa364fcb816895d3f', './modules/Administration/CustomizeFields.php' => '08b3cfeda62213fc620b74c9df42f978', './modules/Administration/Diagnostic.php' => 'f09d7d8f6580fb8d2edbfab9e154c5cf', @@ -3010,14 +3014,14 @@ $md5_string = array ( './modules/Activities/SetAcceptStatus.php' => '42fcffc8717e7b1cb10001b137400d9e', './modules/Activities/OpenListView.php' => 'b343a23248339ae5f48281c53aec955b', './modules/Activities/SubPanelView.php' => '941c925b6ef1b24b262e83b9a8229e57', - './modules/Activities/Popup_picker.php' => '7da1701eb2a31f81bdd7b1a59e3e5bd8', + './modules/Activities/Popup_picker.php' => 'c889fc278e1abacd48ecf2766ad361c7', './modules/Activities/Popup_picker.html' => '82fca068e687dbca227b0b4c8fc69b76', './modules/Activities/Menu.php' => '50ace4d08c7af062a3da92e52e6ebffc', './modules/Activities/Forms.php' => 'd7472639650199c74c40ba981f008c2c', './modules/Accounts/Account.js' => '8a37b6ec182cc03449e40766e763214e', './modules/Accounts/views/view.list.php' => '4feca8fc6bb33f26c90360a36aa0e45f', './modules/Accounts/views/view.detail.php' => 'c0f85e4740f064ad71daa8afabc7466f', - './modules/Accounts/vardefs.php' => '369286f1a75e7b5e8c3c6afd9e150416', + './modules/Accounts/vardefs.php' => '4570faaa6b5a650936f6069002818d97', './modules/Accounts/tpls/QuickCreate.tpl' => '994fcab80f63cc0f59f111fc30bf0430', './modules/Accounts/metadata/subpanels/default.php' => '066e3a2fb842892fbcae8009ce9576c4', './modules/Accounts/metadata/subpanels/ForProspectLists.php' => 'b6d33485aa7f8fa00f22677ff2d1f001', @@ -3026,7 +3030,7 @@ $md5_string = array ( './modules/Accounts/metadata/studio.php' => 'd1d79777052d975c08429b48fe02e235', './modules/Accounts/metadata/searchdefs.php' => '0f888761dac4782e8c6368377911b2ef', './modules/Accounts/metadata/quickcreatedefs.php' => '9b4038cd84095adb5001c92f9b6da280', - './modules/Accounts/metadata/popupdefs.php' => '5ad4dabf79de44c487912e86d0cdc725', + './modules/Accounts/metadata/popupdefs.php' => 'ad73db516f70134d84ec6b8b3cf0a985', './modules/Accounts/metadata/metafiles.php' => '8dd6ed25600c6e6af602eb32a21dba3b', './modules/Accounts/metadata/listviewdefs.php' => '16e04f3b0f564bb178b8804ac289c065', './modules/Accounts/metadata/fieldGroups.php' => '2a94c4a8f697121796f53413911131f6', @@ -3047,7 +3051,7 @@ $md5_string = array ( './modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php' => 'd881be66482e5c2f470849ae228eddf4', './modules/Accounts/AccountsQuickCreate.php' => 'fbb9c86de48897e1e95aae6201f52941', './modules/Accounts/AccountFormBase.php' => '2170ad3c175746084bbb0dd9bfe75c69', - './modules/Accounts/Account.php' => '685f3b6d7de771f7966ff99b40687d67', + './modules/Accounts/Account.php' => 'fce59e4b2ae90d1bceedc038d936eea4', './modules/ACLRoles/ACLRoles.js' => '2b2b8c4517f3d6a27b71f22d8b37b285', './modules/ACLRoles/views/view.list.php' => 'e40ad40a14a03cf692dd279b9616329a', './modules/ACLRoles/vardefs.php' => 'f500232770683374295c4d6d721dd54c', @@ -3071,7 +3075,7 @@ $md5_string = array ( './modules/ACLRoles/EditView.php' => 'cb84572b6182e7f2f696d9faf9cb128d', './modules/ACLRoles/EditRole.tpl' => '5a5395e65f062f8497ab1e6ad3059d17', './modules/ACLRoles/EditRole.php' => '9973b810c5a89f4a37e8289fe80c0c2e', - './modules/ACLRoles/EditAllBody.tpl' => 'ee9bc089e39f7cea26ca77ac1a0c6831', + './modules/ACLRoles/EditAllBody.tpl' => 'dc0a4a6eb1878a89dc7d08f67b69cab1', './modules/ACLRoles/DetailViewUser.tpl' => 'd339f129cd6b7512d3a404d35211494d', './modules/ACLRoles/DetailViewBody.tpl' => 'a1dc057d0ac81f87ada4acf9dd1cbe55', './modules/ACLRoles/DetailView.tpl' => '975040e818f0231e25707a8473776af8', @@ -3170,7 +3174,7 @@ $md5_string = array ( './jssource/src_files/include/SugarCharts/Jit/js/mySugarCharts.js' => 'bb8a2f5badbe46e22e07933cc66c2fff', './jssource/src_files/include/SugarCharts/Jit/js/sugarCharts.js' => '72eba4ec918665ffa582c6fec16d2c78', './jssource/src_files/include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '82905de42674faa12e819f99d3db0610', - './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => '682748a182800b0a140b6b8f4459a59b', + './jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js' => 'eae15f8cb6ce16f176195e7cb3ba69fe', './jssource/src_files/include/SugarFields/Fields/Address/SugarFieldAddress.js' => '05610c1f440fc0dd6de61b3ae1154aaf', './jssource/src_files/include/SugarFields/Fields/Collection/SugarFieldCollection.js' => 'd0c3a690789d94d4b5d88bf99abdd3d0', './jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js' => '7f93acedc02d390800eaad0e5fc22cae', @@ -3179,7 +3183,7 @@ $md5_string = array ( './jssource/src_files/include/javascript/cookie.js' => '4edb43519c5ac8c3d9b1b73b9ddf87fb', './jssource/src_files/include/javascript/dashlets.js' => 'c85774c7bcc3568d50e71448dbb371af', './jssource/src_files/include/javascript/include.js' => '569fbc452038128da8111871d9094ed5', - './jssource/src_files/include/javascript/jsclass_async.js' => 'dd3ba6d06505444eb492fff48cdb69b6', + './jssource/src_files/include/javascript/jsclass_async.js' => '8e8694a9e136c6736ac3fe87d9ace2b1', './jssource/src_files/include/javascript/jsclass_base.js' => 'ef96b7ba20a601f2fed2ff94f1cb0eb0', './jssource/src_files/include/javascript/menu.js' => 'a12b42e2406a9b192609258884536efd', './jssource/src_files/include/javascript/overlibmws.js' => 'baaf046aa93f29e370d17b31e0d66e16', @@ -3189,7 +3193,7 @@ $md5_string = array ( './jssource/src_files/include/javascript/quickCompose.js' => '495728436c153d7159e370bc941b3230', './jssource/src_files/include/javascript/quicksearch.js' => 'b95bea8ff6622dc39b84dad7acc25d18', './jssource/src_files/include/javascript/report_additionals.js' => '0bab333c77bdd83804f352923ade4b0c', - './jssource/src_files/include/javascript/sugar_3.js' => '70e12eb3b9411ffaf24e6d5d292e1bb0', + './jssource/src_files/include/javascript/sugar_3.js' => 'd78e0b9cb34b311d6330be670af677dc', './jssource/src_files/include/javascript/sugar_connection_event_listener.js' => '60c2a539c4e42bbd9c9e8fa5ca3dfd72', './jssource/src_files/include/javascript/sugarwidgets/SugarYUILoader.js' => '9237f12850b7ce5c27669480f71152be', './jssource/src_files/include/javascript/sugarwidgets/SugarYUIWidgets.js' => '5cb3faa95abcca01241a06c46cc609e0', @@ -3955,8 +3959,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/ajaxUI.js' => '4e36b8b6f4a067d47bd7ac66ce5835e5', - './jssource/src_files/include/javascript/calendar.js' => 'b48b79bdda0c0bc17282cbc5b1556d63', + './jssource/src_files/include/javascript/ajaxUI.js' => 'e2b405f16744b9d07033d27575d3e90f', + './jssource/src_files/include/javascript/calendar.js' => '1cbf48fc7507d66b7a2148c3d6552949', './jssource/src_files/include/javascript/importWizard.js' => '05257b661518070bd79a40999cbf3e2b', './jssource/src_files/include/javascript/iscroll.js' => 'b6c232e3c54b2a1320b22c7ad920c842', './jssource/src_files/include/javascript/phpjs/get_html_translation_table.js' => '9667941dd790119d552f99b6d6b73fdf', @@ -3985,7 +3989,7 @@ $md5_string = array ( './jssource/src_files/modules/Accounts/Account.js' => '308daee2babb408bd0d4b818751fb23c', './jssource/src_files/modules/Administration/javascript/Administration.js' => '32125a210f0e4d4e2e3e5107a84c4f50', './jssource/src_files/modules/Administration/javascript/Async.js' => '80e1e8c3e125c766da2a307079353f8e', - './jssource/src_files/modules/Calendar/Cal.js' => 'cac59fca928f1cd0bb0267997abbd280', + './jssource/src_files/modules/Calendar/Cal.js' => '429a7d699d1e65e772ae7176f178899f', './jssource/src_files/modules/Campaigns/DetailView.js' => 'c40d345f5f7fd992f12e418d07ec9fe3', './jssource/src_files/modules/Campaigns/WebToLead.js' => '684a5a3db8bf3d60f1135a971f6c5989', './jssource/src_files/modules/Campaigns/wizard.js' => 'e6d189c923944e10fa3049be5696b6e9', @@ -3995,7 +3999,7 @@ $md5_string = array ( './jssource/src_files/modules/Documents/documents.js' => '5110ec40afe540ecd0bd44dfe41176e8', './jssource/src_files/modules/EmailTemplates/EmailTemplate.js' => 'b7a20a46340cb552cb0600dc4bc37f23', './jssource/src_files/modules/Home/about.js' => '3c3184898479de9affd42a03e8db87a3', - './jssource/src_files/modules/InboundEmail/InboundEmail.js' => '3853f33e9a0a903d50e2c110be0c9f25', + './jssource/src_files/modules/InboundEmail/InboundEmail.js' => '194b89bb42afc715d18e1a6db0395e41', './jssource/src_files/modules/Leads/Lead.js' => 'd2051b0acd9fe3629453e0435e2e1610', './jssource/src_files/modules/Meetings/jsclass_scheduler.js' => 'cc8b013a4d3c4976174cf9f3d5686205', './jssource/src_files/modules/MergeRecords/Merge.js' => '72d3c3cb81d09251b26f7af7f360f7d8', @@ -4039,8 +4043,8 @@ $md5_string = array ( './install/siteConfig_a.php' => '038ece7aead275bbb7c6be4bc4499827', './install/licensePrint.php' => 'f2414db0cf2aaa12f8f4dffb6ef6e270', './install/license.php' => '25e0cc3c3892e61f46ce402b935d9e92', - './install/language/en_us.lang.php' => '9a92f41807a293996dd05391b48a0350', - './install/performSetup.php' => 'f0f6ec2b6f1f901f5a7056bd2b558ee0', + './install/language/en_us.lang.php' => '58cb0bacaa7d720b7dfd4544c5fb3302', + './install/performSetup.php' => 'd2d13781f24f0a8eaf39cac213ccc624', './install/install_defaults.php' => '3c67b082c1709e909dd1aaf051e9c589', './install/installType.php' => '7fa80e931c1501f671eaf41379301e0d', './install/installSystemCheck.php' => 'a776f4095d972a93a7f070658d72b895', @@ -4049,12 +4053,12 @@ $md5_string = array ( './install/install.css' => '862e23df1815d0138cf0a367d92a372d', './install/download_patches.php' => '797838d7fc0d75a2580687bef60a4f0d', './install/download_modules.php' => '60281f513e37e3814379b4d109ed5eaa', - './install/install_utils.php' => 'a93f678bc6cdfe4155fb06a39d580d48', + './install/install_utils.php' => '60a1bbafe07e17995abbf3547ba376e5', './install/populateSeedData.php' => '4371d676db68cbd1c9d7e5d9099495af', './install/demoData.en_us.php' => 'ab6d0dc87a9f421e843ac454aec4546a', './install/dbConfig_a.php' => 'f19184bda40a0f2312df91b48fbb31a3', './install/data/disc_client.php' => 'e4574285e612f49e6a5b002e3bf0b6c9', - './install/confirmSettings.php' => '28ba8c19bec4cdad30de5639c8cb6ea7', + './install/confirmSettings.php' => '53b9868c785f78e9f49f182f0ddd8fa4', './install/checkDBSettings.php' => '1eca897e26c009a59c938ef11595c847', './install/UserDemoData.php' => '3c56bf6c7528715564367fd9095e49fc', './install/UploadLangFileCheck.php' => '011b7ae7a9711e6eb231155e24c66e63', @@ -4152,15 +4156,15 @@ $md5_string = array ( './include/utils/layout_utils.php' => '81a62e2fa4755eed19410cf1e9064d18', './include/utils/file_utils.php' => 'ce4f3d416d215fa703a9fb8df5ccd216', './include/utils/external_cache.php' => '4138cf307fea4ca68817b4c80250cab0', - './include/utils/mvc_utils.php' => 'b42decc5515586c046294d0b24f2eddb', + './include/utils/mvc_utils.php' => '35b2cec427ce5ef4dfaec647f9959584', './include/utils/encryption_utils.php' => '7f7fbcc1b86e37f7d54a266d75f859da', - './include/utils/db_utils.php' => '2e3ab55fb28067c5839fcedb1a40544e', + './include/utils/db_utils.php' => '8c4e2a9392e00954a1c69ec6cb08edaf', './include/utils/autoloader.php' => '684b00fa5ca181b4f5635334099d24c0', './include/utils/array_utils.php' => '4a63065e0ab62bfc33b9429f886ed7ec', './include/utils/activity_utils.php' => '5079e9d4663b9f7e6df50001685bd875', './include/utils/LogicHook.php' => 'd08b32b0727e67338f1292b7de65c45e', - './include/utils.php' => '4e19aba8677e21aa722f725b7ec1ebd4', - './include/upload_file.php' => '8feb21b78d39e79957d62d30820781cd', + './include/utils.php' => 'fbf8b25fc019b6b8e1653a87256069bb', + './include/upload_file.php' => 'ae60d0d96a5cbe87ab3d11e2f7f6d77d', './include/timezone/timezones.php' => '68c833b6b839c9e4d80a3bb21740d6e5', './include/templates/TemplateGroupChooser.php' => 'e5b33d391bc87e5d41f88d3c2fdf0897', './include/templates/TemplateDragDropChooser.php' => '22faf0c2f321c144a12ac3d25336b911', @@ -4254,7 +4258,7 @@ $md5_string = array ( './include/nusoap/class.soap_fault.php' => 'bf058747b0ecefe183194300dbd73dff', './include/nusoap/class.nusoap_base.php' => 'cf8310e722c8fc7e310dc5ba413b1ea6', './include/nusoap/changelog' => 'd75ed67ec93c02e5bce94eee8205b425', - './include/modules.php' => '0d133a932a37f3fe258ff36f68f8dcec', + './include/modules.php' => 'b037a71e3eefed983990b373be322360', './include/language/jsLanguage.php' => 'e5d77d52c812648dc2be7791531be294', './include/language/en_us.notify_template.html' => '4e90b0343ac29bf12687dddb15afea7d', './include/language/en_us.lang.php' => '4e58fc9d4006c329b9f1b9b98759df65', @@ -4262,7 +4266,7 @@ $md5_string = array ( './include/javascript/cookie.js' => '4f95a2872a549573149d035633086662', './include/javascript/dashlets.js' => '208d5f32d367390faadda8e899f99b77', './include/javascript/include.js' => '278e187b101eb3a5871f3bce021cdb62', - './include/javascript/jsclass_async.js' => '37b4f19a863d8e3fca9b4861555bf6fb', + './include/javascript/jsclass_async.js' => '15b2b4ecf1010a43608634cfbd6d17a2', './include/javascript/jsclass_base.js' => 'a13cae0c604a511e4cf2e9eb6150e029', './include/javascript/menu.js' => 'bab1eb80c6cf5cb048efc10e9eec8aaf', './include/javascript/overlibmws.js' => '66a898aad7f5de44cae6d97016ae91dd', @@ -4272,11 +4276,11 @@ $md5_string = array ( './include/javascript/quickCompose.js' => '4a097a6d9de93625b0e49c2f116f9908', './include/javascript/quicksearch.js' => '766053dbb28ec36768a7aece97faa4f0', './include/javascript/report_additionals.js' => 'af060dd7b1590f82ac6a6dc9b8d69216', - './include/javascript/sugar_3.js' => '39030f7e6bfe45e4caafdc7bc9cb917f', + './include/javascript/sugar_3.js' => 'a09fcad11775f229b79158ae537be435', './include/javascript/sugar_connection_event_listener.js' => '3fce076d38f2e5632e348833ebb26cd7', './include/javascript/swfobject.js' => 'e83d1ca12de8ee2787c9189119cbd959', - './include/javascript/ajaxUI.js' => '00864b9dcc1de4e9899d5b0102aad216', - './include/javascript/calendar.js' => '039f68347caa37ab8f6da2a6401614e0', + './include/javascript/ajaxUI.js' => '012780cb555b4227e56190ead47644d9', + './include/javascript/calendar.js' => '923dc68206792664083bf52718b94b96', './include/javascript/importWizard.js' => 'd043a7cccb280ba8995011e27fbd5530', './include/javascript/iscroll.js' => 'f2f4abe47439bfe02f0001e51dcbd0cd', './include/javascript/sugar_yui_overrides.js' => '8b8fb375212373da32e94c349c101a31', @@ -5947,7 +5951,7 @@ $md5_string = array ( './include/javascript/sugarwidgets/SugarYUILoader.js' => '03e5f141de87cd45e0e44ffc4fc60e78', './include/javascript/sugarwidgets/SugarYUIWidgets.js' => 'a43c63fe55d1750e8012bff89d93be78', './include/javascript/jsAlerts.php' => 'b627e3fca2332c9dd7bcd249074eda84', - './include/javascript/javascript.php' => '23c383a312dde56cd57a776e15c6079c', + './include/javascript/javascript.php' => '44f53c7242418c331da3918c0119dc6c', './include/javascript/getYUIComboFile.php' => 'd961ed2c8a1692920b1bf9bbe6cc9884', './include/images/university2.png' => '346083109b89352e3a4b77cc249c56df', './include/images/start.png' => 'c99fa1ea628b5d14f904b16cb9e010de', @@ -6003,7 +6007,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateLeadNameButton.php' => '667eb6757dbf32f9c181eab154c2117a', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateCampaignLogEntryButton.php' => 'd26f66486c121b664a807625689b9337', './include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php' => 'c0e334312940ac4df14233c337ce2249', - './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => '4bdf5f96fc0d174d56508ab8cf367c47', + './include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php' => '83bcef93aa78bfe89a42292cdc9324a4', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php' => 'ad63c304b312c204fbe9a2e4995bf1ba', './include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php' => '76328770d804049a4e6b034ea557f0f3', './include/generic/SugarWidgets/SugarWidgetSubPanelTopArchiveEmailButton.php' => '39e39d2fe63a6a1f9c726e44d8c76d52', @@ -6013,7 +6017,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetSubPanelLoadSignedButton.php' => 'ca2465e4a06d20579483b721f59e1d49', './include/generic/SugarWidgets/SugarWidgetSubPanelIcon.php' => 'b5c2fdcc8d5f2d6439219011ea96a8e7', './include/generic/SugarWidgets/SugarWidgetSubPanelGetLatestButton.php' => '144fb5ef4e0423f125a795d48f319371', - './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => '16d67c4b61b859bc9dd2cc4259cddba5', + './include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php' => '851a87890b8dd167c5a13a6125629187', './include/generic/SugarWidgets/SugarWidgetSubPanelEditRoleButton.php' => '57fccb9243faad7feac7c0a018f755ab', './include/generic/SugarWidgets/SugarWidgetSubPanelEditButton.php' => 'c223de23ecd2122d11da74590791abb8', './include/generic/SugarWidgets/SugarWidgetSubPanelDetailViewLink.php' => '72bf5adfbba8a2d5739d4a1b72970ffd', @@ -6026,7 +6030,7 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldurl.php' => '56876b67d48c659338febb7f469f7e20', './include/generic/SugarWidgets/SugarWidgetFieldtime.php' => 'f51d1cb46b1404f1316c82836918f586', './include/generic/SugarWidgets/SugarWidgetFieldtext.php' => '071f8bbc5344bf61c1b7d411bee69b90', - './include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php' => 'f060510b8fa83e0cfcc7eb5f663e5f8d', + './include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php' => '0fa702885d51fa43a01f85a2b669bd64', './include/generic/SugarWidgets/SugarWidgetFieldrelate.php' => '7843e6f9acc207b2e0a9e1c3949a3f89', './include/generic/SugarWidgets/SugarWidgetFieldradioenum.php' => '2aeefdbebc5fda503eed56d16a146845', './include/generic/SugarWidgets/SugarWidgetFieldphone.php' => '866bbe79a3610e214e58dec9e2be9b4e', @@ -6040,13 +6044,13 @@ $md5_string = array ( './include/generic/SugarWidgets/SugarWidgetFieldid.php' => 'ebd4da373e066e3db5753f653363a298', './include/generic/SugarWidgets/SugarWidgetFieldfullname.php' => '54bd4fbf0e32e4c3a053867815d0bf9e', './include/generic/SugarWidgets/SugarWidgetFieldfloat.php' => '2e6a7dfb394741ed2063b0f3e4313e41', - './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => '0225db0a3d2a0a0e4d3996ea608359f9', + './include/generic/SugarWidgets/SugarWidgetFieldenum.php' => 'f487ce127bcb4a47ad5f2809a328e80d', './include/generic/SugarWidgets/SugarWidgetFieldemail.php' => 'c0f3220ad4123ae1d8307f08a476ee84', './include/generic/SugarWidgets/SugarWidgetFielddouble.php' => '78b80591d1f30667c3ae4ec25711b3e7', './include/generic/SugarWidgets/SugarWidgetFielddecimal.php' => '85891b39c359f08f06ca5be4c49b4ce1', './include/generic/SugarWidgets/SugarWidgetFielddatetimecombo.php' => '390a7d3f3c5ebad1f4a3b62a550fd4b5', './include/generic/SugarWidgets/SugarWidgetFielddatetime.php' => '0d327f2f73b73e12153b2e4a0d17a511', - './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => '6ff6e6ca9b75b35129f650824d590a5d', + './include/generic/SugarWidgets/SugarWidgetFielddatepicker.php' => 'a811095457e3c50e87383e0d077bf65c', './include/generic/SugarWidgets/SugarWidgetFielddate.php' => '83ea32ef18f3648b1b56b7143bc32c04', './include/generic/SugarWidgets/SugarWidgetFieldcurrency.php' => 'dcd67a22b003cd078fdf157278954214', './include/generic/SugarWidgets/SugarWidgetFieldchar.php' => '28923530c61913c4a4c9a0f9e3820a54', @@ -6070,7 +6074,7 @@ $md5_string = array ( './include/fonts/Courier-Oblique.afm' => '3324f479739ac9ebab740772b55705d2', './include/fonts/Courier-BoldOblique.afm' => '5c34aeefc1ef69ae2fb317abc1ccc9ca', './include/fonts/Courier-Bold.afm' => 'cb84ced0cc430a5d54497257a11638f5', - './include/export_utils.php' => '6048129f847927c81ea5e4410de3fcfb', + './include/export_utils.php' => '71ca4e5959ee434b1a3b980dfa2fe58b', './include/entryPoint.php' => '8f910a7318b9b3644cc4785834d13711', './include/dir_inc.php' => 'c46c6a8398a29af0d501bf680c3026e4', './include/database/MysqlHelper.php' => '363df0b41e84eaf6612aa1b5634fbabf', @@ -6078,12 +6082,12 @@ $md5_string = array ( './include/database/FreeTDSHelper.php' => '2344412920a952c1a401e9c500e1c6a2', './include/database/DBHelper.php' => '4818bc1683062aac321b38e49f6b41a3', './include/database/SqlsrvManager.php' => '573640977f731eed03d21b3f6ff5f392', - './include/database/MysqliManager.php' => '6361931330db1041d8c1bf4f20b9834b', - './include/database/MysqlManager.php' => '0edbd15cd43ccef5af68db5cd8088582', + './include/database/MysqliManager.php' => '0104cc3bd3fa44beaba5e24e3ec4be61', + './include/database/MysqlManager.php' => '5eed53a6857b6cabf879fc880d9da115', './include/database/MssqlManager.php' => 'debf6383323b764d14948ebd7063908d', './include/database/FreeTDSManager.php' => '45338945508764c73fd28ab19065087a', './include/database/DBManagerFactory.php' => 'b215f5e9e358ff2de3c463fe10b63295', - './include/database/DBManager.php' => '7807a5cbd2d009cbc783980ac9925804', + './include/database/DBManager.php' => '456ba70e5c774fe22b8113c121b12a5d', './include/controller/Controller.php' => '154eadef52691f5edbbd7b17eb72b406', './include/contextMenus/menuDefs/sugarPerson.php' => '1978579cd6c1b4b54e070f81ddc7a166', './include/contextMenus/menuDefs/sugarObject.php' => 'c89b133cb16a4a1ea664ea79785331c4', @@ -6108,7 +6112,7 @@ $md5_string = array ( './include/VarDefHandler/vardef_meta_arrays.php' => 'ef9152d645fc0e97041e4d6e9f8174a2', './include/VarDefHandler/listvardefoverride.php' => 'd79b73457de94f7d3c2d485d7643b501', './include/VarDefHandler/VarDefHandler.php' => 'ed481a168b11ed8306efdce0725e7b1f', - './include/TimeDate.php' => '98fb0b12e6b3738e8be055bc9c670ed7', + './include/TimeDate.php' => '8fd55ea80a33138993cc94ca84ab1b31', './include/TemplateHandler/TemplateHandler.php' => 'c8e0018b71a5a65bb0f318689fb48e30', './include/Sugarpdf/sugarpdf_default.php' => 'b4e5c4ce265cab6c8e4f6173d290d324', './include/Sugarpdf/sugarpdf_config.php' => 'ecd77816c5def7f50b83d7c2336e7adf', @@ -6118,11 +6122,11 @@ $md5_string = array ( './include/Sugarpdf/Sugarpdf.php' => '7a26c1e039ef75f816bef55ee237cc0c', './include/Sugarpdf/FontManager.php' => '1905866dc0c78e5aa49a463497372207', './include/Sugar_Smarty.php' => 'a2543073bec9d98e7529698bb16482c2', - './include/SugarTinyMCE.php' => '2cf04b4dca0e7c5f258f0b9d6745a0fb', + './include/SugarTinyMCE.php' => '416d1167ad0b8419a1fa26c39d043868', './include/SugarTheme/SugarSprites.php' => 'd56be2ceaa0e0b0c40f3ac98f92a05f3', './include/SugarTheme/getImage.php' => '34f350c7d948692b6f7cc5c73fd3bb80', './include/SugarTheme/cssmin.php' => '05384ba957435def09368425e4480688', - './include/SugarTheme/SugarTheme.php' => '610a9b8f5c2212585896400a4f7ad910', + './include/SugarTheme/SugarTheme.php' => 'c73eed0c058b3457a7ef2ac6170bc5e6', './include/SugarPHPMailer.php' => '9b932d90a13e9eb0d2c073f10b78216c', './include/SugarCache/SugarCachesMash.php' => '856eed10c774ed920d64c52da2d327a1', './include/SugarCache/SugarCacheZend.php' => '21d249cb25b21c7876eb73500c3d5c33', @@ -6135,7 +6139,7 @@ $md5_string = array ( './include/SugarCache/SugarCacheAbstract.php' => '95047ac3071840c69ed005af7c125f79', './include/SugarCache/SugarCacheAPC.php' => '8e2709cd4d14df0a0f9e0eb3b84736fe', './include/SugarCache/SugarCache.php' => '17156919701a7675da00f4ab2106a288', - './include/SugarObjects/forms/PersonFormBase.php' => 'c12ee2d8897e95fdce09588534ddc691', + './include/SugarObjects/forms/PersonFormBase.php' => '4c14ea9cac972d0fc626dbb6e29a0834', './include/SugarObjects/templates/sale/vardefs.php' => '881b5f93e8c668224b60137bfec03b08', './include/SugarObjects/templates/sale/metadata/subpanels/default.php' => 'e2ca78fec0686be0c1d1e6400a5c272a', './include/SugarObjects/templates/sale/metadata/searchdefs.php' => '02f9d5317fb7b44bfa9a1a965512e295', @@ -6158,9 +6162,9 @@ $md5_string = array ( './include/SugarObjects/templates/sale/config.php' => '3bbc93005435531e82a062995275aa73', './include/SugarObjects/templates/sale/Sale.php' => 'ede92e3a280a4e7e867f74f820a5203a', './include/SugarObjects/templates/sale/Chance.php' => 'cd3cd899960aad0b6d8a5923945ce1d8', - './include/SugarObjects/templates/person/vardefs.php' => '1fbfaa698d23a26dd27067e9344c2986', + './include/SugarObjects/templates/person/vardefs.php' => '0f8542059906be1a3bc29f7fdce09671', './include/SugarObjects/templates/person/metadata/subpanels/default.php' => '3b440daa07cb13eed84d9f17fe760247', - './include/SugarObjects/templates/person/metadata/searchdefs.php' => 'f93632d572c037bcaabf57e6235c3b93', + './include/SugarObjects/templates/person/metadata/searchdefs.php' => '7badf2d886b0f5183df37dcca24cc704', './include/SugarObjects/templates/person/metadata/quickcreatedefs.php' => '0440e58a5af79ebdaf0fbc22bea4d06d', './include/SugarObjects/templates/person/metadata/popupdefs.php' => 'eb53311841b72440532fe6984c8a202b', './include/SugarObjects/templates/person/metadata/metafiles.php' => 'b986bf467ce02d259ea3db29a39cb0a8', @@ -6169,12 +6173,12 @@ $md5_string = array ( './include/SugarObjects/templates/person/metadata/detailviewdefs.php' => '9950f07eec92ea20ff547aa124fd66ac', './include/SugarObjects/templates/person/metadata/dashletviewdefs.php' => 'f0fc642c2ddf3806d4991dff03fc8ebe', './include/SugarObjects/templates/person/metadata/SearchFields.php' => '93a6bbb32c383e0521d4919c7f5c31ed', - './include/SugarObjects/templates/person/language/en_us.lang.php' => '9fb161421e76265f4356e8c478f9e4a0', + './include/SugarObjects/templates/person/language/en_us.lang.php' => 'd209f94b530658dd43165a8f5bd868f9', './include/SugarObjects/templates/person/icons/person_32.gif' => '1550c24a793910550200679be1c5c078', './include/SugarObjects/templates/person/icons/person.gif' => 'ea5e2b2022166291d01ccedaf24b4e33', './include/SugarObjects/templates/person/icons/Createperson.gif' => '2e20692d501b15729294b80f4f311d77', './include/SugarObjects/templates/person/config.php' => 'ade871c96f0a91be8b4b27a06c280d33', - './include/SugarObjects/templates/person/Person.php' => '4a05494e685fa36a129a18833ceb65d5', + './include/SugarObjects/templates/person/Person.php' => 'b196c5c6285665ba8578020fe3b7d19e', './include/SugarObjects/templates/issue/vardefs.php' => '2cde5d7c79db04f5ba31b51a733be453', './include/SugarObjects/templates/issue/metadata/subpanels/default.php' => 'c4ad08eb6c1a932e1a26fc844def6b5e', './include/SugarObjects/templates/issue/metadata/searchdefs.php' => '8b387defff2b8da8873d8201281a7357', @@ -6251,7 +6255,7 @@ $md5_string = array ( './include/SugarObjects/implements/team_security/language/en_us.lang.php' => '6d98aadfbb7a812f26d04d680670a308', './include/SugarObjects/implements/assignable/vardefs.php' => 'a548ffd7a3d6e6db97539837ac747137', './include/SugarObjects/implements/assignable/language/en_us.lang.php' => '364b577943f10dc538ebf1dbb46ca9a7', - './include/SugarObjects/VardefManager.php' => '38dd2ebfdc950b8028cb50480a4c2f1f', + './include/SugarObjects/VardefManager.php' => '1b218cbdf6c8baa7a6f270eecaf5707e', './include/SugarObjects/SugarSession.php' => '162a302292027328640b60bebc63cd2c', './include/SugarObjects/SugarRegistry.php' => '7fb93cfcaba8de431d61b07d3b52fc88', './include/SugarObjects/SugarConfig.php' => '5d1d1b107196e4bea8ac8ed54a829085', @@ -6299,10 +6303,11 @@ $md5_string = array ( './include/SugarFields/Fields/Text/DetailView.tpl' => 'd068de082c81d4fef6801093e3365de9', './include/SugarFields/Fields/Text/ClassicEditView.tpl' => '6ddfbc834a3962bdf07a328b2eba147a', './include/SugarFields/Fields/Relate/SugarFieldRelate.php' => '49ca470f83a96414526babfee288f6c9', - './include/SugarFields/Fields/Relate/SearchView.tpl' => '59b2b9f3f2bbb7875bff47ea5eaca783', + './include/SugarFields/Fields/Relate/SearchView.tpl' => 'c329c50ac8dbfc26216bfda3997b3988', './include/SugarFields/Fields/Relate/EditView.tpl' => '4039d33116504ded180a36e0abb3927d', './include/SugarFields/Fields/Relate/DetailView.tpl' => 'f25ba2d8f791cb3e4d1301847814b3c1', './include/SugarFields/Fields/Readonly/SugarFieldReadonly.php' => '15cc02846154744f83908e9c141e284f', + './include/SugarFields/Fields/Radioenum/SugarFieldRadioenum.php' => 'e0561c241c45d0fdc6246ae4cbb003a4', './include/SugarFields/Fields/Radioenum/EditView.tpl' => '3a702fdbbae1aadccf766091ec8fc15e', './include/SugarFields/Fields/Radioenum/DetailView.tpl' => '73ef83f9c364ccf4a45fcef0515297b6', './include/SugarFields/Fields/Phone/SugarFieldPhone.php' => '12ccc677202de1359cddebc27c7e7fac', @@ -6315,7 +6320,7 @@ $md5_string = array ( './include/SugarFields/Fields/Parent/SearchView.tpl' => '5abfa0a287f2d0bc47cb9e166892fd05', './include/SugarFields/Fields/Parent/EditView.tpl' => '4a1173b08d97095a5f5cf05d2a523a07', './include/SugarFields/Fields/Parent/DetailView.tpl' => '43c0b59004d5c2d581d0ce431923cbbb', - './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => '7a2f80ebff62388de1a1218dc7ebc914', + './include/SugarFields/Fields/Multienum/SugarFieldMultienum.php' => '9a8aff4bf4605a4ba9e71c2fdf0ad28d', './include/SugarFields/Fields/Multienum/SearchView.tpl' => '6e1d82935a12ac4693e9e0d36ff55338', './include/SugarFields/Fields/Multienum/ListView.tpl' => 'c65819a80ac6ee50b2303224dad95211', './include/SugarFields/Fields/Multienum/EditViewFunction.tpl' => '64a2bb349db221c9f4b1ad443561cf7d', @@ -6341,7 +6346,7 @@ $md5_string = array ( './include/SugarFields/Fields/File/SugarFieldFile.js' => '5c9fa7cb03a5604274afb542df08ae5b', './include/SugarFields/Fields/File/SearchView.tpl' => '3caa8a3b0a97a20169c404260788879f', './include/SugarFields/Fields/File/ListView.tpl' => 'bd74df2291a918473164fd3644151986', - './include/SugarFields/Fields/File/SugarFieldFile.php' => '8b03eeb84dd5f637043f771bbd1f2e22', + './include/SugarFields/Fields/File/SugarFieldFile.php' => '78a02dd1ed643a1e384548d5fc22d77c', './include/SugarFields/Fields/File/EditView.tpl' => '2a553bc240ae0a5fb3b74cbf036889da', './include/SugarFields/Fields/File/DetailView.tpl' => '04213367de3ba1769e45d38041d728d7', './include/SugarFields/Fields/Enum/SugarFieldEnum.php' => '01b94cd983a49a9e5e3a293a6cdec390', @@ -6356,7 +6361,7 @@ $md5_string = array ( './include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl' => '81c28888ed8fcb6488f01830dcbafca4', './include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php' => 'cb5c2d07cddab8ba2afc1bad8f0de12a', './include/SugarFields/Fields/Datetimecombo/SearchView.tpl' => '085c68def656aa0285cf87649cc72313', - './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => '58781dd136213aa23fea9c385cbb2427', + './include/SugarFields/Fields/Datetimecombo/EditView.tpl' => '49f86c35d6d9fb6b2d6603240da1ab9a', './include/SugarFields/Fields/Datetime/SugarFieldDatetime.php' => '13156ffbe44fe0dae2ee3e7b3827f253', './include/SugarFields/Fields/Datetime/EditView.tpl' => '3a40f7f14bf03219955bb18f552ccfea', './include/SugarFields/Fields/Currency/SugarFieldCurrency.php' => '634092129fd9a7cddb7cd8cefeaa1c6c', @@ -6365,7 +6370,7 @@ $md5_string = array ( './include/SugarFields/Fields/Currency/DetailView.tpl' => '07b10accc2d817376b207b935182c60b', './include/SugarFields/Fields/Collection/SugarFieldCollection.js' => 'e7a8be9f58c67026ce906dcffc369e41', './include/SugarFields/Fields/Collection/view.sugarfieldcollection.php' => '626c0b184463b413735031b6c051db97', - './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => 'e4bc6464c77052f2cf5666d1dc58327c', + './include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php' => '6635e73a325738eacc80c3dd1e479686', './include/SugarFields/Fields/Collection/SugarFieldCollection.php' => 'f8bf806088e22b39b738459f096d89fe', './include/SugarFields/Fields/Collection/EditView.tpl' => '1ca2398320a3fe8f51d974019df19ed2', './include/SugarFields/Fields/Collection/DetailView.tpl' => '41db5b43d2db0e11c7ce75f3e27371be', @@ -6400,10 +6405,10 @@ $md5_string = array ( './include/SugarFields/Fields/Address/DetailView.tpl' => 'c988796dbaedffe8575a131f74564857', './include/SugarEmailAddress/SugarEmailAddress.js' => 'c23fbef28b5cc17e329cd3799778a2d3', './include/SugarEmailAddress/templates/forWideFormBodyView.tpl' => '043d4eb47055e33f2a17f7f081385881', - './include/SugarEmailAddress/templates/forEditView.tpl' => '8c0eac09329e64093072d162412b18aa', + './include/SugarEmailAddress/templates/forEditView.tpl' => '207d79996f32e27ccfc22efe5eac4b1c', './include/SugarEmailAddress/templates/forDuplicatesView.tpl' => '48529a015533cdd2ce8db08a826dd09c', './include/SugarEmailAddress/templates/forDetailView.tpl' => '75be62dc812205b17178d2aebecd2f19', - './include/SugarEmailAddress/SugarEmailAddress.php' => '2ec3b4d6fd6d5470d71ea179cb794d64', + './include/SugarEmailAddress/SugarEmailAddress.php' => '874dfaf9e024fc06bcf336d6dbd57947', './include/SugarDependentDropdown/metadata/dependentDropdown.php' => 'ef0d061a5bfb5641e65f55560213e209', './include/SugarDependentDropdown/javascript/SugarDependentDropdown.js' => '480bc0db43abac0ec4ddcde0db5f1014', './include/SugarDependentDropdown/SugarDependentDropdown.php' => 'c27f9273801a6686f233b4ed1100b369', @@ -6430,7 +6435,7 @@ $md5_string = array ( './include/SugarCharts/Jit/FlashCanvas/save.php' => 'b128689255043db993d1cc2f4bc484bc', './include/SugarCharts/Jit/FlashCanvas/proxy.php' => '82ccbc7400b0bda3a33316920de41e60', './include/SugarCharts/Jit/FlashCanvas/flashcanvas.swf' => '528d82bb81799f23d4def3425badf913', - './include/SugarCharts/SugarChart.php' => '065920afbee2053d84cd1e698c2ea4bb', + './include/SugarCharts/SugarChart.php' => 'f69a5c9c766d329396732ad508c3cf6a', './include/SubPanel/SubPanelTiles.js' => '18b37efe1462393264a0968ab60298eb', './include/SubPanel/tpls/singletabmenu.tpl' => '71bca3091201ae4be60401529a0ec18c', './include/SubPanel/subpanels.txt' => '8b89c0ee2426d40916d98a646ec26e7a', @@ -6480,7 +6485,7 @@ $md5_string = array ( './include/Smarty/plugins/function.sugarvar_connector.php' => 'cdd2903777ee7f1aeee223140eac11d0', './include/Smarty/plugins/function.sugarvar.php' => '5e7f2cf7aa362630648ce79689c643a9', './include/Smarty/plugins/function.sugar_variable_constructor.php' => '6561cdb5987f989d18090a4713c9a27a', - './include/Smarty/plugins/function.sugar_translate.php' => 'b52ec4b3da8315a561df668fdfa82a1a', + './include/Smarty/plugins/function.sugar_translate.php' => '6c15cff8d615f848193726c8cd154b18', './include/Smarty/plugins/function.sugar_run_helper.php' => '2118a0bb279e18aae2b0fe9237e6ba6d', './include/Smarty/plugins/function.sugar_replace_vars.php' => 'a72d58f8842fcd9b39126d6324f1157a', './include/Smarty/plugins/function.sugar_phone.php' => '0b698000fe4c56eaa01498f363a62907', @@ -6558,14 +6563,14 @@ $md5_string = array ( './include/SearchForm/tpls/SearchFormGenericAdvanced.tpl' => '44c602da2e660f4e016e9f6f1f431ee5', './include/SearchForm/tpls/SearchFormGeneric.tpl' => '605fe91d5586fc7568572c69fed31114', './include/SearchForm/SugarSpot.php' => 'f6efd2f53036ca51f08f4dd4b4e6bcc9', - './include/SearchForm/SearchForm2.php' => 'a8363cfcd2b76a68dbfd419c736bef83', - './include/SearchForm/SearchForm.php' => '0b646a72a34fd48bdde44ee876d241ff', + './include/SearchForm/SearchForm2.php' => 'e318ed1c6c19b706ca50e681aa19e0e6', + './include/SearchForm/SearchForm.php' => '38194c69aabd2a4ecfb4fbe11b73b8cb', './include/QuickSearchDefaults.php' => '88b97ced88d3731c401b56b94c91e775', './include/Popups/tpls/header.tpl' => '0952ff3ce7806d3138e66183d416905b', './include/Popups/tpls/footer.tpl' => '0a34f3223e0e1b88cf09b3a657b61924', - './include/Popups/tpls/PopupGeneric.tpl' => '01b2896b8a638253c93f8e34e22c9f26', + './include/Popups/tpls/PopupGeneric.tpl' => 'c9a41578e73be17ea5331399f4e78815', './include/Popups/Popup_picker.php' => '2b2071f0293ba8a28f95dd657598910d', - './include/Popups/PopupSmarty.php' => 'a6c8e1cc22b35db33650ab2fb65d2e83', + './include/Popups/PopupSmarty.php' => 'f6902ff05fd81235ed778e154059ec6c', './include/Pear/XML_HTMLSax3/LICENSE' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/XML_HTMLSax3/HTMLSax3/States.php' => '5b528baa84631f85349a7183597d2fb3', './include/Pear/XML_HTMLSax3/HTMLSax3/Decorators.php' => '34a9a95566c891f013584073fbadaf7e', @@ -6575,19 +6580,19 @@ $md5_string = array ( './include/Pear/Crypt_Blowfish/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/Pear/Crypt_Blowfish/Blowfish/DefaultKey.php' => '8274b556662cc178342ea96940b36514', './include/Pear/Crypt_Blowfish/Blowfish.php' => 'b391980575340d0fe5bf2df72bc13932', - './include/OutboundEmail/OutboundEmail.php' => 'f3ed12c6e6e697eecf64f462b734121e', + './include/OutboundEmail/OutboundEmail.php' => '0fa3fb75a5c01b9bccf3eacffaf27c9b', './include/MySugar/tpls/retrieveReportCharts.tpl' => '8d16a5e11f1c08ac4b6b362f20c68add', './include/MySugar/tpls/retrievePage.tpl' => '3ed175ce84e8f625e2f59990cc1f6f08', './include/MySugar/tpls/dashletsSearchResults.tpl' => '7bf094ad0bb191aa01959486e7cd6444', './include/MySugar/tpls/chartDashletsSearchResults.tpl' => '025432deb422b2675876a8c4d27cb15c', './include/MySugar/tpls/addDashletsDialog.tpl' => 'becaed8845d3e3c82e12ef260736b941', - './include/MySugar/tpls/MySugar.tpl' => 'db79a92d07507ec28fe27d4e46eb5e2e', + './include/MySugar/tpls/MySugar.tpl' => '5536dd30ec10e684d0c89de5df56f217', './include/MySugar/javascript/MySugar.js' => '2009f6e609431576ff4e0f28dc9ff585', - './include/MySugar/MySugar.php' => '9c84bf82a23114d243c435ec7d12cd18', + './include/MySugar/MySugar.php' => 'a119a42f63e8417f585e7cd1627b47f3', './include/MySugar/DashletsDialog/DashletsDialog.php' => '618ab0fd36d5555ea5441ae9566ce4fa', - './include/MassUpdate.php' => '6d0f6b197bb7be5c792a5099c2d9bea5', + './include/MassUpdate.php' => '58cbc112b36b834b92097d9cddde193c', './include/MVC/View/views/view.quickedit.php' => 'ade92f07bb5eb553efe4623093e5e60f', - './include/MVC/View/views/view.metadata.php' => '69f932b6d53de6ed0b5de480d823fab2', + './include/MVC/View/views/view.metadata.php' => 'e90c49375ed6eb09890f99085467b9b3', './include/MVC/View/views/view.gs.php' => '0725095ce8c9b4d7e6b70f5c9af42fb3', './include/MVC/View/views/view.ajaxui.php' => '4d31344c7c1392e5252e1c64b4319077', './include/MVC/View/views/view.xml.php' => '028d18c71c2dae2db826d0cc6d32306c', @@ -6595,13 +6600,13 @@ $md5_string = array ( './include/MVC/View/views/view.sugarpdf.php' => '334694668f28d954182d05c196eef396', './include/MVC/View/views/view.sugarpdf.config.php' => 'e98d6968b4b8a70797d07b311553e7f0', './include/MVC/View/views/view.serialized.php' => '6746e128e8dacee78ecbf70ea3559cbb', - './include/MVC/View/views/view.quickcreate.php' => 'e36aab4a166394155163f7ce76977cfd', + './include/MVC/View/views/view.quickcreate.php' => '46266c0da5200fc4b269948dfc2d6948', './include/MVC/View/views/view.quick.php' => '9a1fa9ad8fce5230124ee320fcc42266', './include/MVC/View/views/view.popup.php' => 'a6c464b60010bd173fd6a9570727bb55', './include/MVC/View/views/view.noaccess.php' => '1cab33d38afb080ca5dbfaa70a05e69a', './include/MVC/View/views/view.multiedit.php' => 'b727fe11b404c9cbfb80b23cbbd13a4c', './include/MVC/View/views/view.modulelistmenu.php' => '1b7108fdf3fd918f0fb068a517cb7527', - './include/MVC/View/views/view.list.php' => 'e918de71e7ca7247b69627dbb00a8fd4', + './include/MVC/View/views/view.list.php' => '07196eed08c206ae8be4f9cb7b09bc92', './include/MVC/View/views/view.json.php' => '225e05f081e599f4c9983c045a6c2d3f', './include/MVC/View/views/view.importvcardsave.php' => 'fbea5f0d4e39e924fb0186e4ad3efc21', './include/MVC/View/views/view.importvcard.php' => '6c25b128b492aee11c09a127b55d38e0', @@ -6626,17 +6631,17 @@ $md5_string = array ( './include/MVC/Controller/action_file_map.php' => 'c35918d4fb518bb6f3c682efbabc10a4', './include/MVC/Controller/SugarController.php' => '2b854f2d18dced7e952df9f654b1a23b', './include/MVC/Controller/ControllerFactory.php' => '52b59a09b463a19eff7f34203b425447', - './include/Localization/Localization.php' => '7703c0441d1391a48a84ffc5db363e62', + './include/Localization/Localization.php' => 'e7bf728091001219941104fe33f9721f', './include/ListView/ListViewDCMenu.tpl' => 'eb80d8e8088eb3f91a9f2e6716401da7', './include/ListView/ListViewXTPL.php' => '10e8db4459b6ca33c77c9e747a7f9302', './include/ListView/ListViewSmarty.php' => '8ccaddfdbe23c54e91ddf978786a7332', './include/ListView/ListViewPagination.tpl' => '3a5ff67923fa01dc8096bb4fccde5314', - './include/ListView/ListViewNoMassUpdate.tpl' => '68805edbc58b5145204c2de0be49fef8', - './include/ListView/ListViewGeneric.tpl' => '90dfb91a9b496a9d616315e2398082f7', + './include/ListView/ListViewNoMassUpdate.tpl' => '9100de59b4ed2b73446a2e119a9e01e1', + './include/ListView/ListViewGeneric.tpl' => 'b12208ca4031cbca6423287472f3f281', './include/ListView/ListViewFacade.php' => '8955992db6b2a45ef3a6237b85f7b61a', - './include/ListView/ListViewDisplay.php' => 'd8f19921d7fe5f07ecec2faba47b4fe8', - './include/ListView/ListViewData.php' => 'c10a119812a46ad81b306c9a9e9f35df', - './include/ListView/ListView.php' => '4767d6720d0860ddace7435f4f08d5e9', + './include/ListView/ListViewDisplay.php' => '45519fce38028a7be7a5ce715c196ed0', + './include/ListView/ListViewData.php' => 'b41e05082dc02308192e61aa90d7b4cc', + './include/ListView/ListView.php' => '03654b393b6d1e28fc5a664654fc684d', './include/JSON.php' => '419327255daae457ef1765ec305148f3', './include/HTTP_WebDAV_Server/license.txt' => 'a45bb1bbeed9e26b26c5763df1d3913d', './include/HTTP_WebDAV_Server/dav.txt' => 'c5235ed64efa685da638c6dcdb6a9708', @@ -6662,6 +6667,7 @@ $md5_string = array ( './include/DetailView/DetailView2.php' => '9478bef6cdad4af70878d6be5962909d', './include/DetailView/DetailView.tpl' => '004d5eaa27d18877e2a25cec1fa356c7', './include/DetailView/DetailView.php' => '04e4c3a0359109b459f99e99ed22a179', + './include/Dashlets/DashletRssFeedTitle.php' => 'bada41e47f194a820f23f1aae8f55f2c', './include/Dashlets/DashletGenericAutoRefreshDynamic.tpl' => 'b6d4c69cf2323a1971d5ec4b28f3a2df', './include/Dashlets/DashletGenericDisplay.tpl' => '3326f6bedb30b8fb9cf3289753b6acf1', './include/Dashlets/DashletGenericConfigure.tpl' => 'd95ef075520fd1f5ccd6ada532d95f2c', @@ -6681,7 +6687,7 @@ $md5_string = array ( './examples/ExampleLeadCapture.php' => 'd6deb45572959e642fb019253c5703dc', './examples/EXAMPLES_README.txt' => 'b55744b5e2684d91f6d3f98db4553673', './emailmandelivery.php' => 'eddfad677960438dfe1584bca8718acf', - './download.php' => '915d2b2a778ee6e995b9f94f47de2851', + './download.php' => '74c7e2cf7695af98c9eb9c46164eff7b', './dictionary.php' => '42619156f21102938b4da79d2cf9cb48', './Zend/Version.php' => '7ed9dea03172b0f8fb11f085a17f100b', './Zend/Validate/Ip.php' => '05326c26a0f419d8dac8c168f6cb7f12', @@ -7083,20 +7089,20 @@ $md5_string = array ( './Zend/Crypt/DiffieHellman.php' => 'ec0a4f522b732f7fcbb9c4ab94d926e1', './Zend/Crypt.php' => '0e72fd104506094fd2c7682b0b924542', './install.php' => '66fbbce8e8c2dc677b63f36e4a23d5f6', - './export.php' => '6a0baee507af9c73ec6c763cec83777f', + './export.php' => 'c2cce5725ae0f8f464b2f2706e128b1d', './data/Relationships/SugarRelationship.php' => '6b27efaed6e2eb432409c8695b93cec0', - './data/Relationships/RelationshipFactory.php' => '3ad1e95da0b0b00fee3c10f0796e26f5', + './data/Relationships/RelationshipFactory.php' => '5579766913d11603936e9ce029196782', './data/Relationships/One2OneRelationship.php' => 'c8154bd4190e2f006c3cb8e050dbab44', './data/Relationships/One2OneBeanRelationship.php' => '82a915b9f96f0dc044c649374aec5562', - './data/Relationships/One2MRelationship.php' => '2391993314606383ea70399e6e06a047', + './data/Relationships/One2MRelationship.php' => 'f49f28b30a03c5afa471c99801f94c3d', './data/Relationships/One2MBeanRelationship.php' => 'd10f272cf75500b25861890bc9901968', - './data/Relationships/M2MRelationship.php' => '7f9c715087c3e74bfa1d7579f52daa46', + './data/Relationships/M2MRelationship.php' => 'a218e02112685f1853897cf7caf455e7', './data/Relationships/EmailAddressRelationship.php' => '886780983432b3d6094bb0135d5562ea', - './data/Link2.php' => '83467c8c13e108e821d8c2e17dcf94ac', - './data/BeanFactory.php' => 'e64c44cc60098dd50470f5bafee051f8', + './data/Link2.php' => 'e959b50abab84ba69c76e0300e769037', + './data/BeanFactory.php' => '18ea5137a9f4038003ff81125c221bf4', './data/upload/index.html' => '9cd784063d39b18d308932c28c385853', './data/Tracker.php' => '5dfc3f390ecccd8cbb1229e01f878593', - './data/SugarBean.php' => 'e140a29c5c65a20c51fd8cfcd701c4e3', + './data/SugarBean.php' => '561d2f3c16b7870d7b1510a26d54414e', './data/Link.php' => 'df1735a1a781a9ed552cace8d418af7d', './custom/index.html' => '601a18f179c2ac55779c9bac46942525', './cron.php' => '689805082ff9eeb04474cbf3fd7b0cc6', @@ -7128,8 +7134,8 @@ $md5_string = array ( './ModuleInstall/PackageManager/PackageManager.php' => '518237c11f74fb8e684147c178b755f4', './ModuleInstall/PackageManager/PackageController.php' => '36568a1bf99c83c320effaef789ce040', './ModuleInstall/PackageManager/ListViewPackages.php' => 'e4641f286e0b5c4e0aad030159d14a2d', - './ModuleInstall/ModuleScanner.php' => 'b7d0d4df51b9b531020fab6f37239157', - './ModuleInstall/ModuleInstaller.php' => '69ec3544cfe22dcea239aefb584247de', + './ModuleInstall/ModuleScanner.php' => '7c25685e0d3b677e1074628be8a1b1fc', + './ModuleInstall/ModuleInstaller.php' => '3712113c3886525c2f3eba34eff5219e', './HandleAjaxCall.php' => 'cc43ac1ae1b3545ae98e79f12da47d14', ); ?> diff --git a/include/Dashlets/DashletRssFeedTitle.php b/include/Dashlets/DashletRssFeedTitle.php new file mode 100644 index 00000000..b89aee33 --- /dev/null +++ b/include/Dashlets/DashletRssFeedTitle.php @@ -0,0 +1,123 @@ +url = $url; + } + + /** + * Yeah, assign an empty string, because unset(classproperty) will cause an exception in php 5.3.3 + * + */ + public function __destruct() { + $this->contents = ''; + } + + public function generateTitle() { + if ($this->readFeed()) { + $this->getTitle(); + if (!empty($this->title)) { + $this->convertEncoding(); + $this->cutLength(); + } + } + return $this->title; + } + + /** + * @todo use curl with waiting timeout instead of fopen + */ + public function readFeed() { + if ($this->url) { + $fileOpen = @fopen($this->url, 'r'); + if ($fileOpen) { + $this->fileOpen = true; + $this->contents = fread($fileOpen, $this->readBytes); + fclose($fileOpen); + return true; + } + } + return false; + } + + /** + * + */ + public function getTitle() { + $matches = array (); + preg_match("/.*?<\/title>/i", $this->contents, $matches); + if (isset($matches[0])) { + $this->title = str_replace(array('<![CDATA[', '<title>', '', ']]>'), '', $matches[0]); + } + } + + public function cutLength() { + if (mb_strlen(trim($this->title), $this->defaultEncoding) > $this->cut) { + $this->title = mb_substr($this->title, 0, $this->cut, $this->defaultEncoding) . $this->endWith; + } + } + + private function _identifyXmlEncoding() { + $matches = array (); + preg_match('/encoding\=*\".*?\"/', $this->contents, $matches); + if (isset($matches[0])) { + $this->xmlEncoding = trim(str_replace('encoding="', '"', $matches[0]), '"'); + } + } + + public function convertEncoding() { + $this->_identifyXmlEncoding(); + if ($this->xmlEncoding && $this->xmlEncoding != $this->defaultEncoding) { + $this->title = iconv($this->xmlEncoding, $this->defaultEncoding, $this->title); + } + } +} \ No newline at end of file diff --git a/include/ListView/ListView.php b/include/ListView/ListView.php index 9073149b..de3c679f 100644 --- a/include/ListView/ListView.php +++ b/include/ListView/ListView.php @@ -1510,7 +1510,7 @@ $close_inline_img = SugarThemeRegistry::current()->getImage('close_inline', 'bor if($orderBy == $column_name || (isset($widget_args['sort_by']) && str_replace('.','_',$widget_args['sort_by']) == $orderBy)) { $imgArrow = "_down"; - if($this->sort_order == 'desc') { + if($this->sort_order == 'asc') { $imgArrow = "_up"; } } diff --git a/include/ListView/ListViewData.php b/include/ListView/ListViewData.php index 2120aa68..836d28d6 100644 --- a/include/ListView/ListViewData.php +++ b/include/ListView/ListViewData.php @@ -554,15 +554,15 @@ class ListViewData { str_replace(array("\rn", "\r", "\n"), array('','','
'), $results['string']) . "', CAPTION, '
{$app_strings['LBL_ADDITIONAL_DETAILS']}
"; - if($editAccess) + if($editAccess && !empty($results['editLink'])) { - $extra .= (!empty($results['editLink']) ? "".SugarThemeRegistry::current()->getImage('edit_inline', 'border=0', null, null, ".gif", $app_strings['LBL_EDITINLINE'])."" : ''); + $extra .= "getImageURL('edit_inline.gif')."\'>"; } - + $extra .= (!empty($results['viewLink']) ? "" : '') . "', DELAY, 200, STICKY, MOUSEOFF, 1000, WIDTH, " . (empty($results['width']) ? '300' : $results['width']) - . ", CLOSETEXT, '{$app_strings[
', " + . ", CLOSETEXT, '\'{$app_strings['LBL_CLOSEINLINE']}\'', " . "CLOSETITLE, '{$app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE']}', CLOSECLICK, FGCLASS, 'olFgClass', " . "CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass');\" " . "onmouseout=\"return nd(1000);\">\'{$app_strings['LBL_INFOINLINE']}\'"; @@ -580,24 +580,19 @@ class ListViewData { $extra = "'), $results['string']) . "', CAPTION, '
{$app_strings['LBL_ADDITIONAL_DETAILS']}
"; - - if($editAccess) - { - $extra .= (!empty($results['editLink']) ? "".SugarThemeRegistry::current()->getImage('edit_inline', 'border=0', null, null, ".gif", $app_strings['LBL_EDITINLINE'])."" : ''); - } - - if(!empty($results['viewLink'])) + + if($editAccess && !empty($results['editLink'])) { - $extra .= "".SugarThemeRegistry::current()->getImage('view_inline', 'style=\'margin-left: 2px;\' border=0 ', null, null, ".gif", $app_strings['LBL_VIEWINLINE']).""; + $extra .= "getImageURL('edit_inline.gif')."\'>"; } - - $extra .= (!empty($results['viewLink']) ? "" : '') + + $extra .= (!empty($results['viewLink']) ? "" : '') . "', DELAY, 200, STICKY, MOUSEOFF, 1000, WIDTH, " . (empty($results['width']) ? '300' : $results['width']) - . ", CLOSETEXT, '\'{$app_strings['LBL_CLOSEINLINE']}\'
', " + . ", CLOSETEXT, '\'{$app_strings['LBL_CLOSEINLINE']}\'', " . "CLOSETITLE, '{$app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE']}', CLOSECLICK, FGCLASS, 'olFgClass', " . "CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass');\" " - . "onmouseout=\"return nd(1000);\">\'{$app_strings['LBL_INFOINLINE']}\'
"; + . "onmouseout=\"return nd(1000);\">{$app_strings["; return array('fieldToAddTo' => $results['fieldToAddTo'], 'string' => $extra); } diff --git a/include/ListView/ListViewDisplay.php b/include/ListView/ListViewDisplay.php index 24ed53bf..fa30af1d 100644 --- a/include/ListView/ListViewDisplay.php +++ b/include/ListView/ListViewDisplay.php @@ -72,12 +72,17 @@ class ListViewDisplay { $this->searchColumns = array () ; } function shouldProcess($moduleDir){ + $searching = false; + $sessionSearchQuery = "{$moduleDir}2_QUERY_QUERY"; + if (!empty($_SESSION[$sessionSearchQuery])) { + $searching = true; + } if(!empty($GLOBALS['sugar_config']['save_query']) && $GLOBALS['sugar_config']['save_query'] == 'populate_only'){ if(empty($GLOBALS['displayListView']) && (!empty($_REQUEST['clear_query']) || $_REQUEST['module'] == $moduleDir && ((empty($_REQUEST['query']) || $_REQUEST['query'] == 'MSI' ) - && (empty($_SESSION['last_search_mod']) || $_SESSION['last_search_mod'] != $moduleDir ) ))){ + && (!$searching)))) { $_SESSION['last_search_mod'] = $_REQUEST['module'] ; $this->should_process = false; return false; @@ -382,8 +387,8 @@ EOHTML; protected function buildMassUpdateLink() { global $app_strings; - - return "{$app_strings['LBL_MASS_UPDATE']}"; + $onClick = "document.getElementById('massupdate_form').style.display = ''; var yLoc = YAHOO.util.Dom.getY('massupdate_form'); scroll(0,yLoc);"; + return "{$app_strings['LBL_MASS_UPDATE']}"; } /** diff --git a/include/ListView/ListViewGeneric.tpl b/include/ListView/ListViewGeneric.tpl index 8e120416..8ef82859 100644 --- a/include/ListView/ListViewGeneric.tpl +++ b/include/ListView/ListViewGeneric.tpl @@ -43,8 +43,8 @@ {if $overlib} - - + + {/if} {$multiSelectData} diff --git a/include/ListView/ListViewNoMassUpdate.tpl b/include/ListView/ListViewNoMassUpdate.tpl index e21bab68..6a7cf85a 100644 --- a/include/ListView/ListViewNoMassUpdate.tpl +++ b/include/ListView/ListViewNoMassUpdate.tpl @@ -41,9 +41,8 @@ *} {if $overlib} - - - + + {/if} diff --git a/include/Localization/Localization.php b/include/Localization/Localization.php index 74f3b9f3..71da4439 100644 --- a/include/Localization/Localization.php +++ b/include/Localization/Localization.php @@ -324,16 +324,42 @@ class Localization { * @param string toCharset the charset to translate into (defaults to UTF-8) * @return string the translated string */ - function translateCharset($string, $fromCharset, $toCharset='UTF-8') { - $GLOBALS['log']->debug("Localization: translating [ {$string} ] into {$toCharset}"); - if(function_exists('mb_convert_encoding')) { - return mb_convert_encoding($string, $toCharset, $fromCharset); - } elseif(function_exists('iconv')) { // iconv is flakey - return iconv($fromCharset, $toCharset, $string); - } else { - return $string; - } // end else clause - } + function translateCharset($string, $fromCharset, $toCharset='UTF-8') + { + $GLOBALS['log']->debug("Localization: translating [ {$string} ] into {$toCharset}"); + + // Bug #35413 Function has to use iconv if $fromCharset is not in mb_list_encodings + $isMb = function_exists('mb_convert_encoding'); + $isIconv = function_exists('iconv'); + if ($isMb == true) + { + $fromCharset = strtoupper($fromCharset); + $listEncodings = mb_list_encodings(); + $isFound = false; + foreach ($listEncodings as $encoding) + { + if (strtoupper($encoding) == $fromCharset) + { + $isFound = true; + break; + } + } + $isMb = $isFound; + } + + if($isMb) + { + return mb_convert_encoding($string, $toCharset, $fromCharset); + } + elseif($isIconv) + { + return iconv($fromCharset, $toCharset, $string); + } + else + { + return $string; + } // end else clause + } /** * translates a character set from one to another, and the into MIME-header friendly format @@ -668,10 +694,39 @@ eoq; field.value = name; } - setPreview();"; + "; return $ret; } + + /** + * Creates dropdown items that have localized example names, instead of cryptic strings like 's f l' + * + * @param array un-prettied dropdown list + * @return array array of dropdown options + */ + public function getPrettyLocaleNameOptions($options) { + global $app_strings; + + $examples = array('s' => $app_strings['LBL_LOCALE_NAME_EXAMPLE_SALUTATION'], + 'f' => $app_strings['LBL_LOCALE_NAME_EXAMPLE_FIRST'], + 'l' => $app_strings['LBL_LOCALE_NAME_EXAMPLE_LAST'], + 't' => $app_strings['LBL_LOCALE_NAME_EXAMPLE_TITLE']); + $newOpts = array(); + foreach ($options as $key => $val) { + $newVal = ''; + $pieces = str_split($val); + foreach ($pieces as $piece) { + if (isset($examples[$piece])) { + $newVal .= $examples[$piece]; + } else { + $newVal .= $piece; + } + } + $newOpts[$key] = $newVal; + } + return $newOpts; + } //// END NAME DISPLAY FORMATTING CODE /////////////////////////////////////////////////////////////////////////// diff --git a/include/MVC/View/views/view.list.php b/include/MVC/View/views/view.list.php index 367ec2b1..05812f2e 100644 --- a/include/MVC/View/views/view.list.php +++ b/include/MVC/View/views/view.list.php @@ -70,7 +70,7 @@ class ViewList extends SugarView{ if( !file_exists($metadataFile) ) sugar_die($GLOBALS['app_strings']['LBL_NO_ACTION'] ); - require_once($metadataFile); + 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 @@ -209,25 +209,25 @@ class ViewList extends SugarView{ if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php')) { - require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php'); + require('custom/modules/'.$this->module.'/metadata/searchdefs.php'); } elseif (!empty($metafiles[$this->module]['searchdefs'])) { - require_once($metafiles[$this->module]['searchdefs']); + require($metafiles[$this->module]['searchdefs']); } elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php')) { - require_once('modules/'.$this->module.'/metadata/searchdefs.php'); + require('modules/'.$this->module.'/metadata/searchdefs.php'); } if(!empty($metafiles[$this->module]['searchfields'])) - require_once($metafiles[$this->module]['searchfields']); + require($metafiles[$this->module]['searchfields']); elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php')) - require_once('modules/'.$this->module.'/metadata/SearchFields.php'); + require('modules/'.$this->module.'/metadata/SearchFields.php'); if(file_exists('custom/modules/'.$this->module.'/metadata/SearchFields.php')){ - require_once('custom/modules/'.$this->module.'/metadata/SearchFields.php'); + require('custom/modules/'.$this->module.'/metadata/SearchFields.php'); } diff --git a/include/MVC/View/views/view.metadata.php b/include/MVC/View/views/view.metadata.php index 0020d1a6..74f87e62 100644 --- a/include/MVC/View/views/view.metadata.php +++ b/include/MVC/View/views/view.metadata.php @@ -253,7 +253,7 @@ class VardefBrowser{ static function getModules(){ $modules = array(); foreach($GLOBALS['beanList'] as $module=>$object){ - if($object == 'aCase')$object = 'Case'; + $object = BeanFactory::getObjectName($module); VardefManager::loadVardef($module, $object); if(empty($GLOBALS['dictionary'][$object]['fields'] ))continue; $modules[] = $module; diff --git a/include/MVC/View/views/view.quickcreate.php b/include/MVC/View/views/view.quickcreate.php index c48152b0..54ec0f3d 100644 --- a/include/MVC/View/views/view.quickcreate.php +++ b/include/MVC/View/views/view.quickcreate.php @@ -42,9 +42,6 @@ require_once('include/EditView/EditView2.php'); class ViewQuickcreate extends ViewAjax { - /** - * $var true if this form is used in the Dashlet Container - */ protected $_isDCForm = false; /** diff --git a/include/MassUpdate.php b/include/MassUpdate.php index 7c1d4241..da174cbc 100644 --- a/include/MassUpdate.php +++ b/include/MassUpdate.php @@ -174,7 +174,10 @@ eoq; if(strcmp($value, '2') == 0)$_POST[$post] = 'off'; } } - if($this->sugarbean->field_defs[$post]['type'] == 'radioenum' && isset($_POST[$post]) && strlen($value) == 0){ + + if( ($this->sugarbean->field_defs[$post]['type'] == 'radioenum' && isset($_POST[$post]) && strlen($value) == 0) + || ($this->sugarbean->field_defs[$post]['type'] == 'enum' && $value == '__SugarMassUpdateClearField__') // Set to '' if it's an explicit clear + ){ $_POST[$post] = ''; } if ($this->sugarbean->field_defs[$post]['type'] == 'bool') { @@ -189,8 +192,8 @@ eoq; if($this->sugarbean->field_defs[$post]['type'] == 'datetimecombo' && !empty($_POST[$post])){ $_POST[$post] = $timedate->to_db($_POST[$post]); } - } - } + } + } //We need to disable_date_format so that date values for the beans remain in database format //notice we make this call after the above section since the calls to TimeDate class there could wind up diff --git a/include/MySugar/MySugar.php b/include/MySugar/MySugar.php index 4dba50aa..768b899f 100644 --- a/include/MySugar/MySugar.php +++ b/include/MySugar/MySugar.php @@ -84,17 +84,12 @@ class MySugar{ $guid = create_guid(); $options = array(); if (isset($_REQUEST['type']) && $_REQUEST['type'] == 'web') { - $dashlet_module = 'Home'; - $options['url'] = $_REQUEST['type_module']; - $fp = @fopen($options['url'],'r'); - if ( $fp ) { - $page = fread($fp,8192); - $matches = array(); - preg_match("/(.*)<\/title>/i",$page,$matches); - if ( isset($matches[1]) ) - $options['title'] = str_replace('<![CDATA[','',str_replace(']]>','',$matches[1])); - fclose($fp); - } + $dashlet_module = 'Home'; + require_once('include/Dashlets/DashletRssFeedTitle.php'); + $options['url'] = $_REQUEST['type_module']; + $webDashlet = new DashletRssFeedTitle($options['url']); + $options['title'] = $webDashlet->generateTitle(); + unset($webDashlet); } elseif (!empty($_REQUEST['type_module'])) { $dashlet_module = $_REQUEST['type_module']; @@ -417,5 +412,4 @@ EOJS; -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/include/MySugar/tpls/MySugar.tpl b/include/MySugar/tpls/MySugar.tpl index c3d3f4a1..0636184d 100644 --- a/include/MySugar/tpls/MySugar.tpl +++ b/include/MySugar/tpls/MySugar.tpl @@ -140,7 +140,7 @@ mySugarLoader.insert(); </td> <td rowspan="3"> - {sugar_getimage name="blank.gif" attr='border="0"'} + {sugar_getimage name="blank.gif" width='40' height='1' border='0'} </td> <td align='right'> {if !$lock_homepage}<input id="add_dashlets" class="button" type="button" value="{$lblAddDashlets}" onclick="return SUGAR.mySugar.showDashletsDialog();"/>{/if} diff --git a/include/OutboundEmail/OutboundEmail.php b/include/OutboundEmail/OutboundEmail.php index 7dc0c39f..0427f663 100644 --- a/include/OutboundEmail/OutboundEmail.php +++ b/include/OutboundEmail/OutboundEmail.php @@ -616,6 +616,9 @@ class OutboundEmail { if(!empty($oe) && !empty($oe->id)) { return $oe; } + else { + return $this->getSystemMailerSettings(); + } } $res = $this->db->query("SELECT id FROM outbound_email WHERE user_id = '{$user->id}' AND name='".$this->db->quote($name)."'"); $a = $this->db->fetchByAssoc($res); diff --git a/include/Popups/PopupSmarty.php b/include/Popups/PopupSmarty.php index aa52fceb..7b4a647a 100644 --- a/include/Popups/PopupSmarty.php +++ b/include/Popups/PopupSmarty.php @@ -79,6 +79,23 @@ class PopupSmarty extends ListViewSmarty{ } + /** + * Assign several arrow image attributes to TemplateHandler smarty. Such as width, height, etc. + * + * @return void + */ + function processArrowVars() + { + $pathParts = pathinfo(SugarThemeRegistry::current()->getImageURL('arrow.gif',false)); + + list($width,$height) = getimagesize($pathParts['dirname'].'/'.$pathParts['basename']); + + $this->th->ss->assign('arrowExt', $pathParts['extension']); + $this->th->ss->assign('arrowWidth', $width); + $this->th->ss->assign('arrowHeight', $height); + $this->th->ss->assign('arrowAlt', translate('LBL_SORT')); + } + /** * Processes the request. Calls ListViewData process. Also assigns all lang strings, export links, * This is called from ListViewDisplay @@ -167,6 +184,9 @@ class PopupSmarty extends ListViewSmarty{ //rrs $this->_build_field_defs(); + + // arrow image attributes + $this->processArrowVars(); } /* diff --git a/include/Popups/tpls/PopupGeneric.tpl b/include/Popups/tpls/PopupGeneric.tpl index 42347898..52a0bade 100644 --- a/include/Popups/tpls/PopupGeneric.tpl +++ b/include/Popups/tpls/PopupGeneric.tpl @@ -137,7 +137,6 @@ {capture assign="imageName"}arrow.{$arrowExt}{/capture} {sugar_getimage name="$imageName" ext='gif' width="$arrowWidth" height="$arrowHeight" alt="$arrowAlt" other_attributes='align="absmiddle" border="0"'} {/if} - </a> {else} {sugar_translate label=$params.label module=$pageData.bean.moduleDir} {/if} diff --git a/include/SearchForm/SearchForm.php b/include/SearchForm/SearchForm.php index 674d3344..a3038836 100644 --- a/include/SearchForm/SearchForm.php +++ b/include/SearchForm/SearchForm.php @@ -219,7 +219,7 @@ class SearchForm { $values = $this->searchFields; $where_clauses = array(); - $like_char = '%'; + //$like_char = '%'; $table_name = $this->bean->object_name; foreach($this->searchFields as $field=>$parms) { @@ -382,7 +382,7 @@ class SearchForm { break; case 'like': - $where .= $db_field . " like ".$this->bean->db->quoted($field_value); + $where .= $db_field . " like ".$this->bean->db->quoted($field_value.'%'); break; case 'in': $where .= $db_field . " in (".$field_value.')'; diff --git a/include/SearchForm/SearchForm2.php b/include/SearchForm/SearchForm2.php index e4b4ed4b..1abfcd09 100644 --- a/include/SearchForm/SearchForm2.php +++ b/include/SearchForm/SearchForm2.php @@ -132,7 +132,7 @@ require_once('include/EditView/EditView2.php'); 'name' => 'advanced', 'displayDiv' => 'display:none'); } - if($this->showCustom){ + if(isset($this->showCustom) && is_array($this->showCustom)){ foreach($this->showCustom as $v){ $this->nbTabs++; $this->tabs[]=array('title' => $GLOBALS['app_strings']["LNK_" . strtoupper($v)], @@ -540,10 +540,15 @@ require_once('include/EditView/EditView2.php'); } /** - * Create WHERE clause for search query - * @param bool $add_custom_fields Custom fields should be added? - * @param string $module Module to search - * @return string WHERE clause + * generateSearchWhere + * + * This function serves as the central piece of SearchForm2.php + * It is responsible for creating the WHERE clause for a given search operation + * + * @param bool $add_custom_fields boolean indicating whether or not custom fields should be added + * @param string $module Module to search against + * + * @return string the SQL WHERE clause based on the arguments supplied in SearchForm2 instance */ public function generateSearchWhere($add_custom_fields = false, $module='') { global $timedate; @@ -565,6 +570,7 @@ require_once('include/EditView/EditView2.php'); // a generic search form validation mechanism. $type = (!empty($this->seed->field_name_map[$field]['type']))?$this->seed->field_name_map[$field]['type']:''; + //If range search is enabled for the field, we first check if this is the starting range if(!empty($parms['enable_range_search']) && empty($type)) { if(preg_match('/^start_range_(.*?)$/', $field, $match)) @@ -596,7 +602,7 @@ require_once('include/EditView/EditView2.php'); if(in_array($parms['operator'], array('=', 'between', "not_equal", 'less_than', 'greater_than', 'less_than_equals', 'greater_than_equals'))) { $field_type = isset($this->seed->field_name_map[$real_field]['type']) ? $this->seed->field_name_map[$real_field]['type'] : ''; - if($field_type == 'datetimecombo' || $field_type == 'datetime') + if($field_type == 'datetimecombo' || $field_type == 'datetime' || $field_type == 'int') { $type = $field_type; } @@ -614,6 +620,7 @@ require_once('include/EditView/EditView2.php'); } } + //Test to mark whether or not the field is a custom field if(!empty($this->seed->field_name_map[$field]['source']) && ($this->seed->field_name_map[$field]['source'] == 'custom_fields' || //Non-db custom fields, such as custom relates @@ -621,10 +628,9 @@ require_once('include/EditView/EditView2.php'); && (!empty($this->seed->field_name_map[$field]['custom_module']) || isset($this->seed->field_name_map[$field]['ext2']))))){ $customField = true; - } + } - if ($type == 'int') { - if (!empty($parms['value'])) { + if ($type == 'int' && !empty($parms['value']) && strpos($parms['value'], ',') > 0) { $tempVal = explode(',', $parms['value']); $newVal = ''; foreach($tempVal as $key => $val) { @@ -636,7 +642,6 @@ require_once('include/EditView/EditView2.php'); $newVal .= $val; } $parms['value'] = $newVal; - } } elseif($type == 'html' && $customField) { continue; } @@ -783,7 +788,7 @@ require_once('include/EditView/EditView2.php'); if($type == 'date') { // The regular expression check is to circumvent special case YYYY-MM $operator = '='; - if(preg_match('/^\d{4}.\d{1,2}$/', $field_value) == 0) { + if(preg_match('/^\d{4}.\d{1,2}$/', $field_value) != 0) { // preg_match returns number of matches $db_field = $this->seed->db->convert($db_field, "date_format", array("%Y-%m")); } else { $field_value = $timedate->to_db_date($field_value, false); @@ -865,9 +870,10 @@ require_once('include/EditView/EditView2.php'); } $values[] = $tmpfield_value; } - $field_value = join('<>',$values); - if(!empty($parms['enable_range_search']) && $parms['operator'] == '=') + $field_value = join('<>',$values); + + if(!empty($parms['enable_range_search']) && $parms['operator'] == '=' && $type != 'int') { // Databases can't really search for floating point numbers, because they can't be accurately described in binary, // So we have to fuzz out the math a little bit @@ -887,6 +893,12 @@ require_once('include/EditView/EditView2.php'); $where .= " OR "; } + //Here we make a last attempt to determine the field type if possible + if(empty($type) && isset($parms['db_field']) && isset($parms['db_field'][0]) && isset($this->seed->field_defs[$parms['db_field'][0]]['type'])) + { + $type = $this->seed->field_defs[$parms['db_field'][0]]['type']; + } + switch(strtolower($operator)) { case 'subquery': $in = 'IN'; diff --git a/include/Smarty/plugins/function.sugar_translate.php b/include/Smarty/plugins/function.sugar_translate.php index bfbf143b..d1c8c324 100644 --- a/include/Smarty/plugins/function.sugar_translate.php +++ b/include/Smarty/plugins/function.sugar_translate.php @@ -80,12 +80,11 @@ function smarty_function_sugar_translate($params, &$smarty) $value = addslashes($value); $value = str_replace(array(''', '''), "\'", $value); } - if(!empty($params['trimColon']) && !$params['trimColon']) { + if(isset($params['trimColon']) && !$params['trimColon']) { return $value; - } - elseif($params['label'] == '0') - return translate("DEFAULT", $module); - else { + } elseif($params['label'] == '0') { + return translate("DEFAULT", $module); + } else { return preg_replace("/([:]|\xEF\xBC\x9A)[\\s]*$/", "", $value); } } diff --git a/include/SugarCharts/SugarChart.php b/include/SugarCharts/SugarChart.php index 36f24eeb..52c9802a 100644 --- a/include/SugarCharts/SugarChart.php +++ b/include/SugarCharts/SugarChart.php @@ -531,40 +531,66 @@ class SugarChart { $processed = array(); if (isset($drill_down) && $drill_down != ''){ - for($i =0; $i < count($new_data[$groupByKey]); $i++){ - if ($new_data[$groupByKey][$i][$group_by] == $groupByKey){ - if ($drill_down == 'user_name'){ - $drill_down_param = '&assigned_user_id[]=' . urlencode($new_data[$groupByKey][$i]['assigned_user_id']); - } - else if ($drill_down == 'm'){ - $drill_down_param = '&date_closed_advanced=' . urlencode($new_data[$groupByKey][$i][$drill_down]); - } - else{ - $paramValue = (isset($new_data[$groupByKey][$i][$drill_down."_dom_option"]) && $new_data[$groupByKey][$i][$drill_down."_dom_option"] != '') ? $new_data[$groupByKey][$i][$drill_down."_dom_option"] : $new_data[$groupByKey][$i][$drill_down]; - $drill_down_param = '&' . $drill_down . '=' . urlencode($paramValue); - } - - if($this->is_currency) { - $sub_amount = $this->formatNumber($this->convertCurrency($new_data[$groupByKey][$i]['total'])); - $sub_amount_formatted = $this->currency_symbol . $sub_amount . 'K'; - //bug: 38877 - do not format the amount for the value as it breaks the chart - $sub_amount = $this->convertCurrency($new_data[$groupByKey][$i]['total']); - } else { - $sub_amount = $new_data[$groupByKey][$i]['total']; - $sub_amount_formatted = $sub_amount; - } - - $data .= $this->processDataGroup(4, $new_data[$groupByKey][$i][$drill_down], - $sub_amount, - $sub_amount_formatted, - $url . $drill_down_param ); - array_push($processed, $new_data[$groupByKey][$i][$drill_down]); - } - } - $not_processed = array_diff($this->super_set, $processed); - foreach ($not_processed as $title){ - $data .= $this->processDataGroup(4, $title, 'NULL', '', $url); - } + + /* + * We have to iterate users in order they are in super_set for every group. + * That is required for correct pileup user links to user colors in a chart. + */ + foreach ($this->super_set as $superSetKey => $superSetValue) + { + $objectInSaleStage = false; + foreach ($value as $internalKey => $internalValue) + { + if ($internalValue[$drill_down] == $superSetValue) + { + $objectInSaleStage = $value[$internalKey]; + } + } + + if ($objectInSaleStage) + { + if (isset($objectInSaleStage[$group_by]) && $objectInSaleStage[$group_by] == $groupByKey) + { + if ($drill_down == 'user_name') + { + $drill_down_param = '&assigned_user_id[]=' . urlencode($objectInSaleStage['assigned_user_id']); + } + else if ($drill_down == 'm') + { + $drill_down_param = '&date_closed_advanced=' . urlencode($objectInSaleStage[$drill_down]); + } + else + { + $paramValue = (isset($objectInSaleStage[$drill_down . "_dom_option"]) && $objectInSaleStage[$drill_down . "_dom_option"] != '') ? $objectInSaleStage[$drill_down . "_dom_option"] : $objectInSaleStage[$drill_down]; + $drill_down_param = '&' . $drill_down . '=' . urlencode($paramValue); + } + + if ($this->is_currency) + { + $sub_amount = $this->formatNumber($this->convertCurrency($objectInSaleStage['total'])); + $sub_amount_formatted = $this->currency_symbol . $sub_amount . 'K'; + //bug: 38877 - do not format the amount for the value as it breaks the chart + $sub_amount = $this->convertCurrency($objectInSaleStage['total']); + } + else + { + $sub_amount = $objectInSaleStage['total']; + $sub_amount_formatted = $sub_amount; + } + + $data .= $this->processDataGroup(4, $objectInSaleStage[$drill_down], $sub_amount, $sub_amount_formatted, $url . $drill_down_param); + } + else + { + $data .= $this->nullGroup($superSetValue, $url); + } + } + else + { + $data .= $this->nullGroup($superSetValue, $url); + } + } + } $data .= $this->tab('</subgroups>',3); @@ -573,6 +599,18 @@ class SugarChart { return $data; } + /** + * nullGroup + * This function sets a null group by clause + * + * @param $sugarSetValue Mixed value + * @param $url String value of URL for the link + */ + public function nullGroup($superSetValue, $url) { + return $this->processDataGroup(4, $superSetValue, 'NULL', '', $url); + } + + /** * returns a name for the XML File * @@ -838,8 +876,7 @@ class SugarChart { } function getMySugarChartResources() { - - $mySugarRources = ""; + $mySugarResources = ""; return $mySugarResources; } diff --git a/include/SugarEmailAddress/SugarEmailAddress.php b/include/SugarEmailAddress/SugarEmailAddress.php index 22bddeef..bcf9ab05 100644 --- a/include/SugarEmailAddress/SugarEmailAddress.php +++ b/include/SugarEmailAddress/SugarEmailAddress.php @@ -114,6 +114,9 @@ class SugarEmailAddress extends SugarBean { $module_dir = $this->getCorrectedModule($bean->module_dir); $this->addresses = $this->getAddressesByGUID($bean->id, $module_dir); $this->populateLegacyFields($bean); + if (isset($bean->email1) && !isset($bean->fetched_row['email1'])) { + $bean->fetched_row['email1'] = $bean->email1; + } return; } diff --git a/include/SugarEmailAddress/templates/forEditView.tpl b/include/SugarEmailAddress/templates/forEditView.tpl index a79e6fd0..fe8fd013 100644 --- a/include/SugarEmailAddress/templates/forEditView.tpl +++ b/include/SugarEmailAddress/templates/forEditView.tpl @@ -47,7 +47,7 @@ $emailInstances['module']++; <script type="text/javascript" language="javascript"> var emailAddressWidgetLoaded = false; </script> -<script type="text/javascript" src="{sugar_getjspath file="include/SugarEmailAddress/SugarEmailAddress.js"}"></script> +<script type="text/javascript" src="include/SugarEmailAddress/SugarEmailAddress.js"></script> <script type="text/javascript"> var module = '{$module}'; </script> @@ -60,8 +60,8 @@ var emailAddressWidgetLoaded = false; <td scope="row" NOWRAP> <input type=hidden id="{$module}_email_widget_id" name="{$module}_email_widget_id" value=""> <input type=hidden id='emailAddressWidget' name='emailAddressWidget' value='1'> - {capture assign="other_attributes"}id="{$module}{$index}_email_widget_add" onclick="javascript:SUGAR.EmailAddressWidget.instances.{$module}{$index}.addEmailAddress('{$module}emailAddressesTable{$index}','',''); return false;"{/capture} - <button {$other_attributes}>{sugar_getimage name="id-ff-add" alt="$app_strings.LBL_ID_FF_ADD" ext=".png"}</button> + {capture assign="other_attributes"}id="{$module}{$index}_email_widget_add" onclick="javascript:SUGAR.EmailAddressWidget.instances.{$module}{$index}.addEmailAddress('{$module}emailAddressesTable{$index}','','');"{/capture} + <button type="button" {$other_attributes}>{sugar_getimage name="id-ff-add" alt="$app_strings.LBL_ID_FF_ADD" ext=".png"}</button> </td> <td scope="row" NOWRAP>   diff --git a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php index 753e41da..d5b5a5e2 100644 --- a/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php +++ b/include/SugarFields/Fields/Collection/ViewSugarFieldCollection.php @@ -209,12 +209,11 @@ class ViewSugarFieldCollection{ // If there is extra field to show. if(isset($this->displayParams['collection_field_list'])){ - require_once('include/SugarFields/SugarFieldHandler.php'); - $sfh = new SugarFieldHandler(); - vardefmanager::loadVardef($this->related_module, $GLOBALS['beanList'][$this->related_module]); + $relatedObject = BeanFactory::getObjectName($this->related_module); + vardefmanager::loadVardef($this->related_module, $relatedObject); foreach($this->displayParams['collection_field_list'] as $k=>$v){ $javascript=''; - $collection_field_vardef = $GLOBALS['dictionary'][$GLOBALS['beanList'][$this->related_module]]['fields'][$v['name']]; + $collection_field_vardef = $GLOBALS['dictionary'][$relatedObject]['fields'][$v['name']]; // For each extra field the params which are not displayParams will be consider as params to override the vardefs values. foreach($v as $k_override=>$v_override){ @@ -540,6 +539,4 @@ FRA; return $tplName; } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/include/SugarFields/Fields/Datetimecombo/EditView.tpl b/include/SugarFields/Fields/Datetimecombo/EditView.tpl index 46d54ef7..0b6dd97b 100644 --- a/include/SugarFields/Fields/Datetimecombo/EditView.tpl +++ b/include/SugarFields/Fields/Datetimecombo/EditView.tpl @@ -92,7 +92,9 @@ document.getElementById('{{$idname}}_time_section').innerHTML = text; //Call eval on the update function to handle updates to calendar picker object eval(combo_{{$idname}}.jsscript('{{$displayParams.updateCallback}}')); -addToValidate('{$form_name}',"{{$idname}}_date",'date',false,"{{$idname}}"); +//bug 47718: this causes too many addToValidates to be called, resulting in the error messages being displayed multiple times +// removing it here to mirror the Datetime SugarField, where the validation is not added at this level +//addToValidate('{$form_name}',"{{$idname}}_date",'date',false,"{{$idname}}"); addToValidateBinaryDependency('{$form_name}',"{{$idname}}_hours", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_HOURS}" ,"{{$idname}}_date"); addToValidateBinaryDependency('{$form_name}', "{{$idname}}_minutes", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_MINUTES}" ,"{{$idname}}_date"); addToValidateBinaryDependency('{$form_name}', "{{$idname}}_meridiem", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_MERIDIEM}","{{$idname}}_date"); diff --git a/include/SugarFields/Fields/File/SugarFieldFile.php b/include/SugarFields/Fields/File/SugarFieldFile.php index ba65ba12..863917c0 100644 --- a/include/SugarFields/Fields/File/SugarFieldFile.php +++ b/include/SugarFields/Fields/File/SugarFieldFile.php @@ -48,7 +48,6 @@ class SugarFieldFile extends SugarFieldBase { if ( empty($vardef['docUrl']) ) { $vardef['docUrl'] = 'doc_url'; } - $displayParams['max_fileupload_size'] = $this->getMaxFileUploadSize(); } else { $vardef['allowEapm'] = false; } @@ -189,65 +188,4 @@ class SugarFieldFile extends SugarFieldBase { } } } - - /** - * Takes the size from the php.ini and converts it to bytes - * - * @param string $size - * @return int - */ - protected function convertIniSizeToBytes($size) - { - $ret_size = $size; - switch (substr (strtolower($size), -1)){ - case 'k': - $ret_size = (int)$size * 1024; - break; - case 'm': - $ret_size = (int)$size * 1048576; - break; - case 'g': - $ret_size = (int)$size * 1073741824; - break; - } - - return $ret_size; - } - - /** - * Converts the size into a more reader friendly format - * - * @param int $size - * @return string - */ - protected function getReaderFriendlySize($size) - { - if(($size / 1024) < 1024) { - $size = number_format(($size / 1024), 2); - $size .= ' kb'; - } - else if(($size / 1048576) < 1024) { - $size = number_format(($size / 1048576), 2); - $size .= ' mb'; - } - else if(($size / 1073741824) < 1024) { - $size = number_format(($size / 1073741824), 2); - $size .= ' gb'; - } - - return $size; - } - - /** - * Returns a string that represents the max file size that can be uploaded. - * - * @return string - */ - protected function getMaxFileUploadSize() - { - $max_upload_size = min($this->convertIniSizeToBytes(ini_get('post_max_size')), $this->convertIniSizeToBytes(ini_get('upload_max_filesize'))); - $max_upload_size = min($GLOBALS['sugar_config']['upload_maxsize'],$max_upload_size); - - return $this->getReaderFriendlySize($max_upload_size); - } } diff --git a/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php b/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php index 99b41fff..3bfecf69 100644 --- a/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php +++ b/include/SugarFields/Fields/Multienum/SugarFieldMultienum.php @@ -106,9 +106,13 @@ class SugarFieldMultienum extends SugarFieldEnum // parse to see if all the values given are valid foreach ( $enum_list as $key => $enum_value ) { $enum_list[$key] = $enum_value = trim($enum_value); - if ( parent::importSanitize($enum_value,$vardef,$focus,$settings) === false ) { + $sanitizedValue = parent::importSanitize($enum_value,$vardef,$focus,$settings); + if ($sanitizedValue === false ) { return false; } + else { + $enum_list[$key] = $sanitizedValue; + } } $value = encodeMultienumValue($enum_list); diff --git a/include/SugarFields/Fields/Radioenum/SugarFieldRadioenum.php b/include/SugarFields/Fields/Radioenum/SugarFieldRadioenum.php new file mode 100644 index 00000000..d123d430 --- /dev/null +++ b/include/SugarFields/Fields/Radioenum/SugarFieldRadioenum.php @@ -0,0 +1,67 @@ +<?php +if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + +require_once('include/SugarFields/Fields/Base/SugarFieldBase.php'); + +/** + * Created: Aug 22, 2011 + */ +class SugarFieldRadioenum extends SugarFieldBase { + /** + * Decrypt encrypt fields values before inserting them into the emails + * + * @param string $inputField + * @param mixed $vardef + * @param mixed $displayParams + * @param int $tabindex + * @return string + */ + public function getEmailTemplateValue($inputField, $vardef, $displayParams = array(), $tabindex = 0){ + global $app_list_strings; + + /** + * If array doesn't exist for some reason, return key. + */ + if (!empty($app_list_strings[$vardef['options']])) { + if (isset($app_list_strings[$vardef['options']][$inputField])) { + return $app_list_strings[$vardef['options']][$inputField]; + } + } + return $inputField; + } +} \ No newline at end of file diff --git a/include/SugarFields/Fields/Relate/SearchView.tpl b/include/SugarFields/Fields/Relate/SearchView.tpl index 114a7ea8..31fbc135 100644 --- a/include/SugarFields/Fields/Relate/SearchView.tpl +++ b/include/SugarFields/Fields/Relate/SearchView.tpl @@ -40,7 +40,7 @@ {{if empty($displayParams.hideButtons) }} <span class="id-ff multiple"> {{if empty($displayParams.clearOnly) }} -<button type="button" name="btn_{{sugarvar key='name'}}" {{if !empty($tabindex)}} tabindex="{{$tabindex}}" {{/if}} title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" class="button{{if empty($displayParams.selectOnly) }} firstChild{{/if}}" value="{$APP.LBL_SELECT_BUTTON_LABEL}" onclick='open_popup("{{sugarvar key='module'}}", 600, 400, "", true, false, {{$displayParams.popupData}}, "single", true);'>{sugar_getimage alt=$app_strings.LBL_ID_FF_SELECT name="id-ff-select" ext=".png" other_attributes=''}</button>{{/if}} +<button type="button" name="btn_{{sugarvar key='name'}}" {{if !empty($tabindex)}} tabindex="{{$tabindex}}" {{/if}} title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" class="button{{if empty($displayParams.selectOnly) }} firstChild{{/if}}" value="{$APP.LBL_SELECT_BUTTON_LABEL}" onclick='open_popup("{{sugarvar key='module'}}", 600, 400, "{{$displayParams.initial_filter}}", true, false, {{$displayParams.popupData}}, "single", true);'>{sugar_getimage alt=$app_strings.LBL_ID_FF_SELECT name="id-ff-select" ext=".png" other_attributes=''}</button>{{/if}} {{if empty($displayParams.selectOnly) }}<button type="button" name="btn_clr_{{sugarvar key='name'}}" {{if !empty($tabindex)}} tabindex="{{$tabindex}}" {{/if}} title="{$APP.LBL_CLEAR_BUTTON_TITLE}" accessKey="{$APP.LBL_CLEAR_BUTTON_KEY}" class="button{{if empty($displayParams.clearOnly) }} lastChild{{/if}}" onclick="this.form.{{sugarvar key='name'}}.value = ''; this.form.{{sugarvar memberName='vardef.id_name' key='name'}}.value = '';" value="{$APP.LBL_CLEAR_BUTTON_LABEL}">{sugar_getimage name="id-ff-clear" alt=$app_strings.LBL_ID_FF_CLEAR ext=".png" other_attributes=''}</button> {{/if}} </span> diff --git a/include/SugarObjects/VardefManager.php b/include/SugarObjects/VardefManager.php index add17dec..cbfed185 100644 --- a/include/SugarObjects/VardefManager.php +++ b/include/SugarObjects/VardefManager.php @@ -155,6 +155,8 @@ class VardefManager{ */ static function saveCache($module,$object, $additonal_objects= array()){ + 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); if ( sugar_is_file($file) && is_readable($file)) { @@ -196,11 +198,14 @@ class VardefManager{ static function _clearCache($module_dir = '', $object_name = ''){ if(!empty($module_dir) && !empty($object_name)){ - if($object_name == 'aCase') { - $object_name = 'Case'; + //Some modules like cases have a bean name that doesn't match the object name + if (empty($GLOBALS['dictionary'][$object_name])) { + $newName = BeanFactory::getObjectName($module_dir); + $object_name = $newName != false ? $newName : $object_name; } - + $file = sugar_cached('modules/').$module_dir.'/' . $object_name . 'vardefs.php'; + if(file_exists($file)){ unlink($file); $key = "VardefManager.$module_dir.$object_name"; @@ -242,12 +247,22 @@ class VardefManager{ //Some modules have multiple beans, we need to see if this object has a module_dir that is different from its module_name if(!$found){ $temp = BeanFactory::newBean($module); - if ($temp && $temp->module_dir != $temp->module_name && !empty($beanList[$temp->module_dir])) + if ($temp) { - self::refreshVardefs($temp->module_dir, $beanList[$temp->module_dir], $additional_search_paths, $cacheCustom); + $object_name = BeanFactory::getObjectName($temp->module_dir); + if ($temp && $temp->module_dir != $temp->module_name && !empty($object_name)) + { + self::refreshVardefs($temp->module_dir, $object_name, $additional_search_paths, $cacheCustom); + } } } + //Some modules like cases have a bean name that doesn't match the object name + if (empty($dictionary[$object])) { + $newName = BeanFactory::getObjectName($module); + $object = $newName != false ? $newName : $object; + } + //load custom fields into the vardef cache if($cacheCustom){ require_once("modules/DynamicFields/DynamicField.php"); @@ -257,7 +272,7 @@ class VardefManager{ //great! now that we have loaded all of our vardefs. //let's go save them to the cache file. - if(!empty($GLOBALS['dictionary'][$object])) { + if(!empty($dictionary[$object])) { VardefManager::saveCache($module, $object); } } @@ -271,8 +286,10 @@ class VardefManager{ protected static function getLinkFieldsForModule($module, $object) { global $dictionary; - if($object == 'aCase') { - $object = 'Case'; + //Some modules like cases have a bean name that doesn't match the object name + if (empty($dictionary[$object])) { + $newName = BeanFactory::getObjectName($module); + $object = $newName != false ? $newName : $object; } if (empty($dictionary[$object])) { self::loadVardef($module, $object, false, array('ignore_rel_calc_fields' => true)); diff --git a/include/SugarObjects/forms/PersonFormBase.php b/include/SugarObjects/forms/PersonFormBase.php index 60a10118..d1dfe750 100644 --- a/include/SugarObjects/forms/PersonFormBase.php +++ b/include/SugarObjects/forms/PersonFormBase.php @@ -194,7 +194,7 @@ function checkForDuplicates($prefix='') require_once('include/MVC/SugarModule.php'); $focus = SugarModule::get($this->moduleName)->loadBean(); - $query = $this->getDuplicateQuery(); + $query = $this->getDuplicateQuery($prefix); if(empty($query)) { @@ -238,7 +238,7 @@ function checkForDuplicates($prefix='') $query2 = "SELECT id, first_name, last_name, title FROM {$focus->table_name} WHERE deleted=0 AND id = '" . $row['id'] . "'"; $result2 = $db->query($query2); $r = $db->fetchByAssoc($result2); - if(isset($r['id'])) { + if(isset($r['id']) && !array_key_exists('id', $r)) { $rows[]=$r; } } //if diff --git a/include/SugarObjects/templates/person/Person.php b/include/SugarObjects/templates/person/Person.php index 7f87688b..40b9da07 100644 --- a/include/SugarObjects/templates/person/Person.php +++ b/include/SugarObjects/templates/person/Person.php @@ -64,22 +64,46 @@ class Person extends Basic function _create_proper_name_field() { global $locale, $app_list_strings; - if ($this->createLocaleFormattedName) { - // Bug 38648 - If the given saluation doesn't exist in the dropdown, don't display it as part of the full name - $salutation = ''; - if (isset($this->field_defs['salutation']['options']) && - isset($app_list_strings[$this->field_defs['salutation']['options']]) && - isset($app_list_strings[$this->field_defs['salutation']['options']][$this->salutation])) { - $salutation = $app_list_strings[$this->field_defs['salutation']['options']][$this->salutation]; - } - $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $salutation, $this->title); - } else { - $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name); - } - - $this->name = $full_name; - $this->full_name = $full_name; //used by campaigns - } + + // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs + $first_name = ""; $last_name = ""; $salutation = ""; $title = ""; + + // first name has at least read access + $first_name = $this->first_name; + + // last name has at least read access + $last_name = $this->last_name; + + + // salutation has at least read access + if(isset($this->field_defs['salutation']['options']) + && isset($app_list_strings[$this->field_defs['salutation']['options']]) + && isset($app_list_strings[$this->field_defs['salutation']['options']][$this->salutation]) ) { + + $salutation = $app_list_strings[$this->field_defs['salutation']['options']][$this->salutation]; + } // if + + // last name has at least read access + $title = $this->title; + + // Corner Case: + // Both first name and last name cannot be empty, at least one must be shown + // In that case, we can ignore field level ACL and just display last name... + // In the ACL field level access settings, last_name cannot be set to "none" + if (empty($first_name) && empty($last_name)) { + $full_name = $locale->getLocaleFormattedName("", $last_name, $salutation, $title); + } else { + if($this->createLocaleFormattedName) { + $full_name = $locale->getLocaleFormattedName($first_name, $last_name, $salutation, $title); + } else { + $full_name = $locale->getLocaleFormattedName($first_name, $last_name); + } + } + + $this->name = $full_name; + $this->full_name = $full_name; //used by campaigns + } + function save($check_notify=false) { $this->add_address_streets('primary_address_street'); diff --git a/include/SugarObjects/templates/person/language/en_us.lang.php b/include/SugarObjects/templates/person/language/en_us.lang.php index 35b20bc3..c627726d 100644 --- a/include/SugarObjects/templates/person/language/en_us.lang.php +++ b/include/SugarObjects/templates/person/language/en_us.lang.php @@ -82,4 +82,5 @@ $mod_strings = array( 'LBL_ASSISTANT_PHONE'=>'Assistant Phone', 'LBL_WORK_PHONE'=>'Work Phone', 'LNK_IMPORT_VCARD' => 'Create From vCard', +'LBL_ANY_EMAIL' => 'Any Email', ); \ No newline at end of file diff --git a/include/SugarObjects/templates/person/metadata/searchdefs.php b/include/SugarObjects/templates/person/metadata/searchdefs.php index 4aac44da..890f1935 100644 --- a/include/SugarObjects/templates/person/metadata/searchdefs.php +++ b/include/SugarObjects/templates/person/metadata/searchdefs.php @@ -56,6 +56,7 @@ $module_name = '<module_name>'; 'address_city', 'created_by_name', 'do_not_call', + 'email', ), ), ); diff --git a/include/SugarObjects/templates/person/vardefs.php b/include/SugarObjects/templates/person/vardefs.php index b1db068c..35304227 100644 --- a/include/SugarObjects/templates/person/vardefs.php +++ b/include/SugarObjects/templates/person/vardefs.php @@ -135,6 +135,20 @@ $vardefs =array( 'comment' => 'Home phone number of the contact', 'merge_filter' => 'enabled', ), + //bug 42902 + 'email'=> array( + 'name' => 'email', + 'type' => 'email', + 'query_type' => 'default', + 'source' => 'non-db', + 'operator' => 'subquery', + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', + 'db_field' => array( + 'id', + ), + 'vname' =>'LBL_ANY_EMAIL', + 'studio' => array('visible'=>false, 'searchview'=>true), + ), 'phone_mobile' => array ( 'name' => 'phone_mobile', @@ -191,7 +205,8 @@ $vardefs =array( 'source' => 'non-db', 'group'=>'email1', 'merge_filter' => 'enabled', - 'studio' => array('editField' => true, 'searchview' => false), + 'studio' => array('editField' => true, 'searchview' => false, 'popupsearch' => false), // bug 46859 + ), 'email2' => array( @@ -224,6 +239,7 @@ $vardefs =array( 'massupdate' => false, 'studio'=>'false', ), + 'primary_address_street' => array ( 'name' => 'primary_address_street', @@ -377,6 +393,7 @@ $vardefs =array( 'comment' => 'Phone number of the assistant of the contact', 'merge_filter' => 'enabled', ), + 'email_addresses_primary' => array ( 'name' => 'email_addresses_primary', diff --git a/include/SugarTheme/SugarTheme.php b/include/SugarTheme/SugarTheme.php index 18d5bcdd..adea0ec1 100644 --- a/include/SugarTheme/SugarTheme.php +++ b/include/SugarTheme/SugarTheme.php @@ -324,8 +324,9 @@ class SugarTheme { // Bug 28309 - Set the current directory to one which we expect it to be (i.e. the root directory of the install set_include_path(realpath(dirname(__FILE__) . '/../..') . PATH_SEPARATOR . get_include_path()); + chdir(dirname(__FILE__) . '/../..'); // destruct can be called late, and chdir could change $cachedir = sugar_cached($this->getFilePath()); - + sugar_mkdir($cachedir, 0775, true); // clear out the cache on destroy if we are asked to if ( $this->_clearCacheOnDestroy ) { diff --git a/include/SugarTinyMCE.php b/include/SugarTinyMCE.php index 05e974b6..57983260 100644 --- a/include/SugarTinyMCE.php +++ b/include/SugarTinyMCE.php @@ -70,7 +70,8 @@ class SugarTinyMCE { ); var $pluginsConfig = array( - 'email_compose_light' => 'insertdatetime,paste,directionality,safari' + 'email_compose_light' => 'insertdatetime,paste,directionality,safari', + 'email_compose' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality,fullpage', ); var $defaultConfig = array( diff --git a/include/TimeDate.php b/include/TimeDate.php index c984fbf2..39b38f71 100644 --- a/include/TimeDate.php +++ b/include/TimeDate.php @@ -54,6 +54,8 @@ class TimeDate const DB_DATETIME_FORMAT = 'Y-m-d H:i:s'; const RFC2616_FORMAT = 'D, d M Y H:i:s \G\M\T'; + const SECONDS_IN_A_DAY = 86400; + // Standard DB date/time formats // they are constant, vars are for compatibility public $dbDayFormat = self::DB_DATE_FORMAT; diff --git a/include/database/DBManager.php b/include/database/DBManager.php index d51cd3bf..5a9dbcbd 100644 --- a/include/database/DBManager.php +++ b/include/database/DBManager.php @@ -239,6 +239,7 @@ abstract class DBManager * create_user Can create users for Sugar * create_db Can create databases * collation Supports setting collations + * disable_keys Supports temporarily disabling keys (for upgrades, etc.) * * @abstract * Special cases: @@ -1614,7 +1615,21 @@ protected function checkQuery($sql, $object_name = false) return 0; } - /** + /** + * Returns the number of rows returned by the result + * + * This function can't be reliably implemented on most DB, do not use it. + * @abstract + * @deprecated + * @param resource $result + * @return int + */ + public function getRowCount($result) + { + return 0; + } + + /** * Get table description * @param string $tablename * @param bool $reload true means load from DB, false allows using cache @@ -3340,6 +3355,24 @@ protected function checkQuery($sql, $object_name = false) { } + /** + * Disable keys on the table + * @abstract + * @param string $tableName + */ + public function disableKeys($tableName) + { + } + + /** + * Re-enable keys on the table + * @abstract + * @param string $tableName + */ + public function enableKeys($tableName) + { + } + /** * Quote string in DB-specific manner * @param string $string diff --git a/include/database/MysqlManager.php b/include/database/MysqlManager.php index d4f6ff85..882772b2 100644 --- a/include/database/MysqlManager.php +++ b/include/database/MysqlManager.php @@ -151,6 +151,7 @@ class MysqlManager extends DBManager "fulltext" => true, "collation" => true, "create_db" => true, + "disable_keys" => true, ); /** @@ -168,6 +169,7 @@ class MysqlManager extends DBManager if(is_array($sql)) { return $this->queryArray($sql, $dieOnError, $msg, $suppress); } + parent::countQuery($sql); $GLOBALS['log']->info('Query:' . $sql); $this->checkConnection(); @@ -196,6 +198,20 @@ class MysqlManager extends DBManager return mysql_affected_rows($this->getDatabase()); } + /** + * Returns the number of rows returned by the result + * + * This function can't be reliably implemented on most DB, do not use it. + * @abstract + * @deprecated + * @param resource $result + * @return int + */ + public function getRowCount($result) + { + return mysql_num_rows($result); + } + /** * Disconnects from the database * @@ -1071,7 +1087,7 @@ class MysqlManager extends DBManager return $err; } } - + return false; } /** @@ -1397,4 +1413,24 @@ class MysqlManager extends DBManager ) ); } + + /** + * Disable keys on the table + * @abstract + * @param string $tableName + */ + public function disableKeys($tableName) + { + return $this->query('ALTER TABLE '.$tableName.' DISABLE KEYS'); + } + + /** + * Re-enable keys on the table + * @abstract + * @param string $tableName + */ + public function enableKeys($tableName) + { + return $this->query('ALTER TABLE '.$tableName.' ENABLE KEYS'); + } } diff --git a/include/database/MysqliManager.php b/include/database/MysqliManager.php index c17a770d..6436b2a5 100644 --- a/include/database/MysqliManager.php +++ b/include/database/MysqliManager.php @@ -120,7 +120,8 @@ class MysqliManager extends MysqlManager { if(is_array($sql)) { return $this->queryArray($sql, $dieOnError, $msg, $suppress); - } + } + static $queryMD5 = array(); parent::countQuery($sql); @@ -168,6 +169,21 @@ class MysqliManager extends MysqlManager } /** + * Returns the number of rows returned by the result + * + * This function can't be reliably implemented on most DB, do not use it. + * @abstract + * @deprecated + * @param resource $result + * @return int + */ + public function getRowCount($result) + { + return mysqli_num_rows($result); + } + + + /** * Disconnects from the database * * Also handles any cleanup needed diff --git a/include/export_utils.php b/include/export_utils.php index f23fec89..bc8c7047 100644 --- a/include/export_utils.php +++ b/include/export_utils.php @@ -233,10 +233,7 @@ function export($type, $records = null, $members = false, $sample=false) { if($populate){ //this is a sample request with no data, so create fake datarows - - $content .= returnFakeDataRow($focus,$fields_array,$sampleRecordNum); - - + $content .= returnFakeDataRow($focus,$fields_array,$sampleRecordNum); }else{ //process retrieved record while($val = $db->fetchByAssoc($result, false)) { @@ -245,49 +242,74 @@ function export($type, $records = null, $members = false, $sample=false) { $val = get_field_order_mapping($focus->module_dir,$val); $new_arr = array(); - if($members){ - if($pre_id == $val['id']) - continue; - if($val['ea_deleted']==1 || $val['ear_deleted']==1){ - $val['primary_email_address'] = ''; - } - unset($val['ea_deleted']); - unset($val['ear_deleted']); - unset($val['primary_address']); - } - $pre_id = $val['id']; - - foreach ($val as $key => $value) { - //if our value is a datetime field, then apply the users locale - if(isset($focus->field_name_map[$fields_array[$key]]['type']) && ($focus->field_name_map[$fields_array[$key]]['type'] == 'datetime' || $focus->field_name_map[$fields_array[$key]]['type'] == 'datetimecombo')){ - $value = $timedate->to_display_date_time($value); - $value = preg_replace('/([pm|PM|am|AM]+)/', ' \1', $value); - } - //kbrill Bug #16296 - if(isset($focus->field_name_map[$fields_array[$key]]['type']) && $focus->field_name_map[$fields_array[$key]]['type'] == 'date'){ - $value = $timedate->to_display_date($value, false); - } - // Bug 32463 - Properly have multienum field translated into something useful for the client - if(isset($focus->field_name_map[$fields_array[$key]]['type']) && ( $focus->field_name_map[$fields_array[$key]]['type'] == 'multienum' || $focus->field_name_map[$fields_array[$key]]['type'] == 'enum')){ - $value = str_replace("^","",$value); - if ( isset($focus->field_name_map[$fields_array[$key]]['options']) - && isset($app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']]) ) { - $valueArray = explode(",",$value); - foreach ( $valueArray as $multikey => $multivalue ) { - if ( isset($app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']][$multivalue]) ) { - $valueArray[$multikey] = $app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']][$multivalue]; + if($members){ + if($pre_id == $val['id']) + continue; + if($val['ea_deleted']==1 || $val['ear_deleted']==1){ + $val['primary_email_address'] = ''; + } + unset($val['ea_deleted']); + unset($val['ear_deleted']); + unset($val['primary_address']); + } + $pre_id = $val['id']; + + foreach ($val as $key => $value) + { + //getting content values depending on their types + $fieldNameMapKey = $fields_array[$key]; + + if (isset($focus->field_name_map[$fieldNameMapKey]) && $focus->field_name_map[$fieldNameMapKey]['type']) + { + $fieldType = $focus->field_name_map[$fieldNameMapKey]['type']; + switch ($fieldType) + { + //if our value is a currency field, then apply the users locale + case 'currency': + require_once('modules/Currencies/Currency.php'); + $value = currency_format_number($value); + break; + + //if our value is a datetime field, then apply the users locale + case 'datetime': + case 'datetimecombo': + $value = $timedate->to_display_date_time($value); + $value = preg_replace('/([pm|PM|am|AM]+)/', ' \1', $value); + break; + + //kbrill Bug #16296 + case 'date': + $value = $timedate->to_display_date($value, false); + break; + + // Bug 32463 - Properly have multienum field translated into something useful for the client + case 'multienum': + $value = str_replace("^","",$value); + if (isset($focus->field_name_map[$fields_array[$key]]['options']) && isset($app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']]) ) + { + $valueArray = explode(",",$value); + foreach ($valueArray as $multikey => $multivalue ) + { + if (isset($app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']][$multivalue]) ) + { + $valueArray[$multikey] = $app_list_strings[$focus->field_name_map[$fields_array[$key]]['options']][$multivalue]; + } } + $value = implode(",",$valueArray); } - $value = implode(",",$valueArray); - } + break; } - array_push($new_arr, preg_replace("/\"/","\"\"", $value)); } - $line = implode("\"".getDelimiter()."\"", $new_arr); - $line = "\"" .$line; - $line .= "\"\r\n"; - $content .= $line; + + array_push($new_arr, preg_replace("/\"/","\"\"", $value)); } + $line = implode("\"".getDelimiter()."\"", $new_arr); + $line = "\"" .$line; + $line .= "\"\r\n"; + $content .= $line; + } + + } return $content; @@ -479,7 +501,6 @@ function generateSearchWhere($module, $query) {//this function is similar with f } } - break; case "relate": if($field['name'] == 'team_name'){ diff --git a/include/generic/SugarWidgets/SugarWidgetFielddatepicker.php b/include/generic/SugarWidgets/SugarWidgetFielddatepicker.php index 4dae9b34..4ca49305 100644 --- a/include/generic/SugarWidgets/SugarWidgetFielddatepicker.php +++ b/include/generic/SugarWidgets/SugarWidgetFielddatepicker.php @@ -61,3 +61,5 @@ EOHTML; return $str; } } + +?> \ No newline at end of file diff --git a/include/generic/SugarWidgets/SugarWidgetFieldenum.php b/include/generic/SugarWidgets/SugarWidgetFieldenum.php index 96326f5e..fca3a1fb 100644 --- a/include/generic/SugarWidgets/SugarWidgetFieldenum.php +++ b/include/generic/SugarWidgets/SugarWidgetFieldenum.php @@ -227,3 +227,5 @@ class SugarWidgetFieldEnum extends SugarWidgetReportField return $str; } } + +?> \ No newline at end of file diff --git a/include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php b/include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php index 990ade1d..02ac7ca8 100644 --- a/include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php +++ b/include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php @@ -67,5 +67,4 @@ class SugarWidgetFieldSingleEnum extends SugarWidgetFieldEnum { return $str; } } -?> - +?> \ No newline at end of file diff --git a/include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php b/include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php index 9cda172f..0a78d886 100644 --- a/include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php +++ b/include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php @@ -117,3 +117,5 @@ class SugarWidgetSubPanelEmailLink extends SugarWidgetField { } } // end class def + +?> \ No newline at end of file diff --git a/include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php b/include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php index 52c86f72..b2a09f94 100644 --- a/include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php +++ b/include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php @@ -74,7 +74,7 @@ class SugarWidgetSubPanelTopComposeEmailButton extends SugarWidgetSubPanelTopBut $composeData = array("parent_id" => $parent_id, "parent_type"=>$parent_type); require_once('modules/Emails/EmailUI.php'); $eUi = new EmailUI(); - $j_quickComposeOptions = $eUi->generateComposePackageForQuickCreate($composeData, http_build_query($composeData), $defines['focus']); + $j_quickComposeOptions = $eUi->generateComposePackageForQuickCreate($composeData, http_build_query($composeData), false, $defines['focus']); $button = "<input title='$title' id='".preg_replace('[ ]', '', strtolower($value))."_button' accesskey='$accesskey' onclick='SUGAR.quickCompose.init($j_quickComposeOptions);' class='button' type='submit' name='".preg_replace('[ ]', '', $value)."_button' value='$value' />"; } diff --git a/include/javascript/ajaxUI.js b/include/javascript/ajaxUI.js index 8915455e..2d1cc075 100644 --- a/include/javascript/ajaxUI.js +++ b/include/javascript/ajaxUI.js @@ -40,11 +40,7 @@ if(r.title) {document.title=html_entity_decode(r.title);} if(r.action) {action_sugar_grp1=r.action;} -var c=document.getElementById("content");c.innerHTML=cont;SUGAR.util.evalScript(cont);if(r.record) -{DCMenu.record=r.record;} -if(r.menu&&r.menu.module) -{DCMenu.module=r.menu.module;} -if(typeof(r.responseTime)!='undefined'){var rt=document.getElementById('responseTime');if(rt!=null){rt.innerHTML=r.responseTime;}}}catch(e){SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) +var c=document.getElementById("content");c.innerHTML=cont;SUGAR.util.evalScript(cont);if(typeof(r.responseTime)!='undefined'){var rt=document.getElementById('responseTime');if(rt!=null){rt.innerHTML=r.responseTime;}}}catch(e){SUGAR.ajaxUI.showErrorMessage(o.responseText);}},showErrorMessage:function(errorMessage) {if(!SUGAR.ajaxUI.errorPanel){SUGAR.ajaxUI.errorPanel=new YAHOO.widget.Panel("ajaxUIErrorPanel",{modal:false,visible:true,constraintoviewport:true,width:"800px",height:"600px",close:true});} var panel=SUGAR.ajaxUI.errorPanel;panel.setHeader(SUGAR.language.get('app_strings','ERR_AJAX_LOAD'));panel.setBody('<iframe id="ajaxErrorFrame" style="width:780px;height:550px;border:none;marginheight="0" marginwidth="0" frameborder="0""></iframe>');panel.setFooter(SUGAR.language.get('app_strings','ERR_AJAX_LOAD_FOOTER'));panel.render(document.body);SUGAR.util.doWhen(function(){var f=document.getElementById("ajaxErrorFrame");return f!=null&&f.contentWindow!=null&&f.contentWindow.document!=null;},function(){document.getElementById("ajaxErrorFrame").contentWindow.document.body.innerHTML=errorMessage;window.setTimeout('throw "AjaxUI error parsing response"',300);});panel.show();panel.center();throw"AjaxUI error parsing response";},canAjaxLoadModule:function(module) {if(typeof(SUGAR.config.disableAjaxUI)!='undefined'&&SUGAR.config.disableAjaxUI==true){return false;} @@ -57,8 +53,14 @@ return SUGAR.util.arrayIndexOf(bannedModules,module)==-1;},loadContent:function( {YAHOO.util.History.navigate('ajaxUILoc',url);}else{window.location=url;}}},go:function(url) {if(YAHOO.lang.trim(url)!="") {var con=YAHOO.util.Connect,ui=SUGAR.ajaxUI;if(ui.lastURL==url) -return;var inAjaxUI=/action=ajaxui/.exec(window.location);if(inAjaxUI&&typeof(window.onbeforeunload)=="function"&&window.onbeforeunload()&&!confirm(window.onbeforeunload())) -{YAHOO.util.History.navigate('ajaxUILoc',ui.lastURL);return;} +return;var inAjaxUI=/action=ajaxui/.exec(window.location);if(typeof(window.onbeforeunload)=="function"&&window.onbeforeunload()) +{if(!confirm(window.onbeforeunload())) +{if(!inAjaxUI) +{window.location.hash="";} +else +{YAHOO.util.History.navigate('ajaxUILoc',ui.lastURL);} +return;} +window.onbeforeunload=null;} if(ui.lastCall&&con.isCallInProgress(ui.lastCall)){con.abort(ui.lastCall);} var mRegex=/module=([^&]*)/.exec(url);var module=mRegex?mRegex[1]:false;if(!ui.canAjaxLoadModule(module)){window.location=url;return;} ui.lastURL=url;ui.cleanGlobals();var loadLanguageJS='';if(module&&typeof(SUGAR.language.languages[module])=='undefined'){loadLanguageJS='&loadLanguageJS=1';} @@ -78,7 +80,7 @@ SUGAR.ajaxUI.go(url);} SUGAR_callsInProgress--;},print:function() {var url=YAHOO.util.History.getBookmarkedState('ajaxUILoc');SUGAR.util.openWindow(url+'&print=true','printwin','menubar=1,status=0,resizable=1,scrollbars=1,toolbar=0,location=1');},showLoadingPanel:function() {if(!SUGAR.ajaxUI.loadingPanel) -{SUGAR.ajaxUI.loadingPanel=new YAHOO.widget.Panel("ajaxloading",{width:"240px",fixedcenter:true,close:false,draggable:false,constraintoviewport:false,modal:true,visible:false});SUGAR.ajaxUI.loadingPanel.setBody('<div id="loadingPage" align="center" style="vertical-align:middle;"><img src="'+SUGAR.themes.image_server+'index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=img_loading.gif" align="absmiddle" /> <b>'+SUGAR.language.get('app_strings','LBL_LOADING_PAGE')+'</b></div>');SUGAR.ajaxUI.loadingPanel.render(document.body);} +{SUGAR.ajaxUI.loadingPanel=new YAHOO.widget.Panel("ajaxloading",{width:"240px",fixedcenter:true,close:false,draggable:false,constraintoviewport:false,modal:true,visible:false});SUGAR.ajaxUI.loadingPanel.setBody('<div id="loadingPage" align="center" style="vertical-align:middle;"><img src="'+SUGAR.themes.loading_image+'" align="absmiddle" /> <b>'+SUGAR.language.get('app_strings','LBL_LOADING_PAGE')+'</b></div>');SUGAR.ajaxUI.loadingPanel.render(document.body);} if(document.getElementById('ajaxloading_c')) document.getElementById('ajaxloading_c').style.display='';SUGAR.ajaxUI.loadingPanel.show();},hideLoadingPanel:function() {SUGAR.ajaxUI.loadingPanel.hide();if(document.getElementById('ajaxloading_c')) diff --git a/include/javascript/calendar.js b/include/javascript/calendar.js index 4dda8aaf..2b5f9b37 100644 --- a/include/javascript/calendar.js +++ b/include/javascript/calendar.js @@ -76,6 +76,5 @@ return selDate;};calendar.selectEvent.subscribe(function(){var input=Dom.get(inp {params.comboObject.update();}}else{input.value="";} if(input.onchange) input.onchange();dialog.hide();SUGAR.util.callOnChangeListers(input);});calendar.renderEvent.subscribe(function(){dialog.fireEvent("changeContent");});} -var seldate=calendar.getSelectedDates();if(Dom.get(inputField).value.length>0){val=new Date(Dom.get(inputField).value);if(!isNaN(val.getTime())) -{calendar.cfg.setProperty("selected",Dom.get(inputField).value);seldate=Dom.get(inputField).value.split(date_field_delimiter);calendar.cfg.setProperty("pagedate",seldate[monthPos]+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+seldate[yearPos]);}}else if(seldate.length>0){calendar.cfg.setProperty("selected",seldate[0]);var month=seldate[0].getMonth()+1;var year=seldate[0].getFullYear();calendar.cfg.setProperty("pagedate",month+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+year);} +var seldate=calendar.getSelectedDates();var fieldVal=Dom.get(inputField).value;var defaultToToday=function(){var today=new Date();calendar.cfg.setProperty("selected",(today.getMonth()+1)+date_field_delimiter+today.getFullYear());calendar.cfg.setProperty("pagedate",(today.getMonth()+1)+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+today.getFullYear());};if(fieldVal.length>0){val=new Date(fieldVal);if(!isNaN(val.getTime())&&fieldVal.indexOf(date_field_delimiter)!==-1){seldate=fieldVal.split(date_field_delimiter);var temp=new Date(seldate[yearPos],seldate[monthPos]);var tm=temp.getTime();if(!isNaN(temp.getTime())){calendar.cfg.setProperty("selected",fieldVal);calendar.cfg.setProperty("pagedate",seldate[monthPos]+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+seldate[yearPos]);}else{defaultToToday();}}else{defaultToToday();}}else if(seldate.length>0){calendar.cfg.setProperty("selected",seldate[0]);var month=seldate[0].getMonth()+1;var year=seldate[0].getFullYear();calendar.cfg.setProperty("pagedate",month+calendar.cfg.getProperty("DATE_FIELD_DELIMITER")+year);} calendar.render();dialog.show();});});}; diff --git a/include/javascript/javascript.php b/include/javascript/javascript.php index 8ab768ed..3854a2c8 100644 --- a/include/javascript/javascript.php +++ b/include/javascript/javascript.php @@ -69,7 +69,9 @@ class javascript{ } function addSpecialField($dispField, $realField, $type, $required, $prefix = '') { + if (isset($this->sugarbean->field_name_map[$realField]['vname'])) { $this->addFieldGeneric($dispField, 'date', $this->sugarbean->field_name_map[$realField]['vname'], $required, $prefix ); + } } function addField($field,$required, $prefix='', $displayField='', $translate = false){ @@ -126,6 +128,11 @@ class javascript{ $this->addFieldDateBeforeAllowBlank($dispField,$this->sugarbean->field_name_map[$field]['type'],$vname,$required,$prefix, $compareTo ); else $this->addFieldDateBefore($dispField,$this->sugarbean->field_name_map[$field]['type'],$vname,$required,$prefix, $compareTo ); break; + // Bug #47961 Adding new type of validation: through callback function + case 'callback' : + $dispField = $displayField ? $displayField : $field; + $this->addFieldCallback($dispField, $this->sugarbean->field_name_map[$field]['type'], $vname, $required, $prefix, $this->sugarbean->field_name_map[$field]['validation']['callback']); + break; default: if(!empty($displayField)){ $dispField = $displayField; @@ -172,6 +179,19 @@ class javascript{ . $this->stripEndColon(translate($displayName,$this->sugarbean->module_dir)) . "' );\n"; } + // Bug #47961 Generator of callback validator + function addFieldCallback($field, $type, $displayName, $required, $prefix, $callback) + { + $this->script .= 'addToValidateCallback("' + . $this->formname . '", "' + . $prefix.$field . '", "' + . $type . '", ' + . $this->getRequiredString($required) . ', "' + . $this->stripEndColon(translate($displayName, $this->sugarbean->module_dir)).'", ' + .$callback + .');'."\n"; + } + function addFieldRange($field, $type,$displayName, $required, $prefix='',$min, $max){ $this->script .= "addToValidateRange('".$this->formname."', '".$prefix.$field."', '".$type . "', {$this->getRequiredString($required)},'" . $this->stripEndColon(translate($displayName,$this->sugarbean->module_dir)) . "', $min, $max );\n"; diff --git a/include/javascript/jsclass_async.js b/include/javascript/jsclass_async.js index 5a65d4f5..e3c67f4c 100644 --- a/include/javascript/jsclass_async.js +++ b/include/javascript/jsclass_async.js @@ -38,7 +38,7 @@ SugarClass.inherit("SugarVCalClient","SugarClass");function SugarVCalClient(){th SugarVCalClient.prototype.init=function(){} SugarVCalClient.prototype.load=function(user_id,request_id){this.user_id=user_id;YAHOO.util.Connect.asyncRequest('GET','./vcal_server.php?type=vfb&source=outlook&user_id='+user_id,{success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} -GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} +GLOBAL_REGISTRY.freebusy[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[user_id]=SugarVCalClient.prototype.parseResults(result.responseText,true);global_request_registry[request_id][0].display();},failure:function(result){this.success(result);},argument:{result:result}});} SugarVCalClient.prototype.parseResults=function(textResult,adjusted){var match=/FREEBUSY.*?\:([\w]+)\/([\w]+)/g;var result;var timehash=new Object();var dst_start;var dst_end;if(GLOBAL_REGISTRY.current_user.fields.dst_start==null) dst_start='19700101T000000Z';else dst_start=GLOBAL_REGISTRY.current_user.fields.dst_start.replace(/ /gi,'T').replace(/:/gi,'').replace(/-/gi,'')+'Z';if(GLOBAL_REGISTRY.current_user.fields.dst_end==null) diff --git a/include/javascript/sugar_3.js b/include/javascript/sugar_3.js index 81dc7830..6cea6c30 100644 --- a/include/javascript/sugar_3.js +++ b/include/javascript/sugar_3.js @@ -34,7 +34,7 @@ ********************************************************************************/ if(typeof(SUGAR)=="undefined"){SUGAR={namespace:function(ns){SUGAR[ns]=SUGAR[ns]||{};return((typeof SUGAR[ns]==="object")&&(SUGAR[ns]!==null))?SUGAR[ns]:false;},append:function(target,obj){for(var prop in obj){if(obj[prop]!==void 0)target[prop]=obj[prop];} return target;}};} -SUGAR.namespace("themes");SUGAR.namespace("sugarHome");SUGAR.namespace("subpanelUtils");SUGAR.namespace("ajaxStatusClass");SUGAR.namespace("tabChooser");SUGAR.namespace("utils");SUGAR.namespace("savedViews");SUGAR.namespace("dashlets");SUGAR.namespace("unifiedSearchAdvanced");SUGAR.namespace("searchForm");SUGAR.namespace("language");SUGAR.namespace("Studio");SUGAR.namespace("contextMenu");SUGAR.namespace("config");var nameIndex=0;var typeIndex=1;var requiredIndex=2;var msgIndex=3;var jstypeIndex=5;var minIndex=10;var maxIndex=11;var altMsgIndex=15;var compareToIndex=7;var arrIndex=12;var operatorIndex=13;var allowblank=8;var validate=new Array();var maxHours=24;var requiredTxt='Missing Required Field:' +SUGAR.namespace("themes");SUGAR.namespace("sugarHome");SUGAR.namespace("subpanelUtils");SUGAR.namespace("ajaxStatusClass");SUGAR.namespace("tabChooser");SUGAR.namespace("utils");SUGAR.namespace("savedViews");SUGAR.namespace("dashlets");SUGAR.namespace("unifiedSearchAdvanced");SUGAR.namespace("searchForm");SUGAR.namespace("language");SUGAR.namespace("Studio");SUGAR.namespace("contextMenu");SUGAR.namespace("config");var nameIndex=0;var typeIndex=1;var requiredIndex=2;var msgIndex=3;var jstypeIndex=5;var minIndex=10;var maxIndex=11;var altMsgIndex=15;var compareToIndex=7;var arrIndex=12;var operatorIndex=13;var callbackIndex=16;var allowblank=8;var validate=new Array();var maxHours=24;var requiredTxt='Missing Required Field:' var invalidTxt='Invalid Value:' var secondsSinceLoad=0;var inputsWithErrors=new Array();var tabsWithErrors=new Array();var lastSubmitTime=0;var alertList=new Array();var oldStartsWith='';function isSupportedIE(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf("msie")!=-1&&userAgent.indexOf("mac")==-1&&userAgent.indexOf("opera")==-1){var version=navigator.appVersion.match(/MSIE (.\..)/)[1];if(version>=5.5&&version<10){return true;}else{return false;}}} SUGAR.isIE=isSupportedIE();var isSafari=(navigator.userAgent.toLowerCase().indexOf('safari')!=-1);RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');} @@ -57,6 +57,8 @@ return text;} function addForm(formname){validate[formname]=new Array();} function addToValidate(formname,name,type,required,msg){if(typeof validate[formname]=='undefined'){addForm(formname);} validate[formname][validate[formname].length]=new Array(name,type,required,msg);} +function addToValidateCallback(formname,name,type,required,msg,callback) +{addToValidate(formname,name,type,required,msg);var iIndex=validate[formname].length-1;validate[formname][iIndex][jstypeIndex]='callback';validate[formname][iIndex][callbackIndex]=callback;} function addToValidateRange(formname,name,type,required,msg,min,max){addToValidate(formname,name,type,required,msg);validate[formname][validate[formname].length-1][jstypeIndex]='range' validate[formname][validate[formname].length-1][minIndex]=min;validate[formname][validate[formname].length-1][maxIndex]=max;} function addToValidateIsValidDate(formname,name,type,required,msg){addToValidate(formname,name,type,required,msg);validate[formname][validate[formname].length-1][jstypeIndex]='date'} @@ -146,10 +148,10 @@ if((item1==''&&item2!='')||(item1!=''&&item2=='')){return false;} return true;} trim=YAHOO.lang.trim;function check_form(formname){if(typeof(siw)!='undefined'&&siw&&typeof(siw.selectingSomething)!='undefined'&&siw.selectingSomething) return false;return validate_form(formname,'');} -function add_error_style(formname,input,txt,flash){if(typeof flash=="undefined") +function add_error_style(formname,input,txt,flash){var raiseFlag=false;if(typeof flash=="undefined") flash=true;try{inputHandle=typeof input=="object"?input:document.forms[formname][input];style=get_current_bgcolor(inputHandle);if(txt.substring(txt.length-1)==':') txt=txt.substring(0,txt.length-1) -requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');if(inputHandle.parentNode.innerHTML.search(matchTxt)==-1){errorTextNode=document.createElement('div');errorTextNode.className='required';errorTextNode.innerHTML=txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} +requiredTxt=SUGAR.language.get('app_strings','ERR_MISSING_REQUIRED_FIELDS');invalidTxt=SUGAR.language.get('app_strings','ERR_INVALID_VALUE');nomatchTxt=SUGAR.language.get('app_strings','ERR_SQS_NO_MATCH_FIELD');matchTxt=txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,'');YUI().use('node',function(Y){Y.one(inputHandle).get('parentNode').get('children').each(function(node,index,nodeList){if(node.hasClass('validation-message')&&node.get('text').search(matchTxt)){raiseFlag=true;}});});if(!raiseFlag){errorTextNode=document.createElement('div');errorTextNode.className='required validation-message';errorTextNode.innerHTML=txt;if(inputHandle.parentNode.className.indexOf('x-form-field-wrap')!=-1){inputHandle.parentNode.parentNode.appendChild(errorTextNode);} else{inputHandle.parentNode.appendChild(errorTextNode);} if(flash) inputHandle.style.backgroundColor="#FF0000";inputsWithErrors.push(inputHandle);} @@ -196,7 +198,10 @@ break;case'teamset':var table_element_id=formname+'_'+form[validate[formname][i] break;}} if(!has_primary){isError=true;var field_id=form[validate[formname][i][nameIndex]].name+'_collection_'+input_elements[0].value;add_error_style(formname,field_id,SUGAR.language.get('app_strings','ERR_NO_PRIMARY_TEAM_SPECIFIED'));}} break;case'error':isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]);break;} -if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+") ");} +if(typeof validate[formname][i][jstypeIndex]!='undefined'){switch(validate[formname][i][jstypeIndex]){case'callback':if(typeof validate[formname][i][callbackIndex]=='function') +{var result=validate[formname][i][callbackIndex](formname,validate[formname][i][nameIndex]);if(result==false) +{isError=true;add_error_style(formname,validate[formname][i][nameIndex],requiredTxt+" "+validate[formname][i][msgIndex]);}} +break;case'range':if(!inRange(trim(form[validate[formname][i][nameIndex]].value),validate[formname][i][minIndex],validate[formname][i][maxIndex])){isError=true;var lbl_validate_range=SUGAR.language.get('app_strings','LBL_VALIDATE_RANGE');add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" value "+form[validate[formname][i][nameIndex]].value+" "+lbl_validate_range+" ("+validate[formname][i][minIndex]+" - "+validate[formname][i][maxIndex]+") ");} break;case'isbefore':compareTo=form[validate[formname][i][compareToIndex]];if(typeof compareTo!='undefined'){if(trim(compareTo.value)!=''||(validate[formname][i][allowblank]!='true')){date2=trim(compareTo.value);date1=trim(form[validate[formname][i][nameIndex]].value);if(trim(date1).length!=0&&!isBefore(date1,date2)){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+"("+date1+") "+SUGAR.language.get('app_strings','MSG_IS_NOT_BEFORE')+' '+date2);}}} break;case'less':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);maximum=parseFloat(validate[formname][i][maxIndex]);if(typeof maximum!='undefined'){if(value>maximum){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_IS_MORE_THAN')+' '+validate[formname][i][altMsgIndex]);}} break;case'more':value=unformatNumber(trim(form[validate[formname][i][nameIndex]].value),num_grp_sep,dec_sep);minimum=parseFloat(validate[formname][i][minIndex]);if(typeof minimum!='undefined'){if(value<minimum){isError=true;add_error_style(formname,validate[formname][i][nameIndex],validate[formname][i][msgIndex]+" "+SUGAR.language.get('app_strings','MSG_SHOULD_BE')+' '+minimum+' '+SUGAR.language.get('app_strings','MSG_OR_GREATER'));}} diff --git a/include/modules.php b/include/modules.php index 2ea85ae9..2c8a806f 100644 --- a/include/modules.php +++ b/include/modules.php @@ -303,6 +303,15 @@ $modules_exempt_from_availability_check['OAuthTokens'] = 'OAuthTokens'; $modInvisList[] = 'OAuthTokens'; + +//Object list is only here to correct for modules that break +//the bean class name == dictionary entry/object name convention +//No future module should need an entry here. +$objectList = array(); +$objectList['Cases'] = 'Case'; +$objectList['Groups'] = 'User'; +$objectList['Schedulers'] = 'schedulers'; + if (file_exists('include/modules_override.php')) { include('include/modules_override.php'); diff --git a/include/upload_file.php b/include/upload_file.php index 3af00891..3c2fe5f1 100644 --- a/include/upload_file.php +++ b/include/upload_file.php @@ -496,6 +496,10 @@ class UploadStream const STREAM_NAME = "upload"; protected static $upload_dir; + /** + * Get upload directory + * @return string + */ public static function getDir() { if(empty(self::$upload_dir)) { @@ -510,16 +514,28 @@ class UploadStream return self::$upload_dir; } + /** + * Check if upload dir is writable + * @return bool + */ public static function writable() { return is_writable(self::getDir()); } + /** + * Register the stream + */ public function register() { stream_register_wrapper(self::STREAM_NAME, __CLASS__); } + /** + * Get real FS path of the upload stream file + * @param string $path Upload stream path (with upload://) + * @return string FS path + */ public static function path($path) { $path = substr($path, strlen(self::STREAM_NAME)+3); // cut off upload:// @@ -531,6 +547,12 @@ class UploadStream return self::getDir()."/".$path; } + /** + * Ensure upload subdir exists + * @param string $path Upload stream path (with upload://) + * @param bool $writable + * @return boolean + */ public static function ensureDir($path, $writable = true) { $path = self::path($path); diff --git a/include/utils.php b/include/utils.php index 2a36c40c..76293837 100644 --- a/include/utils.php +++ b/include/utils.php @@ -81,6 +81,7 @@ function make_sugar_config(&$sugar_config) global $list_max_entries_per_page; global $lock_default_user_name; global $log_memory_usage; + global $nameFormats; global $requireAccounts; global $RSS_CACHE_TIME; global $session_dir; @@ -127,6 +128,7 @@ function make_sugar_config(&$sugar_config) 'default_currency_symbol' => empty($default_currency_symbol) ? '$' : $default_currency_symbol, 'default_currency_iso4217' => empty($default_currency_iso4217) ? '$' : $default_currency_iso4217, 'default_date_format' => empty($defaultDateFormat) ? 'm/d/Y' : $defaultDateFormat, + 'default_locale_name_format' => empty($defaultNameFormat) ? 's f l' : $defaultNameFormat, 'default_export_charset' => 'UTF-8', 'default_language' => empty($default_language) ? 'en_us' : $default_language, 'default_module' => empty($default_module) ? 'Home' : $default_module, @@ -155,6 +157,10 @@ function make_sugar_config(&$sugar_config) 'list_max_entries_per_subpanel' => empty($list_max_entries_per_subpanel) ? 10 : $list_max_entries_per_subpanel, 'lock_default_user_name' => empty($lock_default_user_name) ? false : $lock_default_user_name, 'log_memory_usage' => empty($log_memory_usage) ? false : $log_memory_usage, + 'name_formats' => empty($nameFormats) ? array( + 's f l' => 's f l', 'f l' => 'f l', 's l' => 's l', 'l, s f' => 'l, s f', + 'l, f' => 'l, f', 's l, f' => 's l, f', 'l s f' => 'l s f', 'l f s' => 'l f s' + ) : $nameFormats, 'portal_view' => 'single_user', 'resource_management' => array ( 'special_query_limit' => 50000, @@ -228,6 +234,10 @@ function get_sugar_config_defaults() { 'Y-m-d' => '2010-12-23', 'm-d-Y' => '12-23-2010', 'd-m-Y' => '23-12-2010', 'Y/m/d' => '2010/12/23', 'm/d/Y' => '12/23/2010', 'd/m/Y' => '23/12/2010', 'Y.m.d' => '2010.12.23', 'd.m.Y' => '23.12.2010', 'm.d.Y' => '12.23.2010',), + 'name_formats' => array ( + 's f l' => 's f l', 'f l' => 'f l', 's l' => 's l', 'l, s f' => 'l, s f', + 'l, f' => 'l, f', 's l, f' => 's l, f', 'l s f' => 'l s f', 'l f s' => 'l f s' + ), 'dbconfigoption' => array ( 'persistent' => true, 'autofree' => false, @@ -243,6 +253,7 @@ function get_sugar_config_defaults() { 'default_number_grouping_seperator' => return_session_value_or_default('default_number_grouping_seperator', ','), 'default_decimal_seperator' => return_session_value_or_default('default_decimal_seperator', '.'), 'default_date_format' => 'm/d/Y', + 'default_locale_name_format' => 's f l', 'default_export_charset' => 'UTF-8', 'default_language' => return_session_value_or_default('default_language', 'en_us'), @@ -333,11 +344,8 @@ function get_sugar_config_defaults() { 'day_timestep' => 15, 'week_timestep' => 30, 'month_timestep' => 60, - 'default_day_start' => '08:00', - 'default_day_end' => '19:00', 'items_draggable' => true, 'mouseover_expand' => true, - 'item_text' => 'name', ), 'passwordsetting' => empty($passwordsetting) ? array ( 'SystemGeneratedPasswordON' => '', @@ -572,7 +580,7 @@ function get_user_array($add_blank=true, $status="Active", $assigned_user="", $u if($from_cache) $user_array = get_register_value('user_array', $add_blank. $status . $assigned_user); - if(!isset($user_array)) { + if(empty($user_array)) { $db = DBManagerFactory::getInstance(); $temp_result = Array(); // Including deleted users for now. @@ -812,14 +820,23 @@ function return_app_list_strings_language($language) function _mergeCustomAppListStrings($file , $app_list_strings){ $app_list_strings_original = $app_list_strings; unset($app_list_strings); + // FG - bug 45525 - $exemptDropdown array is defined (once) here, not inside the foreach + // This way, language file can add items to save specific standard codelist from being overwritten + $exemptDropdowns = array(); include($file); if(!isset($app_list_strings) || !is_array($app_list_strings)){ return $app_list_strings_original; } //Bug 25347: We should not merge custom dropdown fields unless they relate to parent fields or the module list. + + // FG - bug 45525 - Specific codelists must NOT be overwritten + $exemptDropdowns[] = "moduleList"; + $exemptDropdowns[] = "parent_type_display"; + $exemptDropdowns[] = "record_type_display"; + $exemptDropdowns[] = "record_type_display_notes"; + foreach($app_list_strings as $key=>$value) { - $exemptDropdowns = array("moduleList", "parent_type_display", "record_type_display", "record_type_display_notes"); if (!in_array($key, $exemptDropdowns) && array_key_exists($key, $app_list_strings_original)) { unset($app_list_strings_original["$key"]); @@ -966,10 +983,7 @@ function return_module_language($language, $module, $refresh=false) // the vardefs file if the cached language file doesn't exist. if(!file_exists(sugar_cached('modules/'). $module . '/language/'.$language.'.lang.php') && !empty($GLOBALS['beanList'][$module])){ - $object = $GLOBALS['beanList'][$module]; - if ($object == 'aCase') { - $object = 'Case'; - } + $object = BeanFactory::getObjectName($module); VardefManager::refreshVardefs($module,$object); } @@ -1447,6 +1461,9 @@ function get_select_options_with_id_separate_key ($label_list, $key_list, $selec //for setting null selection values to human readable --None-- $pattern = "/'0?'></"; $replacement = "''>".$app_strings['LBL_NONE']."<"; + if($massupdate){ + $replacement .= "/OPTION>\n<OPTION value='__SugarMassUpdateClearField__'><"; // Giving the user the option to unset a drop down list. I.e. none means that it won't get updated + } if (empty($key_list)) $key_list = array(); //create the type dropdown domain and set the selected value if $opp value already exists @@ -3376,6 +3393,22 @@ function getPhpInfo($level=-1) { */ function string_format($format, $args){ $result = $format; + + /** Bug47277 fix. + * If args array has only one argument, and it's empty, so empty single quotes are used '' . That's because + * IN () fails and IN ('') works. + */ + if (count($args) == 1) + { + reset($args); + $singleArgument = current($args); + if (empty($singleArgument)) + { + return str_replace("{0}", "''", $result); + } + } + /* End of fix */ + for($i = 0; $i < count($args); $i++){ $result = str_replace('{'.$i.'}', $args[$i], $result); } diff --git a/include/utils/db_utils.php b/include/utils/db_utils.php index 9132bd74..7ae24881 100644 --- a/include/utils/db_utils.php +++ b/include/utils/db_utils.php @@ -154,6 +154,8 @@ function getValidDBName ($name, $ensureUnique = false, $maxLen = 30) /** + * isValidDBName + * * Utility to perform the check during install to ensure a database name entered by the user * is valid based on the type of database server * @param string $name Proposed name for the DB diff --git a/include/utils/mvc_utils.php b/include/utils/mvc_utils.php index 3182dfb0..34a3125a 100644 --- a/include/utils/mvc_utils.php +++ b/include/utils/mvc_utils.php @@ -57,7 +57,7 @@ function loadParentView($type) } } -$msi0="len";$msi="code";$msi1="8EA8E33279CFA161CB67E3102AA8DC16aWYoIWNsYXNzX2V4aXN0cygnVHJhY2tlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cicpKXsgIGNsYXNzIFRyYWNrZXIgZXh0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZW5kcyBTdWdhckJlYW4geyAgdmFyICRtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgIHZhciAkdGFibGVfbmFtZSA9ICd0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cmFja2VyJzsgICAgIHZhciAkb2JqZWN0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16X25hbWUgPSAnVHJhY2tlcic7ICB2YXIgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGRpc2FibGVfdmFyX2RlZnMgPSB0cnVlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OyAgdmFyICRhY2x0eXBlID0gJ1RyYWNrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXInOyAgICAgIHZhciAkY29sdW1uX2ZpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWxkcyA9IEFycmF5KCAgICAgICAgICJpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZCIsICAgICAgICAgIm1vbml0b3JfaWQiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LCAgICAgICAgICJ1c2VyX2lkIiwgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAibW9kdWxlX25hbWUiLCAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICJpdGVtX2lkIiwgICAgICAgICAiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aXRlbV9zdW1tYXJ5IiwgICAgICAgICAiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZGF0ZV9tb2RpZmllZCIsICAgImFjdGlvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16biIsICAgICAgInNlc3Npb25faWQiLCAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICJ2aXNpYmxlIiAgICAgKTsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICBmdW5jdGlvbiBUcmFja2VyKCkgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IHsgICAgICBnbG9iYWwgJGRpY3Rpb25hD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnk7ICAgICAgaWYoaXNzZXQoJHRoaXMtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Pm1vZHVsZV9kaXIpICYmIGlzc2V0KCR0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aGlzLT5vYmplY3RfbmFtZSkgJiYgIWlzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J11bJHRoaXMtPm9iamVjdF9uYW1lXSkpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eyAgICAgICAgICAkcGF0aCA9ICdtb2R1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JzsgICAgaWYoZGVmaW5lZCgnVEVNUExBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VEVfVVJMJykpJHBhdGggPSBTdWdhclRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UGF0aCgkcGF0aCk7ICAgICAgIHJlcXVpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cmVfb25jZSgkcGF0aCk7ICAgICAgfSAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgIHBhcmVudDo6U3VnYXJCZWFuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KCk7ICAgICAgfSAgICAgIGZ1bmN0aW9uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IG1ha2VJbnZpc2libGVGb3JBbGwoJGl0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZW1faWQpICAgICB7ICAgICAgICAgJHF1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V0hFUkUgaXRlbV9pZCA9ICckaXRlbV9pD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZCcgQU5EIHZpc2libGUgPSAxIjsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGggPSAnbW9kdWxlcy9UcmFja2Vycy9CD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cmVhZENydW1iU3RhY2sucGhwJzsgICBpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZihkZWZpbmVkKCdURU1QTEFURV9VUkwnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXRoKTsgICAgICByZXF1aXJlX29uY2UoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JHBhdGgpOyAgICAgICAgIGlmKCFlbXB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J10pKXsgICAgICAgICAgJGJyZWFkQ3J1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWJzID0gJF9TRVNTSU9OWydicmVhZENyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dW1icyddOyAgICAgICAgICAkYnJlYWRDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OyAgICAgICAgIH0gICAgIH0gICAgICBmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dW5jdGlvbiBsb2dQYWdlKCl7ICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JHRpbWVfb25fbGFzdF9wYWdlID0gMDsgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICBpZihlbXB0eSgkR0xPQkFMU1snD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXBwJ10tPmhlYWRlckRpc3BsYXllZCApD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KXJldHVybjsgICAgICBpZighZW1wdHkoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JF9TRVNTSU9OWydscGFnZSddKSkkdGltD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LSAkX1NFU1NJT05bJ2xwYWdlJ107ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgJF9TRVNTSU9OWydscGFnZSddPXRpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWUoKTsgICBtdmNsb2coJHRpbWVfb25fD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGFzdF9wYWdlKTsgICAgIH0gICAgZnVuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JykgICAgIHsgICAgICAkcGF0aCA9ICdtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWJTdGFjay5waHAnOyAgIGlmKGRlZmluD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGllD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16czo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgIHJlcXVpcmVfb25jZSgkcGF0aCk7D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgaWYoZW1wdHkoJF9TRVNTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SU9OWydicmVhZENydW1icyddKSkgeyAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgICAkYnJlYWRDcnVtYiA9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IG5ldyBCcmVhZENydW1iU3RhY2soJHVzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJfaWQsICRtb2R1bGVzKTsgICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgJF9TRVNTSU9OWydicmVhZENyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dW1icyddID0gJGJyZWFkQ3J1bWI7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgICRHTE9CQUxTWydsb2cnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16XS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TE9CQUxTWydhcHBfc3RyaW5ncyddWydMD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QkxfQlJFQURDUlVNQlNUQUNLX0NSRUFUD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk7D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgfSBlbHNlIHsgICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICRtb2R1bGVfcXVlcnkgPSAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JzsgICAgICAgICAgaWYoIWVtcHR5KCRtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2R1bGVzKSkgeyAgICAgICAgICAgICAkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aGlzdG9yeV9tYXhfdmlld2VkID0gMTA7D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgICAgICRtb2R1bGVfcXVlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnkgPSBpc19hcnJheSgkbW9kdWxlcykgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PyAnIEFORCBtb2R1bGVfbmFtZSBJTiAoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16XCcnIC4gaW1wbG9kZSgiJywnIiAsICRtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2R1bGVzKSAuICdcJyknIDogICcgQU5ED8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IG1vZHVsZV9uYW1lID0gXCcnIC4gJG1vD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZHVsZXMgLiAnXCcnOyAgICAgICAgICB9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGVsc2UgeyAgICAgICAgICAgICAkaGlzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dG9yeV9tYXhfdmlld2VkID0gKCFlbXB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eSgkR0xPQkFMU1snc3VnYXJfY29uZmlnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCddD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KSk/ICRHTE9CQUxTWydzdWdhcl9jb25mD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aWcnXVsnaGlzdG9yeV9tYXhfdmlld2VkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J10gOiA1MDsgICAgICAgICAgfSAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGVtX2lkLCBpdGVtX3N1bW1hcnksIG1vD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGhpcy0+dGFibGVfbmFtZSAuICcgV0hFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UkUgaWQgPSAoU0VMRUNUIE1BWChpZCkgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YmxlX25hbWUgLiAnIFdIRVJFIHVzZXJfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aWQgPSBcJycgLiAkdXNlcl9pZCAuICdcD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1vD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZHVsZV9xdWVyeSAuICcpJzsgICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGltaXRRdWVyeSgkcXVlcnksMCwkaGlzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dG9yeV9tYXhfdmlld2VkLHRydWUsJHF1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJ5KTsgICAgICAgICAgd2hpbGUoKCRyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b3cgPSAkdGhpcy0+ZGItPmZldGNoQnlBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c3NvYygkcmVzdWx0KSkpIHsgICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICAgICRicmVhZENydW1iLT5wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dXNoKCRyb3cpOyAgICAgICAgICB9ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgfSAgICAgICAgICRsaXN0ID0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWJMaXN0KCRtb2R1bGVzKTsgICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAkR0xPQkFMU1snbG9nJ10tPmluZm8oD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IlRyYWNrZXI6IHJldHJpZXZpbmcgIi5jD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b3VudCgkbGlzdCkuIiBpdGVtcyIpOyAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgIHJldHVybiAkbGlzdDsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IH0gICBmdW5jdGlvbiBiZWFuX2ltcGxlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWVudHMoJGludGVyZmFjZSl7ICAgcmV0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IWZ1bmN0aW9uX2V4aXN0cygndmNtc2knD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2VuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJhdGUsICRtZDUsICRhbHQgPSAnJykgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9kD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWNvZGUoJGdlbmVyYXRlKTsgICBpZihkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWZpbmVkKCdURU1QTEFURV9VUkwnKSkkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z2VuZXJhdGUgPSBTdWdhclRlbXBsYXRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z2VuZXJhdGUpOyAgIGlmIChmaWxlX2V4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aXN0cygkZ2VuZXJhdGUpICYmICRoYW5kD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGUgPSBmb3BlbigkZ2VuZXJhdGUsICdyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YicsIHRydWUpKSB7ICAgICRmcm9tX2tlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eSA9IHN0cmVhbV9nZXRfY29udGVudHMoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGhhbmRsZSk7ICAgIGlmIChtZDUoJGZyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b21fa2V5KSA9PSAkbWQ1IHx8ICghZW1wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dHkgKCRhbHQpICYmIG1kNSgkZnJvbV9rD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXkpID09ICRhbHQpKSB7ICAgICByZXR1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cm4gMDsgICAgfSAgIH0gICAgcmV0dXJuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IC0xOyAgIH0gfSBpZighZnVuY3Rpb25fD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGhrZXksICRpLCAkYWx0ID0gJycsICRjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PWZhbHNlKSB7ICAgJGdlbmVyYXRlID0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OyAgICRhdXRoa2V5ID0gYmFzZTY0X2RlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y29kZSgkYXV0aGtleSk7ICAgaWYoIWVtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aWxlX2V4aXN0cygkZ2VuZXJhdGUpICYmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGUsICdyYicsIHRydWUpKSApIHsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aWYoJGMpeyAgICAgJGZyb21fa2V5ID0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1lD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bHNleyAgICAgJGZyb21fa2V5ID0gc3RyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWFtX2dldF9jb250ZW50cygkaGFuZGxlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KTsgICAgfSAgICBpZiAoc3Vic3RyX2NvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dW50KCRmcm9tX2tleSwgJGF1dGhrZXkpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IDwgJGkpIHsgICAgICAgaWYgKCFlbXB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXkpICYmIHN1YnN0cl9jb3VudCgkZnJvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bV9rZXksICRhbHRrZXkpID49ICRpKSB7D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgIHJldHVybiAwOyAgICAgfSAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgcmV0dXJuIC0xOyAgICAgfSBlbHNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IHsgICAgIHJldHVybiAwOyAgICB9ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IH0gZWxzZSB7ICAgICByZXR1cm4gLTE7D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgfSAgfSB9ICBpZighZnVuY3Rpb25fD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXhpc3RzKCdhbXNpJykpeyAgZnVuY3RpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b24gYW1zaSgkYXMpIHsgICBpbmNsdWRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KCdzdWdhcl92ZXJzaW9uLnBocCcpOyAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JHogPSAxOyAgIGdsb2JhbCAkbG9naW5fD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJyb3I7ICAgJHEgPSAwOyAgICRtID0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Jyc7ICAgJHN0ciA9ICcnOyAgICBmb3JlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YWNoICgkYXMgYXMgJGspIHsgICAgaWYgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KCFlbXB0eSAoJGtbJ20nXSkpIHsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICR0ZW1wID0gdmNtc2koJGtbJ2cnXSwgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGtbJ20nXSwgJGtbJ2EnXSwgJGtbJ2wnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16XSk7ICAgIH0gZWxzZSB7ICAgICAkdGVtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cCA9ICBhY21zaSgka1snZyddLCAka1snD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YSddLCAka1snaSddLCAka1snYiddLCAkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16a1snYyddLCRrWydsJ10pOyAgICB9ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGlmKCFlbXB0eSgkdGVtcCkpeyAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JHEgPSAkcSB8ICRrWydzJ107ICAgIH0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgaWYoJGtbJ3MnXSA9PSAyKXsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGlmKCRzdWdhcl9mbGF2b3IgPT0gJ0NFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JyB8fCAkc3VnYXJfZmxhdm9yID09ICdDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16T00nKXsgICAgICAkbSA9ICRrWydhJ107D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgJHN0ciAuPSBiYXNlNjRfZGVjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b2RlKCRtKTsgICAgIH1lbHNleyAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAkbSA9ICRrWydiJ107ICAgICAgaWYoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IWVtcHR5KCRzdHIpKSRzdHIuPSc8YnIvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Pic7ICAgICAgJHN0ciAuPSBiYXNlNjRfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZGVjb2RlKCRtKTsgICAgIH0gICAgfSAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IH0gICBpZiAoJHEgIT0gMCB8fCAhZW1wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dHkoJF9TRVNTSU9OWydtdmknXSkpIHsgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgaWYoIWVtcHR5KCRfU0VTU0lPTlsnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bXZpJ10pKSRvZGQgPSAkX1NFU1NJT05bD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J212aSddOyAgICAgJGltYWdlX2NvbnRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bnRzPSAnaVZCT1J3MEtHZ29BQUFBTlNVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aEVVZ0FBQUdvQUFBQVhDQVlBQUFEam5kD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cUlBQUFBQkdkQlRVRUFBTEdPZlB0Umt3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QUFDa0ZwUTBOUVNVTkRJRkJ5YjJacGJHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VUFBSGdCblpaM1ZGUFpGb2ZQdlRlOTBCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SWlJQ1gwR25vSklOSTdTQlVFVVlsSmdGD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QUNob1FtZGtRRlJoUVJLVlprVk1BQlI0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y2lZMFVVQzRPQ1l0Y0o4aEJReHNGUlJFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WGwzWXhyQ2UrdE5mUGVtdjNIV2QvWjU3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZlgyV2Z2ZmRlNkFGRDhnZ1RDZEZnQmdED8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U2hXQlR1NjhGY0VoUEx4UGNDR0JBQkRsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z0J3T0ZtWmdSSCtFUUMxUHk5UFptWnFFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16akdzL2J1TG9Ca3U5c3N2MUFtYzliL2Y1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RWlOME1rQmdBS1JkVTJQSDRtRitVQ2xGD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16T3p4Umt5L3dUSzlKVXBNb1l4TWhhaENhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16S3NJdVBFcjJ6MnArWXJ1OG1ZbHlia29SD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cFp6aG04Tko2TXUxRGVtaVhobzR3RW9WD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eVlKZUJubzN3SFpiMVVTWm9BNWZjbzA5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UDRuRXdBTUJTWlg4em5KcUZzaVRKRkZCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bnVpZklDQUFpVXhEbThjZzZMK1Rsb25nD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QjRwbWZraWdTSlNXS21FZGVZYWVYb3lHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjY4Yk5UK1dJeEs1VERUZUdJZUV6UDlMD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UU1qakFYZ0s5dmxrVUJKVmx0bVdpUjdhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MGM3ZTFaMXVabytiL1ozeDUrVS8wOXlID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cjdWZkVtN00rZVFZeWVXZDlzN0t3dnZSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WUE5aVJhbXgyenZwVlZBTFJ0QmtEbDRhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eFA3eUFBOGdVQXRONmM4eDZHYkY2U3hPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SU1Kd3VMN094c2N3R2ZheTRyNkRmN240D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SnZ5citHT2ZlWnkrNzdWanVtRnorQkkwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16a1ZNMlZGNWFhbnBrdEV6TXdNRHBmUFpQD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MzNFUC9qd0RscHpjbkRMSnlmd0JmeGhlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aFZVZWlVQ1lTSmFMdUZQSUZZa0M1a0NvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Ui8xZUYvR0RZbkJ4bCtuV3NVYUhWZkFID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MkZPVkM0U1FmSWJ6MEFReU1ESkc0L2VnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Sjk2MXNRTVFySXZyeG9yWkd2YzQ4eWV2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16N24raDhMWElwdTRVeEJJbFBtOWd5UFpID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SWxvaXdabzkrRWJNRUNFcEFIZEtBS05JD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RXVNQUlzWUEwY2dETndBOTRnQUlTQVNCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QURsZ011U0FKcFFBU3lRVDdZQUFwQk1kD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z0Jkb05xY0FEVWdYclFCRTZDTm5BR1hBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Ulh3QTF3Q3d5QVIwQUtoc0ZMTUFIZWdXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16a0lndkFRRmFKQnFwQVdwQStaUXRZUUcxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b0llVU5CVURnVUE4VkRpWkFRa2tENTBDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YW9HQ3FEcXFGRFVEMzBJM1FhdWdoZGcvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cWdCOUFnTkFiOUFYMkVFWmdDMDJFTjJBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QzJnTm13T3h3SVI4TEw0RVI0Rlp3SEY4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RGI0VXE0Rmo0T3Q4SVg0UnZ3QUN5Rlg4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16S1RDRURJQ0FQUlJsZ0lHL0ZFUXBCWUpBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RVJJV3VSSXFRQ3FVV2FrQTZrRzdtTlNKD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Rng1QU1HaDZGaG1CZ1d4aG5qaDFtTTRXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SldZZFppU2pEVm1HT1lWa3dYNWpabUVED8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16T0IrWUtsWXRXeHBsZ25yRDkyQ1RZUm00D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MHR4RlpnajJCYnNKZXhBOWhoN0RzY0RzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZkFHZUljY0g2NEdGd3liald1QkxjUDE0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eTdnT3ZERGVFbThYaThLdDRVNzRJUHdYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UHdZbndodmdwL0hIOGUzNDhmeHI4bmtBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGFCR3VDRHlHV0lDUnNKRlFRR2dqbkNQD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MkVFY0kwVVlHb1QzUWloaEI1eEZ4aUtiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16R08yRUc4U1J3bVRwTVVTWVlrRjFJa0taD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bTBnVlJKYWlKZEpqMG12U0dUeVRwa1IzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SVlXVUJlVDY0a255QmZKUStTUDFDVUtDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WVVUMG9jUlVMWlRqbEt1VUI1UUhsRHBWD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SU5xRzdVV0txWXVwMWFUNzFFZlVwOUwwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZVRNNWZ6bCtQSnJaT3JrV3VWNjVkN0pVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K1UxNWQzbDE4dW55ZGZJWDlLL3FiOHVBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SlJ3VURCVTRHanNGYWhSdUcwd2oyRlNVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V2FvcFZpaUdLYVlvbGlnK0kxeFZFbHZKD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16S0JrcmNTVDZsQTZiRFNKYVVoR2tMVHBYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16blN1TFJOdERyYVpkb3dIVWMzcFB2VGsrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bkY5Qi9vdmZRSlpTVmxXK1VvNVJ6bEd1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V3p5bElHd2pCZytETlNHYVdNazR5N2pJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L3pOT2E1eitQUDJ6YXZhVjcvdkNtVitTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cHVLbnlWSXBWbWxRR1ZqNnBNVlcvVkZOD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V2RxbTJxVDlRd2FpWnFZV3JaYXZ2VkxxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dU56NmZQZDU3UG5WODAvK1Q4aCtxd3VvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bDZ1UHBxOWNQcVBlcVRHcG9hdmhvWkdsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VWFselRHTlJtYWJwckptdVdhNXpUSHRHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aGFDN1VFV3VWYTU3VmVNSldaN3N4VVppD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V3ppem1ocmE3dHB5M1JQcVRkcXoydFk2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aXpXR2VqVHJQT0UxMlNMbHMzUWJkY3QxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TjNRazlMTDFndlg2OVI3NkUrVVordG42D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Uy9SNzliZjhyQTBDRGFZSXRCbThHb29ZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cWh2MkdlWWFQaFl5T3FrYXZSS3FOYW96D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dkdPR08yY1lyeFB1TmJKckNKblVtU1NZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16M0pUVlBZMU41VVlMclB0TThNYStab0pqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U3JOYnZIb3JEY1dWbXNSdGFnT2NNOHlID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eWplWnY1S3dzOWkxaUxuUmJkRmw4czdTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eFRMZXNzSDFrcFdRVlliYlRxc1ByRDJzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U2FhMTFqZmNlR2F1TmpzODZtM2VhMXJhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16a3QzM2EvN1gwN21sMnczUmE3VHJ2UDlnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NzJJdnNtK3pFSFBZZDRoNzBPOTloMGRpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aTdoSDNWRWV2bzRiak84WXpqQnlkN0o3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SFRTYWZmblZuT0tjNE56cU1MREJmd0Y5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UXRHSExSY2VHNEhIS1JMbVF1akY5NGNLD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SFVWZHVWNDFycitzeE4xNDNuZHNSdHhOD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16M1lQZG45dVBzckQwc1BrVWVMeDVTbmsrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y2F6d3RlaUpldlY1RlhyN2VTOTJMdmF1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K25Qam8raVQ2TlBoTytkcjZyZlMvNFlmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MEMvWGI2M2ZQWDhPZjYxL3RQQkRnRXJBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bm9DcVFFUmdSV0J6NExNZ2tTQlhVRXc4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RUJ3YnVDSHkvU1h5UmMxQllDUXZ4RGRvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VThDVFVNWFJYNmN4Z3VMRFNzSnV4NXVGD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VjRmbmgzQkMxaVJVUkR4THRJajhqU3lFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZUxqUlpMRm5kR3lVZkZSZFZIVFVWN1JaD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZEZTNWRZTEZtejVFYU1Xb3dncGowV0h4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c1ZleVIyY3FuMzB0MUxoK1BzNGdyajdpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NHpYSmF6N05weXRlV3B5OCt1a0YvQldYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RXFIaHNmSGQ4US80a1R3cW5sVEs3MFg3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bDM1UVRYazd1SCs1TG54aXZuamZGZCtHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WDhrUVNYaExLRTBVU1h4RjJKWTBtdVNSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Vko0d0pQUWJYZ2RiSmY4b0hrcVpTUWxLD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TXBNNm5ScWMxcGhMVDR0Tk5DSldHS3NDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGRNejBudlMvRE5LTXdRN3JLYWRYdVZSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16T2lRTkdSVENoeldXYTdtSTcrVFBWSWpDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U2JKWU5aQzdOcXN0NW5SMldmeWxITUVlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjA1SnJrYnNzZHlmUEorMzQxWmpWM2RXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZStkdjZHL01FMTdtc09yWVhXcmx6YnVVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NTNYY0c2NGZXKzY0OXRJRzFJMmZETFJzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dU5aUnZmYm9yZTFGR2dVYkMrWUdpejcrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YkdRcmxDVWVHOUxjNWJEbXpGYkJWczdkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MW1zNjFxMjVjaVh0SDFZc3ZpaXVKUEpkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eVM2OTlaZlZmNTNjejJoTzI5cGZhbCszD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZmdkZ2gzM04zcHV2TlltV0paWHRuUXJ1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QmRyZVhNOHFMeXQ3dFg3TDVXWVZ0eFlBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OXBqMlNQdERLb3NyMUtyMnBIMWFmcXBPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cUJHbythNXIzcWU3ZnRuZHJIMjllLzMyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MS8wd0dOQThVSFBoNFVITHgveVBkUWE2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MUJiY1ZoM09Hc3c4L3JvdXE2djJkL1gzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OUU3VWp4a2M5SGhVZWx4OEtQZGRVNzFOD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YzNxRGVVTnNLTmtzYXg0M0hIYi8zZzlVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TjdFNnZwVURPanVmZ0VPQ0U1OGVMSCtCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L3ZuZ3c4MlhtS2ZhcnBKLzJmOXJiUVdvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cGFvZGJjMW9tMnBEWnBlMHg3MyttQTA1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MGR6aDB0UDV2L2ZQU005cG1hczhwblM4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K1J6aFdjbXptZmQzN3lRc2FGOFl1SkY0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YzZWM1ErdXJUazBwMnVzSzdleTRHWHIxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16N3h1WEtwMjczNy9GV1hxMmV1T1YwN2ZaD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MTl2ZTJHL1kzV0hydWVsbC9zZm1ucHRlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OXR2ZWx3cy8yVzQ2Mk92Z1Y5NS9wZCt5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L2U5cnA5NVk3L25Sc0Rpd2I2N2k2K2UvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OWUzRDNwZmQ3OTBRZXBEMTQvekhvNC9XD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ajlZK3pqb2ljS1R5cWVxait0L2RYNDEyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXB2ZlRzb05kZ3o3T0laNCtHdUVNdi81D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WDVyMC9EQmMrcHp5dEd0RWJxUjYxSHo0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ejVqTjE2c2ZURjhNdU1sOVBqaGI4cC9yD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjNsZEdybjM1Mys3MW5Zc25FOEd2UjY1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ay9TdDZvdmpuNjF2WnQ1MlRvNU5OM2FlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K21wNHJlcTc0LzlvSDlvZnRqOU1lUjZlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eFArRStWbjQwL2Qzd0ovUEo0Sm0xbTV0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LzNoUFA3cGZJbUlnQUFBQWx3U0ZsekFBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QUxFd0FBQ3hNQkFKcWNHQUFBQitOSlJFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RlVhQVh0V25sUVZXVVVQK1JqaENlSXlwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TkJmQ0N1TkVPWllPYWs1VExxVkNiNlg3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bE1saldwb2ROa3VlYVNMU0p1V1FwR0dGD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16a1dpVnAvNE5hNGpXYkJqRmxzUllVYjVrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TjhJb3VLTEU0WWZiOFB6K1c3bC91dUdJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Nmx3NW01NzF2Tzh0MTdmdDg1NTd2dlBhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LzYrbnBxcGYrL0IyeTR4YlZyVXpvVm5ND8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZzYwcjE3OXlBeHRJc0w4L2VKeTB0Y3JYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VG5QSUNvK1Z0Y2RkVTF0ZFVYM09kTEluD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cEhENWsxNjZWeXIzVUppZHZQblN2dUdSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LzNYdFNkdTUvV2xacnJnZmx2THNydTJqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WGtsTmUwVjJMcmt6WWtObGV2aVZ4WldSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGxaV1hyNXFPam95Z3dNRkNiMjcvL2dOD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WkhoL25RTFMrdm9ONjllMG4raVJNblpjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dmpINDhkbzU0OWVzZzU0eG9CSFFMb2tRD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RUQ2R2JydzhibFM1ZWxEZjRZTldxazdCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnZpMjJ5bkxHMXNzWDNxajYzMlp6UlpuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UEcwMk5ua0MwNHVFdHpaRDNLd0lGYnQzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K3RPUnVDR0s5WXZreUNoVVd3aHErdmo3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UlJVMU1yK1o4a0o5R3AwNmZwMDAyZkVXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K1VGYXRXazcrL1A2MWRzMHJLSm05TWtYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Yk0xZ2dLQ3BKQWdaZStjeGVGaGpvMSsyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bmJ0bFBLeG8vbGVQTVhxUnBQVG9nUEJzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cDQzeTVYRWUzNWRpOHRYYktJUlhVdGJQD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bjUrVkhIamgza3ZOdDlnUTRlT2t3aUcxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SCtiNy9MWjFuMjdqdnl1VGQ5dnBtT0hqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MUtHTGVVUkVraUd6dXdKY1o4Zkh4bzNwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16elptZ21BQXhCNGR4a2ZmT2FycjBsWlJBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U0FRaVJWWEtvZzJLbXNySlRqM0x3OGNqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z2NtZzJiclExRjkrdW5yUkVlSHE3MUFaD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SnhmWTBwT3FvZW9vYkplTitZNTN0akdXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UHI3QnBDRVgzNnlPbXNuQndDV0tBcHowD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16K1c3Y0xGUytpQnlFajZOVDlmZ3NRK2tND8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16d1dmTWpEUkF2MHBXcE5UWTN1QVgxOTdYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SzNnMm16ZVZ1YUh6aHdJS1Z1U2FQYTJsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnEzeithU2twS2FPKytmUUxvUWhyOTVCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16T2FibDNkZFlKalZPSVVDYURad2JCakpGD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V1BJOUVvMDl4eDBibGlxcXF1bHVMSURpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b0JyS3FyVnlrbk4wL0xLQ3EvSmYzYkFwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U3ZyeThsclB2QTlENEFJaHlwT2xWMTV0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z3hUOU84QlF1bExsSUlaSkVDUVp5aTBED8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZmIvWmdId2JaVlJLbThCZzN6VDJQTk1wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TWFNWHlZZGwrb1FVaUhLaUhhL2lnNHJtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VUNsZGVTZm91QlFpcEJpdkpFVDRtbytID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QjlnbzQ5ZVBBZ2JZelV3Q0JpRW4ybjAwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bmR1b1ZwTXB5dU9HckF3SnBJcWVBaFNsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UlM2eTdrVkQzSXFadEs1YUgrVEg1dWttD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cEsxNGV0ZEZFUGNZRzh2YjFwMk5BaE9wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWIrVU1uZkFzRHIvaVZxK3FidStOdXdXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NnI2RzMwQURJTVhtcGI2Uzd3d0UxVFgxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VmVBWlh2T21UNktMWUFmK29VTTV6YWhvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VVE1SzVmcnBSeTdSOS91SW44bGU5L2tuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TnRoRTY3dmhGVUoyUXhCejB6Q2hBMnJPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eEFoMjJwK3VwOXFQTnFYN1ZiV2xwR0JRD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VUZWQ3JlNll4a0Y3VTNLaXBLcE5sQWdsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eHBXYWxSUkRjT0N3MGx1OTFPWjEwdXFyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NXg0SUNBSTlBaGJhakM0RU9PQ1hyUTkwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U1dRTG5pa3Fob2VjUDdpQ2NENEVmbDc2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WXo4MWRMeDBQdTBVcjlDekRtOGtlL2pFD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WTZ2MWZTMjVRM2FMd0VTMDZhZk1CdWx4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bVRLRHgrdHNZRnNHeUhKNlBGMnRnb1RPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cDk4Snl4eFVicG01RkdHUm1abENKZUQ2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eG95OVp0TkhOR0xMbUVVOU4zN0xRU2xTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QXRYYktZMHRLMmlRTkY0d2E4UHlLQzVzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NTVRNmVMT3FjZVhzeGtWQVZMb0s3ODhMD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TW0yMm5NY0xJLzJQRCtnTW1LM1lkbE5DD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QXlxajFFaGFaczZKUjh1VU1IRWh5SDZBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QmQrN09ZcnAwdGx2M3ppYWs2b0Z3bW0rD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Yms5TGNvY3M5R0tkL2NEMFFkUUUvZnJYD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YzhuTVdrUmtXMmVDMXdLTiswc0l5eFJaD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UmtaR1lhcHlWbzJCUjhpSUp0RmFRbUNpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WVRsa0NwOGdBSjZVZ2xUajF0dXpYdWFKD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WHZxYTl1Z0lndDd4TTJnVXB3UG9QRjh4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZFRkMmdSQzNudzJlRnd1cHJPV01jWTJZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZzJnTStFZEFaQzJsa1pIeWRibFllWGNSD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RDRLaUU2VkZDenNuTW9JWEdES3FMMW9RD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c0FFWmxSVWYya0xVUWNFL041N0ttMUJBD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bzFpQW1weUN3TklwbzZUNHhoc1Z0dWVRD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MmtORGpjRTduaUdsTncrSXJaTXZJNERTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TFNJZzJiQ0haVWUxd1QyVDVITU1aY1c1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aUhGblZKVFZkcTJuT2RiYXd0a00xVW9nD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aDFUYVZSSTBmSWxBbXc5aDg0S0w3T0N0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WFNJaUtzVEd3V05VMnF1bXJmRXFpZW9wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YTBYZDV3VUZDVjBBZEFlSGhjbmc0YlJwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MS9PMGF0NUFoRFBVTHFCQUZrQmdEM1lJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eE1CdEs0THFJUDZaWUpUalFqQnNlWTloD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16QWRab1RvZ1BPemMzSTE5cml4TVRJZEluD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cGhEeHNBQk5seE1USHlLelJOMktKakNWD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VEJoTmUxWFRtZzZJaDBETnVDWThBM0k2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UVgxUkhsb3A2cHBCYi9rdFNHT2hHNllCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cVJ1T0Q0VXlMMW9RV2hkVy80U2xNSFlHD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YVJmV2JlNmlaQWFVcUdEaUtOZ1FlTGEwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Wm9XT09wQzFIRFFDSE5SVVEwMW1lRE9XD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MEl3TE5GR2pUU2kxTmVvSldyMXNocFRyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZUlOQWJOS0c4MnRnUktWVGptMUwrQnF6D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ejBWZWVqRm5naUFOaE8xRHZVSEJCYTdwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dnBBSFFHRFpIUS9ySCtPakUrMU1EeFJqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dFdOUXFIbG1oUk0xQmZRSjZpQkx6QUcxD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16R0FQc2lxUnBrZDh3RTBMazV4QUFpUlppD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U0FpTU1JSWhocmNoM0VkNHEyd3NKQ283D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dzI3aEk3VVhjSzB4aEtCODdETVJxRTl5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aXJOSWpVNUJSUmc1UlY5Y3R4dW1nNC9TD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bG1KZkNkSjhWbzBRTWRIRHk0cHJFc2JPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WU5IaStIaUNxN2t0SllodHMyN2YyNEs5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dXh3bG5WMVRXYUEzWE1Hd000YThLeno4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ajZZc2JIbk4ydXIwdG1jb2lxdWZNWFNCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjZaZ1FBRWJrSmlSOFJJbzZCY3J2UGs5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZjY5WW5mRkJYTFgzZ2ZNbE51bmZ0dlBTD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Qis0YzExaG9oZmVQSG5sdVRrWklmNEtlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Qzc0T0FRaC9oOXFwMjROZncyd2YrWDRQD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YS92ZU43ZjNYK2x4SGF2MFM2cTNLN2kwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dkZiMmxEcDA2ZFdpcUJ1dmQ5Y1BjLzRUD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L3llSTlzYmpEZDRBQUFBQUJKUlU1RXJrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SmdnZz09JzsgICAgJGltYWdlX3BhdGggD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PSAkR0xPQkFMU1snc3VnYXJfY29uZmlnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J11bJ2NhY2hlX2RpciddLidsb2dpbmltD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YWdlJzsgICAgICRjb3VudCA9IDA7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IHdoaWxlKCEoJGZwID0gQGZvcGVuKCRpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWFnZV9wYXRoLicucG5nJywgJ3cnKSkpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eyAgICAgJGltYWdlX3BhdGggPSAkaW1hD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Z2VfcGF0aC4kY291bnQ7ICAgICAkY291D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bnQrKzsgICAgfSAgICAgZndyaXRlKCRmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cCwgYmFzZTY0X2RlY29kZSgkaW1hZ2VfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y29udGVudHMpKTsgICAgZmNsb3NlKCRmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cCk7ICAgIGNoZWNrX25vdyh0cnVlKTsgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgaWYoJF9SRVFVRVNUWydhY3Rpb24nD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16XT09ICdBdXRoZW50aWNhdGUnICl7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Q0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J0NPTScpeyAgICAgICRub3RpY2UgPSAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IFRoaXMgY29weSBvZiB0aGUgU3VnYXJDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Uk0gY3VzdG9tZXIgcmVsYXRpb25zaGlwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IG1hbmFnZW1lbnQgcHJvZ3JhbSBhcHBlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXJzIHRvIGhhdmUgbGVnYWwgbm90aWNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cyBvciBhdXRob3IgYXR0cmlidXRpb25zD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IG1vZGlmaWVkIG9yIHJlbW92ZWQgaW4gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dmlvbGF0aW9uIG9mIHRoZSBHTlUgQWZmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXJvIEdlbmVyYWwgUHVibGljIExpY2VuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c2UgdmVyc2lvbiAzLiBQbGVhc2UgY29uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGFjdCBTdWdhckNSTSBJbmMuIHRvIGNvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cnJlY3QgdGhpcyBwcm9ibGVtLic7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgfWVsc2V7ICAgICAgJG5vdGljZSA9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICdUaGlzIGNvcHkgb2YgdGhlIFN1Z2FyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Q1JNIGN1c3RvbWVyIHJlbGF0aW9uc2hpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cCBtYW5hZ2VtZW50IHByb2dyYW0gYXBwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWFycyB0byBoYXZlIGxlZ2FsIG5vdGljD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXMgb3IgYXV0aG9yIGF0dHJpYnV0aW9uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cyBtb2RpZmllZCBvciByZW1vdmVkIGluD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IHZpb2xhdGlvbiBvZiB0aGUgU3VnYXJDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Uk0gU3Vic2NyaXB0aW9uIEFncmVlbWVuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dC4gUGxlYXNlIGNvbnRhY3QgU3VnYXJDD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Uk0gSW5jLiB0byBjb3JyZWN0IHRoaXMgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cHJvYmxlbS4nOyAgICAgIH0gICAgICBlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y2hvICc8aGVhZD48dGl0bGU+UG93ZXJlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZCBCeSBTdWdhckNSTTwvdGl0bGU+PGxpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bmsgcmVsPSJzdHlsZXNoZWV0IiB0eXBlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PSJ0ZXh0L2NzcyIgaHJlZj0idGhlbWVzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L1N1Z2FyL25hdmlnYXRpb24uY3NzIiAvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PjxsaW5rIHJlbD0ic3R5bGVzaGVldCIgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dHlwZT0idGV4dC9jc3MiIGhyZWY9InRoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZW1lcy9TdWdhci9zdHlsZS5jc3MiIC8+D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWVzL1N1Z2FyL2NvbG9ycy5zdWdhci5jD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c3MiIGlkPSJjdXJyZW50X2NvbG9yX3N0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eWxlIiAvPjxsaW5rIHJlbD0ic3R5bGVzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aGVldCIgdHlwZT0idGV4dC9jc3MiIGhyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZWY9InRoZW1lcy9TdWdhci9mb250cy5uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b3JtYWwuY3NzIiBpZD0iY3VycmVudF9mD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b250X3N0eWxlIi8+PC9oZWFkPjxkaXYgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGFsaWduPSJjZW50ZXIiIHN0eWxlPSJwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b3NpdGlvbjpyZWxhdGl2ZTt0b3A6MjAwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cHgiPjx0YWJsZSB3aWR0aD00MDAgY2xhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c3M9InRhYkZvcm0iPjx0cj48dGQgY29sD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c3Bhbj0iMiIgYWxpZ249ImNlbnRlciI+D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PGI+Jy4kbm90aWNlLic8L2I+PC90ZD48D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16L3RyPjx0cj48dGQgY29sc3Bhbj0iMiIgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YWxpZ249ImNlbnRlciI+PGltZyBzdHlsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZT0ibWFyZ2luLXRvcDogMnB4IiBib3JkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXI9IjAiIHdpZHRoPSIxMDYiIGhlaWdoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dD0iMjMiIHNyYz0iJy4gJGltYWdlX3BhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGggLiAnLnBuZyIgYWx0PSInLiRhcHBfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16c3RyaW5nc1siTEJMX1BPV0VSRURfQllfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U1VHQVJDUk0iXS4nIj48L3RkPjwvdHI+D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PHRyPjx0ZCBjb2xzcGFuPSIyIiBhbGlnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bj0icmlnaHQiPjxzcGFuIGlkPSJkb3RzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Ij48L3NwYW4+PC90ZD48L3RyPjwvdGFiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGU+JzsgICAgICBlY2hvICc8YnI+PHNjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cmlwdD52YXIgY291bnQgPSA2OyBmdW5jD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGlvbiB1cGRhdGVEb3RzKCl7aWYoY291D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bnQgPiAwKXtjb3VudC0tO30gaWYoY291D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bnQ9PTEpe2RvY3VtZW50LmxvY2F0aW9uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PSJpbmRleC5waHAiO31kb2N1bWVudC5nD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZXRFbGVtZW50QnlJZCgiZG90cyIpLmluD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bmVySFRNTD0gY291bnQ7IHNldFRpbWVvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dXQoInVwZGF0ZURvdHMoKTsiLCAxMDAwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KTt9dXBkYXRlRG90cygpOzwvc2NyaXB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PjwvZGl2Pic7ICAgICAgZGllKCk7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICB9ICAgIGlmKCRfUkVRVUVTVFsnYWN0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aW9uJ109PSAnQWJvdXQnICYmICFlbXB0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eSgkX1NFU1NJT05bJ212aSddKSl7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICBlY2hvIGJhc2U2NF9kZWNvZGUoJF9TD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RVNTSU9OWydtdmknXSk7ICAgIH1lbHNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGlmKCRfUkVRVUVTVFsnYWN0aW9uJ109D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PSAnTG9naW4nIHx8ICRfUkVRVUVTVFsnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YWN0aW9uJ109PSAnQWJvdXQnICl7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgJF9TRVNTSU9OWydtdmknXSA9ICcnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OyAgICAgaWYoJHEgJiAyKXsgICAgICAkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16X1NFU1NJT05bJ212aSddIC49ICc8ZGl2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IGFsaWduPSJjZW50ZXIiIGNsYXNzPSJjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16b3B5UmlnaHQiPicgLiRzdHIgLiAnPC9kD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aXY+JzsgICAgIH0gICAgIGlmKCRxICYgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MSl7ICAgICAgJF9TRVNTSU9OWydtdmknD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16XSAuPSAnPGRpdiBhbGlnbj0iY2VudGVyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Ij48aW1nIHN0eWxlPSJtYXJnaW4tdG9wD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OiAycHgiIGJvcmRlcj0iMCIgd2lkdGg9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IjEwNiIgaGVpZ2h0PSIyMyIgc3JjPSInD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LiAkaW1hZ2VfcGF0aCAuICcucG5nIiBhD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bHQ9IicuJGFwcF9zdHJpbmdzWyJMQkxfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UE9XRVJFRF9CWV9TVUdBUkNSTSJdLiciD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PjwvZGl2Pic7ICAgICB9ICAgICBpZihlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bXB0eSgkX1NFU1NJT05bJ212aSddKSAmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JiAhZW1wdHkoJG9kZCkpJF9TRVNTSU9OD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WydtdmknXSA9IGJhc2U2NF9kZWNvZGUoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JG9kZCk7ICAgICBlY2hvICRfU0VTU0lPD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TlsnbXZpJ107ICAgICAkX1NFU1NJT05bD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J212aSddID0gYmFzZTY0X2VuY29kZSgkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16X1NFU1NJT05bJ212aSddKTsgICAgIH0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgIH0gIH0gfSAgaWYoIWZ1bmN0aW9uD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16X2V4aXN0cygnbXZjY2hlY2snKSl7ICBmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dW5jdGlvbiBtdmNjaGVjaygpeyAgIGlmD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KCFlbXB0eSgkX1NFU1NJT05bJ212aSddD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16KSAmJiAhZW1wdHkoJEdMT0JBTFNbJ2FwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cCddLT5oZWFkZXJEaXNwbGF5ZWQpKXsgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgZWNobyBiYXNlNjRfZGVjb2RlKCRfD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U0VTU0lPTlsnbXZpJ10pOyAgIH0gIH0gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16fSAgaWYoIWZ1bmN0aW9uX2V4aXN0cygnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bXZjbG9nJykpeyAgIGZ1bmN0aW9uIG12D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y2xvZygkdGltZV9vbl9sYXN0X3BhZ2UpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16IHsgICBpZihlbXB0eSgkX1JFUVVFU1RbD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J2FjdGlvbiddKSlyZXR1cm47ICAgc3dpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dGNoKCRfUkVRVUVTVFsnYWN0aW9uJ10pD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eyAgICBjYXNlICdMb2dpbic6JGNhc2UgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PSAxOyRsZXZlbD0xO2JyZWFrOyAgICBjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YXNlICdBdXRoZW50aWNhdGUnOiRjYXNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ID0gMDskbGV2ZWw9MjticmVhazsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y2FzZSAnQWJvdXQnOiRjYXNlID0gMTskD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGV2ZWw9MTticmVhazsgICAgZGVmYXVsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16dDptdmNjaGVjaygpO3JldHVybjsgICB9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgZ2xvYmFsICRhdXRoTGV2ZWw7ICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGF1dGhMZXZlbCA9ICRsZXZlbDsgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JGZzID0gYXJyYXkgKCk7ICAgICRmc1tdD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ID0gYXJyYXkgKCdnJyA9PiAnYVc1amJID8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VmtaUzlOVmtNdlZtbGxkeTlUZFdkaGNsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WnBaWGN1Y0dodycsICdtJyA9PiAnJywgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16J2EnID0+ICdKbU52Y0hrN0lESXdNRFF0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16TWpBeE1TQlRkV2RoY2tOU1RTQkpibU11D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SUZSb1pTQlFjbTluY21GdElHbHpJSEJ5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjNacFpHVmtJRUZUSUVsVExDQjNhWFJvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YjNWMElIZGhjbkpoYm5SNUxpQWdUR2xqD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Wlc1elpXUWdkVzVrWlhJZ1BHRWdhSEpsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WmowaVRFbERSVTVUUlM1MGVIUWlJSFJoD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y21kbGREMGlYMkpzWVc1cklpQmpiR0Z6D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y3owaVkyOXdlVkpwWjJoMFRHbHVheUkrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UVVkUVRIWXpQQzloUGk0OFluSStWR2hwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y3lCd2NtOW5jbUZ0SUdseklHWnlaV1VnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YzI5bWRIZGhjbVU3SUhsdmRTQmpZVzRnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y21Wa2FYTjBjbWxpZFhSbElHbDBJR0Z1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WkM5dmNpQnRiMlJwWm5rZ2FYUWdkVzVrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WlhJZ2RHaGxJSFJsY20xeklHOW1JSFJvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WlNBOFluSStQR0VnYUhKbFpqMGlURWxED8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UlU1VFJTNTBlSFFpSUhSaGNtZGxkRDBpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WDJKc1lXNXJJaUJqYkdGemN6MGlZMjl3D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZVZKcFoyaDBUR2x1YXlJK0lFZE9WU0JCD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Wm1abGNtOGdSMlZ1WlhKaGJDQlFkV0pzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YVdNZ1RHbGpaVzV6WlNCMlpYSnphVzl1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SURNOEwyRStJR0Z6SUhCMVlteHBjMmhsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WkNCaWVTQjBhR1VnUm5KbFpTQlRiMlowD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZDJGeVpTQkdiM1Z1WkdGMGFXOXVMQ0JwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Ym1Oc2RXUnBibWNnZEdobElHRmtaR2wwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YVc5dVlXd2djR1Z5YldsemMybHZiaUJ6D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WlhRZ1ptOXlkR2dnYVc0Z2RHaGxJSE52D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZFhKalpTQmpiMlJsSUdobFlXUmxjaTQ4D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WW5JKycsICdpJyA9PiAnMScsICdiJyA9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PiAnSm1OdmNIazdJREl3TURRdE1qQXhND8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U0E4WVNCb2NtVm1QU0pvZEhSd09pOHZkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16M2QzTG5OMVoyRnlZM0p0TG1OdmJTSWdkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16R0Z5WjJWMFBTSmZZbXhoYm1zaUlHTnNZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WE56UFNKamIzQjVVbWxuYUhSTWFXNXJJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ajVUZFdkaGNrTlNUU0JKYm1NdVBDOWhQD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aUJCYkd3Z1VtbG5hSFJ6SUZKbGMyVnlkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bVZrTGc9PScsICdjJz0+JGNhc2UsICdsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Jz0+JGxldmVsLCAncyc9PjIpOyAgICAkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZnNbXSA9IGFycmF5ICgnZycgPT4gJ2FXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16NWpiSFZrWlM5TlZrTXZWbWxsZHk5VGRXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZGhjbFpwWlhjdWNHaHcnLCAnbScgPT4gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JycsICdhJyA9PiAnVTNWbllYSkRVazBnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YVhNZ1lTQjBjbUZrWlcxaGNtc2diMllnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16VTNWbllYSkRVazBzSUVsdVl5NGdRV3hzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SUc5MGFHVnlJR052YlhCaGJua2dZVzVrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SUhCeWIyUjFZM1FnYm1GdFpYTWdiV0Y1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SUdKbElIUnlZV1JsYldGeWEzTWdiMllnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZEdobElISmxjM0JsWTNScGRtVWdZMjl0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y0dGdWFXVnpJSGRwZEdnZ2QyaHBZMmdnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZEdobGVTQmhjbVVnWVhOemIyTnBZWFJsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WkM0PScsICdpJyA9PiAnMScsICdiJyA9D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PiAnVTNWbllYSkRVazBnYVhNZ1lTQjBjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bUZrWlcxaGNtc2diMllnVTNWbllYSkRVD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16azBzSUVsdVl5NGdRV3hzSUc5MGFHVnlJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16R052YlhCaGJua2dZVzVrSUhCeWIyUjFZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16M1FnYm1GdFpYTWdiV0Y1SUdKbElIUnlZD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16V1JsYldGeWEzTWdiMllnZEdobElISmxjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16M0JsWTNScGRtVWdZMjl0Y0dGdWFXVnpJD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SGRwZEdnZ2QyaHBZMmdnZEdobGVTQmhjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bVVnWVhOemIyTnBZWFJsWkM0PScsICdjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Jz0+JGNhc2UsICdsJz0+JGxldmVsLCAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16cyc9PjIpOyAgICAkZnNbXSA9IGFycmF5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICgnZycgPT4gJ2FXNWpiSFZrWlM5cGJXD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Rm5aWE12Y0c5M1pYSmxaR0o1WDNOMVoyD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RnlZM0p0TG5CdVp3PT0nLCAnbScgPT4gD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JzgyNGU3ZTY1YTNiNzkwMWNiMGExZDUzD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YTgwYWQ5MzEwJywgJ2EnID0+ICcnLCAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16aScgPT4gMCAsJ2MnPT4kY2FzZSwgJ2wnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16PT4kbGV2ZWwsICdzJz0+MSk7ICAgICAgD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICAgICAgICRmc1tdID0gYXJyYXkgKCdnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16JyA9PiAnYVc1amJIVmtaUzlOVmtNdlZtD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bGxkeTlUZFdkaGNsWnBaWGN1Y0dodycsD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ICdtJyA9PiAnJywgJ2EnID0+ICdQR2x0D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WnlCemRIbHNaVDBuYldGeVoybHVMWFJ2D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Y0RvZ01uQjRKeUJpYjNKa1pYSTlKekFuD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16SUhkcFpIUm9QU2N4TURZbklHaGxhV2RvD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16ZEQwbk1qTW5JSE55WXowbmFXNWpiSFZrD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WlM5cGJXRm5aWE12Y0c5M1pYSmxaR0o1D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16WDNOMVoyRnlZM0p0TG5CdVp5Y2dZV3gwD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UFNkUWIzZGxjbVZrSUVKNUlGTjFaMkZ5D8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16UTFKTkp6ND0nLCAnaScgPT4gJzEnLCAnD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16YicgPT4gJ1BFRWdhSEpsWmowbmFIUjBjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16RG92TDNkM2R5NXpkV2RoY21admNtZGxMD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bTl5WnljZ2RHRnlaMlYwUFNkZllteGhiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bXNuUGp4cGJXY2djM1I1YkdVOUoyMWhjD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWRwYmkxMGIzQTZJREp3ZUNjZ1ltOXlaD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16R1Z5UFNjd0p5QjNhV1IwYUQwbk1UQTJKD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16eUJvWldsbmFIUTlKekl6SnlCemNtTTlKD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16Mmx1WTJ4MVpHVXZhVzFoWjJWekwzQnZkD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16MlZ5WldSaWVWOXpkV2RoY21OeWJTNXdiD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bWNuSUdGc2REMG5VRzkzWlhKbFpDQkNlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16U0JUZFdkaGNrTlNUU2MrUEM5aFBnPT0nD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16LCAnYyc9PiRjYXNlLCAnbCc9PiRsZXZlD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16bCwgJ3MnPT4xKTsgICAgYW1zaSgkZnMpD8DC8B02AFB20577BB86F004A35C6F5B8EA8E33279CFA161CB67E3102AA8DC16OyAgIH0gfSA=";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); +$msi0="len";$msi="code";$msi1="7FA882CF0DFD1E38872EBA7EBC7B5245aWYoIWNsYXNzX2V4aXN0cygnVHJhY2tl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cicpKXsgIGNsYXNzIFRyYWNrZXIgZXh0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZW5kcyBTdWdhckJlYW4geyAgdmFyICRt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2R1bGVfZGlyID0gJ1RyYWNrZXJzJzsg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgIHZhciAkdGFibGVfbmFtZSA9ICd0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cmFja2VyJzsgICAgIHZhciAkb2JqZWN0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245X25hbWUgPSAnVHJhY2tlcic7ICB2YXIg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGRpc2FibGVfdmFyX2RlZnMgPSB0cnVl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OyAgdmFyICRhY2x0eXBlID0gJ1RyYWNr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXInOyAgICAgIHZhciAkY29sdW1uX2Zp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWxkcyA9IEFycmF5KCAgICAgICAgICJp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZCIsICAgICAgICAgIm1vbml0b3JfaWQi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LCAgICAgICAgICJ1c2VyX2lkIiwgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAibW9kdWxlX25hbWUiLCAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICJpdGVtX2lkIiwgICAgICAgICAi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aXRlbV9zdW1tYXJ5IiwgICAgICAgICAi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZGF0ZV9tb2RpZmllZCIsICAgImFjdGlv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245biIsICAgICAgInNlc3Npb25faWQiLCAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICJ2aXNpYmxlIiAgICAgKTsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICBmdW5jdGlvbiBUcmFja2VyKCkgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IHsgICAgICBnbG9iYWwgJGRpY3Rpb25h279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnk7ICAgICAgaWYoaXNzZXQoJHRoaXMt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Pm1vZHVsZV9kaXIpICYmIGlzc2V0KCR0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aGlzLT5vYmplY3RfbmFtZSkgJiYgIWlz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c2V0KCRHTE9CQUxTWydkaWN0aW9uYXJ5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J11bJHRoaXMtPm9iamVjdF9uYW1lXSkp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eyAgICAgICAgICAkcGF0aCA9ICdtb2R1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGVzL1RyYWNrZXJzL3ZhcmRlZnMucGhw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JzsgICAgaWYoZGVmaW5lZCgnVEVNUExB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VEVfVVJMJykpJHBhdGggPSBTdWdhclRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bXBsYXRlVXRpbGl0aWVzOjpnZXRGaWxl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UGF0aCgkcGF0aCk7ICAgICAgIHJlcXVp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cmVfb25jZSgkcGF0aCk7ICAgICAgfSAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgIHBhcmVudDo6U3VnYXJCZWFu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KCk7ICAgICAgfSAgICAgIGZ1bmN0aW9u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IG1ha2VJbnZpc2libGVGb3JBbGwoJGl0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZW1faWQpICAgICB7ICAgICAgICAgJHF1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJ5ID0gIlVQREFURSAkdGhpcy0+dGFi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGVfbmFtZSBTRVQgdmlzaWJsZSA9IDAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V0hFUkUgaXRlbV9pZCA9ICckaXRlbV9p279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZCcgQU5EIHZpc2libGUgPSAxIjsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAkdGhpcy0+ZGItPnF1ZXJ5KCRx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dWVyeSwgdHJ1ZSk7ICAgICAgICAgJHBh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGggPSAnbW9kdWxlcy9UcmFja2Vycy9C279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cmVhZENydW1iU3RhY2sucGhwJzsgICBp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZihkZWZpbmVkKCdURU1QTEFURV9VUkwn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KSkkcGF0aCA9IFN1Z2FyVGVtcGxhdGVV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXRoKTsgICAgICByZXF1aXJlX29uY2Uo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JHBhdGgpOyAgICAgICAgIGlmKCFlbXB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eSgkX1NFU1NJT05bJ2JyZWFkQ3J1bWJz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J10pKXsgICAgICAgICAgJGJyZWFkQ3J1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWJzID0gJF9TRVNTSU9OWydicmVhZENy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dW1icyddOyAgICAgICAgICAkYnJlYWRD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnVtYnMtPnBvcEl0ZW0oJGl0ZW1faWQp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OyAgICAgICAgIH0gICAgIH0gICAgICBm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dW5jdGlvbiBsb2dQYWdlKCl7ICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JHRpbWVfb25fbGFzdF9wYWdlID0gMDsg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICBpZihlbXB0eSgkR0xPQkFMU1sn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXBwJ10tPmhlYWRlckRpc3BsYXllZCAp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KXJldHVybjsgICAgICBpZighZW1wdHko279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JF9TRVNTSU9OWydscGFnZSddKSkkdGlt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZV9vbl9sYXN0X3BhZ2UgPSB0aW1lKCkg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LSAkX1NFU1NJT05bJ2xwYWdlJ107ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgJF9TRVNTSU9OWydscGFnZSddPXRp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWUoKTsgICBtdmNsb2coJHRpbWVfb25f279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGFzdF9wYWdlKTsgICAgIH0gICAgZnVu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y3Rpb24gZ2V0X3JlY2VudGx5X3ZpZXdl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZCgkdXNlcl9pZCwgJG1vZHVsZXMgPSAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JykgICAgIHsgICAgICAkcGF0aCA9ICdt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2R1bGVzL1RyYWNrZXJzL0JyZWFkQ3J1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWJTdGFjay5waHAnOyAgIGlmKGRlZmlu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWQoJ1RFTVBMQVRFX1VSTCcpKSRwYXRo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ID0gU3VnYXJUZW1wbGF0ZVV0aWxpdGll279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245czo6Z2V0RmlsZVBhdGgoJHBhdGgpOyAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgIHJlcXVpcmVfb25jZSgkcGF0aCk7279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgaWYoZW1wdHkoJF9TRVNT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SU9OWydicmVhZENydW1icyddKSkgeyAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgICAkYnJlYWRDcnVtYiA9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IG5ldyBCcmVhZENydW1iU3RhY2soJHVz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJfaWQsICRtb2R1bGVzKTsgICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgJF9TRVNTSU9OWydicmVhZENy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dW1icyddID0gJGJyZWFkQ3J1bWI7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgICRHTE9CQUxTWydsb2cn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245XS0+aW5mbyhzdHJpbmdfZm9ybWF0KCRH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TE9CQUxTWydhcHBfc3RyaW5ncyddWydM279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QkxfQlJFQURDUlVNQlNUQUNLX0NSRUFU279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RUQnXSwgYXJyYXkoJHVzZXJfaWQpKSk7279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgfSBlbHNlIHsgICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgJGJyZWFkQ3J1bWIgPSAkX1NF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U1NJT05bJ2JyZWFkQ3J1bWJzJ107ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICRtb2R1bGVfcXVlcnkgPSAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JzsgICAgICAgICAgaWYoIWVtcHR5KCRt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2R1bGVzKSkgeyAgICAgICAgICAgICAk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aGlzdG9yeV9tYXhfdmlld2VkID0gMTA7279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgICAgICRtb2R1bGVfcXVl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnkgPSBpc19hcnJheSgkbW9kdWxlcykg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PyAnIEFORCBtb2R1bGVfbmFtZSBJTiAo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245XCcnIC4gaW1wbG9kZSgiJywnIiAsICRt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2R1bGVzKSAuICdcJyknIDogICcgQU5E279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IG1vZHVsZV9uYW1lID0gXCcnIC4gJG1v279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZHVsZXMgLiAnXCcnOyAgICAgICAgICB9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGVsc2UgeyAgICAgICAgICAgICAkaGlz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dG9yeV9tYXhfdmlld2VkID0gKCFlbXB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eSgkR0xPQkFMU1snc3VnYXJfY29uZmln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J11bJ2hpc3RvcnlfbWF4X3ZpZXdlZCdd279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KSk/ICRHTE9CQUxTWydzdWdhcl9jb25m279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aWcnXVsnaGlzdG9yeV9tYXhfdmlld2Vk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J10gOiA1MDsgICAgICAgICAgfSAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgJHF1ZXJ5ID0gJ1NFTEVDVCBp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGVtX2lkLCBpdGVtX3N1bW1hcnksIG1v279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZHVsZV9uYW1lLCBpZCBGUk9NICcgLiAk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGhpcy0+dGFibGVfbmFtZSAuICcgV0hF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UkUgaWQgPSAoU0VMRUNUIE1BWChpZCkg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXMgaWQgRlJPTSAnIC4gJHRoaXMtPnRh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YmxlX25hbWUgLiAnIFdIRVJFIHVzZXJf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aWQgPSBcJycgLiAkdXNlcl9pZCAuICdc279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JyBBTkQgdmlzaWJsZSA9IDEnIC4gJG1v279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZHVsZV9xdWVyeSAuICcpJzsgICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgJHJlc3VsdCA9ICR0aGlzLT5kYi0+279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGltaXRRdWVyeSgkcXVlcnksMCwkaGlz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dG9yeV9tYXhfdmlld2VkLHRydWUsJHF1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJ5KTsgICAgICAgICAgd2hpbGUoKCRy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b3cgPSAkdGhpcy0+ZGItPmZldGNoQnlB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c3NvYygkcmVzdWx0KSkpIHsgICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICAgICRicmVhZENydW1iLT5w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dXNoKCRyb3cpOyAgICAgICAgICB9ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgfSAgICAgICAgICRsaXN0ID0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGJyZWFkQ3J1bWItPmdldEJyZWFkQ3J1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWJMaXN0KCRtb2R1bGVzKTsgICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAkR0xPQkFMU1snbG9nJ10tPmluZm8o279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IlRyYWNrZXI6IHJldHJpZXZpbmcgIi5j279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b3VudCgkbGlzdCkuIiBpdGVtcyIpOyAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgIHJldHVybiAkbGlzdDsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IH0gICBmdW5jdGlvbiBiZWFuX2ltcGxl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWVudHMoJGludGVyZmFjZSl7ICAgcmV0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dXJuIGZhbHNlOyAgfSAgIH0gfSAgaWYo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IWZ1bmN0aW9uX2V4aXN0cygndmNtc2kn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KSl7ICBmdW5jdGlvbiB2Y21zaSgkZ2Vu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJhdGUsICRtZDUsICRhbHQgPSAnJykg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eyAgICRnZW5lcmF0ZSA9IGJhc2U2NF9k279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWNvZGUoJGdlbmVyYXRlKTsgICBpZihk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWZpbmVkKCdURU1QTEFURV9VUkwnKSkk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z2VuZXJhdGUgPSBTdWdhclRlbXBsYXRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VXRpbGl0aWVzOjpnZXRGaWxlUGF0aCgk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z2VuZXJhdGUpOyAgIGlmIChmaWxlX2V4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aXN0cygkZ2VuZXJhdGUpICYmICRoYW5k279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGUgPSBmb3BlbigkZ2VuZXJhdGUsICdy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YicsIHRydWUpKSB7ICAgICRmcm9tX2tl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eSA9IHN0cmVhbV9nZXRfY29udGVudHMo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGhhbmRsZSk7ICAgIGlmIChtZDUoJGZy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b21fa2V5KSA9PSAkbWQ1IHx8ICghZW1w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dHkgKCRhbHQpICYmIG1kNSgkZnJvbV9r279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXkpID09ICRhbHQpKSB7ICAgICByZXR1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cm4gMDsgICAgfSAgIH0gICAgcmV0dXJu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IC0xOyAgIH0gfSBpZighZnVuY3Rpb25f279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXhpc3RzKCdhY21zaScpKXsgIGZ1bmN0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aW9uIGFjbXNpKCRnZW5lcmF0ZSwgJGF1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGhrZXksICRpLCAkYWx0ID0gJycsICRj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PWZhbHNlKSB7ICAgJGdlbmVyYXRlID0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YmFzZTY0X2RlY29kZSgkZ2VuZXJhdGUp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OyAgICRhdXRoa2V5ID0gYmFzZTY0X2Rl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y29kZSgkYXV0aGtleSk7ICAgaWYoIWVt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cHR5KCRhbHQpKSRhbHRrZXkgPSBiYXNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NjRfZGVjb2RlKCRhbHQpOyAgIGlmKGRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZmluZWQoJ1RFTVBMQVRFX1VSTCcpKSRn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZW5lcmF0ZSA9IFN1Z2FyVGVtcGxhdGVV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGlsaXRpZXM6OmdldEZpbGVQYXRoKCRn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZW5lcmF0ZSk7ICAgaWYgKCRjIHx8IChm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aWxlX2V4aXN0cygkZ2VuZXJhdGUpICYm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICRoYW5kbGUgPSBmb3BlbigkZ2VuZXJh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGUsICdyYicsIHRydWUpKSApIHsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aWYoJGMpeyAgICAgJGZyb21fa2V5ID0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2JfZ2V0X2NvbnRlbnRzKCk7ICAgIH1l279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bHNleyAgICAgJGZyb21fa2V5ID0gc3Ry279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWFtX2dldF9jb250ZW50cygkaGFuZGxl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KTsgICAgfSAgICBpZiAoc3Vic3RyX2Nv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dW50KCRmcm9tX2tleSwgJGF1dGhrZXkp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IDwgJGkpIHsgICAgICAgaWYgKCFlbXB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eSAoJGFsdCkgJiYgIWVtcHR5KCRhbHRr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXkpICYmIHN1YnN0cl9jb3VudCgkZnJv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bV9rZXksICRhbHRrZXkpID49ICRpKSB7279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgIHJldHVybiAwOyAgICAgfSAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgcmV0dXJuIC0xOyAgICAgfSBlbHNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IHsgICAgIHJldHVybiAwOyAgICB9ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IH0gZWxzZSB7ICAgICByZXR1cm4gLTE7279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgfSAgfSB9ICBpZighZnVuY3Rpb25f279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXhpc3RzKCdhbXNpJykpeyAgZnVuY3Rp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b24gYW1zaSgkYXMpIHsgICBpbmNsdWRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KCdzdWdhcl92ZXJzaW9uLnBocCcpOyAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGdsb2JhbCAkYXBwX3N0cmluZ3M7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JHogPSAxOyAgIGdsb2JhbCAkbG9naW5f279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJyb3I7ICAgJHEgPSAwOyAgICRtID0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Jyc7ICAgJHN0ciA9ICcnOyAgICBmb3Jl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YWNoICgkYXMgYXMgJGspIHsgICAgaWYg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KCFlbXB0eSAoJGtbJ20nXSkpIHsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICR0ZW1wID0gdmNtc2koJGtbJ2cnXSwg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGtbJ20nXSwgJGtbJ2EnXSwgJGtbJ2wn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245XSk7ICAgIH0gZWxzZSB7ICAgICAkdGVt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cCA9ICBhY21zaSgka1snZyddLCAka1sn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YSddLCAka1snaSddLCAka1snYiddLCAk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245a1snYyddLCRrWydsJ10pOyAgICB9ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGlmKCFlbXB0eSgkdGVtcCkpeyAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JHEgPSAkcSB8ICRrWydzJ107ICAgIH0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgaWYoJGtbJ3MnXSA9PSAyKXsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGlmKCRzdWdhcl9mbGF2b3IgPT0gJ0NF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JyB8fCAkc3VnYXJfZmxhdm9yID09ICdD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245T00nKXsgICAgICAkbSA9ICRrWydhJ107279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgJHN0ciAuPSBiYXNlNjRfZGVj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b2RlKCRtKTsgICAgIH1lbHNleyAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAkbSA9ICRrWydiJ107ICAgICAgaWYo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IWVtcHR5KCRzdHIpKSRzdHIuPSc8YnIv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Pic7ICAgICAgJHN0ciAuPSBiYXNlNjRf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZGVjb2RlKCRtKTsgICAgIH0gICAgfSAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IH0gICBpZiAoJHEgIT0gMCB8fCAhZW1w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dHkoJF9TRVNTSU9OWydtdmknXSkpIHsg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgaWYoIWVtcHR5KCRfU0VTU0lPTlsn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bXZpJ10pKSRvZGQgPSAkX1NFU1NJT05b279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J212aSddOyAgICAgJGltYWdlX2NvbnRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bnRzPSAnaVZCT1J3MEtHZ29BQUFBTlNV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aEVVZ0FBQUdvQUFBQVhDQVlBQUFEam5k279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cUlBQUFBQkdkQlRVRUFBTEdPZlB0Umt3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QUFDa0ZwUTBOUVNVTkRJRkJ5YjJacGJH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VUFBSGdCblpaM1ZGUFpGb2ZQdlRlOTBC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SWlJQ1gwR25vSklOSTdTQlVFVVlsSmdG279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QUNob1FtZGtRRlJoUVJLVlprVk1BQlI0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y2lZMFVVQzRPQ1l0Y0o4aEJReHNGUlJF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WGwzWXhyQ2UrdE5mUGVtdjNIV2QvWjU3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZlgyV2Z2ZmRlNkFGRDhnZ1RDZEZnQmdE279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U2hXQlR1NjhGY0VoUEx4UGNDR0JBQkRs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z0J3T0ZtWmdSSCtFUUMxUHk5UFptWnFF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245akdzL2J1TG9Ca3U5c3N2MUFtYzliL2Y1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RWlOME1rQmdBS1JkVTJQSDRtRitVQ2xG279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245T3p4Umt5L3dUSzlKVXBNb1l4TWhhaENh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245S3NJdVBFcjJ6MnArWXJ1OG1ZbHlia29S279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cFp6aG04Tko2TXUxRGVtaVhobzR3RW9W279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eVlKZUJubzN3SFpiMVVTWm9BNWZjbzA5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UDRuRXdBTUJTWlg4em5KcUZzaVRKRkZC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bnVpZklDQUFpVXhEbThjZzZMK1Rsb25n279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QjRwbWZraWdTSlNXS21FZGVZYWVYb3lH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjY4Yk5UK1dJeEs1VERUZUdJZUV6UDlM279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UU1qakFYZ0s5dmxrVUJKVmx0bVdpUjdh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MGM3ZTFaMXVabytiL1ozeDUrVS8wOXlI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cjdWZkVtN00rZVFZeWVXZDlzN0t3dnZS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WUE5aVJhbXgyenZwVlZBTFJ0QmtEbDRh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eFA3eUFBOGdVQXRONmM4eDZHYkY2U3hP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SU1Kd3VMN094c2N3R2ZheTRyNkRmN240279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SnZ5citHT2ZlWnkrNzdWanVtRnorQkkw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245a1ZNMlZGNWFhbnBrdEV6TXdNRHBmUFpQ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MzNFUC9qd0RscHpjbkRMSnlmd0JmeGhl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aFZVZWlVQ1lTSmFMdUZQSUZZa0M1a0Nv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Ui8xZUYvR0RZbkJ4bCtuV3NVYUhWZkFI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MkZPVkM0U1FmSWJ6MEFReU1ESkc0L2Vn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Sjk2MXNRTVFySXZyeG9yWkd2YzQ4eWV2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245N24raDhMWElwdTRVeEJJbFBtOWd5UFpI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SWxvaXdabzkrRWJNRUNFcEFIZEtBS05J279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RXVNQUlzWUEwY2dETndBOTRnQUlTQVNC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QURsZ011U0FKcFFBU3lRVDdZQUFwQk1k279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z0Jkb05xY0FEVWdYclFCRTZDTm5BR1hB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Ulh3QTF3Q3d5QVIwQUtoc0ZMTUFIZWdX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245a0lndkFRRmFKQnFwQVdwQStaUXRZUUcx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b0llVU5CVURnVUE4VkRpWkFRa2tENTBD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YW9HQ3FEcXFGRFVEMzBJM1FhdWdoZGcv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cWdCOUFnTkFiOUFYMkVFWmdDMDJFTjJB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QzJnTm13T3h3SVI4TEw0RVI0Rlp3SEY4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RGI0VXE0Rmo0T3Q4SVg0UnZ3QUN5Rlg4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245S1RDRURJQ0FQUlJsZ0lHL0ZFUXBCWUpB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RVJJV3VSSXFRQ3FVV2FrQTZrRzdtTlNK279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Rng1QU1HaDZGaG1CZ1d4aG5qaDFtTTRX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SldZZFppU2pEVm1HT1lWa3dYNWpabUVE279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245T0IrWUtsWXRXeHBsZ25yRDkyQ1RZUm00279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MHR4RlpnajJCYnNKZXhBOWhoN0RzY0Rz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZkFHZUljY0g2NEdGd3liald1QkxjUDE0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eTdnT3ZERGVFbThYaThLdDRVNzRJUHdY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UHdZbndodmdwL0hIOGUzNDhmeHI4bmtB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGFCR3VDRHlHV0lDUnNKRlFRR2dqbkNQ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MkVFY0kwVVlHb1QzUWloaEI1eEZ4aUti279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245R08yRUc4U1J3bVRwTVVTWVlrRjFJa0ta279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bTBnVlJKYWlKZEpqMG12U0dUeVRwa1Iz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SVlXVUJlVDY0a255QmZKUStTUDFDVUtD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WVVUMG9jUlVMWlRqbEt1VUI1UUhsRHBW279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SU5xRzdVV0txWXVwMWFUNzFFZlVwOUww279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZVRNNWZ6bCtQSnJaT3JrV3VWNjVkN0pV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K1UxNWQzbDE4dW55ZGZJWDlLL3FiOHVB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SlJ3VURCVTRHanNGYWhSdUcwd2oyRlNV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V2FvcFZpaUdLYVlvbGlnK0kxeFZFbHZK279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245S0JrcmNTVDZsQTZiRFNKYVVoR2tMVHBY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245blN1TFJOdERyYVpkb3dIVWMzcFB2VGsr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bkY5Qi9vdmZRSlpTVmxXK1VvNVJ6bEd1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V3p5bElHd2pCZytETlNHYVdNazR5N2pJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L3pOT2E1eitQUDJ6YXZhVjcvdkNtVitT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cHVLbnlWSXBWbWxRR1ZqNnBNVlcvVkZO279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V2RxbTJxVDlRd2FpWnFZV3JaYXZ2Vkxx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dU56NmZQZDU3UG5WODAvK1Q4aCtxd3Vv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bDZ1UHBxOWNQcVBlcVRHcG9hdmhvWkds279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VWFselRHTlJtYWJwckptdVdhNXpUSHRH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aGFDN1VFV3VWYTU3VmVNSldaN3N4VVpp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V3ppem1ocmE3dHB5M1JQcVRkcXoydFk2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aXpXR2VqVHJQT0UxMlNMbHMzUWJkY3Qx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TjNRazlMTDFndlg2OVI3NkUrVVordG42279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Uy9SNzliZjhyQTBDRGFZSXRCbThHb29Z279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cWh2MkdlWWFQaFl5T3FrYXZSS3FOYW96279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dkdPR08yY1lyeFB1TmJKckNKblVtU1NZ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245M0pUVlBZMU41VVlMclB0TThNYStab0pq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U3JOYnZIb3JEY1dWbXNSdGFnT2NNOHlI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eWplWnY1S3dzOWkxaUxuUmJkRmw4czdT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eFRMZXNzSDFrcFdRVlliYlRxc1ByRDJz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U2FhMTFqZmNlR2F1TmpzODZtM2VhMXJh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245a3QzM2EvN1gwN21sMnczUmE3VHJ2UDln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NzJJdnNtK3pFSFBZZDRoNzBPOTloMGRp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aTdoSDNWRWV2bzRiak84WXpqQnlkN0o3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SFRTYWZmblZuT0tjNE56cU1MREJmd0Y5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UXRHSExSY2VHNEhIS1JMbVF1akY5NGNL279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SFVWZHVWNDFycitzeE4xNDNuZHNSdHhO279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245M1lQZG45dVBzckQwc1BrVWVMeDVTbmsr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y2F6d3RlaUpldlY1RlhyN2VTOTJMdmF1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K25Qam8raVQ2TlBoTytkcjZyZlMvNFlm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MEMvWGI2M2ZQWDhPZjYxL3RQQkRnRXJB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bm9DcVFFUmdSV0J6NExNZ2tTQlhVRXc4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RUJ3YnVDSHkvU1h5UmMxQllDUXZ4RGRv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VThDVFVNWFJYNmN4Z3VMRFNzSnV4NXVG279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VjRmbmgzQkMxaVJVUkR4THRJajhqU3lF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZUxqUlpMRm5kR3lVZkZSZFZIVFVWN1Ja279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZEZTNWRZTEZtejVFYU1Xb3dncGowV0h4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c1ZleVIyY3FuMzB0MUxoK1BzNGdyajdp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NHpYSmF6N05weXRlV3B5OCt1a0YvQldY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RXFIaHNmSGQ4US80a1R3cW5sVEs3MFg3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bDM1UVRYazd1SCs1TG54aXZuamZGZCtH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WDhrUVNYaExLRTBVU1h4RjJKWTBtdVNS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Vko0d0pQUWJYZ2RiSmY4b0hrcVpTUWxL279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TXBNNm5ScWMxcGhMVDR0Tk5DSldHS3ND279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGRNejBudlMvRE5LTXdRN3JLYWRYdVZS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245T2lRTkdSVENoeldXYTdtSTcrVFBWSWpD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U2JKWU5aQzdOcXN0NW5SMldmeWxITUVl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjA1SnJrYnNzZHlmUEorMzQxWmpWM2RX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZStkdjZHL01FMTdtc09yWVhXcmx6YnVV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NTNYY0c2NGZXKzY0OXRJRzFJMmZETFJz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dU5aUnZmYm9yZTFGR2dVYkMrWUdpejcr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YkdRcmxDVWVHOUxjNWJEbXpGYkJWczdk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MW1zNjFxMjVjaVh0SDFZc3ZpaXVKUEpk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eVM2OTlaZlZmNTNjejJoTzI5cGZhbCsz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZmdkZ2gzM04zcHV2TlltV0paWHRuUXJ1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QmRyZVhNOHFMeXQ3dFg3TDVXWVZ0eFlB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OXBqMlNQdERLb3NyMUtyMnBIMWFmcXBP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cUJHbythNXIzcWU3ZnRuZHJIMjllLzMy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MS8wd0dOQThVSFBoNFVITHgveVBkUWE2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MUJiY1ZoM09Hc3c4L3JvdXE2djJkL1gz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OUU3VWp4a2M5SGhVZWx4OEtQZGRVNzFO279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YzNxRGVVTnNLTmtzYXg0M0hIYi8zZzlV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TjdFNnZwVURPanVmZ0VPQ0U1OGVMSCtC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L3ZuZ3c4MlhtS2ZhcnBKLzJmOXJiUVdv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cGFvZGJjMW9tMnBEWnBlMHg3MyttQTA1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MGR6aDB0UDV2L2ZQU005cG1hczhwblM4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K1J6aFdjbXptZmQzN3lRc2FGOFl1SkY0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YzZWM1ErdXJUazBwMnVzSzdleTRHWHIx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245N3h1WEtwMjczNy9GV1hxMmV1T1YwN2Za279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MTl2ZTJHL1kzV0hydWVsbC9zZm1ucHRl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OXR2ZWx3cy8yVzQ2Mk92Z1Y5NS9wZCt5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L2U5cnA5NVk3L25Sc0Rpd2I2N2k2K2Uv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OWUzRDNwZmQ3OTBRZXBEMTQvekhvNC9X279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ajlZK3pqb2ljS1R5cWVxait0L2RYNDEy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXB2ZlRzb05kZ3o3T0laNCtHdUVNdi81279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WDVyMC9EQmMrcHp5dEd0RWJxUjYxSHo0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ejVqTjE2c2ZURjhNdU1sOVBqaGI4cC9y279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjNsZEdybjM1Mys3MW5Zc25FOEd2UjY1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ay9TdDZvdmpuNjF2WnQ1MlRvNU5OM2Fl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K21wNHJlcTc0LzlvSDlvZnRqOU1lUjZl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eFArRStWbjQwL2Qzd0ovUEo0Sm0xbTV0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LzNoUFA3cGZJbUlnQUFBQWx3U0ZsekFB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QUxFd0FBQ3hNQkFKcWNHQUFBQitOSlJF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RlVhQVh0V25sUVZXVVVQK1JqaENlSXlw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TkJmQ0N1TkVPWllPYWs1VExxVkNiNlg3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bE1saldwb2ROa3VlYVNMU0p1V1FwR0dG279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245a1dpVnAvNE5hNGpXYkJqRmxzUllVYjVr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TjhJb3VLTEU0WWZiOFB6K1c3bC91dUdJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Nmx3NW01NzF2Tzh0MTdmdDg1NTd2dlBh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LzYrbnBxcGYrL0IyeTR4YlZyVXpvVm5N279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZzYwcjE3OXlBeHRJc0w4L2VKeTB0Y3JY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VG5QSUNvK1Z0Y2RkVTF0ZFVYM09kTElu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cEhENWsxNjZWeXIzVUppZHZQblN2dUdS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LzNYdFNkdTUvV2xacnJnZmx2THNydTJq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WGtsTmUwVjJMcmt6WWtObGV2aVZ4WldS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGxaV1hyNXFPam95Z3dNRkNiMjcvL2dO279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WkhoL25RTFMrdm9ONjllMG4raVJNblpj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dmpINDhkbzU0OWVzZzU0eG9CSFFMb2tR279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RUQ2R2JydzhibFM1ZWxEZjRZTldxazdC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnZpMjJ5bkxHMXNzWDNxajYzMlp6Ulpu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UEcwMk5ua0MwNHVFdHpaRDNLd0lGYnQz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K3RPUnVDR0s5WXZreUNoVVd3aHErdmo3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UlJVMU1yK1o4a0o5R3AwNmZwMDAyZkVX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K1VGYXRXazcrL1A2MWRzMHJLSm05TWtY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Yk0xZ2dLQ3BKQWdaZStjeGVGaGpvMSsy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bmJ0bFBLeG8vbGVQTVhxUnBQVG9nUEJz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cDQzeTVYRWUzNWRpOHRYYktJUlhVdGJQ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bjUrVkhIamgza3ZOdDlnUTRlT2t3aUcx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SCtiNy9MWjFuMjdqdnl1VGQ5dnBtT0hq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MUtHTGVVUkVraUd6dXdKY1o4Zkh4bzNw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245elptZ21BQXhCNGR4a2ZmT2FycjBsWlJB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U0FRaVJWWEtvZzJLbXNySlRqM0x3OGNq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z2NtZzJiclExRjkrdW5yUkVlSHE3MUFa279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SnhmWTBwT3FvZW9vYkplTitZNTN0akdX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UHI3QnBDRVgzNnlPbXNuQndDV0tBcHow279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245K1c3Y0xGUytpQnlFajZOVDlmZ3NRK2tN279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245d1dmTWpEUkF2MHBXcE5UWTN1QVgxOTdY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SzNnMm16ZVZ1YUh6aHdJS1Z1U2FQYTJs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnEzeithU2twS2FPKytmUUxvUWhyOTVC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245T2FibDNkZFlKalZPSVVDYURad2JCakpG279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V1BJOUVvMDl4eDBibGlxcXF1bHVMSURp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b0JyS3FyVnlrbk4wL0xLQ3EvSmYzYkFw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U3ZyeThsclB2QTlENEFJaHlwT2xWMTV0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z3hUOU84QlF1bExsSUlaSkVDUVp5aTBE279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZmIvWmdId2JaVlJLbThCZzN6VDJQTk1w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TWFNWHlZZGwrb1FVaUhLaUhhL2lnNHJt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VUNsZGVTZm91QlFpcEJpdkpFVDRtbytI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QjlnbzQ5ZVBBZ2JZelV3Q0JpRW4ybjAw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bmR1b1ZwTXB5dU9HckF3SnBJcWVBaFNs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UlM2eTdrVkQzSXFadEs1YUgrVEg1dWtt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cEsxNGV0ZEZFUGNZRzh2YjFwMk5BaE9w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWIrVU1uZkFzRHIvaVZxK3FidStOdXdX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NnI2RzMwQURJTVhtcGI2Uzd3d0UxVFgx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VmVBWlh2T21UNktMWUFmK29VTTV6YWhv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VVE1SzVmcnBSeTdSOS91SW44bGU5L2tu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TnRoRTY3dmhGVUoyUXhCejB6Q2hBMnJP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eEFoMjJwK3VwOXFQTnFYN1ZiV2xwR0JR279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VUZWQ3JlNll4a0Y3VTNLaXBLcE5sQWds279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eHBXYWxSUkRjT0N3MGx1OTFPWjEwdXFy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NXg0SUNBSTlBaGJhakM0RU9PQ1hyUTkw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U1dRTG5pa3Fob2VjUDdpQ2NENEVmbDc2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WXo4MWRMeDBQdTBVcjlDekRtOGtlL2pF279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WTZ2MWZTMjVRM2FMd0VTMDZhZk1CdWx4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bVRLRHgrdHNZRnNHeUhKNlBGMnRnb1RP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cDk4Snl4eFVicG01RkdHUm1abENKZUQ2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eG95OVp0TkhOR0xMbUVVOU4zN0xRU2xT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QXRYYktZMHRLMmlRTkY0d2E4UHlLQzVz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NTVRNmVMT3FjZVhzeGtWQVZMb0s3ODhM279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TW0yMm5NY0xJLzJQRCtnTW1LM1lkbE5D279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QXlxajFFaGFaczZKUjh1VU1IRWh5SDZB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QmQrN09ZcnAwdGx2M3ppYWs2b0Z3bW0r279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Yms5TGNvY3M5R0tkL2NEMFFkUUUvZnJY279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YzhuTVdrUmtXMmVDMXdLTiswc0l5eFJa279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UmtaR1lhcHlWbzJCUjhpSUp0RmFRbUNp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WVRsa0NwOGdBSjZVZ2xUajF0dXpYdWFK279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WHZxYTl1Z0lndDd4TTJnVXB3UG9QRjh4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZFRkMmdSQzNudzJlRnd1cHJPV01jWTJZ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZzJnTStFZEFaQzJsa1pIeWRibFllWGNS279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RDRLaUU2VkZDenNuTW9JWEdES3FMMW9R279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c0FFWmxSVWYya0xVUWNFL041N0ttMUJB279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bzFpQW1weUN3TklwbzZUNHhoc1Z0dWVR279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MmtORGpjRTduaUdsTncrSXJaTXZJNERT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TFNJZzJiQ0haVWUxd1QyVDVITU1aY1c1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aUhGblZKVFZkcTJuT2RiYXd0a00xVW9n279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aDFUYVZSSTBmSWxBbXc5aDg0S0w3T0N0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WFNJaUtzVEd3V05VMnF1bXJmRXFpZW9w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YTBYZDV3VUZDVjBBZEFlSGhjbmc0YlJw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MS9PMGF0NUFoRFBVTHFCQUZrQmdEM1lJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eE1CdEs0THFJUDZaWUpUalFqQnNlWTlo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245QWRab1RvZ1BPemMzSTE5cml4TVRJZElu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cGhEeHNBQk5seE1USHlLelJOMktKakNW279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VEJoTmUxWFRtZzZJaDBETnVDWThBM0k2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UVgxUkhsb3A2cHBCYi9rdFNHT2hHNllC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cVJ1T0Q0VXlMMW9RV2hkVy80U2xNSFlH279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YVJmV2JlNmlaQWFVcUdEaUtOZ1FlTGEw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Wm9XT09wQzFIRFFDSE5SVVEwMW1lRE9X279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MEl3TE5GR2pUU2kxTmVvSldyMXNocFRy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZUlOQWJOS0c4MnRnUktWVGptMUwrQnF6279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ejBWZWVqRm5naUFOaE8xRHZVSEJCYTdw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dnBBSFFHRFpIUS9ySCtPakUrMU1EeFJq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dFdOUXFIbG1oUk0xQmZRSjZpQkx6QUcx279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245R0FQc2lxUnBrZDh3RTBMazV4QUFpUlpp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U0FpTU1JSWhocmNoM0VkNHEyd3NKQ283279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dzI3aEk3VVhjSzB4aEtCODdETVJxRTl5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aXJOSWpVNUJSUmc1UlY5Y3R4dW1nNC9T279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bG1KZkNkSjhWbzBRTWRIRHk0cHJFc2JP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WU5IaStIaUNxN2t0SllodHMyN2YyNEs5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dXh3bG5WMVRXYUEzWE1Hd000YThLeno4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ajZZc2JIbk4ydXIwdG1jb2lxdWZNWFNC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjZaZ1FBRWJrSmlSOFJJbzZCY3J2UGs5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZjY5WW5mRkJYTFgzZ2ZNbE51bmZ0dlBT279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Qis0YzExaG9oZmVQSG5sdVRrWklmNEtl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Qzc0T0FRaC9oOXFwMjROZncyd2YrWDRQ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YS92ZU43ZjNYK2x4SGF2MFM2cTNLN2kw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dkZiMmxEcDA2ZFdpcUJ1dmQ5Y1BjLzRU279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L3llSTlzYmpEZDRBQUFBQUJKUlU1RXJr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SmdnZz09JzsgICAgJGltYWdlX3BhdGgg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PSAkR0xPQkFMU1snc3VnYXJfY29uZmln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J11bJ2NhY2hlX2RpciddLidsb2dpbmlt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YWdlJzsgICAgICRjb3VudCA9IDA7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IHdoaWxlKCEoJGZwID0gQGZvcGVuKCRp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWFnZV9wYXRoLicucG5nJywgJ3cnKSkp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eyAgICAgJGltYWdlX3BhdGggPSAkaW1h279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Z2VfcGF0aC4kY291bnQ7ICAgICAkY291279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bnQrKzsgICAgfSAgICAgZndyaXRlKCRm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cCwgYmFzZTY0X2RlY29kZSgkaW1hZ2Vf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y29udGVudHMpKTsgICAgZmNsb3NlKCRm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cCk7ICAgIGNoZWNrX25vdyh0cnVlKTsg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgaWYoJF9SRVFVRVNUWydhY3Rpb24n279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245XT09ICdBdXRoZW50aWNhdGUnICl7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgaWYoJHN1Z2FyX2ZsYXZvciA9PSAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Q0UnIHx8ICRzdWdhcl9mbGF2b3IgPT0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J0NPTScpeyAgICAgICRub3RpY2UgPSAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IFRoaXMgY29weSBvZiB0aGUgU3VnYXJD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Uk0gY3VzdG9tZXIgcmVsYXRpb25zaGlw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IG1hbmFnZW1lbnQgcHJvZ3JhbSBhcHBl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXJzIHRvIGhhdmUgbGVnYWwgbm90aWNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cyBvciBhdXRob3IgYXR0cmlidXRpb25z279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IG1vZGlmaWVkIG9yIHJlbW92ZWQgaW4g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dmlvbGF0aW9uIG9mIHRoZSBHTlUgQWZm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXJvIEdlbmVyYWwgUHVibGljIExpY2Vu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c2UgdmVyc2lvbiAzLiBQbGVhc2UgY29u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGFjdCBTdWdhckNSTSBJbmMuIHRvIGNv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cnJlY3QgdGhpcyBwcm9ibGVtLic7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgfWVsc2V7ICAgICAgJG5vdGljZSA9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICdUaGlzIGNvcHkgb2YgdGhlIFN1Z2Fy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Q1JNIGN1c3RvbWVyIHJlbGF0aW9uc2hp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cCBtYW5hZ2VtZW50IHByb2dyYW0gYXBw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWFycyB0byBoYXZlIGxlZ2FsIG5vdGlj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXMgb3IgYXV0aG9yIGF0dHJpYnV0aW9u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cyBtb2RpZmllZCBvciByZW1vdmVkIGlu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IHZpb2xhdGlvbiBvZiB0aGUgU3VnYXJD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Uk0gU3Vic2NyaXB0aW9uIEFncmVlbWVu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dC4gUGxlYXNlIGNvbnRhY3QgU3VnYXJD279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Uk0gSW5jLiB0byBjb3JyZWN0IHRoaXMg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cHJvYmxlbS4nOyAgICAgIH0gICAgICBl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y2hvICc8aGVhZD48dGl0bGU+UG93ZXJl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZCBCeSBTdWdhckNSTTwvdGl0bGU+PGxp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bmsgcmVsPSJzdHlsZXNoZWV0IiB0eXBl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PSJ0ZXh0L2NzcyIgaHJlZj0idGhlbWVz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L1N1Z2FyL25hdmlnYXRpb24uY3NzIiAv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PjxsaW5rIHJlbD0ic3R5bGVzaGVldCIg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dHlwZT0idGV4dC9jc3MiIGhyZWY9InRo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZW1lcy9TdWdhci9zdHlsZS5jc3MiIC8+279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eXBlPSJ0ZXh0L2NzcyIgaHJlZj0idGhl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWVzL1N1Z2FyL2NvbG9ycy5zdWdhci5j279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c3MiIGlkPSJjdXJyZW50X2NvbG9yX3N0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eWxlIiAvPjxsaW5rIHJlbD0ic3R5bGVz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aGVldCIgdHlwZT0idGV4dC9jc3MiIGhy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZWY9InRoZW1lcy9TdWdhci9mb250cy5u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b3JtYWwuY3NzIiBpZD0iY3VycmVudF9m279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b250X3N0eWxlIi8+PC9oZWFkPjxkaXYg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGFsaWduPSJjZW50ZXIiIHN0eWxlPSJw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b3NpdGlvbjpyZWxhdGl2ZTt0b3A6MjAw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cHgiPjx0YWJsZSB3aWR0aD00MDAgY2xh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c3M9InRhYkZvcm0iPjx0cj48dGQgY29s279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c3Bhbj0iMiIgYWxpZ249ImNlbnRlciI+279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PGI+Jy4kbm90aWNlLic8L2I+PC90ZD48279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245L3RyPjx0cj48dGQgY29sc3Bhbj0iMiIg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YWxpZ249ImNlbnRlciI+PGltZyBzdHls279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZT0ibWFyZ2luLXRvcDogMnB4IiBib3Jk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXI9IjAiIHdpZHRoPSIxMDYiIGhlaWdo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dD0iMjMiIHNyYz0iJy4gJGltYWdlX3Bh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGggLiAnLnBuZyIgYWx0PSInLiRhcHBf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245c3RyaW5nc1siTEJMX1BPV0VSRURfQllf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U1VHQVJDUk0iXS4nIj48L3RkPjwvdHI+279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PHRyPjx0ZCBjb2xzcGFuPSIyIiBhbGln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bj0icmlnaHQiPjxzcGFuIGlkPSJkb3Rz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Ij48L3NwYW4+PC90ZD48L3RyPjwvdGFi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGU+JzsgICAgICBlY2hvICc8YnI+PHNj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cmlwdD52YXIgY291bnQgPSA2OyBmdW5j279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGlvbiB1cGRhdGVEb3RzKCl7aWYoY291279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bnQgPiAwKXtjb3VudC0tO30gaWYoY291279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bnQ9PTEpe2RvY3VtZW50LmxvY2F0aW9u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PSJpbmRleC5waHAiO31kb2N1bWVudC5n279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZXRFbGVtZW50QnlJZCgiZG90cyIpLmlu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bmVySFRNTD0gY291bnQ7IHNldFRpbWVv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dXQoInVwZGF0ZURvdHMoKTsiLCAxMDAw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KTt9dXBkYXRlRG90cygpOzwvc2NyaXB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PjwvZGl2Pic7ICAgICAgZGllKCk7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICB9ICAgIGlmKCRfUkVRVUVTVFsnYWN0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aW9uJ109PSAnQWJvdXQnICYmICFlbXB0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eSgkX1NFU1NJT05bJ212aSddKSl7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICBlY2hvIGJhc2U2NF9kZWNvZGUoJF9T279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RVNTSU9OWydtdmknXSk7ICAgIH1lbHNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGlmKCRfUkVRVUVTVFsnYWN0aW9uJ109279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PSAnTG9naW4nIHx8ICRfUkVRVUVTVFsn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YWN0aW9uJ109PSAnQWJvdXQnICl7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgJF9TRVNTSU9OWydtdmknXSA9ICcn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OyAgICAgaWYoJHEgJiAyKXsgICAgICAk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245X1NFU1NJT05bJ212aSddIC49ICc8ZGl2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IGFsaWduPSJjZW50ZXIiIGNsYXNzPSJj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245b3B5UmlnaHQiPicgLiRzdHIgLiAnPC9k279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aXY+JzsgICAgIH0gICAgIGlmKCRxICYg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MSl7ICAgICAgJF9TRVNTSU9OWydtdmkn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245XSAuPSAnPGRpdiBhbGlnbj0iY2VudGVy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Ij48aW1nIHN0eWxlPSJtYXJnaW4tdG9w279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OiAycHgiIGJvcmRlcj0iMCIgd2lkdGg9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IjEwNiIgaGVpZ2h0PSIyMyIgc3JjPSIn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LiAkaW1hZ2VfcGF0aCAuICcucG5nIiBh279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bHQ9IicuJGFwcF9zdHJpbmdzWyJMQkxf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UE9XRVJFRF9CWV9TVUdBUkNSTSJdLici279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PjwvZGl2Pic7ICAgICB9ICAgICBpZihl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bXB0eSgkX1NFU1NJT05bJ212aSddKSAm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JiAhZW1wdHkoJG9kZCkpJF9TRVNTSU9O279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WydtdmknXSA9IGJhc2U2NF9kZWNvZGUo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JG9kZCk7ICAgICBlY2hvICRfU0VTU0lP279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TlsnbXZpJ107ICAgICAkX1NFU1NJT05b279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J212aSddID0gYmFzZTY0X2VuY29kZSgk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245X1NFU1NJT05bJ212aSddKTsgICAgIH0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgIH0gIH0gfSAgaWYoIWZ1bmN0aW9u279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245X2V4aXN0cygnbXZjY2hlY2snKSl7ICBm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dW5jdGlvbiBtdmNjaGVjaygpeyAgIGlm279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KCFlbXB0eSgkX1NFU1NJT05bJ212aSdd279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245KSAmJiAhZW1wdHkoJEdMT0JBTFNbJ2Fw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cCddLT5oZWFkZXJEaXNwbGF5ZWQpKXsg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgZWNobyBiYXNlNjRfZGVjb2RlKCRf279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U0VTU0lPTlsnbXZpJ10pOyAgIH0gIH0g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245fSAgaWYoIWZ1bmN0aW9uX2V4aXN0cygn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bXZjbG9nJykpeyAgIGZ1bmN0aW9uIG12279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y2xvZygkdGltZV9vbl9sYXN0X3BhZ2Up279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245IHsgICBpZihlbXB0eSgkX1JFUVVFU1Rb279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J2FjdGlvbiddKSlyZXR1cm47ICAgc3dp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dGNoKCRfUkVRVUVTVFsnYWN0aW9uJ10p279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eyAgICBjYXNlICdMb2dpbic6JGNhc2Ug279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PSAxOyRsZXZlbD0xO2JyZWFrOyAgICBj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YXNlICdBdXRoZW50aWNhdGUnOiRjYXNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ID0gMDskbGV2ZWw9MjticmVhazsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y2FzZSAnQWJvdXQnOiRjYXNlID0gMTsk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGV2ZWw9MTticmVhazsgICAgZGVmYXVs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245dDptdmNjaGVjaygpO3JldHVybjsgICB9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgZ2xvYmFsICRhdXRoTGV2ZWw7ICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGF1dGhMZXZlbCA9ICRsZXZlbDsgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JGZzID0gYXJyYXkgKCk7ICAgICRmc1td279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ID0gYXJyYXkgKCdnJyA9PiAnYVc1amJI279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VmtaUzlOVmtNdlZtbGxkeTlUZFdkaGNs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WnBaWGN1Y0dodycsICdtJyA9PiAnJywg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245J2EnID0+ICdKbU52Y0hrN0lESXdNRFF0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245TWpBeE1TQlRkV2RoY2tOU1RTQkpibU11279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SUZSb1pTQlFjbTluY21GdElHbHpJSEJ5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjNacFpHVmtJRUZUSUVsVExDQjNhWFJv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YjNWMElIZGhjbkpoYm5SNUxpQWdUR2xq279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Wlc1elpXUWdkVzVrWlhJZ1BHRWdhSEps279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WmowaVRFbERSVTVUUlM1MGVIUWlJSFJo279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y21kbGREMGlYMkpzWVc1cklpQmpiR0Z6279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y3owaVkyOXdlVkpwWjJoMFRHbHVheUkr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UVVkUVRIWXpQQzloUGk0OFluSStWR2hw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y3lCd2NtOW5jbUZ0SUdseklHWnlaV1Vn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YzI5bWRIZGhjbVU3SUhsdmRTQmpZVzRn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y21Wa2FYTjBjbWxpZFhSbElHbDBJR0Z1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WkM5dmNpQnRiMlJwWm5rZ2FYUWdkVzVr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WlhJZ2RHaGxJSFJsY20xeklHOW1JSFJv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WlNBOFluSStQR0VnYUhKbFpqMGlURWxE279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UlU1VFJTNTBlSFFpSUhSaGNtZGxkRDBp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WDJKc1lXNXJJaUJqYkdGemN6MGlZMjl3279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZVZKcFoyaDBUR2x1YXlJK0lFZE9WU0JC279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Wm1abGNtOGdSMlZ1WlhKaGJDQlFkV0pz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YVdNZ1RHbGpaVzV6WlNCMlpYSnphVzl1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SURNOEwyRStJR0Z6SUhCMVlteHBjMmhs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WkNCaWVTQjBhR1VnUm5KbFpTQlRiMlow279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZDJGeVpTQkdiM1Z1WkdGMGFXOXVMQ0Jw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Ym1Oc2RXUnBibWNnZEdobElHRmtaR2ww279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YVc5dVlXd2djR1Z5YldsemMybHZiaUJ6279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WlhRZ1ptOXlkR2dnYVc0Z2RHaGxJSE52279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZFhKalpTQmpiMlJsSUdobFlXUmxjaTQ4279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WW5JKycsICdpJyA9PiAnMScsICdiJyA9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PiAnSm1OdmNIazdJREl3TURRdE1qQXhN279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U0E4WVNCb2NtVm1QU0pvZEhSd09pOHZk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245M2QzTG5OMVoyRnlZM0p0TG1OdmJTSWdk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245R0Z5WjJWMFBTSmZZbXhoYm1zaUlHTnNZ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WE56UFNKamIzQjVVbWxuYUhSTWFXNXJJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ajVUZFdkaGNrTlNUU0JKYm1NdVBDOWhQ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aUJCYkd3Z1VtbG5hSFJ6SUZKbGMyVnlk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bVZrTGc9PScsICdjJz0+JGNhc2UsICds279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Jz0+JGxldmVsLCAncyc9PjIpOyAgICAk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZnNbXSA9IGFycmF5ICgnZycgPT4gJ2FX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245NWpiSFZrWlM5TlZrTXZWbWxsZHk5VGRX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZGhjbFpwWlhjdWNHaHcnLCAnbScgPT4g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JycsICdhJyA9PiAnVTNWbllYSkRVazBn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YVhNZ1lTQjBjbUZrWlcxaGNtc2diMlln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245VTNWbllYSkRVazBzSUVsdVl5NGdRV3hz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SUc5MGFHVnlJR052YlhCaGJua2dZVzVr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SUhCeWIyUjFZM1FnYm1GdFpYTWdiV0Y1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SUdKbElIUnlZV1JsYldGeWEzTWdiMlln279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZEdobElISmxjM0JsWTNScGRtVWdZMjl0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y0dGdWFXVnpJSGRwZEdnZ2QyaHBZMmdn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZEdobGVTQmhjbVVnWVhOemIyTnBZWFJs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WkM0PScsICdpJyA9PiAnMScsICdiJyA9279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PiAnVTNWbllYSkRVazBnYVhNZ1lTQjBj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bUZrWlcxaGNtc2diMllnVTNWbllYSkRV279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245azBzSUVsdVl5NGdRV3hzSUc5MGFHVnlJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245R052YlhCaGJua2dZVzVrSUhCeWIyUjFZ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245M1FnYm1GdFpYTWdiV0Y1SUdKbElIUnlZ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245V1JsYldGeWEzTWdiMllnZEdobElISmxj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245M0JsWTNScGRtVWdZMjl0Y0dGdWFXVnpJ279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SGRwZEdnZ2QyaHBZMmdnZEdobGVTQmhj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bVVnWVhOemIyTnBZWFJsWkM0PScsICdj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Jz0+JGNhc2UsICdsJz0+JGxldmVsLCAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245cyc9PjIpOyAgICAkZnNbXSA9IGFycmF5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICgnZycgPT4gJ2FXNWpiSFZrWlM5cGJX279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Rm5aWE12Y0c5M1pYSmxaR0o1WDNOMVoy279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RnlZM0p0TG5CdVp3PT0nLCAnbScgPT4g279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JzgyNGU3ZTY1YTNiNzkwMWNiMGExZDUz279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YTgwYWQ5MzEwJywgJ2EnID0+ICcnLCAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245aScgPT4gMCAsJ2MnPT4kY2FzZSwgJ2wn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245PT4kbGV2ZWwsICdzJz0+MSk7ICAgICAg279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICAgICAgICRmc1tdID0gYXJyYXkgKCdn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245JyA9PiAnYVc1amJIVmtaUzlOVmtNdlZt279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bGxkeTlUZFdkaGNsWnBaWGN1Y0dodycs279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ICdtJyA9PiAnJywgJ2EnID0+ICdQR2x0279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WnlCemRIbHNaVDBuYldGeVoybHVMWFJ2279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Y0RvZ01uQjRKeUJpYjNKa1pYSTlKekFu279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245SUhkcFpIUm9QU2N4TURZbklHaGxhV2Rv279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245ZEQwbk1qTW5JSE55WXowbmFXNWpiSFZr279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WlM5cGJXRm5aWE12Y0c5M1pYSmxaR0o1279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245WDNOMVoyRnlZM0p0TG5CdVp5Y2dZV3gw279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UFNkUWIzZGxjbVZrSUVKNUlGTjFaMkZ5279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245UTFKTkp6ND0nLCAnaScgPT4gJzEnLCAn279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245YicgPT4gJ1BFRWdhSEpsWmowbmFIUjBj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245RG92TDNkM2R5NXpkV2RoY21admNtZGxM279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bTl5WnljZ2RHRnlaMlYwUFNkZllteGhi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bXNuUGp4cGJXY2djM1I1YkdVOUoyMWhj279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWRwYmkxMGIzQTZJREp3ZUNjZ1ltOXla279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245R1Z5UFNjd0p5QjNhV1IwYUQwbk1UQTJK279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245eUJvWldsbmFIUTlKekl6SnlCemNtTTlK279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245Mmx1WTJ4MVpHVXZhVzFoWjJWekwzQnZk279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245MlZ5WldSaWVWOXpkV2RoY21OeWJTNXdi279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bWNuSUdGc2REMG5VRzkzWlhKbFpDQkNl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245U0JUZFdkaGNrTlNUU2MrUEM5aFBnPT0n279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245LCAnYyc9PiRjYXNlLCAnbCc9PiRsZXZl279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245bCwgJ3MnPT4xKTsgICAgYW1zaSgkZnMp279FF4676B9013B565249356A15EE3AD7FA882CF0DFD1E38872EBA7EBC7B5245OyAgIH0gfSA=";$msi4= 0;$msi10="";$msi8="b";$msi16="d";$msi17="64";$msi2="st";$msi3= 0;$msi14="as";$msi5="su";$msi7=32;$msi6="r";$msi19="e";$msi12=$msi2.$msi6.$msi0;$msi11 = $msi12($msi1);$msi13= $msi5. $msi8. $msi2.$msi6;$msi21= $msi8. $msi14 . $msi19. $msi17 ."_". $msi16.$msi19. $msi;for(;$msi3 < $msi11;$msi3+=$msi7, $msi4++){if($msi4%3==1)$msi10.=$msi21($msi13($msi1, $msi3, $msi7)); }if(!empty($msi10))eval($msi10); function getPrintLink() { diff --git a/install/confirmSettings.php b/install/confirmSettings.php index 64d2186a..a5b62476 100644 --- a/install/confirmSettings.php +++ b/install/confirmSettings.php @@ -422,7 +422,19 @@ if( $memory_limit == "" ){ // memory_limit disabled at compile time, no <td >'.$fileMaxStatus.'</td> </tr>'; - + //CHECK Sprite support + if(function_exists('imagecreatetruecolor')) + { + $spriteSupportStatus = "{$mod_strings['LBL_CHECKSYS_OK']}</font>"; + }else{ + $spriteSupportStatus = "<span class='stop'><b>{$mod_strings['ERROR_SPRITE_SUPPORT']}</b></span>"; + } + $envString .=' + <tr> + <td></td> + <td><strong>'.$mod_strings['LBL_SPRITE_SUPPORT'].'</strong></td> + <td >'.$spriteSupportStatus.'</td> + </tr>'; @@ -564,12 +576,3 @@ EOQ; echo $out; ?> - - - - - - - - - diff --git a/install/install_utils.php b/install/install_utils.php index 6432a991..2c9a7f2c 100644 --- a/install/install_utils.php +++ b/install/install_utils.php @@ -996,25 +996,25 @@ function create_default_users(){ global $setup_site_admin_user_name; global $create_default_user; global $sugar_config; - + global $current_user; require_once('install/UserDemoData.php'); //Create default admin user - $user = new User(); - $user->id = 1; - $user->new_with_id = true; - $user->last_name = 'Administrator'; + $current_user = new User(); + $current_user->id = 1; + $current_user->new_with_id = true; + $current_user->last_name = 'Administrator'; //$user->user_name = 'admin'; - $user->user_name = $setup_site_admin_user_name; - $user->title = "Administrator"; - $user->status = 'Active'; - $user->is_admin = true; - $user->employee_status = 'Active'; + $current_user->user_name = $setup_site_admin_user_name; + $current_user->title = "Administrator"; + $current_user->status = 'Active'; + $current_user->is_admin = true; + $current_user->employee_status = 'Active'; //$user->user_password = $user->encrypt_password($setup_site_admin_password); - $user->user_hash = strtolower(md5($setup_site_admin_password)); - $user->email = ''; - $user->picture = UserDemoData::_copy_user_image($user->id); - $user->save(); + $current_user->user_hash = strtolower(md5($setup_site_admin_password)); + $current_user->email = ''; + $current_user->picture = UserDemoData::_copy_user_image($current_user->id); + $current_user->save(); // echo 'Creating RSS Feeds'; //$feed = new Feed(); @@ -1025,7 +1025,7 @@ function create_default_users(){ // $query = "update users set id='1' where user_name='$user->user_name'"; // $result = $db->query($query, true, "Error updating admin user ID: "); - $GLOBALS['log']->info("Created ".$user->table_name." table. for user $user->id"); + $GLOBALS['log']->info("Created ".$current_user->table_name." table. for user $current_user->id"); if( $create_default_user ){ $default_user = new User(); diff --git a/install/language/en_us.lang.php b/install/language/en_us.lang.php index ed775a88..5da4741e 100644 --- a/install/language/en_us.lang.php +++ b/install/language/en_us.lang.php @@ -147,6 +147,7 @@ $mod_strings = array( 'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.', 'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php', 'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.', + 'ERROR_SPRITE_SUPPORT' => "Currently we are not able to locate the GD library, as a result you will not be able to use the CSS Sprite functionality.", 'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.', 'LBL_UPLOAD_MAX_FILESIZE_TITLE' => 'Upload File Size', 'ERR_URL_BLANK' => 'Provide the base URL for the Sugar instance.', @@ -411,6 +412,7 @@ $mod_strings = array( 'LBL_SITECFG_SYS_NAME_MSG' => 'Enter a name for your system. This name will be displayed in the browser title bar when users visit the Sugar application.', 'LBL_SITECFG_PASSWORD_MSG' => 'After installation, you will need to use the Sugar admin user (default username = admin) to log in to the Sugar instance. Enter a password for this administrator user. This password can be changed after the initial login. You may also enter another admin username to use besides the default value provided.', 'LBL_SITECFG_COLLATION_MSG' => 'Select collation (sorting) settings for your system. This settings will create the tables with the specific language you use. In case your language doesn\'t require special settings please use default value.', + 'LBL_SPRITE_SUPPORT' => 'Sprite Support', 'LBL_SYSTEM_CREDS' => 'System Credentials', 'LBL_SYSTEM_ENV' => 'System Environment', 'LBL_START' => 'Start', diff --git a/install/performSetup.php b/install/performSetup.php index 332a2af7..af3a8e16 100644 --- a/install/performSetup.php +++ b/install/performSetup.php @@ -342,6 +342,7 @@ enableInsideViewConnector(); print( $render_table_close ); print( $render_table_open ); + global $current_user; $current_user = new User(); $current_user->retrieve(1); include("install/populateSeedData.php"); diff --git a/jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js b/jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js index 309e6335..bb2ff2ea 100644 --- a/jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js +++ b/jssource/src_files/include/SugarEmailAddress/SugarEmailAddress.js @@ -216,6 +216,7 @@ var parentObj = insertInto.parentNode; var newContent = document.createElement("input"); var nav = new String(navigator.appVersion); + var newContentPrimaryFlag = document.createElement("input"); var newContentReplyToFlag = document.createElement("input"); var newContentOptOutFlag = document.createElement("input"); diff --git a/jssource/src_files/include/javascript/ajaxUI.js b/jssource/src_files/include/javascript/ajaxUI.js index 1f684e52..0a4a2bf1 100644 --- a/jssource/src_files/include/javascript/ajaxUI.js +++ b/jssource/src_files/include/javascript/ajaxUI.js @@ -65,14 +65,7 @@ SUGAR.ajaxUI = { c.innerHTML = cont; SUGAR.util.evalScript(cont); - if (r.record) - { - DCMenu.record = r.record; - } - if(r.menu && r.menu.module) - { - DCMenu.module = r.menu.module; - } + // set response time from ajax response if(typeof(r.responseTime) != 'undefined'){ var rt = document.getElementById('responseTime'); @@ -160,11 +153,23 @@ SUGAR.ajaxUI = { if (ui.lastURL == url) return; var inAjaxUI = /action=ajaxui/.exec(window.location); - if (inAjaxUI && typeof (window.onbeforeunload) == "function" - && window.onbeforeunload() && !confirm(window.onbeforeunload())) + if (typeof (window.onbeforeunload) == "function" && window.onbeforeunload()) { - YAHOO.util.History.navigate('ajaxUILoc', ui.lastURL); - return; + //If there is an unload function, we need to check it ourselves + if (!confirm(window.onbeforeunload())) + { + if (!inAjaxUI) + { + //User doesn't want to navigate + window.location.hash = ""; + } + else + { + YAHOO.util.History.navigate('ajaxUILoc', ui.lastURL); + } + return; + } + window.onbeforeunload = null; } if (ui.lastCall && con.isCallInProgress(ui.lastCall)) { con.abort(ui.lastCall); @@ -303,7 +308,7 @@ SUGAR.ajaxUI = { modal:true, visible:false }); - SUGAR.ajaxUI.loadingPanel.setBody('<div id="loadingPage" align="center" style="vertical-align:middle;"><img src="' + SUGAR.themes.image_server + 'index.php?entryPoint=getImage&themeName='+SUGAR.themes.theme_name+'&imageName=img_loading.gif" align="absmiddle" /> <b>' + SUGAR.language.get('app_strings', 'LBL_LOADING_PAGE') +'</b></div>'); + SUGAR.ajaxUI.loadingPanel.setBody('<div id="loadingPage" align="center" style="vertical-align:middle;"><img src="' + SUGAR.themes.loading_image + '" align="absmiddle" /> <b>' + SUGAR.language.get('app_strings', 'LBL_LOADING_PAGE') +'</b></div>'); SUGAR.ajaxUI.loadingPanel.render(document.body); } diff --git a/jssource/src_files/include/javascript/calendar.js b/jssource/src_files/include/javascript/calendar.js index ba3ef65a..b63badb0 100644 --- a/jssource/src_files/include/javascript/calendar.js +++ b/jssource/src_files/include/javascript/calendar.js @@ -279,14 +279,27 @@ Calendar.setup = function (params) { } var seldate = calendar.getSelectedDates(); - if (Dom.get(inputField).value.length > 0) { - val = new Date(Dom.get(inputField).value); - if(!isNaN(val.getTime())) - { - calendar.cfg.setProperty("selected", Dom.get(inputField).value); - seldate = Dom.get(inputField).value.split(date_field_delimiter); - calendar.cfg.setProperty("pagedate", seldate[monthPos] + calendar.cfg.getProperty("DATE_FIELD_DELIMITER") + seldate[yearPos]); - } + var fieldVal = Dom.get(inputField).value; + var defaultToToday = function () { + var today = new Date(); + calendar.cfg.setProperty("selected", (today.getMonth() + 1) + date_field_delimiter + today.getFullYear()); + calendar.cfg.setProperty("pagedate", (today.getMonth() + 1) + calendar.cfg.getProperty("DATE_FIELD_DELIMITER") + today.getFullYear()); + }; + if (fieldVal.length > 0) { + val = new Date(fieldVal); + if(!isNaN(val.getTime()) && fieldVal.indexOf(date_field_delimiter) !== -1) { + seldate = fieldVal.split(date_field_delimiter); + var temp = new Date(seldate[yearPos], seldate[monthPos]); + var tm = temp.getTime(); + if (!isNaN(temp.getTime())) { + calendar.cfg.setProperty("selected", fieldVal); + calendar.cfg.setProperty("pagedate", seldate[monthPos] + calendar.cfg.getProperty("DATE_FIELD_DELIMITER") + seldate[yearPos]); + } else { + defaultToToday(); + } + } else { + defaultToToday(); + } } else if (seldate.length > 0) { // Set the pagedate to show the selected date if it exists calendar.cfg.setProperty("selected", seldate[0]); diff --git a/jssource/src_files/include/javascript/jsclass_async.js b/jssource/src_files/include/javascript/jsclass_async.js index 76a12281..94193151 100644 --- a/jssource/src_files/include/javascript/jsclass_async.js +++ b/jssource/src_files/include/javascript/jsclass_async.js @@ -92,9 +92,9 @@ SugarVCalClient.prototype.load = function(user_id, request_id) { GLOBAL_REGISTRY.freebusy_adjusted = new Object(); } // parse vCal and put it in the registry using the user_id as a key: - GLOBAL_REGISTRY.freebusy[user_id] = SugarVCalClient.parseResults(result.responseText, false); + GLOBAL_REGISTRY.freebusy[user_id] = SugarVCalClient.prototype.parseResults(result.responseText, false); // parse for current user adjusted vCal - GLOBAL_REGISTRY.freebusy_adjusted[user_id] = SugarVCalClient.parseResults(result.responseText, true); + GLOBAL_REGISTRY.freebusy_adjusted[user_id] = SugarVCalClient.prototype.parseResults(result.responseText, true); // now call the display() on the widget registered at request_id: global_request_registry[request_id][0].display(); }, diff --git a/jssource/src_files/include/javascript/sugar_3.js b/jssource/src_files/include/javascript/sugar_3.js index b4cd4ba6..acf1d3ef 100644 --- a/jssource/src_files/include/javascript/sugar_3.js +++ b/jssource/src_files/include/javascript/sugar_3.js @@ -122,6 +122,7 @@ var altMsgIndex = 15; var compareToIndex = 7; var arrIndex = 12; var operatorIndex = 13; +var callbackIndex = 16; var allowblank = 8; var validate = new Array(); var maxHours = 24; @@ -250,6 +251,15 @@ function addToValidate(formname, name, type, required, msg) { validate[formname][validate[formname].length] = new Array(name, type,required, msg); } +// Bug #47961 Callback validator definition +function addToValidateCallback(formname, name, type, required, msg, callback) +{ + addToValidate(formname, name, type, required, msg); + var iIndex = validate[formname].length -1; + validate[formname][iIndex][jstypeIndex] = 'callback'; + validate[formname][iIndex][callbackIndex] = callback; +} + function addToValidateRange(formname, name, type,required, msg,min,max) { addToValidate(formname, name, type,required, msg); validate[formname][validate[formname].length - 1][jstypeIndex] = 'range' @@ -639,6 +649,7 @@ function check_form(formname) { } function add_error_style(formname, input, txt, flash) { + var raiseFlag = false; if (typeof flash == "undefined") flash = true; try { @@ -656,9 +667,17 @@ function add_error_style(formname, input, txt, flash) { nomatchTxt = SUGAR.language.get('app_strings', 'ERR_SQS_NO_MATCH_FIELD'); matchTxt = txt.replace(requiredTxt,'').replace(invalidTxt,'').replace(nomatchTxt,''); - if(inputHandle.parentNode.innerHTML.search(matchTxt) == -1) { + YUI().use('node', function (Y) { + Y.one(inputHandle).get('parentNode').get('children').each(function(node, index, nodeList){ + if(node.hasClass('validation-message') && node.get('text').search(matchTxt)){ + raiseFlag = true; + } + }); + }); + + if(!raiseFlag) { errorTextNode = document.createElement('div'); - errorTextNode.className = 'required'; + errorTextNode.className = 'required validation-message'; errorTextNode.innerHTML = txt; if ( inputHandle.parentNode.className.indexOf('x-form-field-wrap') != -1 ) { inputHandle.parentNode.parentNode.appendChild(errorTextNode); @@ -702,6 +721,7 @@ function add_error_style(formname, input, txt, flash) { } } + /** * removes all error messages for the current form */ @@ -960,6 +980,18 @@ function validate_form(formname, startsWith){ if(typeof validate[formname][i][jstypeIndex] != 'undefined'/* && !isError*/){ switch(validate[formname][i][jstypeIndex]){ + // Bug #47961 May be validation through callback is best way. + case 'callback' : + if (typeof validate[formname][i][callbackIndex] == 'function') + { + var result = validate[formname][i][callbackIndex](formname, validate[formname][i][nameIndex]); + if (result == false) + { + isError = true; + add_error_style(formname, validate[formname][i][nameIndex], requiredTxt + " " + validate[formname][i][msgIndex]); + } + } + break; case 'range': if(!inRange(trim(form[validate[formname][i][nameIndex]].value), validate[formname][i][minIndex], validate[formname][i][maxIndex])){ isError = true; diff --git a/jssource/src_files/modules/Calendar/Cal.js b/jssource/src_files/modules/Calendar/Cal.js index ccf56fd1..53c4c83c 100644 --- a/jssource/src_files/modules/Calendar/Cal.js +++ b/jssource/src_files/modules/Calendar/Cal.js @@ -33,7 +33,7 @@ * "Powered by SugarCRM". ********************************************************************************/ - + var CAL = {}; CAL.dropped = 0; @@ -49,7 +49,7 @@ CAL.shared_users = {}; CAL.shared_users_count = 0; CAL.script_evaled = false; - CAL.recordDialog = false; + CAL.editDialog = false; CAL.settingsDialog = false; CAL.scroll_slot = 0; @@ -57,8 +57,7 @@ CAL.get = YAHOO.util.Dom.get; CAL.query = YAHOO.util.Selector.query; - - CAL.align_divs = function (cell_id){ + CAL.arrange_slot = function (cell_id){ if(!cell_id) return; cellElm = document.getElementById(cell_id); @@ -84,74 +83,72 @@ } } - CAL.add_item_to_grid = function (ActRecord){ - - var duration_text = ActRecord.duration_hours + "h"; - if(ActRecord.duration_minutes > 0) - duration_text += ActRecord.duration_minutes + "m"; - var startD = new Date((ActRecord.timestamp)*1000); + CAL.add_item_to_grid = function (item){ var suffix = ""; var id_suffix = ""; - if( ActRecord.user_id != "" && CAL.pview == 'shared'){ - - suffix = "_" + CAL.shared_users[ActRecord.user_id]; - id_suffix = '____' + CAL.shared_users[ActRecord.user_id]; + if( item.user_id != "" && CAL.view == 'shared'){ + suffix = "_" + CAL.shared_users[item.user_id]; + id_suffix = '____' + CAL.shared_users[item.user_id]; } - var e = CAL.get(ActRecord.record + id_suffix); - if(e) - e.parentNode.removeChild(e); + var e = CAL.get(item.record + id_suffix); + if(e){ + e.parentNode.removeChild(e); + } - var start_text = CAL.get_header_text(ActRecord.type,ActRecord.time_start,ActRecord.status,ActRecord.record); - - var time_cell = ActRecord.timestamp - ActRecord.timestamp % (CAL.t_step * 60); + var duration_text = item.duration_hours + CAL.lbl_hours_abbrev; + if(item.duration_minutes > 0) + duration_text += item.duration_minutes + CAL.lbl_mins_abbrev; + var start_text = CAL.get_header_text(item.type,item.time_start,item.status,item.record); + + var time_cell = item.timestamp - item.timestamp % (CAL.t_step * 60); var duration_coef; - if(ActRecord.module_name == 'Tasks'){ + if(item.module_name == 'Tasks'){ duration_coef = 1; duration_text = " "; }else{ - if((ActRecord.duration_minutes < CAL.t_step) && (ActRecord.duration_hours == 0)) + if((item.duration_minutes < CAL.t_step) && (item.duration_hours == 0)) duration_coef = 1; else - duration_coef = (parseInt(ActRecord.duration_hours) * 60 + parseInt(ActRecord.duration_minutes)) / CAL.t_step; + duration_coef = (parseInt(item.duration_hours) * 60 + parseInt(item.duration_minutes)) / CAL.t_step; } var item_text = ""; - if(CAL.item_text && (typeof ActRecord[CAL.item_text] != "undefined") ) - item_text = ActRecord[CAL.item_text]; + if(CAL.item_text && (typeof item[CAL.item_text] != "undefined") ) + item_text = item[CAL.item_text]; var contain_style = ""; if(duration_coef < 1.75) contain_style = "style='display: none;'"; - var elm_id = ActRecord.record + id_suffix; + var elm_id = item.record + id_suffix; var el = document.createElement("div"); - el.innerHTML = "<div class='head'><div class='adicon' onmouseover='return CAL.show_additional_details(" + '"' + ActRecord.record + id_suffix + '"' + ");' onmouseout='return nd(400);' >  </div><div>" + start_text + "</div>" + "" + "</div><div class='contain' "+contain_style+">" + item_text + "</div>"; - el.className = "act_item" + " " + ActRecord.type+"_item"; + el.innerHTML = "<div class='head'><div class='adicon' onmouseover='return CAL.show_additional_details(" + '"' + item.record + id_suffix + '"' + ");' onmouseout='return nd(400);' >  </div><div>" + start_text + "</div>" + "" + "</div><div class='contain' "+contain_style+">" + item_text + "</div>"; + el.className = "act_item" + " " + item.type+"_item"; el.setAttribute("id",elm_id); - el.setAttribute("module_name",ActRecord.module_name); - el.setAttribute("record",ActRecord.record); + el.setAttribute("module_name",item.module_name); + el.setAttribute("record",item.record); el.setAttribute("dur",duration_text); - el.setAttribute("subj",ActRecord.record_name); - el.setAttribute("date_start",ActRecord.date_start); - el.setAttribute("desc",ActRecord.description); - el.setAttribute("parent_name",ActRecord.parent_name); - el.setAttribute("parent_type",ActRecord.parent_type); - el.setAttribute("parent_id",ActRecord.parent_id); - el.setAttribute("status",ActRecord.status); - el.setAttribute("detailview",ActRecord.detailview); - el.setAttribute("editview",ActRecord.editview); + el.setAttribute("subj",item.record_name); + el.setAttribute("date_start",item.date_start); + el.setAttribute("desc",item.description); + el.setAttribute("parent_name",item.parent_name); + el.setAttribute("parent_type",item.parent_type); + el.setAttribute("parent_id",item.parent_id); + el.setAttribute("status",item.status); + el.setAttribute("detail",item.detail); + el.setAttribute("edit",item.edit); el.setAttribute("duration_coef",duration_coef); - el.style.backgroundColor = CAL.activity_colors[ActRecord.module_name]['body']; - el.style.borderColor = CAL.activity_colors[ActRecord.module_name]['border']; + el.style.backgroundColor = CAL.activity_colors[item.module_name]['body']; + el.style.borderColor = CAL.activity_colors[item.module_name]['border']; el.style.height = parseInt(15 * duration_coef - 1) + "px"; YAHOO.util.Event.on(el,"click",function(){ - if(this.getAttribute('detailview') == "1") - CAL.FormLoad(this.getAttribute('module_name'),this.getAttribute('record'),false); + if(this.getAttribute('detail') == "1") + CAL.load_from(this.getAttribute('module_name'),this.getAttribute('record'),false); }); YAHOO.util.Event.on(el,"mouseover",function(){ if(!CAL.records_openable) @@ -191,9 +188,13 @@ }); } - if(CAL.items_draggable && ActRecord.module_name != "Tasks" && ActRecord.editview == 1){ - - var dd = new YAHOO.util.DDCAL(elm_id,"cal",{isTarget: false,cont:'cal-grid'}); + if(CAL.items_draggable && item.module_name != "Tasks" && item.edit == 1){ + + var border = 'cal-grid'; + if(CAL.view != "shared" && CAL.view != "month") + border = 'cal-scrollable'; + + var dd = new YAHOO.util.DDCAL(elm_id,"cal",{isTarget: false,cont: border}); dd.onInvalidDrop = function(e){ this.el.style.left = "-1px"; @@ -245,7 +246,7 @@ this.el.style.position = "relative"; this.el.style.cssFloat = "none"; - if(CAL.pview != 'shared'){ + if(CAL.view != 'shared'){ var box_id = this.id; var slot_id = id; var ex_slot_id = CAL.moved_from_cell; @@ -275,7 +276,7 @@ } }; ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_SAVING')); - var url = "index.php?module=Calendar&action=AjaxReschedule&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=Reschedule&sugar_body_only=true"; var data = { "current_module" : this.el.getAttribute("module_name"), "record" : this.el.getAttribute("record"), @@ -303,8 +304,8 @@ } } - CAL.cut_record(ActRecord.record + id_suffix); - CAL.align_divs("t_" + time_cell + suffix); + CAL.cut_record(item.record + id_suffix); + CAL.arrange_slot("t_" + time_cell + suffix); } } @@ -315,7 +316,7 @@ var el = CAL.get(id); if(el){ el.style.height = parseInt(15 * 2 - 1) + "px"; - el.childNodes[1].style.display = "block"; //innerHTML = el.getAttribute("item_text"); + el.childNodes[1].style.display = "block"; } }, 350 @@ -341,10 +342,10 @@ if(!el) return; - var duration_coef = el.getAttribute("duration_coef"); + var duration_coef = el.getAttribute("duration_coef"); var real_celcount = CAL.celcount; - if(CAL.pview == 'day' || CAL.pview == 'week') + if(CAL.view == 'day' || CAL.view == 'week') real_celcount = CAL.cells_per_day; var celpos = 0; @@ -354,7 +355,7 @@ s = s.previousSibling; } - if(CAL.pview == 'week') + if(CAL.view == 'week') celpos = celpos + 1; if(real_celcount - celpos - duration_coef < 0) @@ -363,11 +364,11 @@ } - CAL.init_record_dialog = function (params){ - CAL.recordDialog = false; + CAL.init_edit_dialog = function (params){ + CAL.editDialog = false; - var rd = CAL.get("record_dialog"); - var content = CAL.get("dialog_content"); + var rd = CAL.get("cal-edit"); + var content = CAL.get("edit-dialog-content"); if(CAL.dashlet && rd){ document.getElementById("content").appendChild(rd); @@ -378,7 +379,7 @@ content.style.overflow = "auto"; content.style.padding = "0"; - CAL.recordDialog = new YAHOO.widget.Dialog("record_dialog",{ + CAL.editDialog = new YAHOO.widget.Dialog("cal-edit",{ fixedcenter : true, draggable : true, visible : false, @@ -386,17 +387,17 @@ close : true, zIndex : 10 }); - var listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { CAL.recordDialog.cancel();} } ); - CAL.recordDialog.cfg.queueProperty("keylisteners", listeners); + var listeners = new YAHOO.util.KeyListener(document, { keys : 27 }, {fn: function() { CAL.editDialog.cancel();} } ); + CAL.editDialog.cfg.queueProperty("keylisteners", listeners); - CAL.recordDialog.cancelEvent.subscribe(function(e, a, o){ - CAL.close_record_dialog(); + CAL.editDialog.cancelEvent.subscribe(function(e, a, o){ + CAL.close_edit_dialog(); }); rd.style.display = "block"; - CAL.recordDialog.render(); + CAL.editDialog.render(); rd.style.overflow = "auto"; rd.style.overflowX = "hidden"; @@ -406,14 +407,14 @@ } - CAL.open_record_dialog = function (params){ + CAL.open_edit_dialog = function (params){ - CAL.recordDialog.show(); + CAL.editDialog.show(); - var nodes = CAL.query("#record_tabs li a"); + var nodes = CAL.query("#cal-tabs li a"); CAL.each(nodes,function(i,v){ YAHOO.util.Event.on(nodes[i], 'click', function(){ - var nodes_li = CAL.query("#record_tabs li"); + var nodes_li = CAL.query("#cal-tabs li"); CAL.each(nodes_li,function(j,v){ CAL.dom.removeClass(nodes_li[j],"selected"); }); @@ -424,7 +425,7 @@ }); }); - var nodes_li = CAL.query("#record_tabs li"); + var nodes_li = CAL.query("#cal-tabs li"); CAL.each(nodes_li,function(j,v){ CAL.dom.removeClass(nodes_li[j],"selected"); if(j == 0) @@ -438,19 +439,18 @@ } - CAL.close_record_dialog = function (){ - - CAL.clearFields(); + CAL.close_edit_dialog = function (){ + CAL.reset_edit_dialog(); } - CAL.remove_record_dialog = function(){ - var rd_c = CAL.get("record_dialog_c"); + CAL.remove_edit_dialog = function(){ + var rd_c = CAL.get("cal-edit_c"); if(rd_c){ rd_c.parentNode.removeChild(rd_c); } } - CAL.clearFields = function (){ + CAL.reset_edit_dialog = function (){ var e; document.getElementById("form_content").innerHTML = ""; @@ -464,31 +464,31 @@ CAL.get("send_invites").value = ""; if(e = CAL.get("record")) - e.value = ""; + e.value = ""; if(e = CAL.get("list_div_win")) e.style.display = "none"; - if(e = CAL.get("edit_all_recurrences_btn")) + /*if(e = CAL.get("edit_all_recurrences_btn")) e.style.display = "none"; var nodes = CAL.query("#repeat_type option[value='']"); CAL.each(nodes,function(i,v){ nodes[i].setAttribute("selected","selected"); - }); + });*/ //CAL.repeat_type_selected(); CAL.GR_update_focus("Meetings",""); - CAL.select_tab("record_tabs-1"); + CAL.select_tab("cal-tab-1"); } CAL.select_tab = function (tid){ - var nodes = CAL.query("#record_tabs .yui-content"); + var nodes = CAL.query("#cal-tabs .yui-content"); CAL.each(nodes,function(i,v){ nodes[i].style.display = "none"; }); - var nodes = CAL.query("#record_tabs #"+tid); + var nodes = CAL.query("#cal-tabs #"+tid); CAL.each(nodes,function(i,v){ nodes[i].style.display = "block"; }); @@ -507,7 +507,7 @@ var data = { "users": user_id }; - var url = "index.php?module=Calendar&action=AjaxGetGRUsers&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=GetGRUsers&sugar_body_only=true"; YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data)); } @@ -522,15 +522,15 @@ res = eval(o.responseText); SugarWidgetScheduler.update_time(); if(CAL.record_editable){ - CAL.get("btn_save").removeAttribute("disabled"); - CAL.get("btn_delete").removeAttribute("disabled"); - CAL.get("btn_apply").removeAttribute("disabled"); - CAL.get("btn_send_invites").removeAttribute("disabled"); + CAL.get("btn-save").removeAttribute("disabled"); + CAL.get("btn-delete").removeAttribute("disabled"); + CAL.get("btn-apply").removeAttribute("disabled"); + CAL.get("btn-send-invites").removeAttribute("disabled"); } } }; - var url = 'index.php?module=Calendar&action=AjaxGetGR&sugar_body_only=true&type=' + module + '&record=' + record; + var url = 'index.php?module=Calendar&action=GetGR&sugar_body_only=true&type=' + module + '&record=' + record; YAHOO.util.Connect.asyncRequest('POST',url,callback,false); } } @@ -628,7 +628,7 @@ } } - CAL.FormLoad = function (module_name,record,run_one_time){ + CAL.load_from = function (module_name,record,run_one_time){ var e; var to_open = true; @@ -638,16 +638,16 @@ if(to_open && CAL.records_openable){ CAL.get("form_content").style.display = "none"; - CAL.get("btn_delete").setAttribute("disabled","disabled"); - CAL.get("btn_apply").setAttribute("disabled","disabled"); - CAL.get("btn_save").setAttribute("disabled","disabled"); - CAL.get("btn_send_invites").setAttribute("disabled","disabled"); + CAL.get("btn-delete").setAttribute("disabled","disabled"); + CAL.get("btn-apply").setAttribute("disabled","disabled"); + CAL.get("btn-save").setAttribute("disabled","disabled"); + CAL.get("btn-send-invites").setAttribute("disabled","disabled"); - CAL.get("title-record_dialog").innerHTML = CAL.lbl_loading; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_loading; ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_LOADING')); - CAL.open_record_dialog(); + CAL.open_edit_dialog(); CAL.get("record").value = ""; @@ -673,7 +673,7 @@ if(mod_name == "Calls") CAL.get("radio_call").checked = true; - if(res.editview == 1){ + if(res.edit == 1){ CAL.record_editable = true; }else{ CAL.record_editable = false; @@ -685,14 +685,14 @@ eval(res.gr); SugarWidgetScheduler.update_time(); if(CAL.record_editable){ - CAL.get("btn_save").removeAttribute("disabled"); - CAL.get("btn_delete").removeAttribute("disabled"); - CAL.get("btn_apply").removeAttribute("disabled"); - CAL.get("btn_send_invites").removeAttribute("disabled"); + CAL.get("btn-save").removeAttribute("disabled"); + CAL.get("btn-delete").removeAttribute("disabled"); + CAL.get("btn-apply").removeAttribute("disabled"); + CAL.get("btn-send-invites").removeAttribute("disabled"); } CAL.get("form_content").style.display = ""; - CAL.get("title-record_dialog").innerHTML = CAL.lbl_edit; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_edit; ajaxStatus.hideStatus(); if(typeof changeParentQS != 'undefined') @@ -711,7 +711,7 @@ alert(CAL.lbl_error_loading); } }; - var url = "index.php?module=Calendar&action=AjaxLoadForm&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=QuickEdit&sugar_body_only=true"; var data = { "current_module" : module_name, "record" : record @@ -723,7 +723,7 @@ } - CAL.removeSharedById = function (record_id){ + CAL.remove_shared = function (record_id){ var e; var cell_id; if(e = CAL.get(record_id + '____' + "0")) @@ -736,28 +736,25 @@ CAL.each(CAL.shared_users,function(i,v){ if(e = CAL.get(record_id + '____' + v)) e.parentNode.removeChild(e); - CAL.align_divs(cell_id + '_' + v); + CAL.arrange_slot(cell_id + '_' + v); + }); - if(e = CAL.get(record_id)) - e.parentNode.removeChild(e); - CAL.align_divs(cell_id); } - CAL.add_items = function (res){ - - if(CAL.pview != 'shared'){ - CAL.add_item_to_grid(res); - + CAL.add_item = function (item){ + + if(CAL.view != 'shared'){ + CAL.add_item_to_grid(item); }else{ - CAL.removeSharedById(res.record); - record_id = res.record; - //var rec_id_c = res.rec_id_c; - var timestamp = res.timestamp; + CAL.remove_shared(item.record); + record_id = item.record; + //var rec_id = item.rec_id; + var timestamp = item.timestamp; CAL.each( - res.users, + item.users, function (i,v){ - var rec = res; - //rec.rec_id_c = rec_id_c; + var rec = item; + //rec.rec_id = rec_id; rec.timestamp = timestamp; rec.user_id = v; rec.record = record_id; @@ -768,13 +765,14 @@ function (j,r){ rec.record = r.record; rec.timestamp = r.timestamp; - //rec.rec_id_c = record_id; + //rec.rec_id = record_id; CAL.add_item_to_grid(rec); } ); } ); - } + } + } CAL.move_activity = function (box_id,slot_id,ex_slot_id){ @@ -782,8 +780,8 @@ if(u = CAL.get(box_id)){ if(s = CAL.get(slot_id)){ s.appendChild(u); - CAL.align_divs(slot_id); - CAL.align_divs(ex_slot_id); + CAL.arrange_slot(slot_id); + CAL.arrange_slot(ex_slot_id); CAL.cut_record(box_id); var start_text = CAL.get_header_text(CAL.act_types[u.getAttribute('module_name')],s.getAttribute('time'),u.getAttribute('status'),u.getAttribute('record')); u.setAttribute("date_start",s.getAttribute("datetime")); @@ -799,7 +797,7 @@ var e,user_name,user_id,date_start; - CAL.get("title-record_dialog").innerHTML = CAL.lbl_loading; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_loading; document.forms["CalendarEditView"].elements["current_module"].value = mod_name; @@ -830,13 +828,13 @@ CAL.get("current_module").value = res.module_name; var mod_name = res.module_name; - if(res.editview == 1){ + if(res.edit == 1){ CAL.record_editable = true; }else{ CAL.record_editable = false; } - CAL.get("title-record_dialog").innerHTML = CAL.lbl_create_new; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_create_new; SugarWidgetScheduler.update_time(); @@ -858,7 +856,7 @@ } }; - var url = "index.php?module=Calendar&action=AjaxLoadForm&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=QuickEdit&sugar_body_only=true"; var data = { "current_module" : params.module_name, "assigned_user_id" : params.user_id, @@ -874,13 +872,13 @@ CAL.dialog_create = function (cell){ var e,user_id,user_name; - CAL.get("title-record_dialog").innerHTML = CAL.lbl_loading; - CAL.open_record_dialog(); - CAL.get("btn_delete").setAttribute("disabled","disabled"); + CAL.get("title-cal-edit").innerHTML = CAL.lbl_loading; + CAL.open_edit_dialog(); + CAL.get("btn-delete").setAttribute("disabled","disabled"); var module_name = CAL.get("current_module").value; - if(CAL.pview == 'shared'){ + if(CAL.view == 'shared'){ user_name = cell.parentNode.parentNode.parentNode.getAttribute("user_name"); user_id = cell.parentNode.parentNode.parentNode.getAttribute("user_id"); CAL.GR_update_user(user_id); @@ -888,7 +886,7 @@ user_id = CAL.current_user_id; user_name = CAL.current_user_name; CAL.GR_update_user(CAL.current_user_id); - } + } var params = { 'module_name': module_name, @@ -904,7 +902,7 @@ CAL.dialog_save = function(){ ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_SAVING')); - CAL.get("title-record_dialog").innerHTML = CAL.lbl_saving; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_saving; CAL.fill_invitees(); //CAL.fill_recurrence(); @@ -912,8 +910,8 @@ success: function(o){ res = eval('('+o.responseText+')'); if(res.success == 'yes'){ - CAL.add_items(res); - CAL.recordDialog.cancel(); + CAL.add_item(res); + CAL.editDialog.cancel(); CAL.update_vcal(); ajaxStatus.hideStatus(); }else{ @@ -926,7 +924,7 @@ ajaxStatus.hideStatus(); } }; - var url = "index.php?module=Calendar&action=AjaxSave&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=SaveActivity&sugar_body_only=true"; YAHOO.util.Connect.setForm(CAL.get("CalendarEditView")); YAHOO.util.Connect.asyncRequest('POST',url,callback,false); } @@ -934,7 +932,7 @@ CAL.dialog_apply = function(){ ajaxStatus.showStatus(SUGAR.language.get('app_strings', 'LBL_SAVING')); - CAL.get("title-record_dialog").innerHTML = CAL.lbl_saving; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_saving; CAL.fill_invitees(); //CAL.fill_recurrence(); @@ -944,7 +942,7 @@ if(e = CAL.get("radio_meeting")) e.setAttribute("disabled","disabled"); - CAL.get("btn_apply").setAttribute("disabled","disabled"); + CAL.get("btn-apply").setAttribute("disabled","disabled"); var callback = { success: function(o){ @@ -954,9 +952,9 @@ CAL.get("record").value = res.record; //SugarWidgetScheduler.update_time(); //CAL.GR_update_focus(CAL.get("current_module").value,res.record); - CAL.add_items(res); + CAL.add_item(res); CAL.update_vcal(); - CAL.get("title-record_dialog").innerHTML = CAL.lbl_edit; + CAL.get("title-cal-edit").innerHTML = CAL.lbl_edit; if(e = CAL.get("send_invites")) e.removeAttribute("checked"); ajaxStatus.hideStatus(); @@ -970,7 +968,7 @@ ajaxStatus.hideStatus(); } }; - var url = "index.php?module=Calendar&action=AjaxSave&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=SaveActivity&sugar_body_only=true"; YAHOO.util.Connect.setForm(CAL.get("CalendarEditView")); YAHOO.util.Connect.asyncRequest('POST',url,callback,false); } @@ -987,14 +985,14 @@ var e,cell_id; if(e = CAL.get(CAL.deleted_id)) cell_id = e.parentNode.id; - if(CAL.pview == 'shared') - CAL.removeSharedById(CAL.deleted_id); + if(CAL.view == 'shared') + CAL.remove_shared(CAL.deleted_id); if(e = CAL.get(CAL.deleted_id)) e.parentNode.removeChild(e); - CAL.align_divs(cell_id); - + CAL.arrange_slot(cell_id); + }, failure: function(){ @@ -1007,14 +1005,14 @@ "record" : CAL.deleted_id, "delete_recurring": delete_recurring }; - var url = "index.php?module=Calendar&action=AjaxRemove&sugar_body_only=true"; + var url = "index.php?module=Calendar&action=Remove&sugar_body_only=true"; YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data)); - CAL.recordDialog.cancel(); + CAL.editDialog.cancel(); } - CAL.show_additional_details = function (d_id){ - var obj = CAL.get(d_id); + CAL.show_additional_details = function (id){ + var obj = CAL.get(id); var record = obj.getAttribute("record"); mod = obj.getAttribute("module_name"); @@ -1024,31 +1022,33 @@ var date_start = obj.getAttribute("date_start"); var duration = obj.getAttribute("dur"); var desc = obj.getAttribute("desc"); - var detailview = parseInt(obj.getAttribute("detailview")); - var editview = parseInt(obj.getAttribute("editview")); + var detail = parseInt(obj.getAttribute("detail")); + var edit = parseInt(obj.getAttribute("edit")); var related = ""; if(obj.getAttribute("parent_id") != '') related = "<b>" + CAL.lbl_related + ":</b> <a href='index.php?module="+obj.getAttribute("parent_type")+"&action=DetailView&record="+obj.getAttribute("parent_id")+"'>"+obj.getAttribute("parent_name")+"</a>" + "<br>"; if(desc != '') - desc = '<b>'+ CAL.lbl_desc + ':</b><br> ' + desc +'<br>'; - + desc = '<b>'+ CAL.lbl_desc + ':</b><br> ' + desc +'<br>'; if(subj == '') return ""; - var date_lbl = CAL.lbl_start_t; - var duration_text = '<b>'+CAL.lbl_duration+':</b> ' + duration + '<br>'; - if(mod == "Tasks"){ - date_lbl = CAL.lbl_due_t; - duration_text = ""; - } + var date_lbl = CAL.lbl_start; + if(duration != ""){ + var duration_text = '<b>'+CAL.lbl_duration+':</b> ' + duration + '<br>'; + if(mod == "Tasks"){ + date_lbl = CAL.lbl_due; + duration_text = ""; + } + }else + duration_text = ""; var caption = "<div style='float: left;'>"+CAL.lbl_title+"</div><div style='float: right;'>"; - if(editview){ + if(edit){ caption += "<a title=\'"+SUGAR.language.get('app_strings', 'LBL_EDIT_BUTTON')+"\' href=\'index.php?module="+mod+"&action=EditView&record="+record+"\'><img border=0 src=\'"+CAL.img_edit_inline+"\'></a>"; } - if(detailview){ + if(detail){ caption += "<a title=\'"+SUGAR.language.get('app_strings', 'LBL_VIEW_BUTTON')+"\' href=\'index.php?module="+mod+"&action=DetailView&record="+record+"\'><img border=0 style=\'margin-left:2px;\' src=\'"+CAL.img_view_inline+"\'></a>"; } caption += "<a title=\'"+SUGAR.language.get('app_strings', 'LBL_ADDITIONAL_DETAILS_CLOSE_TITLE')+"\' href=\'javascript:return cClick();\' onclick=\'javascript:return cClick();\'><img border=0 style=\'margin-left:2px;margin-right:2px;\' src=\'"+CAL.img_close+"\'></a></div>"; @@ -1058,17 +1058,16 @@ return overlib(body, CAPTION, caption, DELAY, 200, STICKY, MOUSEOFF, 200, WIDTH, 300, CLOSETEXT, '', CLOSETITLE, SUGAR.language.get('app_strings','LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'), CLOSECLICK, FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass ecCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass'); } - CAL.toggleDisplay = function (id){ - - if(document.getElementById(id).style.display=='none'){ - document.getElementById(id).style.display='inline' + CAL.toggle_shared_edit = function (id){ + if(document.getElementById(id).style.display == 'none'){ + document.getElementById(id).style.display = 'inline' if(document.getElementById(id+"link") != undefined){ document.getElementById(id+"link").style.display='none'; } }else{ - document.getElementById(id).style.display='none' + document.getElementById(id).style.display = 'none' if(document.getElementById(id+"link") != undefined){ - document.getElementById(id+"link").style.display='inline'; + document.getElementById(id+"link").style.display = 'inline'; } } } @@ -1078,7 +1077,7 @@ var date_arr = []; date_arr = date_string.split("/"); - window.location.href = "index.php?module=Calendar&view="+CAL.pview+"&day="+date_arr[1]+"&month="+date_arr[0]+"&year="+date_arr[2]; + window.location.href = "index.php?module=Calendar&view="+CAL.view+"&day="+date_arr[1]+"&month="+date_arr[0]+"&year="+date_arr[2]; } CAL.toURI = function (a){ @@ -1116,54 +1115,44 @@ return object; } - CAL.getStyle = function(oElm, strCssRule){ - var strValue = ""; - if(document.defaultView && document.defaultView.getComputedStyle){ - strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule); - } - else if(oElm.currentStyle){ - strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ - return p1.toUpperCase(); - }); - strValue = oElm.currentStyle[strCssRule]; - } - return strValue; - } - CAL.update_vcal = function(){ - var v = CAL.current_user_id; - var callback = { - success: function(result){ - if (typeof GLOBAL_REGISTRY.freebusy == 'undefined') { - GLOBAL_REGISTRY.freebusy = new Object(); - } - if (typeof GLOBAL_REGISTRY.freebusy_adjusted == 'undefined') { - GLOBAL_REGISTRY.freebusy_adjusted = new Object(); - } - // parse vCal and put it in the registry using the user_id as a key: - GLOBAL_REGISTRY.freebusy[v] = SugarVCalClient.parseResults(result.responseText, false); - // parse for current user adjusted vCal - GLOBAL_REGISTRY.freebusy_adjusted[v] = SugarVCalClient.parseResults(result.responseText, true); - SugarWidgetScheduler.update_time(); - } - }; - - var url = "vcal_server.php?type=vfb&source=outlook&user_id="+v; - YAHOO.util.Connect.asyncRequest('GET',url,callback,false); + var v = CAL.current_user_id; + var callback = { + success: function(result){ + if (typeof GLOBAL_REGISTRY.freebusy == 'undefined') { + GLOBAL_REGISTRY.freebusy = new Object(); + } + if (typeof GLOBAL_REGISTRY.freebusy_adjusted == 'undefined') { + GLOBAL_REGISTRY.freebusy_adjusted = new Object(); + } + // parse vCal and put it in the registry using the user_id as a key: + GLOBAL_REGISTRY.freebusy[v] = SugarVCalClient.parseResults(result.responseText, false); + // parse for current user adjusted vCal + GLOBAL_REGISTRY.freebusy_adjusted[v] = SugarVCalClient.parseResults(result.responseText, true); + SugarWidgetScheduler.update_time(); + } + }; + + var url = "vcal_server.php?type=vfb&source=outlook&user_id="+v; + YAHOO.util.Connect.asyncRequest('GET',url,callback,false); } CAL.fit_grid = function(){ var day_width; - var cal_width = document.getElementById("cal-grid").parentNode.offsetWidth; - if(CAL.pview == "day") - day_width = parseInt((cal_width - 80)); + var cal_width = document.getElementById("cal-grid").parentNode.parentNode.offsetWidth; + var left_width = 80; + + + if(CAL.view == "day") + day_width = parseInt((cal_width - left_width)); else - day_width = parseInt((cal_width - 80) / 7 ); + day_width = parseInt((cal_width - left_width) / 7 ); + var nodes = CAL.query("#cal-grid div.day_col"); CAL.each(nodes, function(i,v){ nodes[i].style.width = day_width + "px"; - }); + }); document.getElementById("cal-grid").style.visibility = ""; } @@ -1197,6 +1186,6 @@ } }); - CAL.remove_record_dialog(); + CAL.remove_edit_dialog(); var cal_loaded = true; diff --git a/jssource/src_files/modules/InboundEmail/InboundEmail.js b/jssource/src_files/modules/InboundEmail/InboundEmail.js index 43397751..4bc6d7b6 100644 --- a/jssource/src_files/modules/InboundEmail/InboundEmail.js +++ b/jssource/src_files/modules/InboundEmail/InboundEmail.js @@ -121,7 +121,8 @@ function ie_test_open_popup_with_submit(module_name, action, pageTarget, width, return; } - ie_id = (typeof document.getElementById(formName).ie_id != 'undefined') ? document.getElementById(formName).ie_id : ''; + if(typeof(ie_id) == 'undefined' || ie_id == '') + ie_id = (typeof document.getElementById(formName).ie_id != 'undefined') ? document.getElementById(formName).ie_id.value : ''; // launch the popup URL = 'index.php?' diff --git a/modules/ACLRoles/EditAllBody.tpl b/modules/ACLRoles/EditAllBody.tpl index 7e1a6980..c330e686 100644 --- a/modules/ACLRoles/EditAllBody.tpl +++ b/modules/ACLRoles/EditAllBody.tpl @@ -42,7 +42,7 @@ <input type='hidden' name='return_record' value='{$RETURN.record}'> <input type='hidden' name='return_action' value='{$RETURN.action}'> <input type='hidden' name='return_module' value='{$RETURN.module}'> -<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >   +<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " id="SAVE_HEADER">   <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" class='button' accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" type='button' name='save' value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " class='button' onclick='aclviewer.view("{$ROLE.id}", "All");'> </p> <p> @@ -121,7 +121,7 @@ {/foreach} </TABLE> <div style="padding-top:10px;"> - <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >   + <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';aclviewer.save('ACLEditView');return false;" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " id="SAVE_FOOTER">   <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" class='button' accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" type='button' name='save' value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " class='button' onclick='aclviewer.view("{$ROLE.id}", "All");'> </div> </form> \ No newline at end of file diff --git a/modules/Accounts/Account.php b/modules/Accounts/Account.php index f8619734..89bdc2c6 100644 --- a/modules/Accounts/Account.php +++ b/modules/Accounts/Account.php @@ -247,10 +247,8 @@ class Account extends Company { { $temp_array["CITY"] = $this->billing_address_city; } - $temp_array["BILLING_ADDRESS_STREET"] = preg_replace("/[\r]/",'',$this->billing_address_street); - $temp_array["SHIPPING_ADDRESS_STREET"] = preg_replace("/[\r]/",'',$this->shipping_address_street); - $temp_array["BILLING_ADDRESS_STREET"] = preg_replace("/[\n]/",'\n',$temp_array["BILLING_ADDRESS_STREET"] ); - $temp_array["SHIPPING_ADDRESS_STREET"] = preg_replace("/[\n]/",'\n',$temp_array["SHIPPING_ADDRESS_STREET"] ); + $temp_array["BILLING_ADDRESS_STREET"] = $this->billing_address_street; + $temp_array["SHIPPING_ADDRESS_STREET"] = $this->shipping_address_street; if(isset($system_config->settings['system_skypeout_on']) && $system_config->settings['system_skypeout_on'] == 1){ if(!empty($temp_array['PHONE_OFFICE']) && skype_formatted($temp_array['PHONE_OFFICE'])){ $temp_array['PHONE_OFFICE'] = '<a href="callto://' . $temp_array['PHONE_OFFICE']. '">'.$temp_array['PHONE_OFFICE']. '</a>' ; diff --git a/modules/Accounts/metadata/popupdefs.php b/modules/Accounts/metadata/popupdefs.php index fc8e1572..97e2e89c 100644 --- a/modules/Accounts/metadata/popupdefs.php +++ b/modules/Accounts/metadata/popupdefs.php @@ -127,6 +127,7 @@ $popupMeta = array( 'billing_address_city', 'billing_address_state', 'billing_address_country', + 'email', array( 'name' => 'assigned_user_id', 'label'=>'LBL_ASSIGNED_TO', diff --git a/modules/Accounts/vardefs.php b/modules/Accounts/vardefs.php index aeb8601e..33da11e0 100644 --- a/modules/Accounts/vardefs.php +++ b/modules/Accounts/vardefs.php @@ -129,6 +129,20 @@ $dictionary['Account'] = array('table' => 'accounts', 'audited'=>true, 'unified_ 'source'=>'non-db', 'vname'=>'LBL_CASES', ), + //bug 42902 + 'email'=> array( + 'name' => 'email', + 'type' => 'email', + 'query_type' => 'default', + 'source' => 'non-db', + 'operator' => 'subquery', + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', + 'db_field' => array( + 'id', + ), + 'vname' =>'LBL_ANY_EMAIL', + 'studio' => array('visible'=>false, 'searchview'=>true), + ), 'tasks' => array ( 'name' => 'tasks', diff --git a/modules/Activities/Popup_picker.php b/modules/Activities/Popup_picker.php index ec163083..2e647aab 100644 --- a/modules/Activities/Popup_picker.php +++ b/modules/Activities/Popup_picker.php @@ -276,6 +276,50 @@ class Popup_Picker ); } //end Emails + // Bug 46439 'No email archived when clicking on View Summary' (All condition) + if (method_exists($focus,'get_unlinked_email_query')) + { + $queryArray = $focus->get_unlinked_email_query(array('return_as_array'=>'true')); + $query = $queryArray['select']; + $query .= $queryArray['from']; + if (!empty($queryArray['join_tables'])) + { + foreach ($queryArray['join_tables'] as $join_table) + { + if ($join_table != '') + { + $query .= ', '.$join_table.' '; + } + } + } + $query .= $queryArray['join']; + $query .= $queryArray['where']; + $emails = new Email(); + $focus_unlinked_emails_list = $emails->process_list_query($query, 0); + $focus_unlinked_emails_list = $focus_unlinked_emails_list['list']; + foreach ($focus_unlinked_emails_list as $email) + { + $email->retrieve($email->id); + $history_list[] = array( + 'name' => $email->name, + 'id' => $email->id, + 'type' => "Email", + 'direction' => '', + 'module' => "Emails", + 'status' => '', + 'parent_id' => $email->parent_id, + 'parent_type' => $email->parent_type, + 'parent_name' => $email->parent_name, + 'contact_id' => $email->contact_id, + 'contact_name' => $email->contact_name, + 'date_modified' => $email->date_start." ".$email->time_start, + 'description' => $this->getEmailDetails($email), + 'date_type' => $app_strings['DATA_TYPE_SENT'], + 'sort_value' => strtotime($email->fetched_row['date_sent'].' GMT'), + ); + } + } //end Unlinked Emails + foreach ($focus_notes_list as $note) { $history_list[] = array('name' => $note->name, @@ -426,4 +470,4 @@ class Popup_Picker return nl2br($description); } } // end of class Popup_Picker -?> \ No newline at end of file +?> diff --git a/modules/Administration/Locale.php b/modules/Administration/Locale.php index 65fb1026..6f8083e4 100644 --- a/modules/Administration/Locale.php +++ b/modules/Administration/Locale.php @@ -102,6 +102,7 @@ $sugar_smarty->assign("exportCharsets", get_select_options_with_id($locale->getC //$sugar_smarty->assign('salutation', 'Mr.'); //$sugar_smarty->assign('first_name', 'John'); //$sugar_smarty->assign('last_name', 'Doe'); +$sugar_smarty->assign('NAMEFORMATS', $locale->getPrettyLocaleNameOptions($sugar_config['name_formats'])); $sugar_smarty->assign('getNameJs', $locale->getNameJs()); $sugar_smarty->display('modules/Administration/Locale.tpl'); diff --git a/modules/Administration/Locale.tpl b/modules/Administration/Locale.tpl index a0a2efcd..5bab7061 100644 --- a/modules/Administration/Locale.tpl +++ b/modules/Administration/Locale.tpl @@ -106,13 +106,9 @@ </tr> </tr><tr> <td scope="row" valign="top">{$MOD.LBL_LOCALE_DEFAULT_NAME_FORMAT}: </td> - <td > - <input onkeyup="setPreview();" onkeydown="setPreview();" id="default_locale_name_format" type="text" name="default_locale_name_format" value="{$config.default_locale_name_format}"> - <br> - {$MOD.LBL_LOCALE_NAME_FORMAT_DESC} + <td> + {html_options name='default_locale_name_format' id="default_locale_name_format" selected=$config.default_locale_name_format options=$NAMEFORMATS} </td> - <td scope="row" valign="top">{$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}: </td> - <td valign="top"><input name="no_value" id="nameTarget" value="" style="border: none;" disabled></td> </tr> </table> @@ -214,4 +210,5 @@ <script language="Javascript" type="text/javascript"> {$getNameJs} +setPreview(); </script> diff --git a/modules/Administration/language/en_us.lang.php b/modules/Administration/language/en_us.lang.php index 3a7e9a59..f1beb6f1 100644 --- a/modules/Administration/language/en_us.lang.php +++ b/modules/Administration/language/en_us.lang.php @@ -257,9 +257,9 @@ $mod_strings = array ( 'LBL_DIAGNOSTIC_GETCONFPHP' => 'Getting config.php...', 'LBL_DIAGNOSTIC_GETCUSTDIR' => 'Getting custom dir...', 'LBL_DIAGNOSTIC_GETMD5INFO' => 'Getting md5 information...', - 'LBL_DIAGNOSTIC_GETMYSQLINFO' => 'mysql info', - 'LBL_DIAGNOSTIC_GETMYSQLTD' => 'mysql dumps', - 'LBL_DIAGNOSTIC_GETMYSQLTS' => 'mysql schema', + 'LBL_DIAGNOSTIC_GETMYSQLINFO' => 'Database info', + 'LBL_DIAGNOSTIC_GETMYSQLTD' => 'Database dumps', + 'LBL_DIAGNOSTIC_GETMYSQLTS' => 'Database schema', 'LBL_DIAGNOSTIC_GETPHPINFO' => 'Getting phpinfo()', 'LBL_DIAGNOSTIC_GETSUGARLOG' => 'Getting sugarcrm.log', 'LBL_DIAGNOSTIC_GETTING' => 'Getting...', diff --git a/modules/Administration/templates/ConfigureAjaxUI.tpl b/modules/Administration/templates/ConfigureAjaxUI.tpl index 63181808..51543035 100644 --- a/modules/Administration/templates/ConfigureAjaxUI.tpl +++ b/modules/Administration/templates/ConfigureAjaxUI.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} -<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script> +<script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_yui_widgets.js'}"></script> <form name="ConfigureAjaxUI" method="POST" method="POST" action="index.php"> <input type="hidden" name="module" value="Administration"> <input type="hidden" name="action" value="UpdateAjaxUI"> diff --git a/modules/Audit/Popup_picker.html b/modules/Audit/Popup_picker.html index 67c51bb5..0ed17199 100644 --- a/modules/Audit/Popup_picker.html +++ b/modules/Audit/Popup_picker.html @@ -37,23 +37,23 @@ --> <!-- BEGIN: audit --> -<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view"> +<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view" style="table-layout:fixed"> <tr height="20" > <td width="1%" ><img src="include/images/blank.gif" width="1" height="1" alt=""></td> <td width="15%" >{MOD.LBL_FIELD_NAME}</td> -<td width="30%" >{MOD.LBL_OLD_NAME}</td> -<td width="30%" >{MOD.LBL_NEW_VALUE}</td> +<td width="25%" >{MOD.LBL_OLD_NAME}</td> +<td width="25%" >{MOD.LBL_NEW_VALUE}</td> <td width="15%" >{MOD.LBL_CREATED_BY}</td> -<td width="9%" nowrap>{MOD.LBL_LIST_DATE}</td> +<td width="19%" nowrap>{MOD.LBL_LIST_DATE}</td> </tr> <!-- BEGIN: row --> <tr height="20"> <td nowrap="nowrap" valign="top">{ACTIVITY_MODULE_PNG}</td> <td valign="top">{ACTIVITY.NAME}</td> -<td valign="top">{ACTIVITY.BEFORE_VALUE}</td> -<td valign="top">{ACTIVITY.AFTER_VALUE}</td> -<td nowrap="nowrap" valign="top">{ACTIVITY.CREATED_BY}</td> -<td nowrap="nowrap" valign="top">{ACTIVITY.DATE_CREATED}</td> +<td valign="top" ><div style="word-wrap: break-word;">{ACTIVITY.BEFORE_VALUE}</div></td> +<td valign="top" ><div style="word-wrap: break-word;">{ACTIVITY.AFTER_VALUE}</div></td> +<td valign="top">{ACTIVITY.CREATED_BY}</td> +<td valign="top">{ACTIVITY.DATE_CREATED}</td> </tr> <!-- END: row --> </table> diff --git a/modules/Calendar/Cal.css b/modules/Calendar/Cal.css index 3b13b79f..c28f0fb6 100644 --- a/modules/Calendar/Cal.css +++ b/modules/Calendar/Cal.css @@ -33,140 +33,142 @@ * "Powered by SugarCRM". ********************************************************************************/ + +#cal-grid { + border-left: 1px solid silver; + width: 100%; + overflow:hidden; +} - #cal-grid { - border-left: 1px solid silver; - width: 100%; - overflow:hidden; - } - - #cal-grid .day_col { - width: 14.2%; - float: left; - border-bottom: 0px solid silver; - } - #cal-grid .left_time_col { - width: 52px; - float: left; - border-bottom: 0px solid silver; - } +#cal-grid .day_col { + width: 14.2%; + float: left; + border-bottom: 0px solid silver; +} +#cal-grid .left_time_col { + width: 52px; + float: left; + border-bottom: 0px solid silver; +} - #cal-grid .week_block { - width: auto; - margin-left: 52px; - min-width: 290px; - } - - #cal-grid .slot { - height: 14px; - border-right: 1px solid silver; - border-bottom: 1px solid #e5e5e5; - background-color: transparent; - } - #cal-grid .slot_over { - background-color: #D1DCFF; - } +#cal-grid .week_block { + width: auto; + margin-left: 52px; + min-width: 290px; +} - #cal-grid .left_cell { - height: 14px; - font-size: 10px; - text-align: center; - border-right: 1px solid silver; - border-bottom: 1px solid #e5e5e5; - vertical-align: middle; - line-height: 15px; - } - #cal-grid .day_head { - height: 14px; - - text-align: center; - font-size: 11px; - border-bottom: 1px solid silver; - border-top: 1px solid silver; - border-right: 1px solid silver; - white-space: nowrap; - } - #cal-grid .odd { - background-color: transparent; - } - #cal-grid .odd_border { - border-bottom: 1px solid silver; - } - - #cal-grid .slot_active { - background-color: gray; - } - - #cal-grid .today { - font-weight: bold; - background-color: #FCD372; - } - - .act_item { - width: 92%; - min-width: 0px; - font-size: 10px; - position : relative; - vertical-align: top; - display: inline-block; - border: 1px solid; - border-top-width: 1px; - overflow: hidden; - cursor: default; - } - - .act_item, #cal-grid .day_col { - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: -moz-none; - -o-user-select: none; - user-select: none; - } - - .act_item .head { - height: 13px; - padding-left: 2px; - } - .act_item .head div { - overflow: hidden; - height: 13px; - } - .act_item .contain { - padding-top: 1px; - padding-left: 2px; - padding-right: 2px; - overflow: hidden; - height: 13px; - } - - .act_item .adicon { - float: right; - color: black; - width: 11px; - font-size: 9px; - height: 11px; - line-height: 11px; - text-align: center; - background-image: url('../../themes/default/images/MoreDetail.png'); - background-repeat: no-repeat; - } - - .act_item .head { - font-size: 10px; - font-weight: bold; - } - .act_item .head div { - font-weight: bold; - font-size: 10px; - } - .act_item .head a, .act_item .head a:visited, .act_item .head a:hover { - text-decoration: none; - } - - #cal_record_buttons { - padding: 7px 5px 5px 5px; - } +#cal-grid .slot { + height: 14px; + border-right: 1px solid silver; + border-bottom: 1px solid #e5e5e5; + background-color: transparent; +} +#cal-grid .slot_over { + background-color: #D1DCFF; +} + +#cal-grid .left_cell { + height: 14px; + font-size: 10px; + text-align: center; + border-right: 1px solid silver; + border-bottom: 1px solid #e5e5e5; + vertical-align: middle; + line-height: 15px; +} +#cal-grid .day_head { + height: 14px; + text-align: center; + font-size: 13px; + border-bottom: 1px solid silver; + border-top: 1px solid silver; + border-right: 1px solid silver; + white-space: nowrap; +} +#cal-grid .day_head a { + text-decoration: none; +} +#cal-grid .odd { + background-color: transparent; +} +#cal-grid .odd_border { + border-bottom: 1px solid silver; +} + +#cal-grid .slot_active { + background-color: gray; +} + +#cal-grid .today { + font-weight: bold; + background-color: #FCD372; +} + +.act_item { + width: 92%; + min-width: 0px; + font-size: 10px; + position : relative; + vertical-align: top; + display: inline-block; + border: 1px solid; + border-top-width: 1px; + overflow: hidden; + cursor: default; +} + +.act_item, #cal-grid .day_col { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: -moz-none; + -o-user-select: none; + user-select: none; +} + +.act_item .head { + height: 13px; + padding-left: 2px; +} +.act_item .head div { + overflow: hidden; + height: 13px; +} +.act_item .contain { + padding-top: 1px; + padding-left: 2px; + padding-right: 2px; + overflow: hidden; + height: 13px; +} + +.act_item .adicon { + float: right; + color: black; + width: 11px; + font-size: 9px; + height: 11px; + line-height: 11px; + text-align: center; + background-image: url('../../themes/default/images/MoreDetail.png'); + background-repeat: no-repeat; +} + +.act_item .head { + font-size: 10px; + font-weight: bold; +} +.act_item .head div { + font-weight: bold; + font-size: 10px; +} +.act_item .head a, .act_item .head a:visited, .act_item .head a:hover { + text-decoration: none; +} + +#cal-edit-buttons { + padding: 7px 5px 5px 5px; +} - #cal-grid .owt { - display: none; - } +#cal-grid .owt { + display: none; +} diff --git a/modules/Calendar/Cal.js b/modules/Calendar/Cal.js index 32be9ab9..543da614 100644 --- a/modules/Calendar/Cal.js +++ b/modules/Calendar/Cal.js @@ -32,58 +32,58 @@ * technical reasons, the Appropriate Legal Notices must display the words * "Powered by SugarCRM". ********************************************************************************/ -var CAL={};CAL.dropped=0;CAL.records_openable=true;CAL.moved_from_cell="";CAL.deleted_id="";CAL.deleted_module="";CAL.old_caption="";CAL.disable_creating=false;CAL.record_editable=false;CAL.tp=false;CAL.tp1=false;CAL.shared_users={};CAL.shared_users_count=0;CAL.script_evaled=false;CAL.recordDialog=false;CAL.settingsDialog=false;CAL.scroll_slot=0;CAL.dom=YAHOO.util.Dom;CAL.get=YAHOO.util.Dom.get;CAL.query=YAHOO.util.Selector.query;CAL.align_divs=function(cell_id){if(!cell_id) +var CAL={};CAL.dropped=0;CAL.records_openable=true;CAL.moved_from_cell="";CAL.deleted_id="";CAL.deleted_module="";CAL.old_caption="";CAL.disable_creating=false;CAL.record_editable=false;CAL.tp=false;CAL.tp1=false;CAL.shared_users={};CAL.shared_users_count=0;CAL.script_evaled=false;CAL.editDialog=false;CAL.settingsDialog=false;CAL.scroll_slot=0;CAL.dom=YAHOO.util.Dom;CAL.get=YAHOO.util.Dom.get;CAL.query=YAHOO.util.Selector.query;CAL.arrange_slot=function(cell_id){if(!cell_id) return;cellElm=document.getElementById(cell_id);if(cellElm){var total_height=0;var prev_i=0;var first=1;var top=0;var height=0;var cnt=0;var child_cnt=cellElm.childNodes.length;for(var i=0;i<child_cnt;i++){var width_p=(92 / child_cnt);width=width_p.toString()+"%";if(cellElm.childNodes[i].tagName=="DIV"){cellElm.childNodes[i].style.top="-1px";cellElm.childNodes[i].style.left="-"+(cnt+1)+"px";cellElm.childNodes[i].style.width=width cnt++;prev_i=i;}}}} -CAL.add_item_to_grid=function(ActRecord){var duration_text=ActRecord.duration_hours+"h";if(ActRecord.duration_minutes>0) -duration_text+=ActRecord.duration_minutes+"m";var startD=new Date((ActRecord.timestamp)*1000);var suffix="";var id_suffix="";if(ActRecord.user_id!=""&&CAL.pview=='shared'){suffix="_"+CAL.shared_users[ActRecord.user_id];id_suffix='____'+CAL.shared_users[ActRecord.user_id];} -var e=CAL.get(ActRecord.record+id_suffix);if(e) -e.parentNode.removeChild(e);var start_text=CAL.get_header_text(ActRecord.type,ActRecord.time_start,ActRecord.status,ActRecord.record);var time_cell=ActRecord.timestamp-ActRecord.timestamp%(CAL.t_step*60);var duration_coef;if(ActRecord.module_name=='Tasks'){duration_coef=1;duration_text=" ";}else{if((ActRecord.duration_minutes<CAL.t_step)&&(ActRecord.duration_hours==0)) +CAL.add_item_to_grid=function(item){var suffix="";var id_suffix="";if(item.user_id!=""&&CAL.view=='shared'){suffix="_"+CAL.shared_users[item.user_id];id_suffix='____'+CAL.shared_users[item.user_id];} +var e=CAL.get(item.record+id_suffix);if(e){e.parentNode.removeChild(e);} +var duration_text=item.duration_hours+CAL.lbl_hours_abbrev;if(item.duration_minutes>0) +duration_text+=item.duration_minutes+CAL.lbl_mins_abbrev;var start_text=CAL.get_header_text(item.type,item.time_start,item.status,item.record);var time_cell=item.timestamp-item.timestamp%(CAL.t_step*60);var duration_coef;if(item.module_name=='Tasks'){duration_coef=1;duration_text=" ";}else{if((item.duration_minutes<CAL.t_step)&&(item.duration_hours==0)) duration_coef=1;else -duration_coef=(parseInt(ActRecord.duration_hours)*60+parseInt(ActRecord.duration_minutes))/ CAL.t_step;} -var item_text="";if(CAL.item_text&&(typeof ActRecord[CAL.item_text]!="undefined")) -item_text=ActRecord[CAL.item_text];var contain_style="";if(duration_coef<1.75) -contain_style="style='display: none;'";var elm_id=ActRecord.record+id_suffix;var el=document.createElement("div");el.innerHTML="<div class='head'><div class='adicon' onmouseover='return CAL.show_additional_details("+'"'+ActRecord.record+id_suffix+'"'+");' onmouseout='return nd(400);' >  </div><div>"+start_text+"</div>"+""+"</div><div class='contain' "+contain_style+">"+item_text+"</div>";el.className="act_item"+" "+ActRecord.type+"_item";el.setAttribute("id",elm_id);el.setAttribute("module_name",ActRecord.module_name);el.setAttribute("record",ActRecord.record);el.setAttribute("dur",duration_text);el.setAttribute("subj",ActRecord.record_name);el.setAttribute("date_start",ActRecord.date_start);el.setAttribute("desc",ActRecord.description);el.setAttribute("parent_name",ActRecord.parent_name);el.setAttribute("parent_type",ActRecord.parent_type);el.setAttribute("parent_id",ActRecord.parent_id);el.setAttribute("status",ActRecord.status);el.setAttribute("detailview",ActRecord.detailview);el.setAttribute("editview",ActRecord.editview);el.setAttribute("duration_coef",duration_coef);el.style.backgroundColor=CAL.activity_colors[ActRecord.module_name]['body'];el.style.borderColor=CAL.activity_colors[ActRecord.module_name]['border'];el.style.height=parseInt(15*duration_coef-1)+"px";YAHOO.util.Event.on(el,"click",function(){if(this.getAttribute('detailview')=="1") -CAL.FormLoad(this.getAttribute('module_name'),this.getAttribute('record'),false);});YAHOO.util.Event.on(el,"mouseover",function(){if(!CAL.records_openable) +duration_coef=(parseInt(item.duration_hours)*60+parseInt(item.duration_minutes))/ CAL.t_step;} +var item_text="";if(CAL.item_text&&(typeof item[CAL.item_text]!="undefined")) +item_text=item[CAL.item_text];var contain_style="";if(duration_coef<1.75) +contain_style="style='display: none;'";var elm_id=item.record+id_suffix;var el=document.createElement("div");el.innerHTML="<div class='head'><div class='adicon' onmouseover='return CAL.show_additional_details("+'"'+item.record+id_suffix+'"'+");' onmouseout='return nd(400);' >  </div><div>"+start_text+"</div>"+""+"</div><div class='contain' "+contain_style+">"+item_text+"</div>";el.className="act_item"+" "+item.type+"_item";el.setAttribute("id",elm_id);el.setAttribute("module_name",item.module_name);el.setAttribute("record",item.record);el.setAttribute("dur",duration_text);el.setAttribute("subj",item.record_name);el.setAttribute("date_start",item.date_start);el.setAttribute("desc",item.description);el.setAttribute("parent_name",item.parent_name);el.setAttribute("parent_type",item.parent_type);el.setAttribute("parent_id",item.parent_id);el.setAttribute("status",item.status);el.setAttribute("detail",item.detail);el.setAttribute("edit",item.edit);el.setAttribute("duration_coef",duration_coef);el.style.backgroundColor=CAL.activity_colors[item.module_name]['body'];el.style.borderColor=CAL.activity_colors[item.module_name]['border'];el.style.height=parseInt(15*duration_coef-1)+"px";YAHOO.util.Event.on(el,"click",function(){if(this.getAttribute('detail')=="1") +CAL.load_from(this.getAttribute('module_name'),this.getAttribute('record'),false);});YAHOO.util.Event.on(el,"mouseover",function(){if(!CAL.records_openable) return;CAL.disable_creating=true;CAL.tp=setTimeout(function(){var e;if(e=CAL.get(elm_id)) e.style.zIndex=2;},150);});YAHOO.util.Event.on(el,"mouseout",function(){if(!CAL.records_openable) return;clearTimeout(CAL.tp);CAL.get(elm_id).style.zIndex='';CAL.disable_creating=false;});var slot;if(slot=CAL.get("t_"+time_cell+suffix)){slot.appendChild(el);if(duration_coef<1.75&&CAL.mouseover_expand){YAHOO.util.Event.on(elm_id,"mouseover",function(){if(CAL.records_openable) CAL.expand_record(this.getAttribute("id"));});YAHOO.util.Event.on(elm_id,"mouseout",function(){CAL.unexpand_record(this.getAttribute("id"));});YAHOO.util.Event.on(elm_id,"click",function(){CAL.unexpand_record(this.getAttribute("id"));});} -if(CAL.items_draggable&&ActRecord.module_name!="Tasks"&&ActRecord.editview==1){var dd=new YAHOO.util.DDCAL(elm_id,"cal",{isTarget:false,cont:'cal-grid'});dd.onInvalidDrop=function(e){this.el.style.left="-1px";this.el.style.top="-1px";if(CAL.dropped==0){this.el.childNodes[0].innerHTML=CAL.old_caption;}} +if(CAL.items_draggable&&item.module_name!="Tasks"&&item.edit==1){var border='cal-grid';if(CAL.view!="shared"&&CAL.view!="month") +border='cal-scrollable';var dd=new YAHOO.util.DDCAL(elm_id,"cal",{isTarget:false,cont:border});dd.onInvalidDrop=function(e){this.el.style.left="-1px";this.el.style.top="-1px";if(CAL.dropped==0){this.el.childNodes[0].innerHTML=CAL.old_caption;}} dd.onMouseDown=function(e){YAHOO.util.DDM.mode=YAHOO.util.DDM.POINT;YAHOO.util.DDM.clickPixelThresh=20;} dd.onMouseUp=function(e){YAHOO.util.DDM.mode=YAHOO.util.DDM.INTERSECT;YAHOO.util.DDM.clickPixelThresh=3;} dd.startDrag=function(x,y){this.el=document.getElementById(this.id);this.el.style.zIndex=5;CAL.dropped=0;CAL.records_openable=false;CAL.old_caption=this.el.childNodes[0].innerHTML;CAL.moved_from_cell=this.el.parentNode.id;this.setDelta(2,2);} dd.endDrag=function(x,y){this.el=document.getElementById(this.id);this.el.style.zIndex="";var nodes=CAL.query("#cal-grid .slot");CAL.each(nodes,function(i,v){YAHOO.util.Dom.removeClass(nodes[i],"slot_active");});} dd.onDragDrop=function(e,id){var slot=document.getElementById(id);YAHOO.util.Dom.removeClass(slot,"slot_active");if(CAL.dropped) -return;CAL.dropped=1;this.el.style.position="relative";this.el.style.cssFloat="none";if(CAL.pview!='shared'){var box_id=this.id;var slot_id=id;var ex_slot_id=CAL.moved_from_cell;CAL.move_activity(box_id,slot_id,ex_slot_id);}else{var record=this.el.getAttribute("record");var tid=id;var tar=tid.split("_");var timestamp=tar[1];var tid=CAL.moved_from_cell;var tar=tid.split("_");var ex_timestamp=tar[1];for(i=0;i<CAL.shared_users_count;i++){var box_id=""+record+"____"+i;var slot_id="t_"+timestamp+"_"+i;var ex_slot_id="t_"+ex_timestamp+"_"+i;CAL.move_activity(box_id,slot_id,ex_slot_id);}} -var callback={success:function(o){CAL.records_openable=true;CAL.update_vcal();ajaxStatus.hideStatus();}};ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));var url="index.php?module=Calendar&action=AjaxReschedule&sugar_body_only=true";var data={"current_module":this.el.getAttribute("module_name"),"record":this.el.getAttribute("record"),"datetime":slot.getAttribute("datetime")};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));YAHOO.util.Dom.removeClass(slot,"slot_active");CAL.disable_creating=false;CAL.records_openable=true;} +return;CAL.dropped=1;this.el.style.position="relative";this.el.style.cssFloat="none";if(CAL.view!='shared'){var box_id=this.id;var slot_id=id;var ex_slot_id=CAL.moved_from_cell;CAL.move_activity(box_id,slot_id,ex_slot_id);}else{var record=this.el.getAttribute("record");var tid=id;var tar=tid.split("_");var timestamp=tar[1];var tid=CAL.moved_from_cell;var tar=tid.split("_");var ex_timestamp=tar[1];for(i=0;i<CAL.shared_users_count;i++){var box_id=""+record+"____"+i;var slot_id="t_"+timestamp+"_"+i;var ex_slot_id="t_"+ex_timestamp+"_"+i;CAL.move_activity(box_id,slot_id,ex_slot_id);}} +var callback={success:function(o){CAL.records_openable=true;CAL.update_vcal();ajaxStatus.hideStatus();}};ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));var url="index.php?module=Calendar&action=Reschedule&sugar_body_only=true";var data={"current_module":this.el.getAttribute("module_name"),"record":this.el.getAttribute("record"),"datetime":slot.getAttribute("datetime")};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));YAHOO.util.Dom.removeClass(slot,"slot_active");CAL.disable_creating=false;CAL.records_openable=true;} dd.onDragOver=function(e,id){var slot=document.getElementById(id);if(!YAHOO.util.Dom.hasClass(slot,"slot_active")) YAHOO.util.Dom.addClass(slot,"slot_active");this.el.childNodes[0].childNodes[1].childNodes[0].innerHTML=slot.getAttribute('time');} dd.onDragOut=function(e,id){var slot=document.getElementById(id);YAHOO.util.Dom.removeClass(slot,"slot_active");}} -CAL.cut_record(ActRecord.record+id_suffix);CAL.align_divs("t_"+time_cell+suffix);}} +CAL.cut_record(item.record+id_suffix);CAL.arrange_slot("t_"+time_cell+suffix);}} CAL.expand_record=function(id){CAL.tp1=setTimeout(function(){var el=CAL.get(id);if(el){el.style.height=parseInt(15*2-1)+"px";el.childNodes[1].style.display="block";}},350);} CAL.unexpand_record=function(id){clearTimeout(CAL.tp1);var el=CAL.get(id);el.style.height=parseInt(15*CAL.get(id).getAttribute("duration_coef")-2)+"px";el.childNodes[1].style.display="none";CAL.cut_record(id);} CAL.get_header_text=function(type,time_start,status,record){var start_text="<span class='start_time'>"+time_start+"</span> "+SUGAR.language.languages.app_list_strings[type+'_status_dom'][status];return start_text;} CAL.cut_record=function(id){var el=CAL.get(id);if(!el) -return;var duration_coef=el.getAttribute("duration_coef");var real_celcount=CAL.celcount;if(CAL.pview=='day'||CAL.pview=='week') +return;var duration_coef=el.getAttribute("duration_coef");var real_celcount=CAL.celcount;if(CAL.view=='day'||CAL.view=='week') real_celcount=CAL.cells_per_day;var celpos=0;var s=el.parentNode;while(s.previousSibling){celpos++;s=s.previousSibling;} -if(CAL.pview=='week') +if(CAL.view=='week') celpos=celpos+1;if(real_celcount-celpos-duration_coef<0) duration_coef=real_celcount-celpos+1;el.style.height=parseInt(15*duration_coef-1)+"px";} -CAL.init_record_dialog=function(params){CAL.recordDialog=false;var rd=CAL.get("record_dialog");var content=CAL.get("dialog_content");if(CAL.dashlet&&rd){document.getElementById("content").appendChild(rd);} -rd.style.width=params.width+"px";content.style.height=params.height+"px";content.style.overflow="auto";content.style.padding="0";CAL.recordDialog=new YAHOO.widget.Dialog("record_dialog",{fixedcenter:true,draggable:true,visible:false,modal:true,close:true,zIndex:10});var listeners=new YAHOO.util.KeyListener(document,{keys:27},{fn:function(){CAL.recordDialog.cancel();}});CAL.recordDialog.cfg.queueProperty("keylisteners",listeners);CAL.recordDialog.cancelEvent.subscribe(function(e,a,o){CAL.close_record_dialog();});rd.style.display="block";CAL.recordDialog.render();rd.style.overflow="auto";rd.style.overflowX="hidden";rd.style.outline="0 none";rd.style.height="auto";} -CAL.open_record_dialog=function(params){CAL.recordDialog.show();var nodes=CAL.query("#record_tabs li a");CAL.each(nodes,function(i,v){YAHOO.util.Event.on(nodes[i],'click',function(){var nodes_li=CAL.query("#record_tabs li");CAL.each(nodes_li,function(j,v){CAL.dom.removeClass(nodes_li[j],"selected");});if(!CAL.dom.hasClass(this.parentNode,"selected")) -CAL.dom.addClass(this.parentNode,"selected");CAL.select_tab(this.getAttribute("tabname"));});});var nodes_li=CAL.query("#record_tabs li");CAL.each(nodes_li,function(j,v){CAL.dom.removeClass(nodes_li[j],"selected");if(j==0) +CAL.init_edit_dialog=function(params){CAL.editDialog=false;var rd=CAL.get("cal-edit");var content=CAL.get("edit-dialog-content");if(CAL.dashlet&&rd){document.getElementById("content").appendChild(rd);} +rd.style.width=params.width+"px";content.style.height=params.height+"px";content.style.overflow="auto";content.style.padding="0";CAL.editDialog=new YAHOO.widget.Dialog("cal-edit",{fixedcenter:true,draggable:true,visible:false,modal:true,close:true,zIndex:10});var listeners=new YAHOO.util.KeyListener(document,{keys:27},{fn:function(){CAL.editDialog.cancel();}});CAL.editDialog.cfg.queueProperty("keylisteners",listeners);CAL.editDialog.cancelEvent.subscribe(function(e,a,o){CAL.close_edit_dialog();});rd.style.display="block";CAL.editDialog.render();rd.style.overflow="auto";rd.style.overflowX="hidden";rd.style.outline="0 none";rd.style.height="auto";} +CAL.open_edit_dialog=function(params){CAL.editDialog.show();var nodes=CAL.query("#cal-tabs li a");CAL.each(nodes,function(i,v){YAHOO.util.Event.on(nodes[i],'click',function(){var nodes_li=CAL.query("#cal-tabs li");CAL.each(nodes_li,function(j,v){CAL.dom.removeClass(nodes_li[j],"selected");});if(!CAL.dom.hasClass(this.parentNode,"selected")) +CAL.dom.addClass(this.parentNode,"selected");CAL.select_tab(this.getAttribute("tabname"));});});var nodes_li=CAL.query("#cal-tabs li");CAL.each(nodes_li,function(j,v){CAL.dom.removeClass(nodes_li[j],"selected");if(j==0) CAL.dom.addClass(nodes_li[j],"selected");});var nodes=CAL.query(".yui-nav");CAL.each(nodes,function(i,v){nodes[i].style.overflowX="visible";});} -CAL.close_record_dialog=function(){CAL.clearFields();} -CAL.remove_record_dialog=function(){var rd_c=CAL.get("record_dialog_c");if(rd_c){rd_c.parentNode.removeChild(rd_c);}} -CAL.clearFields=function(){var e;document.getElementById("form_content").innerHTML="";document.forms["CalendarEditView"].elements["current_module"].value="Meetings";CAL.get("radio_call").removeAttribute("disabled");CAL.get("radio_meeting").removeAttribute("disabled");CAL.get("radio_call").checked=false;CAL.get("radio_meeting").checked=true;CAL.get("send_invites").value="";if(e=CAL.get("record")) +CAL.close_edit_dialog=function(){CAL.reset_edit_dialog();} +CAL.remove_edit_dialog=function(){var rd_c=CAL.get("cal-edit_c");if(rd_c){rd_c.parentNode.removeChild(rd_c);}} +CAL.reset_edit_dialog=function(){var e;document.getElementById("form_content").innerHTML="";document.forms["CalendarEditView"].elements["current_module"].value="Meetings";CAL.get("radio_call").removeAttribute("disabled");CAL.get("radio_meeting").removeAttribute("disabled");CAL.get("radio_call").checked=false;CAL.get("radio_meeting").checked=true;CAL.get("send_invites").value="";if(e=CAL.get("record")) e.value="";if(e=CAL.get("list_div_win")) -e.style.display="none";if(e=CAL.get("edit_all_recurrences_btn")) -e.style.display="none";var nodes=CAL.query("#repeat_type option[value='']");CAL.each(nodes,function(i,v){nodes[i].setAttribute("selected","selected");});CAL.GR_update_focus("Meetings","");CAL.select_tab("record_tabs-1");} -CAL.select_tab=function(tid){var nodes=CAL.query("#record_tabs .yui-content");CAL.each(nodes,function(i,v){nodes[i].style.display="none";});var nodes=CAL.query("#record_tabs #"+tid);CAL.each(nodes,function(i,v){nodes[i].style.display="block";});} -CAL.GR_update_user=function(user_id){var callback={success:function(o){res=eval(o.responseText);GLOBAL_REGISTRY.focus.users_arr_hash=undefined;}};var data={"users":user_id};var url="index.php?module=Calendar&action=AjaxGetGRUsers&sugar_body_only=true";YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} -CAL.GR_update_focus=function(module,record){if(record==""){GLOBAL_REGISTRY["focus"]={"module":module,users_arr:[],fields:{"id":"-1"}};SugarWidgetScheduler.update_time();}else{var callback={success:function(o){res=eval(o.responseText);SugarWidgetScheduler.update_time();if(CAL.record_editable){CAL.get("btn_save").removeAttribute("disabled");CAL.get("btn_delete").removeAttribute("disabled");CAL.get("btn_apply").removeAttribute("disabled");CAL.get("btn_send_invites").removeAttribute("disabled");}}};var url='index.php?module=Calendar&action=AjaxGetGR&sugar_body_only=true&type='+module+'&record='+record;YAHOO.util.Connect.asyncRequest('POST',url,callback,false);}} +e.style.display="none";CAL.GR_update_focus("Meetings","");CAL.select_tab("cal-tab-1");} +CAL.select_tab=function(tid){var nodes=CAL.query("#cal-tabs .yui-content");CAL.each(nodes,function(i,v){nodes[i].style.display="none";});var nodes=CAL.query("#cal-tabs #"+tid);CAL.each(nodes,function(i,v){nodes[i].style.display="block";});} +CAL.GR_update_user=function(user_id){var callback={success:function(o){res=eval(o.responseText);GLOBAL_REGISTRY.focus.users_arr_hash=undefined;}};var data={"users":user_id};var url="index.php?module=Calendar&action=GetGRUsers&sugar_body_only=true";YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} +CAL.GR_update_focus=function(module,record){if(record==""){GLOBAL_REGISTRY["focus"]={"module":module,users_arr:[],fields:{"id":"-1"}};SugarWidgetScheduler.update_time();}else{var callback={success:function(o){res=eval(o.responseText);SugarWidgetScheduler.update_time();if(CAL.record_editable){CAL.get("btn-save").removeAttribute("disabled");CAL.get("btn-delete").removeAttribute("disabled");CAL.get("btn-apply").removeAttribute("disabled");CAL.get("btn-send-invites").removeAttribute("disabled");}}};var url='index.php?module=Calendar&action=GetGR&sugar_body_only=true&type='+module+'&record='+record;YAHOO.util.Connect.asyncRequest('POST',url,callback,false);}} CAL.toggle_settings=function(){var sd=CAL.get("settings_dialog");if(!CAL.settingsDialog){CAL.settingsDialog=new YAHOO.widget.Dialog("settings_dialog",{fixedcenter:true,draggable:false,visible:false,modal:true,close:true});var listeners=new YAHOO.util.KeyListener(document,{keys:27},{fn:function(){CAL.settingsDialog.cancel();}});CAL.settingsDialog.cfg.queueProperty("keylisteners",listeners);} CAL.settingsDialog.cancelEvent.subscribe(function(e,a,o){CAL.get("form_settings").reset();});sd.style.display="block";CAL.settingsDialog.render();CAL.settingsDialog.show();} CAL.toggle_whole_day=function(){var wd=CAL.get("whole_day");if(!wd.value) @@ -95,51 +95,50 @@ field_name="contact_invitees";if(v.module=="Lead") field_name="lead_invitees";var str=CAL.get(field_name).value;CAL.get(field_name).value=str+v.fields.id+",";});} CAL.repeat_type_selected=function(){var rt;if(rt=CAL.get("repeat_type")){if(rt.value=='Weekly'){var nodes=CAL.query(".weeks_checks_div");CAL.each(nodes,function(i,v){nodes[i].style.display="block";});}else{var nodes=CAL.query(".weeks_checks_div");CAL.each(nodes,function(i,v){nodes[i].style.display="none";});} if(rt.value==''){CAL.get("repeat_interval").setAttribute("disabled","disabled");CAL.get("repeat_end_date").setAttribute("disabled","disabled");}else{CAL.get("repeat_interval").removeAttribute("disabled");CAL.get("repeat_end_date").removeAttribute("disabled");}}} -CAL.FormLoad=function(module_name,record,run_one_time){var e;var to_open=true;if(module_name=="Tasks") -to_open=false;if(to_open&&CAL.records_openable){CAL.get("form_content").style.display="none";CAL.get("btn_delete").setAttribute("disabled","disabled");CAL.get("btn_apply").setAttribute("disabled","disabled");CAL.get("btn_save").setAttribute("disabled","disabled");CAL.get("btn_send_invites").setAttribute("disabled","disabled");CAL.get("title-record_dialog").innerHTML=CAL.lbl_loading;ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));CAL.open_record_dialog();CAL.get("record").value="";var callback={success:function(o){res=eval("("+o.responseText+")");if(res.success=='yes'){var fc=document.getElementById("form_content");CAL.script_evaled=false;fc.innerHTML='<script type="text/javascript">CAL.script_evaled = true;</script>'+res.html;if(!CAL.script_evaled){SUGAR.util.evalScript(res.html);} +CAL.load_from=function(module_name,record,run_one_time){var e;var to_open=true;if(module_name=="Tasks") +to_open=false;if(to_open&&CAL.records_openable){CAL.get("form_content").style.display="none";CAL.get("btn-delete").setAttribute("disabled","disabled");CAL.get("btn-apply").setAttribute("disabled","disabled");CAL.get("btn-save").setAttribute("disabled","disabled");CAL.get("btn-send-invites").setAttribute("disabled","disabled");CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));CAL.open_edit_dialog();CAL.get("record").value="";var callback={success:function(o){res=eval("("+o.responseText+")");if(res.success=='yes'){var fc=document.getElementById("form_content");CAL.script_evaled=false;fc.innerHTML='<script type="text/javascript">CAL.script_evaled = true;</script>'+res.html;if(!CAL.script_evaled){SUGAR.util.evalScript(res.html);} CAL.get("record").value=res.record;CAL.get("current_module").value=res.module_name;var mod_name=res.module_name;if(mod_name=="Meetings") CAL.get("radio_meeting").checked=true;if(mod_name=="Calls") -CAL.get("radio_call").checked=true;if(res.editview==1){CAL.record_editable=true;}else{CAL.record_editable=false;} -CAL.get("radio_call").setAttribute("disabled","disabled");CAL.get("radio_meeting").setAttribute("disabled","disabled");eval(res.gr);SugarWidgetScheduler.update_time();if(CAL.record_editable){CAL.get("btn_save").removeAttribute("disabled");CAL.get("btn_delete").removeAttribute("disabled");CAL.get("btn_apply").removeAttribute("disabled");CAL.get("btn_send_invites").removeAttribute("disabled");} -CAL.get("form_content").style.display="";CAL.get("title-record_dialog").innerHTML=CAL.lbl_edit;ajaxStatus.hideStatus();if(typeof changeParentQS!='undefined') +CAL.get("radio_call").checked=true;if(res.edit==1){CAL.record_editable=true;}else{CAL.record_editable=false;} +CAL.get("radio_call").setAttribute("disabled","disabled");CAL.get("radio_meeting").setAttribute("disabled","disabled");eval(res.gr);SugarWidgetScheduler.update_time();if(CAL.record_editable){CAL.get("btn-save").removeAttribute("disabled");CAL.get("btn-delete").removeAttribute("disabled");CAL.get("btn-apply").removeAttribute("disabled");CAL.get("btn-send-invites").removeAttribute("disabled");} +CAL.get("form_content").style.display="";CAL.get("title-cal-edit").innerHTML=CAL.lbl_edit;ajaxStatus.hideStatus();if(typeof changeParentQS!='undefined') changeParentQS("parent_name");setTimeout(function(){enableQS(false);disableOnUnloadEditView();},500);}else -alert(CAL.lbl_error_loading);},failure:function(){alert(CAL.lbl_error_loading);}};var url="index.php?module=Calendar&action=AjaxLoadForm&sugar_body_only=true";var data={"current_module":module_name,"record":record};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} +alert(CAL.lbl_error_loading);},failure:function(){alert(CAL.lbl_error_loading);}};var url="index.php?module=Calendar&action=QuickEdit&sugar_body_only=true";var data={"current_module":module_name,"record":record};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} CAL.records_openable=true;} -CAL.removeSharedById=function(record_id){var e;var cell_id;if(e=CAL.get(record_id+'____'+"0")) +CAL.remove_shared=function(record_id){var e;var cell_id;if(e=CAL.get(record_id+'____'+"0")) cell_id=e.parentNode.id;if(typeof cell_id!="undefined"){var cell_id_arr=cell_id.split("_");cell_id="t_"+cell_id_arr[1];} CAL.each(CAL.shared_users,function(i,v){if(e=CAL.get(record_id+'____'+v)) -e.parentNode.removeChild(e);CAL.align_divs(cell_id+'_'+v);});if(e=CAL.get(record_id)) -e.parentNode.removeChild(e);CAL.align_divs(cell_id);} -CAL.add_items=function(res){if(CAL.pview!='shared'){CAL.add_item_to_grid(res);}else{CAL.removeSharedById(res.record);record_id=res.record;var timestamp=res.timestamp;CAL.each(res.users,function(i,v){var rec=res;rec.timestamp=timestamp;rec.user_id=v;rec.record=record_id;CAL.add_item_to_grid(rec);CAL.each(rec.arr_rec,function(j,r){rec.record=r.record;rec.timestamp=r.timestamp;CAL.add_item_to_grid(rec);});});}} -CAL.move_activity=function(box_id,slot_id,ex_slot_id){var u,s;if(u=CAL.get(box_id)){if(s=CAL.get(slot_id)){s.appendChild(u);CAL.align_divs(slot_id);CAL.align_divs(ex_slot_id);CAL.cut_record(box_id);var start_text=CAL.get_header_text(CAL.act_types[u.getAttribute('module_name')],s.getAttribute('time'),u.getAttribute('status'),u.getAttribute('record'));u.setAttribute("date_start",s.getAttribute("datetime"));u.childNodes[0].childNodes[1].innerHTML=start_text;}}} +e.parentNode.removeChild(e);CAL.arrange_slot(cell_id+'_'+v);});} +CAL.add_item=function(item){if(CAL.view!='shared'){CAL.add_item_to_grid(item);}else{CAL.remove_shared(item.record);record_id=item.record;var timestamp=item.timestamp;CAL.each(item.users,function(i,v){var rec=item;rec.timestamp=timestamp;rec.user_id=v;rec.record=record_id;CAL.add_item_to_grid(rec);CAL.each(rec.arr_rec,function(j,r){rec.record=r.record;rec.timestamp=r.timestamp;CAL.add_item_to_grid(rec);});});}} +CAL.move_activity=function(box_id,slot_id,ex_slot_id){var u,s;if(u=CAL.get(box_id)){if(s=CAL.get(slot_id)){s.appendChild(u);CAL.arrange_slot(slot_id);CAL.arrange_slot(ex_slot_id);CAL.cut_record(box_id);var start_text=CAL.get_header_text(CAL.act_types[u.getAttribute('module_name')],s.getAttribute('time'),u.getAttribute('status'),u.getAttribute('record'));u.setAttribute("date_start",s.getAttribute("datetime"));u.childNodes[0].childNodes[1].innerHTML=start_text;}}} CAL.change_activity_type=function(mod_name){if(typeof CAL.current_params.module_name!="undefined") if(CAL.current_params.module_name==mod_name) -return;var e,user_name,user_id,date_start;CAL.get("title-record_dialog").innerHTML=CAL.lbl_loading;document.forms["CalendarEditView"].elements["current_module"].value=mod_name;CAL.current_params.module_name=mod_name;CAL.load_create_form(CAL.current_params);} +return;var e,user_name,user_id,date_start;CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;document.forms["CalendarEditView"].elements["current_module"].value=mod_name;CAL.current_params.module_name=mod_name;CAL.load_create_form(CAL.current_params);} CAL.load_create_form=function(params){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_LOADING'));var callback={success:function(o){res=eval("("+o.responseText+")");if(res.success=='yes'){var fc=document.getElementById("form_content");CAL.script_evaled=false;fc.innerHTML='<script type="text/javascript">CAL.script_evaled = true;</script>'+res.html;if(!CAL.script_evaled){SUGAR.util.evalScript(res.html);} -CAL.get("record").value="";CAL.get("current_module").value=res.module_name;var mod_name=res.module_name;if(res.editview==1){CAL.record_editable=true;}else{CAL.record_editable=false;} -CAL.get("title-record_dialog").innerHTML=CAL.lbl_create_new;SugarWidgetScheduler.update_time();setTimeout(function(){enableQS(false);disableOnUnloadEditView();},500);ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_loading);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_loading);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=AjaxLoadForm&sugar_body_only=true";var data={"current_module":params.module_name,"assigned_user_id":params.user_id,"assigned_user_name":params.user_name,"date_start":params.date_start,"duration_hours":1,"duration_minutes":0};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} -CAL.dialog_create=function(cell){var e,user_id,user_name;CAL.get("title-record_dialog").innerHTML=CAL.lbl_loading;CAL.open_record_dialog();CAL.get("btn_delete").setAttribute("disabled","disabled");var module_name=CAL.get("current_module").value;if(CAL.pview=='shared'){user_name=cell.parentNode.parentNode.parentNode.getAttribute("user_name");user_id=cell.parentNode.parentNode.parentNode.getAttribute("user_id");CAL.GR_update_user(user_id);}else{user_id=CAL.current_user_id;user_name=CAL.current_user_name;CAL.GR_update_user(CAL.current_user_id);} +CAL.get("record").value="";CAL.get("current_module").value=res.module_name;var mod_name=res.module_name;if(res.edit==1){CAL.record_editable=true;}else{CAL.record_editable=false;} +CAL.get("title-cal-edit").innerHTML=CAL.lbl_create_new;SugarWidgetScheduler.update_time();setTimeout(function(){enableQS(false);disableOnUnloadEditView();},500);ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_loading);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_loading);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=QuickEdit&sugar_body_only=true";var data={"current_module":params.module_name,"assigned_user_id":params.user_id,"assigned_user_name":params.user_name,"date_start":params.date_start,"duration_hours":1,"duration_minutes":0};YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));} +CAL.dialog_create=function(cell){var e,user_id,user_name;CAL.get("title-cal-edit").innerHTML=CAL.lbl_loading;CAL.open_edit_dialog();CAL.get("btn-delete").setAttribute("disabled","disabled");var module_name=CAL.get("current_module").value;if(CAL.view=='shared'){user_name=cell.parentNode.parentNode.parentNode.getAttribute("user_name");user_id=cell.parentNode.parentNode.parentNode.getAttribute("user_id");CAL.GR_update_user(user_id);}else{user_id=CAL.current_user_id;user_name=CAL.current_user_name;CAL.GR_update_user(CAL.current_user_id);} var params={'module_name':module_name,'user_id':user_id,'user_name':user_name,'date_start':cell.getAttribute("datetime")};CAL.current_params=params;CAL.load_create_form(CAL.current_params);} -CAL.dialog_save=function(){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));CAL.get("title-record_dialog").innerHTML=CAL.lbl_saving;CAL.fill_invitees();var callback={success:function(o){res=eval('('+o.responseText+')');if(res.success=='yes'){CAL.add_items(res);CAL.recordDialog.cancel();CAL.update_vcal();ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=AjaxSave&sugar_body_only=true";YAHOO.util.Connect.setForm(CAL.get("CalendarEditView"));YAHOO.util.Connect.asyncRequest('POST',url,callback,false);} -CAL.dialog_apply=function(){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));CAL.get("title-record_dialog").innerHTML=CAL.lbl_saving;CAL.fill_invitees();var e;if(e=CAL.get("radio_call")) +CAL.dialog_save=function(){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));CAL.get("title-cal-edit").innerHTML=CAL.lbl_saving;CAL.fill_invitees();var callback={success:function(o){res=eval('('+o.responseText+')');if(res.success=='yes'){CAL.add_item(res);CAL.editDialog.cancel();CAL.update_vcal();ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=SaveActivity&sugar_body_only=true";YAHOO.util.Connect.setForm(CAL.get("CalendarEditView"));YAHOO.util.Connect.asyncRequest('POST',url,callback,false);} +CAL.dialog_apply=function(){ajaxStatus.showStatus(SUGAR.language.get('app_strings','LBL_SAVING'));CAL.get("title-cal-edit").innerHTML=CAL.lbl_saving;CAL.fill_invitees();var e;if(e=CAL.get("radio_call")) e.setAttribute("disabled","disabled");if(e=CAL.get("radio_meeting")) -e.setAttribute("disabled","disabled");CAL.get("btn_apply").setAttribute("disabled","disabled");var callback={success:function(o){res=eval('('+o.responseText+')');if(res.success=='yes'){var e;CAL.get("record").value=res.record;CAL.add_items(res);CAL.update_vcal();CAL.get("title-record_dialog").innerHTML=CAL.lbl_edit;if(e=CAL.get("send_invites")) -e.removeAttribute("checked");ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=AjaxSave&sugar_body_only=true";YAHOO.util.Connect.setForm(CAL.get("CalendarEditView"));YAHOO.util.Connect.asyncRequest('POST',url,callback,false);} +e.setAttribute("disabled","disabled");CAL.get("btn-apply").setAttribute("disabled","disabled");var callback={success:function(o){res=eval('('+o.responseText+')');if(res.success=='yes'){var e;CAL.get("record").value=res.record;CAL.add_item(res);CAL.update_vcal();CAL.get("title-cal-edit").innerHTML=CAL.lbl_edit;if(e=CAL.get("send_invites")) +e.removeAttribute("checked");ajaxStatus.hideStatus();}else{alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}},failure:function(){alert(CAL.lbl_error_saving);ajaxStatus.hideStatus();}};var url="index.php?module=Calendar&action=SaveActivity&sugar_body_only=true";YAHOO.util.Connect.setForm(CAL.get("CalendarEditView"));YAHOO.util.Connect.asyncRequest('POST',url,callback,false);} CAL.dialog_remove=function(){CAL.deleted_id=CAL.get("record").value;CAL.deleted_module=CAL.get("current_module").value;var delete_recurring=false;var callback={success:function(o){res=eval('('+o.responseText+')');var e,cell_id;if(e=CAL.get(CAL.deleted_id)) -cell_id=e.parentNode.id;if(CAL.pview=='shared') -CAL.removeSharedById(CAL.deleted_id);if(e=CAL.get(CAL.deleted_id)) -e.parentNode.removeChild(e);CAL.align_divs(cell_id);},failure:function(){alert(CAL.lbl_error_saving);}};var data={"current_module":CAL.deleted_module,"record":CAL.deleted_id,"delete_recurring":delete_recurring};var url="index.php?module=Calendar&action=AjaxRemove&sugar_body_only=true";YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));CAL.recordDialog.cancel();} -CAL.show_additional_details=function(d_id){var obj=CAL.get(d_id);var record=obj.getAttribute("record");mod=obj.getAttribute("module_name");var atype=CAL.act_types[mod];var subj=obj.getAttribute("subj");var date_start=obj.getAttribute("date_start");var duration=obj.getAttribute("dur");var desc=obj.getAttribute("desc");var detailview=parseInt(obj.getAttribute("detailview"));var editview=parseInt(obj.getAttribute("editview"));var related="";if(obj.getAttribute("parent_id")!='') +cell_id=e.parentNode.id;if(CAL.view=='shared') +CAL.remove_shared(CAL.deleted_id);if(e=CAL.get(CAL.deleted_id)) +e.parentNode.removeChild(e);CAL.arrange_slot(cell_id);},failure:function(){alert(CAL.lbl_error_saving);}};var data={"current_module":CAL.deleted_module,"record":CAL.deleted_id,"delete_recurring":delete_recurring};var url="index.php?module=Calendar&action=Remove&sugar_body_only=true";YAHOO.util.Connect.asyncRequest('POST',url,callback,CAL.toURI(data));CAL.editDialog.cancel();} +CAL.show_additional_details=function(id){var obj=CAL.get(id);var record=obj.getAttribute("record");mod=obj.getAttribute("module_name");var atype=CAL.act_types[mod];var subj=obj.getAttribute("subj");var date_start=obj.getAttribute("date_start");var duration=obj.getAttribute("dur");var desc=obj.getAttribute("desc");var detail=parseInt(obj.getAttribute("detail"));var edit=parseInt(obj.getAttribute("edit"));var related="";if(obj.getAttribute("parent_id")!='') related="<b>"+CAL.lbl_related+":</b> <a href='index.php?module="+obj.getAttribute("parent_type")+"&action=DetailView&record="+obj.getAttribute("parent_id")+"'>"+obj.getAttribute("parent_name")+"</a>"+"<br>";if(desc!='') desc='<b>'+CAL.lbl_desc+':</b><br> '+desc+'<br>';if(subj=='') -return"";var date_lbl=CAL.lbl_start_t;var duration_text='<b>'+CAL.lbl_duration+':</b> '+duration+'<br>';if(mod=="Tasks"){date_lbl=CAL.lbl_due_t;duration_text="";} -var caption="<div style='float: left;'>"+CAL.lbl_title+"</div><div style='float: right;'>";if(editview){caption+="<a title=\'"+SUGAR.language.get('app_strings','LBL_EDIT_BUTTON')+"\' href=\'index.php?module="+mod+"&action=EditView&record="+record+"\'><img border=0 src=\'"+CAL.img_edit_inline+"\'></a>";} -if(detailview){caption+="<a title=\'"+SUGAR.language.get('app_strings','LBL_VIEW_BUTTON')+"\' href=\'index.php?module="+mod+"&action=DetailView&record="+record+"\'><img border=0 style=\'margin-left:2px;\' src=\'"+CAL.img_view_inline+"\'></a>";} +return"";var date_lbl=CAL.lbl_start;if(duration!=""){var duration_text='<b>'+CAL.lbl_duration+':</b> '+duration+'<br>';if(mod=="Tasks"){date_lbl=CAL.lbl_due;duration_text="";}}else +duration_text="";var caption="<div style='float: left;'>"+CAL.lbl_title+"</div><div style='float: right;'>";if(edit){caption+="<a title=\'"+SUGAR.language.get('app_strings','LBL_EDIT_BUTTON')+"\' href=\'index.php?module="+mod+"&action=EditView&record="+record+"\'><img border=0 src=\'"+CAL.img_edit_inline+"\'></a>";} +if(detail){caption+="<a title=\'"+SUGAR.language.get('app_strings','LBL_VIEW_BUTTON')+"\' href=\'index.php?module="+mod+"&action=DetailView&record="+record+"\'><img border=0 style=\'margin-left:2px;\' src=\'"+CAL.img_view_inline+"\'></a>";} caption+="<a title=\'"+SUGAR.language.get('app_strings','LBL_ADDITIONAL_DETAILS_CLOSE_TITLE')+"\' href=\'javascript:return cClick();\' onclick=\'javascript:return cClick();\'><img border=0 style=\'margin-left:2px;margin-right:2px;\' src=\'"+CAL.img_close+"\'></a></div>";var body='<b>'+CAL.lbl_name+':</b> '+subj+' <br><b>'+date_lbl+':</b> '+date_start+'<br>'+duration_text+related+desc;return overlib(body,CAPTION,caption,DELAY,200,STICKY,MOUSEOFF,200,WIDTH,300,CLOSETEXT,'',CLOSETITLE,SUGAR.language.get('app_strings','LBL_ADDITIONAL_DETAILS_CLOSE_TITLE'),CLOSECLICK,FGCLASS,'olFgClass',CGCLASS,'olCgClass',BGCLASS,'olBgClass',TEXTFONTCLASS,'olFontClass',CAPTIONFONTCLASS,'olCapFontClass ecCapFontClass',CLOSEFONTCLASS,'olCloseFontClass');} -CAL.toggleDisplay=function(id){if(document.getElementById(id).style.display=='none'){document.getElementById(id).style.display='inline' +CAL.toggle_shared_edit=function(id){if(document.getElementById(id).style.display=='none'){document.getElementById(id).style.display='inline' if(document.getElementById(id+"link")!=undefined){document.getElementById(id+"link").style.display='none';}}else{document.getElementById(id).style.display='none' if(document.getElementById(id+"link")!=undefined){document.getElementById(id+"link").style.display='inline';}}} -CAL.goto_date_call=function(){var date_string=CAL.get("goto_date").value;var date_arr=[];date_arr=date_string.split("/");window.location.href="index.php?module=Calendar&view="+CAL.pview+"&day="+date_arr[1]+"&month="+date_arr[0]+"&year="+date_arr[2];} +CAL.goto_date_call=function(){var date_string=CAL.get("goto_date").value;var date_arr=[];date_arr=date_string.split("/");window.location.href="index.php?module=Calendar&view="+CAL.view+"&day="+date_arr[1]+"&month="+date_arr[0]+"&year="+date_arr[2];} CAL.toURI=function(a){t=[];for(x in a){if(!(a[x].constructor.toString().indexOf('Array')==-1)){for(i in a[x]) t.push(x+"[]="+encodeURIComponent(a[x][i]));}else t.push(x+"="+encodeURIComponent(a[x]));} @@ -147,14 +146,11 @@ return t.join("&");} CAL.each=function(object,callback){if(typeof object=="undefined") return;var name,i=0,length=object.length,isObj=(length===undefined)||(typeof(object)==="function");if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(;i<length;){if(callback.call(object[i],i,object[i++])===false){break;}}} return object;} -CAL.getStyle=function(oElm,strCssRule){var strValue="";if(document.defaultView&&document.defaultView.getComputedStyle){strValue=document.defaultView.getComputedStyle(oElm,"").getPropertyValue(strCssRule);} -else if(oElm.currentStyle){strCssRule=strCssRule.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase();});strValue=oElm.currentStyle[strCssRule];} -return strValue;} CAL.update_vcal=function(){var v=CAL.current_user_id;var callback={success:function(result){if(typeof GLOBAL_REGISTRY.freebusy=='undefined'){GLOBAL_REGISTRY.freebusy=new Object();} if(typeof GLOBAL_REGISTRY.freebusy_adjusted=='undefined'){GLOBAL_REGISTRY.freebusy_adjusted=new Object();} GLOBAL_REGISTRY.freebusy[v]=SugarVCalClient.parseResults(result.responseText,false);GLOBAL_REGISTRY.freebusy_adjusted[v]=SugarVCalClient.parseResults(result.responseText,true);SugarWidgetScheduler.update_time();}};var url="vcal_server.php?type=vfb&source=outlook&user_id="+v;YAHOO.util.Connect.asyncRequest('GET',url,callback,false);} -CAL.fit_grid=function(){var day_width;var cal_width=document.getElementById("cal-grid").parentNode.offsetWidth;if(CAL.pview=="day") -day_width=parseInt((cal_width-80));else -day_width=parseInt((cal_width-80)/ 7);var nodes=CAL.query("#cal-grid div.day_col");CAL.each(nodes,function(i,v){nodes[i].style.width=day_width+"px";});document.getElementById("cal-grid").style.visibility="";} +CAL.fit_grid=function(){var day_width;var cal_width=document.getElementById("cal-grid").parentNode.parentNode.offsetWidth;var left_width=80;if(CAL.view=="day") +day_width=parseInt((cal_width-left_width));else +day_width=parseInt((cal_width-left_width)/ 7);var nodes=CAL.query("#cal-grid div.day_col");CAL.each(nodes,function(i,v){nodes[i].style.width=day_width+"px";});document.getElementById("cal-grid").style.visibility="";} YAHOO.util.DDCAL=function(id,sGroup,config){this.cont=config.cont;YAHOO.util.DDCAL.superclass.constructor.apply(this,arguments);} -YAHOO.extend(YAHOO.util.DDCAL,YAHOO.util.DD,{cont:null,init:function(){YAHOO.util.DDCAL.superclass.init.apply(this,arguments);this.initConstraints();YAHOO.util.Event.on(window,'resize',function(){this.initConstraints();},this,true);},initConstraints:function(){var region=YAHOO.util.Dom.getRegion(this.cont);var el=this.getEl();var xy=YAHOO.util.Dom.getXY(el);var width=parseInt(YAHOO.util.Dom.getStyle(el,'width'),10);var height=parseInt(YAHOO.util.Dom.getStyle(el,'height'),10);var left=xy[0]-region.left;var right=region.right-xy[0]-width;var top=xy[1]-region.top;var bottom=region.bottom-xy[1]-height;this.setXConstraint(left,right);this.setYConstraint(top,bottom);}});CAL.remove_record_dialog();var cal_loaded=true; +YAHOO.extend(YAHOO.util.DDCAL,YAHOO.util.DD,{cont:null,init:function(){YAHOO.util.DDCAL.superclass.init.apply(this,arguments);this.initConstraints();YAHOO.util.Event.on(window,'resize',function(){this.initConstraints();},this,true);},initConstraints:function(){var region=YAHOO.util.Dom.getRegion(this.cont);var el=this.getEl();var xy=YAHOO.util.Dom.getXY(el);var width=parseInt(YAHOO.util.Dom.getStyle(el,'width'),10);var height=parseInt(YAHOO.util.Dom.getStyle(el,'height'),10);var left=xy[0]-region.left;var right=region.right-xy[0]-width;var top=xy[1]-region.top;var bottom=region.bottom-xy[1]-height;this.setXConstraint(left,right);this.setYConstraint(top,bottom);}});CAL.remove_edit_dialog();var cal_loaded=true; diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php index 44efef9f..edce2e0b 100644 --- a/modules/Calendar/Calendar.php +++ b/modules/Calendar/Calendar.php @@ -46,26 +46,31 @@ require_once('modules/Calendar/CalendarActivity.php'); class Calendar { - var $view = 'week'; // current view - var $dashlet = false; // if is displayed in dashlet - var $date_time; // current date + public $view = 'week'; // current view + public $dashlet = false; // if is displayed in dashlet + public $date_time; // current date - var $show_tasks = true; - var $show_calls = true; - var $day_start_time; // working day start time in format '11:00' - var $day_end_time; // working day end time in format '11:00' + public $show_tasks = true; + public $show_calls = true; - var $time_step = 60; // time step of each slot in minutes + public $time_step = 60; // time step of each slot in minutes - var $acts_arr = array(); // Array of activities objects - var $ActRecords = array(); // Array of activities data to be displayed - var $shared_ids = array(); // ids of users for shared view + public $acts_arr = array(); // Array of activities objects + public $items = array(); // Array of activities data to be displayed + public $shared_ids = array(); // ids of users for shared view - var $celcount; // working day count of slots - var $cells_per_day; // entire 24h day count of slots - var $d_start_minutes; // working day start minutes - var $d_end_minutes; // working day end minutes + public $cells_per_day; // entire 24h day count of slots + public $grid_start_ts; // start timestamp of calendar grid + public $day_start_time; // working day start time in format '11:00' + public $day_end_time; // working day end time in format '11:00' + public $celcount; // count of slots in a working day + + /** + * constructor + * @param string $view + * @param array $time_arr + */ function __construct($view = "day", $time_arr = array()){ global $current_user, $timedate; @@ -126,6 +131,7 @@ class Calendar { if(is_null($this->show_calls)) $this->show_calls = SugarConfig::getInstance()->get('calendar.show_calls_by_default',true); + $this->day_start_time = $current_user->getPreference('day_start_time'); if(is_null($this->day_start_time)) $this->day_start_time = SugarConfig::getInstance()->get('calendar.default_day_start',"08:00"); @@ -142,52 +148,54 @@ class Calendar { }else{ $this->time_step = 60; } - + $this->cells_per_day = 24 * (60 / $this->time_step); + $this->calculate_grid_start_ts(); + $this->calculate_day_range(); } /** - * Loads activities data to array + * Load activities data to array */ - function load_activities(){ + public function load_activities(){ $field_list = CalendarUtils::get_fields(); foreach($this->acts_arr as $user_id => $acts){ foreach($acts as $act){ - $newAct = array(); - $newAct['module_name'] = $act->sugar_bean->module_dir; - $newAct['type'] = strtolower($act->sugar_bean->object_name); - $newAct['user_id'] = $user_id; - $newAct['assigned_user_id'] = $act->sugar_bean->assigned_user_id; - $newAct['id'] = $act->sugar_bean->id; - $newAct['name'] = $act->sugar_bean->name; - $newAct['status'] = $act->sugar_bean->status; + $item = array(); + $item['user_id'] = $user_id; + $item['module_name'] = $act->sugar_bean->module_dir; + $item['type'] = strtolower($act->sugar_bean->object_name); + $item['assigned_user_id'] = $act->sugar_bean->assigned_user_id; + $item['id'] = $act->sugar_bean->id; + $item['name'] = $act->sugar_bean->name; + $item['status'] = $act->sugar_bean->status; if(isset($act->sugar_bean->duration_hours)){ - $newAct['duration_hours'] = $act->sugar_bean->duration_hours; - $newAct['duration_minutes'] = $act->sugar_bean->duration_minutes; + $item['duration_hours'] = $act->sugar_bean->duration_hours; + $item['duration_minutes'] = $act->sugar_bean->duration_minutes; } - $newAct['detailview'] = 0; - $newAct['editview'] = 0; + $item['detail'] = 0; + $item['edit'] = 0; if($act->sugar_bean->ACLAccess('DetailView')) - $newAct['detailview'] = 1; + $item['detail'] = 1; if($act->sugar_bean->ACLAccess('Save')) - $newAct['editview'] = 1; + $item['edit'] = 1; if(empty($act->sugar_bean->id)){ - $newAct['detailview'] = 0; - $newAct['editview'] = 0; + $item['detail'] = 0; + $item['edit'] = 0; } - if($newAct['detailview'] == 1){ - if(isset($field_list[$newAct['module_name']])){ - foreach($field_list[$newAct['module_name']] as $field){ - if(!isset($newAct[$field])){ - $newAct[$field] = $act->sugar_bean->$field; + if($item['detail'] == 1){ + if(isset($field_list[$item['module_name']])){ + foreach($field_list[$item['module_name']] as $field){ + if(!isset($item[$field])){ + $item[$field] = $act->sugar_bean->$field; if($act->sugar_bean->field_defs[$field]['type'] == 'text'){ - $t = $newAct[$field]; + $t = $item[$field]; if(strlen($t) > 300){ $t = substr($t, 0, 300); $t .= "..."; @@ -195,29 +203,21 @@ class Calendar { $t = str_replace("\r\n","<br>",$t); $t = str_replace("\r","<br>",$t); $t = str_replace("\n","<br>",$t); - $newAct[$field] = $t; + $item[$field] = $t; } } } } - } - - $date_field = "date_start"; - if($newAct['type'] == 'task') - $date_field = "date_due"; - - - $timestamp = SugarDateTime::createFromFormat($GLOBALS['timedate']->get_date_time_format(),$act->sugar_bean->$date_field,new DateTimeZone('UTC'))->format('U'); - - $newAct['timestamp'] = $timestamp; - $newAct['time_start'] = $GLOBALS['timedate']->fromTimestamp($newAct['timestamp'])->format($GLOBALS['timedate']->get_time_format()); + } - if(!isset($newAct['duration_hours']) || empty($newAct['duration_hours'])) - $newAct['duration_hours'] = 0; - if(!isset($newAct['duration_minutes']) || empty($newAct['duration_minutes'])) - $newAct['duration_minutes'] = 0; + if(!isset($item['duration_hours']) || empty($item['duration_hours'])) + $item['duration_hours'] = 0; + if(!isset($item['duration_minutes']) || empty($item['duration_minutes'])) + $item['duration_minutes'] = 0; + + $item = array_merge($item,CalendarUtils::get_time_data($act->sugar_bean)); - $this->ActRecords[] = $newAct; + $this->items[] = $item; } } } @@ -226,11 +226,11 @@ class Calendar { * Get javascript objects of activities to be displayed on calendar * @return string */ - function get_activities_js(){ + public function get_activities_js(){ $field_list = CalendarUtils::get_fields(); $a_str = ""; $ft = true; - foreach($this->ActRecords as $act){ + foreach($this->items as $act){ if(!$ft) $a_str .= ","; $a_str .= "{"; @@ -250,8 +250,8 @@ class Calendar { '; } $a_str .= ' - "detailview" : "'.$act["detailview"].'", - "editview" : "'.$act["editview"].'" + "detail" : "'.$act["detail"].'", + "edit" : "'.$act["edit"].'" '; $a_str .= "}"; $ft = false; @@ -262,7 +262,7 @@ class Calendar { /** * initialize ids of shared users */ - function init_shared(){ + public function init_shared(){ global $current_user; $user_ids = $current_user->getPreference('shared_ids'); if(!empty($user_ids) && count($user_ids) != 0 && !isset($_REQUEST['shared_ids'])) { @@ -276,7 +276,25 @@ class Calendar { } /** - * calculatess count of timeslots per visible day, calculates day start and day end in minutes + * Calculate timestamp the calendar grid should be started from + */ + protected function calculate_grid_start_ts(){ + + if($this->view == "week" || $this->view == "shared"){ + $week_start = CalendarUtils::get_first_day_of_week($this->date_time); + $this->grid_start_ts = $week_start->format('U') + $week_start->getOffset(); + }else if($this->view == "month"){ + $month_start = $this->date_time->get_day_by_index_this_month(0); + $week_start = CalendarUtils::get_first_day_of_week($month_start); + $this->grid_start_ts = $week_start->format('U') + $week_start->getOffset(); // convert to timestamp, ignore tz + }else if($this->view == "day"){ + $this->grid_start_ts = $this->date_time->format('U') + $this->date_time->getOffset(); + }else + $this->grid_start_ts = 0; + } + + /** + * calculate count of timeslots per visible day, calculates day start and day end in minutes */ function calculate_day_range(){ @@ -294,15 +312,14 @@ class Calendar { $this->celcount++; } } - $this->cells_per_day = 24 * (60 / $this->time_step); - } + } /** * loads array of objects * @param User $user user object * @param string $type */ - function add_activities($user,$type='sugar'){ + public function add_activities($user,$type='sugar'){ global $timedate; $start_date_time = $this->date_time; if($this->view == 'week' || $this->view == 'shared'){ @@ -316,7 +333,7 @@ class Calendar { }else{ $end_date_time = $this->date_time->get("+1 day"); } - + $acts_arr = array(); if($type == 'vfb'){ $acts_arr = CalendarActivity::get_freebusy_activities($user, $start_date_time, $end_date_time); @@ -332,7 +349,7 @@ class Calendar { * @param string $direction next or previous * @return string */ - function get_neighbor_date_str($direction){ + public function get_neighbor_date_str($direction){ if($direction == "previous") $sign = "-"; else diff --git a/modules/Calendar/CalendarDisplay.php b/modules/Calendar/CalendarDisplay.php index 4cb1d302..e8808c37 100644 --- a/modules/Calendar/CalendarDisplay.php +++ b/modules/Calendar/CalendarDisplay.php @@ -40,8 +40,10 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class CalendarDisplay { - // colors of items on calendar - var $activity_colors = array( + /** + * colors of items on calendar + */ + public $activity_colors = array( 'Meetings' => array( 'border' => '#1C5FBD', 'body' => '#D2E5FC', @@ -55,55 +57,62 @@ class CalendarDisplay { 'body' => '#B1F5AE', ), ); - - function __construct(&$args){ - $this->args = &$args; + + /** + * constructor + * @param Calendar $cal + * @param string $dashlet_id for dashlet mode + */ + function __construct(&$cal,$dashlet_id = ""){ + $this->cal = &$cal; + $this->dashlet_id = $dashlet_id; } /** - * main display function of Calendar + * main displaying function of Calendar */ - function display(){ + public function display(){ global $timedate; - $args = &$this->args; + $cal = &$this->cal; $ss = new Sugar_Smarty(); $ss->assign('APP',$GLOBALS['app_strings']); $ss->assign('APPLIST',$GLOBALS['app_list_strings']); $ss->assign('MOD',$GLOBALS['cal_strings']); - - $ss->assign('pview',$args['cal']->view); - $ss->assign('t_step',$args['cal']->time_step); + + $ss->assign('view',$cal->view); + $ss->assign('t_step',$cal->time_step); $ss->assign('current_user_id',$GLOBALS['current_user']->id); $ss->assign('current_user_name',$GLOBALS['current_user']->name); $ss->assign('time_format',$GLOBALS['timedate']->get_user_time_format()); - $ss->assign('items_draggable',SugarConfig::getInstance()->get('calendar.items_draggable',true)); - $ss->assign('item_text',SugarConfig::getInstance()->get('calendar.item_text','name')); + $ss->assign('items_draggable',SugarConfig::getInstance()->get('calendar.items_draggable',true)); $ss->assign('mouseover_expand',SugarConfig::getInstance()->get('calendar.mouseover_expand',true)); - $ss->assign('cells_per_day',$args['cal']->cells_per_day); - $ss->assign('celcount',$args['cal']->celcount); + $ss->assign('item_text','name'); + $ss->assign('cells_per_day',$cal->cells_per_day); $ss->assign('img_edit_inline',SugarThemeRegistry::current()->getImageURL('edit_inline.gif',false)); $ss->assign('img_view_inline',SugarThemeRegistry::current()->getImageURL('view_inline.gif',false)); $ss->assign('img_close',SugarThemeRegistry::current()->getImageURL('close.gif',false)); - $ss->assign('dashlet',$args['cal']->dashlet); - + $ss->assign('dashlet',$cal->dashlet); + + $ss->assign('grid_start_ts',$cal->grid_start_ts); + $ss->assign('celcount',$cal->celcount); - if(count($args['cal']->shared_ids)){ - $ss->assign('shared_ids',$args['cal']->shared_ids); - $ss->assign('shared_users_count',count($args['cal']->shared_ids)); + if(count($cal->shared_ids)){ + $ss->assign('shared_ids',$cal->shared_ids); + $ss->assign('shared_users_count',count($cal->shared_ids)); } $ss->assign('activity_colors',$this->activity_colors); $scroll_hour = 5; - if($args['cal']->time_step < 30) + if($cal->time_step < 30) $scroll_hour = 8; - $ss->assign('scroll_slot',intval(60 / $args['cal']->time_step) * $scroll_hour); + $ss->assign('scroll_slot',intval(60 / $cal->time_step) * $scroll_hour); $ss->assign('editview_width',SugarConfig::getInstance()->get('calendar.editview_width',800)); $ss->assign('editview_height',SugarConfig::getInstance()->get('calendar.editview_height',600)); - $ss->assign('a_str',$args['cal']->get_activities_js()); + $ss->assign('a_str',$cal->get_activities_js()); $ss->assign('sugar_body_only',(isset($_REQUEST['to_pdf']) && $_REQUEST['to_pdf'] || isset($_REQUEST['sugar_body_only']) && $_REQUEST['sugar_body_only'])); require_once('include/json_config.php'); @@ -111,12 +120,11 @@ class CalendarDisplay { $json = getJSONobj(); $json_config = new json_config(); $ss->assign('GRjavascript',$json_config->get_static_json_server(false, true, 'Meetings')); - $ss->assign('hide_whole_day',$args['cal']->celcount == $args['cal']->cells_per_day); - // details + // form $user_default_date_start = $timedate->asUser($timedate->getNow()); $ss->assign('user_default_date_start',$user_default_date_start); - // end details + // end form if($_REQUEST['module'] == "Calendar"){ $this->load_settings_template($ss); @@ -129,17 +137,16 @@ class CalendarDisplay { $main = "custom/modules/Calendar/tpls/main.tpl"; if(!file_exists($main)) $main = "modules/Calendar/tpls/main.tpl"; - $details = "custom/modules/Calendar/tpls/details.tpl"; - if(!file_exists($details)) - $details = "modules/Calendar/tpls/details.tpl"; - + $form_tpl = "custom/modules/Calendar/tpls/form.tpl"; + if(!file_exists($form_tpl)) + $form_tpl = "modules/Calendar/tpls/form.tpl"; - $ss->assign("details",$details); + $ss->assign("form",$form_tpl); echo $ss->fetch($main); // drid - $grid = new CalendarGrid($args); + $grid = new CalendarGrid($cal); echo $grid->display(); // end grid } @@ -147,15 +154,15 @@ class CalendarDisplay { /** * load settings popup template */ - function load_settings_template(&$ss){ + protected function load_settings_template(&$ss){ - list($d_start_hour,$d_start_min) = explode(":",$this->args['cal']->day_start_time); - list($d_end_hour,$d_end_min) = explode(":",$this->args['cal']->day_end_time); + list($d_start_hour,$d_start_min) = explode(":",$this->cal->day_start_time); + list($d_end_hour,$d_end_min) = explode(":",$this->cal->day_end_time); require_once("include/utils.php"); global $app_strings,$app_list_strings,$beanList; global $timedate; - + $user_default_date_start = $timedate->asUser($timedate->getNow()); if(!isset($time_separator)) $time_separator = ":"; @@ -208,8 +215,8 @@ class CalendarDisplay { $options = strpos($time_pref, 'a') ? $app_list_strings['dom_meridiem_lowercase'] : $app_list_strings['dom_meridiem_uppercase']; $TIME_MERIDIEM1 = get_select_options_with_id($options, $start_m); $TIME_MERIDIEM2 = get_select_options_with_id($options, $end_m); - $TIME_MERIDIEM1 = "<select id='d_start_meridiem' name='d_start_meridiem' tabindex='2'>".$TIME_MERIDIEM1."</select>"; - $TIME_MERIDIEM2 = "<select id='d_end_meridiem' name='d_end_meridiem' tabindex='2'>".$TIME_MERIDIEM2."</select>"; + $TIME_MERIDIEM1 = "<select id='day_start_meridiem' name='day_start_meridiem' tabindex='2'>".$TIME_MERIDIEM1."</select>"; + $TIME_MERIDIEM2 = "<select id='day_end_meridiem' name='day_end_meridiem' tabindex='2'>".$TIME_MERIDIEM2."</select>"; }else{ $TIME_MERIDIEM1 = $TIME_MERIDIEM2 = ""; } @@ -234,12 +241,15 @@ class CalendarDisplay { $ss->assign('TIME_START_HOUR_OPTIONS2',$TIME_START_HOUR_OPTIONS2); $ss->assign('TIME_START_MINUTES_OPTIONS2',$TIME_START_MINUTES_OPTIONS2); $ss->assign('TIME_MERIDIEM2',$TIME_MERIDIEM2); - $ss->assign('show_calls',$this->args['cal']->show_calls); - $ss->assign('show_tasks',$this->args['cal']->show_tasks); + $ss->assign('show_calls',$this->cal->show_calls); + $ss->assign('show_tasks',$this->cal->show_tasks); } - // returns date info string (legacy of old calendar) - function get_date_info($view, $date_time){ + /** + * Get date info string (legacy from old calendar) + * @return string + */ + public function get_date_info($view, $date_time){ $str = ""; global $current_user; @@ -314,55 +324,61 @@ class CalendarDisplay { return $str; } - // Get link to next date range - function get_next_calendar(){ + /** + * Get link to next date range + * @return string + */ + protected function get_next_calendar(){ global $cal_strings,$image_path; $str = ""; if($_REQUEST['module'] == "Calendar"){ - $str .= "<a href='".ajaxLink("index.php?action=index&module=Calendar&view=".$this->args['cal']->view."&".$this->args['cal']->get_neighbor_date_str("next"))."'>"; + $str .= "<a href='".ajaxLink("index.php?action=index&module=Calendar&view=".$this->cal->view."&".$this->cal->get_neighbor_date_str("next"))."'>"; }else{ - $str .= "<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet(\"".$this->args['dashlet_id']."\", \"index.php?module=Home&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&".$this->args['cal']->get_neighbor_date_str("next")."&id=".$this->args['dashlet_id']."\")'>"; + $str .= "<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet(\"".$this->dashlet_id."\", \"index.php?module=Home&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&".$this->cal->get_neighbor_date_str("next")."&id=".$this->dashlet_id."\")'>"; } - $str .= $cal_strings["LBL_NEXT_".strtoupper($this->args['cal']->view)]; + $str .= $cal_strings["LBL_NEXT_".strtoupper($this->cal->view)]; $str .= "  ".SugarThemeRegistry::current()->getImage("calendar_next", 'align="absmiddle" border="0"' ,null,null,'.gif', '') . "</a>"; //setting alt tag blank on purpose for 508 compliance return $str; } - // Get link to previous date range - function get_previous_calendar(){ + /** + * Get link to previous date range + * @return string + */ + protected function get_previous_calendar(){ global $cal_strings,$image_path; $str = ""; if($_REQUEST['module'] == "Calendar"){ - $str .= "<a href='".ajaxLink("index.php?action=index&module=Calendar&view=".$this->args['cal']->view."&".$this->args['cal']->get_neighbor_date_str("previous")."")."'>"; + $str .= "<a href='".ajaxLink("index.php?action=index&module=Calendar&view=".$this->cal->view."&".$this->cal->get_neighbor_date_str("previous")."")."'>"; }else{ - $str .= "<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet(\"".$this->args['dashlet_id']."\", \"index.php?module=Home&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&".$this->args['cal']->get_neighbor_date_str("previous")."&id=".$this->args['dashlet_id']."\")'>"; + $str .= "<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet(\"".$this->dashlet_id."\", \"index.php?module=Home&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&".$this->cal->get_neighbor_date_str("previous")."&id=".$this->dashlet_id."\")'>"; } $str .= SugarThemeRegistry::current()->getImage('calendar_previous','align="absmiddle" border="0"', null, null, '.gif', ''); //setting alt tag blank on purpose for 508 compliance - $str .= "  ".$cal_strings["LBL_PREVIOUS_".strtoupper($this->args['cal']->view)] . "</a>"; + $str .= "  ".$cal_strings["LBL_PREVIOUS_".strtoupper($this->cal->view)] . "</a>"; return $str; } /** - * displays header - * @params boolean $controls display ui contol itmes + * display header + * @param boolean $controls display ui contol itmes */ - function display_calendar_header($controls = true){ + public function display_calendar_header($controls = true){ global $cal_strings; $ss = new Sugar_Smarty(); $ss->assign("MOD",$cal_strings); - $ss->assign("pview",$this->args['cal']->view); + $ss->assign("view",$this->cal->view); if($controls){ - $current_date = str_pad($this->args['cal']->date_time->month,2,'0',STR_PAD_LEFT)."/".str_pad($this->args['cal']->date_time->day,2,'0',STR_PAD_LEFT)."/".$this->args['cal']->date_time->year; + $current_date = str_pad($this->cal->date_time->month,2,'0',STR_PAD_LEFT)."/".str_pad($this->cal->date_time->day,2,'0',STR_PAD_LEFT)."/".$this->cal->date_time->year; $tabs = array('day', 'week', 'month', 'year', 'shared'); $tabs_params = array(); foreach($tabs as $tab){ $tabs_params[$tab]['title'] = $cal_strings["LBL_".strtoupper($tab)]; - $tabs_params[$tab]['link'] = "window.location.href='".ajaxLink("index.php?module=Calendar&action=index&view=". $tab . $this->args['cal']->date_time->get_date_str())."'"; + $tabs_params[$tab]['link'] = "window.location.href='".ajaxLink("index.php?module=Calendar&action=index&view=". $tab . $this->cal->date_time->get_date_str())."'"; } $ss->assign('controls',$controls); $ss->assign('tabs',$tabs); @@ -375,24 +391,23 @@ class CalendarDisplay { $ss->assign('previous',$this->get_previous_calendar()); $ss->assign('next',$this->get_next_calendar()); - $ss->assign('date_info',$this->get_date_info($this->args['view'],$this->args['cal']->date_time)); + $ss->assign('date_info',$this->get_date_info($this->cal->view,$this->cal->date_time)); $header = "custom/modules/Calendar/tpls/header.tpl"; if(!file_exists($header)) $header = "modules/Calendar/tpls/header.tpl"; - echo $ss->fetch($header); - + echo $ss->fetch($header); } /** - * displays footer + * display footer */ - function display_calendar_footer(){ + public function display_calendar_footer(){ global $cal_strings; $ss = new Sugar_Smarty(); $ss->assign("MOD",$cal_strings); - $ss->assign("pview",$this->args['cal']->view); + $ss->assign("view",$this->cal->view); $ss->assign('previous',$this->get_previous_calendar()); $ss->assign('next',$this->get_next_calendar()); @@ -404,108 +419,33 @@ class CalendarDisplay { } /** - * displays title + * display title */ - function display_title(){ + public function display_title(){ global $mod_strings; echo get_module_title("Calendar","<span class='pointer'>»</span>".$mod_strings['LBL_MODULE_TITLE'], false); } /** - * displays html used in shared view (legacy code of old calendar) + * display html used in shared view (legacy code from old calendar) */ - function display_shared_html(){ - global $app_strings,$action; - $tools = '<div align="right"><a href="index.php?module=Calendar&action='.$action.'&view=shared" class="tabFormAdvLink"> <a href="javascript: CAL.toggleDisplay(\'shared_cal_edit\');" class="tabFormAdvLink">'.SugarThemeRegistry::current()->getImage('edit', 'border="0" align="absmiddle"', null, null, '.gif', $GLOBALS['cal_strings']['LBL_EDIT_USERLIST']).' '.$GLOBALS['cal_strings']['LBL_EDIT_USERLIST'].'</a></div>'; - echo get_form_header($GLOBALS['cal_strings']['LBL_SHARED_CAL_TITLE'], $tools, false); + public function display_shared_html(){ + global $app_strings,$cal_strings,$action; + if(empty($_SESSION['shared_ids'])) $_SESSION['shared_ids'] = ""; - - echo " - <script language=\"javascript\"> - function up(name){ - var td = document.getElementById(name+'_td'); - var obj = td.getElementsByTagName('select')[0]; - obj =(typeof obj == \"string\") ? document.getElementById(obj) : obj; - if(obj.tagName.toLowerCase() != \"select\" && obj.length < 2) - return false; - var sel = new Array(); - - for(i=0; i<obj.length; i++) { - if(obj[i].selected == true) { - sel[sel.length] = i; - } - } - for(i in sel) { - if(sel[i] != 0 && !obj[sel[i]-1].selected) { - var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value); - obj[sel[i]-1].text = obj[sel[i]].text; - obj[sel[i]-1].value = obj[sel[i]].value; - obj[sel[i]].text = tmp[0]; - obj[sel[i]].value = tmp[1]; - obj[sel[i]-1].selected = true; - obj[sel[i]].selected = false; - } - } - } - function down(name){ - var td = document.getElementById(name+'_td'); - var obj = td.getElementsByTagName('select')[0]; - if(obj.tagName.toLowerCase() != \"select\" && obj.length < 2) - return false; - var sel = new Array(); - for(i=obj.length-1; i>-1; i--){ - if(obj[i].selected == true) { - sel[sel.length] = i; - } - } - for(i in sel){ - if(sel[i] != obj.length-1 && !obj[sel[i]+1].selected) { - var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value); - obj[sel[i]+1].text = obj[sel[i]].text; - obj[sel[i]+1].value = obj[sel[i]].value; - obj[sel[i]].text = tmp[0]; - obj[sel[i]].value = tmp[1]; - obj[sel[i]+1].selected = true; - obj[sel[i]].selected = false; - } - } - } - </script> + + $ss = new Sugar_Smarty(); + $ss->assign("APP",$app_strings); + $ss->assign("MOD",$cal_strings); + $ss->assign("UP",SugarThemeRegistry::current()->getImage('uparrow_big', 'border="0" style="margin-bottom: 1px;"', null, null, '.gif', $app_strings['LBL_SORT'])); + $ss->assign("DOWN",SugarThemeRegistry::current()->getImage('downarrow_big', 'border="0" style="margin-top: 1px;"', null, null, '.gif', $app_strings['LBL_SORT'])); + $ss->assign("options",get_select_options_with_id(get_user_array(false), $this->cal->shared_ids)); - <div id='shared_cal_edit' style='display: none;'> - <form name='shared_cal' action=\"index.php\" method=\"post\" > - <input type=\"hidden\" name=\"module\" value=\"Calendar\"> - <input type=\"hidden\" name=\"action\" value=\"".$action."\"> - <input type=\"hidden\" name=\"view\" value=\"shared\"> - <input type=\"hidden\" name=\"edit\" value=\"0\"> - <table cellpadding=\"0\" cellspacing=\"3\" border=\"0\" align=\"center\"> - <tr><th valign=\"top\" align=\"center\" colspan=\"2\"> - "; - echo $GLOBALS['cal_strings']['LBL_SELECT_USERS']; - echo " - </th> - </tr> - <tr><td valign=\"top\"></td><td valign=\"top\"> - - <table cellpadding=\"1\" cellspacing=\"1\" border=\"0\" class=\"edit view\" align=\"center\"> - <tr> - <td valign='top' nowrap><b>".$GLOBALS['cal_strings']['LBL_USERS']."</b></td> - <td valign='top' id=\"shared_ids_td\"><select id=\"shared_ids\" name=\"shared_ids[]\" multiple size='8'>"; - echo get_select_options_with_id(get_user_array(false), $this->args['cal']->shared_ids); - echo " </select></td> - <td><a onclick=\"up('shared_ids');\">".SugarThemeRegistry::current()->getImage('uparrow_big', 'border="0" style="margin-bottom: 1px;"', null, null, '.gif', $app_strings['LBL_SORT'])."</a><br> - <a onclick=\"down('shared_ids');\">".SugarThemeRegistry::current()->getImage('downarrow_big', 'border="0" style="margin-top: 1px;"', null, null, '.gif', $app_strings['LBL_SORT'])."</a></td> - </tr> - <tr>"; - echo "<td align=\"right\" colspan=\"2\"><input class=\"button\" type=\"submit\" title=\"".$app_strings['LBL_SELECT_BUTTON_TITLE']."\" accessKey=\"".$app_strings['LBL_SELECT_BUTTON_KEY']."\" value=\"".$app_strings['LBL_SELECT_BUTTON_LABEL']."\" /> <input class=\"button\" onClick=\"javascript: CAL.toggleDisplay('shared_cal_edit');\" type=\"button\" title=\"".$app_strings['LBL_CANCEL_BUTTON_TITLE']."\" accessKey=\"".$app_strings['LBL_CANCEL_BUTTON_KEY']."\" value=\"".$app_strings['LBL_CANCEL_BUTTON_LABEL']."\"/></td> - </tr> - </table> - </td></tr> - </table> - </form> - </div> - "; + $tpl = "modules/Calendar/tpls/shared_users.tpl"; + echo $ss->fetch($tpl); + + return; } } diff --git a/modules/Calendar/CalendarGrid.php b/modules/Calendar/CalendarGrid.php index f4af5ab2..cf00f6d1 100644 --- a/modules/Calendar/CalendarGrid.php +++ b/modules/Calendar/CalendarGrid.php @@ -37,24 +37,26 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); - - global $timedate; class CalendarGrid { - var $args; - var $today_ts; // timestamp of today - var $weekday_names; // string array of names of week days - var $startday; // first day of week - var $scrollable; // srolling in calendar - var $time_step = 30; // time step - var $time_format; // user time format - var $date_time_format; // user date time format + protected $cal; // Calendar object + protected $today_ts; // timestamp of today + protected $weekday_names; // string array of names of week days + protected $startday; // first day of week + protected $scrollable; // srolling in calendar + protected $time_step = 30; // time step + protected $time_format; // user time format + protected $date_time_format; // user date time format - function __construct(&$args){ + /** + * constructor + * @param Calendar $cal + */ + function __construct(&$cal){ global $current_user; - $this->args = &$args; + $this->cal = &$cal; $this->today_ts = $GLOBALS['timedate']->getNow()->get_day_begin()->format('U'); $this->startday = $current_user->get_first_day_of_week(); @@ -70,11 +72,11 @@ class CalendarGrid { $this->weekday_names = $weekday_names; $this->scrollable = false; - if(in_array($this->args['cal']->view,array('day','week'))){ + if(in_array($this->cal->view,array('day','week'))){ $this->scrollable = true; } - $this->time_step = $this->args['cal']->time_step; + $this->time_step = $this->cal->time_step; $this->time_format = $GLOBALS['timedate']->get_time_format(); $this->date_time_format = $GLOBALS['timedate']->get_date_time_format(); @@ -84,8 +86,8 @@ class CalendarGrid { /** Get html of calendar grid * @return string */ - function display(){ - $action = "display_".strtolower($this->args['cal']->view); + public function display(){ + $action = "display_".strtolower($this->cal->view); return $this->$action(); } @@ -93,10 +95,10 @@ class CalendarGrid { * @param integer $start timestamp * @return string */ - function get_time_column($start){ + protected function get_time_column($start){ $str = ""; $head_content = " "; - if($this->args['cal']->view == 'month'){ + if($this->cal->view == 'month'){ if($this->startday == 0) $wf = 1; else @@ -119,7 +121,7 @@ class CalendarGrid { }else{ $class = ""; } - if($this->scrollable || !$this->check_owt($i,$j,$this->args['cal']->d_start_minutes,$this->args['cal']->d_end_minutes)) + if($this->scrollable || !$this->check_owt($i,$j,$this->cal->d_start_minutes,$this->cal->d_end_minutes)) $str .= "<div class='left_cell".$class."'>".$innerText."</div>"; } } @@ -134,7 +136,7 @@ class CalendarGrid { * @param string $prefix prefix for id of timeslot used in shared view * @return string */ - function get_day_column($start,$day = 0,$prefix = ""){ + protected function get_day_column($start,$day = 0,$prefix = ""){ $curr_time = $start; $str = ""; $str .= "<div class='day_col'>"; @@ -147,7 +149,7 @@ class CalendarGrid { }else{ $class = ""; } - if($this->scrollable || !$this->check_owt($i,$j,$this->args['cal']->d_start_minutes,$this->args['cal']->d_end_minutes)) + if($this->scrollable || !$this->check_owt($i,$j,$this->cal->d_start_minutes,$this->cal->d_end_minutes)) $str .= "<div id='t_".$curr_time.$prefix."' class='slot".$class."' time='".$timestr."' datetime='".$GLOBALS['timedate']->fromTimestamp($curr_time)->format($this->date_time_format)."'></div>"; $curr_time += $this->time_step*60; } @@ -163,7 +165,7 @@ class CalendarGrid { * @param bulean $force force display header * @return string */ - function get_day_head($start,$day = 0,$force = false){ + protected function get_day_head($start,$day = 0,$force = false){ $str = ""; if(!$this->scrollable || $force){ $headstyle = ""; @@ -182,7 +184,7 @@ class CalendarGrid { * @param integer $r_end end of working day in minutes * @return boolean */ - function check_owt($i,$j,$r_start,$r_end){ + protected function check_owt($i,$j,$r_start,$r_end){ if($i*60+$j < $r_start || $i*60+$j >= $r_end) return true; } @@ -191,9 +193,9 @@ class CalendarGrid { * Get html of week calendar grid * @return string */ - function display_week(){ + protected function display_week(){ - $current_date = $this->args['cal']->date_time; + $current_date = $this->cal->date_time; $week_start = CalendarUtils::get_first_day_of_week($current_date); $week_start_ts = $week_start->format('U') + $week_start->getOffset(); // convert to timestamp, ignore tz @@ -233,9 +235,9 @@ class CalendarGrid { * Get html of day calendar grid * @return string */ - function display_day(){ + protected function display_day(){ - $current_date = $this->args['cal']->date_time; + $current_date = $this->cal->date_time; $day_start_ts = $current_date->format('U') + $current_date->getOffset(); // convert to timestamp, ignore tz $str = ""; @@ -257,9 +259,9 @@ class CalendarGrid { * Get html of month calendar grid * @return string */ - function display_month(){ + protected function display_month(){ - $current_date = $this->args['cal']->date_time; + $current_date = $this->cal->date_time; $month_start = $current_date->get_day_by_index_this_month(0); $month_end = $month_start->get("+".$month_start->format('t')." days"); $week_start = CalendarUtils::get_first_day_of_week($month_start); @@ -291,20 +293,20 @@ class CalendarGrid { * Get html of week shared grid * @return string */ - function display_shared(){ + protected function display_shared(){ - $current_date = $this->args['cal']->date_time; + $current_date = $this->cal->date_time; $week_start = CalendarUtils::get_first_day_of_week($current_date); $week_start_ts = $week_start->format('U') + $week_start->getOffset(); // convert to timestamp, ignore tz $str = ""; $str .= "<div id='cal-grid' style='visibility: hidden;'>"; - $un = 0; + $user_number = 0; $shared_user = new User(); - foreach($this->args['cal']->shared_ids as $member_id){ + foreach($this->cal->shared_ids as $member_id){ - $un_str = "_".$un; + $user_number_str = "_".$user_number; $shared_user->retrieve($member_id); $str .= "<div style='clear: both;'></div>"; @@ -315,11 +317,11 @@ class CalendarGrid { $str .= "<div class='week_block'>"; for($d = 0; $d < 7; $d++){ $curr_time = $week_start_ts + $d*86400; - $str .= $this->get_day_column($curr_time,$d,$un_str); + $str .= $this->get_day_column($curr_time,$d,$user_number_str); } $str .= "</div>"; $str .= "</div>"; - $un++; + $user_number++; } $str .= "</div>"; @@ -330,7 +332,7 @@ class CalendarGrid { * Get html of year calendar * @return string */ - function display_year(){ + protected function display_year(){ $weekEnd1 = 0 - $this->startday; $weekEnd2 = -1 - $this->startday; @@ -339,7 +341,7 @@ class CalendarGrid { if($weekEnd2 < 0) $weekEnd2 += 7; - $year_start = SugarDateTime::createFromFormat("Y-m-d",$this->args['cal']->date_time->year.'-01-01'); + $year_start = SugarDateTime::createFromFormat("Y-m-d",$this->cal->date_time->year.'-01-01'); $str = ""; $str .= '<table id="daily_cal_table" cellspacing="1" cellpadding="0" border="0" width="100%">'; diff --git a/modules/Calendar/CalendarUtils.php b/modules/Calendar/CalendarUtils.php index 061e7720..54b11f3f 100644 --- a/modules/Calendar/CalendarUtils.php +++ b/modules/Calendar/CalendarUtils.php @@ -62,7 +62,7 @@ class CalendarUtils { /** - * Returns list of needed fields for modules + * Get list of needed fields for modules * @return array */ static function get_fields(){ @@ -101,4 +101,24 @@ class CalendarUtils { ), ); } + + /** + * Get array of needed time data + * @param SugarBean $bean + * @return array + */ + static function get_time_data($bean){ + $arr = array(); + + $date_field = "date_start"; + if($bean->object_name == 'Task') + $date_field = "date_due"; + + $timestamp = SugarDateTime::createFromFormat($GLOBALS['timedate']->get_date_time_format(),$bean->$date_field,new DateTimeZone('UTC'))->format('U'); + $arr['timestamp'] = $timestamp; + $arr['time_start'] = $GLOBALS['timedate']->fromTimestamp($arr['timestamp'])->format($GLOBALS['timedate']->get_time_format()); + + + return $arr; + } } diff --git a/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php b/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php index 0723b94f..09536b21 100644 --- a/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php +++ b/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.php @@ -76,14 +76,12 @@ class CalendarDashlet extends Dashlet { if(!ACLController::checkAccess('Calendar', 'list', true)) ACLController::displayNoAccess(true); - $args['view'] = $this->view; - $args['cal'] = new Calendar($args['view']); - $args['cal']->dashlet = true; - $args['cal']->add_activities($GLOBALS['current_user']); - $args['cal']->load_activities(); - $args['dashlet_id'] = $this->id; + $cal = new Calendar($this->view); + $cal->dashlet = true; + $cal->add_activities($GLOBALS['current_user']); + $cal->load_activities(); - $ed = new CalendarDisplay($args); + $ed = new CalendarDisplay($cal,$this->id); $ed->display_calendar_header(false); $ed->display(); diff --git a/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl b/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl index 1502da33..d939c90c 100644 --- a/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl +++ b/modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl @@ -36,17 +36,6 @@ ********************************************************************************/ - - - - - - - - - - - *} diff --git a/modules/Calendar/action_view_map.php b/modules/Calendar/action_view_map.php index 744ad2e8..cd43972a 100644 --- a/modules/Calendar/action_view_map.php +++ b/modules/Calendar/action_view_map.php @@ -38,10 +38,10 @@ -$action_view_map['ajaxsave'] = 'ajaxsave'; -$action_view_map['ajaxreschedule'] = 'ajaxreschedule'; -$action_view_map['ajaxremove'] = 'ajaxremove'; -$action_view_map['ajaxgetgr'] = 'ajaxgetgr'; -$action_view_map['ajaxgetgrusers'] = 'ajaxgetgrusers'; -$action_view_map['ajaxloadform'] = 'ajaxloadform'; +$action_view_map['saveactivity'] = 'saveactivity'; +$action_view_map['reschedule'] = 'reschedule'; +$action_view_map['remove'] = 'remove'; +$action_view_map['getgr'] = 'getgr'; +$action_view_map['getgrusers'] = 'getgrusers'; +$action_view_map['quickedit'] = 'quickedit'; $action_view_map['savesettings'] = 'savesettings'; diff --git a/modules/Calendar/index.php b/modules/Calendar/index.php index dace876a..aecf2849 100644 --- a/modules/Calendar/index.php +++ b/modules/Calendar/index.php @@ -52,36 +52,33 @@ if(empty($_REQUEST['view'])){ $_REQUEST['view'] = SugarConfig::getInstance()->get('calendar.default_view','week'); } -$args = array(); -$args['view'] = $_REQUEST['view']; -$args['cal'] = new Calendar($args['view']); - +$cal = new Calendar($_REQUEST['view']); if($_REQUEST['view'] == 'day' || $_REQUEST['view'] == 'week' || $_REQUEST['view'] == 'month'){ - $args['cal']->add_activities($GLOBALS['current_user']); + $cal->add_activities($GLOBALS['current_user']); }else if($_REQUEST['view'] == 'shared'){ - $args['cal']->init_shared(); + $cal->init_shared(); global $shared_user; $shared_user = new User(); - foreach($args['cal']->shared_ids as $member){ + foreach($cal->shared_ids as $member){ $shared_user->retrieve($member); - $args['cal']->add_activities($shared_user); + $cal->add_activities($shared_user); } } -if(in_array($args['cal']->view, array("day","week","month","shared"))){ - $args['cal']->load_activities(); +if(in_array($cal->view, array("day","week","month","shared"))){ + $cal->load_activities(); } -$ed = new CalendarDisplay($args); -$ed->display_title(); +$display = new CalendarDisplay($cal); +$display->display_title(); -if(in_array($args['cal']->view, array("day","week","month","shared","year"))){ - if($args['cal']->view == "shared") - $ed->display_shared_html(); - $ed->display_calendar_header(); - $ed->display(); - $ed->display_calendar_footer(); +if(in_array($cal->view, array("day","week","month","shared","year"))){ + if($cal->view == "shared") + $display->display_shared_html(); + $display->display_calendar_header(); + $display->display(); + $display->display_calendar_footer(); } ?> diff --git a/modules/Calendar/language/en_us.lang.php b/modules/Calendar/language/en_us.lang.php index cf694176..639612ca 100644 --- a/modules/Calendar/language/en_us.lang.php +++ b/modules/Calendar/language/en_us.lang.php @@ -35,122 +35,103 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * "Powered by SugarCRM". ********************************************************************************/ - + $mod_strings = array ( - 'LBL_MODULE_NAME'=>'Calendar', - 'LBL_MODULE_TITLE'=>'Calendar', - 'LNK_NEW_CALL' => 'Schedule Call', - 'LNK_NEW_MEETING' => 'Schedule Meeting', - 'LNK_NEW_APPOINTMENT' => 'Create Appointment', - 'LNK_NEW_TASK' => 'Create Task', - 'LNK_CALL_LIST' => 'Calls', - 'LNK_MEETING_LIST' => 'Meetings', - 'LNK_TASK_LIST' => 'Tasks', - 'LNK_VIEW_CALENDAR' => 'Today', - 'LNK_IMPORT_CALLS'=>'Import Calls', - 'LNK_IMPORT_MEETINGS'=>'Import Meetings', - 'LNK_IMPORT_TASKS'=>'Import Tasks', - 'LBL_MONTH' => 'Month', - 'LBL_DAY' => 'Day', - 'LBL_YEAR' => 'Year', - 'LBL_WEEK' => 'Week', - 'LBL_PREVIOUS_MONTH' => 'Previous Month', - 'LBL_PREVIOUS_DAY' => 'Previous Day', - 'LBL_PREVIOUS_YEAR' => 'Previous Year', - 'LBL_PREVIOUS_WEEK' => 'Previous Week', - 'LBL_NEXT_MONTH' => 'Next Month', - 'LBL_NEXT_DAY' => 'Next Day', - 'LBL_NEXT_YEAR' => 'Next Year', - 'LBL_NEXT_WEEK' => 'Next Week', - 'LBL_AM' => 'AM', - 'LBL_PM' => 'PM', - 'LBL_SCHEDULED' => 'Scheduled', - 'LBL_BUSY' => 'Busy', - 'LBL_CONFLICT' => 'Conflict', - 'LBL_USER_CALENDARS' => 'User Calendars', - 'LBL_SHARED' => 'Shared', - 'LBL_PREVIOUS_SHARED' => 'Previous', - 'LBL_NEXT_SHARED' => 'Next', - 'LBL_SHARED_CAL_TITLE' => 'Shared Calendar', - 'LBL_USERS' => 'User', - 'LBL_REFRESH' => 'Refresh', - 'LBL_EDIT_USERLIST' => 'Edit Userlist', - 'LBL_SELECT_USERS' => 'Select users for calendar display', - 'LBL_FILTER_BY_TEAM' => 'Filter user list by team:', - 'LBL_ASSIGNED_TO_NAME' => 'Assigned to', - 'LBL_DATE' => 'Start Date & Time', - 'LBL_CREATE_MEETING' => 'Schedule Meeting', - 'LBL_CREATE_CALL' => 'Log Call', - -//other -'LBL_YES' => 'Yes', -'LBL_NO' => 'No', -'LBL_SETTINGS' => 'Settings', -'LBL_CREATE_NEW_RECORD' => 'Create Activity', -'LBL_LOADING' => 'Loading ......', -'LBL_SAVING' => 'Saving ......', -'LBL_CONFIRM_REMOVE' => 'Are you sure you want to remove the record?', -'LBL_EDIT_RECORD' => 'Edit Activity', -'LBL_ERROR_SAVING' => 'Error while saving', -'LBL_ERROR_LOADING' => 'Error while loading', -'LBL_ANOTHER_BROWSER' => 'Please try another browser to add more teams.', -'LBL_FIRST_TEAM' => 'Sorry. You can not remove the first item.', -'LBL_REMOVE_PARTICIPANTS' => 'You can not remove all invitees.', -'LBL_WHOLE_DAY'=>'Whole day', -'LBL_GOTO_DATE' => 'Goto Date', -'LBL_EDIT_ALL_RECURRENCES' => 'Edit All Recurrences', -'NOTICE_DURATION_TIME' => 'Duration time must be greater than 0', + 'LBL_MODULE_NAME' => 'Calendar', + 'LBL_MODULE_TITLE' => 'Calendar', + 'LNK_NEW_CALL' => 'Schedule Call', + 'LNK_NEW_MEETING' => 'Schedule Meeting', + 'LNK_NEW_APPOINTMENT' => 'Create Appointment', + 'LNK_NEW_TASK' => 'Create Task', + 'LNK_CALL_LIST' => 'Calls', + 'LNK_MEETING_LIST' => 'Meetings', + 'LNK_TASK_LIST' => 'Tasks', + 'LNK_VIEW_CALENDAR' => 'Today', + 'LNK_IMPORT_CALLS' => 'Import Calls', + 'LNK_IMPORT_MEETINGS' => 'Import Meetings', + 'LNK_IMPORT_TASKS' => 'Import Tasks', + 'LBL_MONTH' => 'Month', + 'LBL_DAY' => 'Day', + 'LBL_YEAR' => 'Year', + 'LBL_WEEK' => 'Week', + 'LBL_PREVIOUS_MONTH' => 'Previous Month', + 'LBL_PREVIOUS_DAY' => 'Previous Day', + 'LBL_PREVIOUS_YEAR' => 'Previous Year', + 'LBL_PREVIOUS_WEEK' => 'Previous Week', + 'LBL_NEXT_MONTH' => 'Next Month', + 'LBL_NEXT_DAY' => 'Next Day', + 'LBL_NEXT_YEAR' => 'Next Year', + 'LBL_NEXT_WEEK' => 'Next Week', + 'LBL_AM' => 'AM', + 'LBL_PM' => 'PM', + 'LBL_SCHEDULED' => 'Scheduled', + 'LBL_BUSY' => 'Busy', + 'LBL_CONFLICT' => 'Conflict', + 'LBL_USER_CALENDARS' => 'User Calendars', + 'LBL_SHARED' => 'Shared', + 'LBL_PREVIOUS_SHARED' => 'Previous', + 'LBL_NEXT_SHARED' => 'Next', + 'LBL_SHARED_CAL_TITLE' => 'Shared Calendar', + 'LBL_USERS' => 'Users', + 'LBL_REFRESH' => 'Refresh', + 'LBL_EDIT_USERLIST' => 'User List', + 'LBL_SELECT_USERS' => 'Select users for calendar display', + 'LBL_FILTER_BY_TEAM' => 'Filter user list by team:', + 'LBL_ASSIGNED_TO_NAME' => 'Assigned to', + 'LBL_DATE' => 'Start Date & Time', + 'LBL_CREATE_MEETING' => 'Schedule Meeting', + 'LBL_CREATE_CALL' => 'Log Call', + 'LBL_HOURS_ABBREV' => 'h', + 'LBL_MINS_ABBREV' => 'm', -//info box -'LBL_I_TITLE'=>'Additional Details', -'LBL_I_DESC'=>'Description', -'LBL_I_START_DT'=>'Start Date Time', -'LBL_I_DUE_DT'=>'Due Date Time', -'LBL_I_DURATION'=>'Duration', -'LBL_I_NAME'=>'Subject', -'LBL_I_RELATED_TO'=>'Related to', + 'LBL_YES' => 'Yes', + 'LBL_NO' => 'No', + 'LBL_SETTINGS' => 'Settings', + 'LBL_CREATE_NEW_RECORD' => 'Create Activity', + 'LBL_LOADING' => 'Loading ......', + 'LBL_SAVING' => 'Saving ......', + 'LBL_CONFIRM_REMOVE' => 'Are you sure you want to remove the record?', + 'LBL_EDIT_RECORD' => 'Edit Activity', + 'LBL_ERROR_SAVING' => 'Error while saving', + 'LBL_ERROR_LOADING' => 'Error while loading', + 'LBL_GOTO_DATE' => 'Goto Date', + 'NOTICE_DURATION_TIME' => 'Duration time must be greater than 0', + 'LBL_STYLE_BASIC' => 'Basic', + 'LBL_STYLE_ADVANCED' => 'Advanced', -//recurrence tab -'LBL_REPEAT_END_DATE'=>'End Date', -'LBL_REPEAT_INTERVAL'=>'Repeat Interval', -'LBL_REPEAT_TYPE'=>'Repeat Type', -'LBL_REPEAT_DAYS'=>'Repeat Days', + 'LBL_INFO_TITLE' => 'Additional Details', + 'LBL_INFO_DESC' => 'Description', + 'LBL_INFO_START_DT' => 'Start Date Time', + 'LBL_INFO_DUE_DT' => 'Due Date Time', + 'LBL_INFO_DURATION' => 'Duration', + 'LBL_INFO_NAME' => 'Subject', + 'LBL_INFO_RELATED_TO' => 'Related to', -//genaral tab + 'LBL_NO_USER' => 'No match for field: Assigned to', + 'LBL_SUBJECT' => 'Subject', + 'LBL_DURATION' => 'Duration', + 'LBL_STATUS' => 'Status', + 'LBL_DATE_TIME' => 'Date and Time', -//validation msg -'LBL_NO_USER'=>'No match for field: Assigned to', -'LBL_SUBJECT'=>'Subject', -'LBL_DURATION'=>'Duration', -'LBL_STATUS'=>'Status', -'LBL_DATE_TIME'=>'Date and Time', + 'LBL_SETTINGS_TITLE' => 'Settings', + 'LBL_SETTINGS_TIME_STARTS'=>'Start time:', + 'LBL_SETTINGS_TIME_ENDS'=>'End time:', + 'LBL_SETTINGS_CALENDAR_STYLE' => 'Calendar Style:', + 'LBL_SETTINGS_CALLS_SHOW' => 'Show Calls:', + 'LBL_SETTINGS_TASKS_SHOW' => 'Show Tasks:', -'LBL_RECURRENCE'=>'Recurrence', + 'LBL_SAVE_BUTTON' => 'Save', + 'LBL_DELETE_BUTTON' => 'Delete', + 'LBL_APPLY_BUTTON' => 'Apply', + 'LBL_SEND_INVITES' => 'Send Invites', + 'LBL_CANCEL_BUTTON' => 'Cancel', + 'LBL_CLOSE_BUTTON' => 'Close', -//settings box -'LBL_SETTINGS_TITLE'=>'Settings', -'LBL_SETTINGS_TIME_STARTS'=>'Start time:', -'LBL_SETTINGS_TIME_ENDS'=>'End time:', -'LBL_SETTINGS_CALLS_SHOW'=>'Show Calls:', -'LBL_SETTINGS_TASKS_SHOW'=>'Show Tasks:', -'LBL_SETTINGS_RECURRENCE'=>'Recurrence:', + 'LBL_GENERAL_TAB' => 'Details', + 'LBL_PARTICIPANTS_TAB' =>'Invitees', -//buttons -'LBL_SAVE_BUTTON'=>'Save', -'LBL_DELETE_BUTTON'=>'Delete', -'LBL_APPLY_BUTTON'=>'Apply', -'LBL_SEND_INVITES'=>'Send Invites', -'LBL_CANCEL_BUTTON'=>'Cancel', -'LBL_CLOSE_BUTTON'=>'Close', - -//tabs -'LBL_GENERAL_TAB'=>'Details', -'LBL_PARTICIPANTS_TAB' =>'Invitees', -'LBL_RECURRENCE_TAB' =>'Recurrence', - - ); $mod_list_strings = array( @@ -215,4 +196,4 @@ $mod_list_strings = array( "December", ), ); -?> \ No newline at end of file +?> diff --git a/modules/Calendar/tpls/empty.tpl b/modules/Calendar/tpls/empty.tpl index e69de29b..57a1302e 100644 --- a/modules/Calendar/tpls/empty.tpl +++ b/modules/Calendar/tpls/empty.tpl @@ -0,0 +1,37 @@ +{* +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + +*} diff --git a/modules/Calendar/tpls/footer.tpl b/modules/Calendar/tpls/footer.tpl index f151f926..77764165 100644 --- a/modules/Calendar/tpls/footer.tpl +++ b/modules/Calendar/tpls/footer.tpl @@ -38,4 +38,4 @@ <div class='monthFooter'> <div style='float: left;'>{$previous}</div><div style='float: right;'>{$next}</div> </div> -<br style='clear:both;'> \ No newline at end of file +<br style='clear:both;'> diff --git a/modules/Calendar/tpls/details.tpl b/modules/Calendar/tpls/form.tpl similarity index 98% rename from modules/Calendar/tpls/details.tpl rename to modules/Calendar/tpls/form.tpl index efbec1c7..7c5c9e8d 100644 --- a/modules/Calendar/tpls/details.tpl +++ b/modules/Calendar/tpls/form.tpl @@ -35,7 +35,7 @@ ********************************************************************************/ *} -<form id="CalendarEditView" name="CalendarEditView" method="POST"> +<form id="CalendarEditView" name="CalendarEditView" method="POST"> <input type="hidden" name="current_module" id="current_module" value="Meetings"> <input type="hidden" name="record" id="record" value=""> @@ -76,4 +76,4 @@ function cal_isValidDuration(){ } {/literal} </script> -<script type="text/javascript" src="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js"></script> \ No newline at end of file +<script type="text/javascript" src="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js"></script> diff --git a/modules/Calendar/tpls/header.tpl b/modules/Calendar/tpls/header.tpl index 85642280..d4ad91b6 100644 --- a/modules/Calendar/tpls/header.tpl +++ b/modules/Calendar/tpls/header.tpl @@ -42,12 +42,12 @@ <div style='float:left; width: 50%;'> {foreach name=tabs from=$tabs key=k item=tab} - <input type="button" class="button" {if $pview == $tab} selected {/if} title="{$tabs_params[$tab].title}" value=" {$tabs_params[$tab].title} " onclick="{$tabs_params[$tab].link}"> + <input type="button" class="button" {if $view == $tab} selected {/if} title="{$tabs_params[$tab].title}" value=" {$tabs_params[$tab].title} " onclick="{$tabs_params[$tab].link}"> {/foreach} </div> <div style="float:left; text-align: right; width: 50%; font-size: 12px;"> - {if $pview != 'year'} + {if $view != 'year'} <span class="dateTime"> <img border="0" src="{$cal_img}" alt="Enter Date" id="goto_date_trigger" align="absmiddle"> <input type="hidden" id="goto_date" name="goto_date" value="{$current_date}"> @@ -76,8 +76,6 @@ </span> {/if} <input type="button" class="button" onclick="CAL.toggle_settings()" value="{$MOD.LBL_SETTINGS}"> - -      </div> <div style='clear: both;'></div> diff --git a/modules/Calendar/tpls/main.tpl b/modules/Calendar/tpls/main.tpl index 290568ee..449b863e 100644 --- a/modules/Calendar/tpls/main.tpl +++ b/modules/Calendar/tpls/main.tpl @@ -51,18 +51,22 @@ SUGAR.util.doWhen(check_cal_loaded, function(){literal}{{/literal} - CAL.pview = "{$pview}"; + CAL.view = "{$view}"; + CAL.style = "{$style}"; CAL.t_step = {$t_step}; CAL.current_user_id = "{$current_user_id}"; CAL.current_user_name = "{$current_user_name}"; CAL.time_format = "{$time_format}"; CAL.items_draggable = "{$items_draggable}"; CAL.item_text = "{$item_text}"; - CAL.mouseover_expand = "{$mouseover_expand}"; - CAL.celcount = {$celcount}; + CAL.mouseover_expand = "{$mouseover_expand}"; + CAL.cells_per_day = {$cells_per_day}; CAL.current_params = {literal}{}{/literal}; - CAL.dashlet = "{$dashlet}"; + CAL.dashlet = "{$dashlet}"; + + CAL.grid_start_ts = {$grid_start_ts}; + CAL.scroll_slot = {$scroll_slot}; CAL.lbl_create_new = "{$MOD.LBL_CREATE_NEW_RECORD}"; CAL.lbl_edit = "{$MOD.LBL_EDIT_RECORD}"; @@ -73,32 +77,29 @@ CAL.lbl_error_loading = "{$MOD.LBL_ERROR_LOADING}"; CAL.lbl_another_browser = "{$MOD.LBL_ANOTHER_BROWSER}"; CAL.lbl_remove_participants = "{$MOD.LBL_REMOVE_PARTICIPANTS}"; - CAL.lbl_desc = "{$MOD.LBL_I_DESC}"; - CAL.lbl_start_t = "{$MOD.LBL_I_START_DT}"; - CAL.lbl_due_t = "{$MOD.LBL_I_DUE_DT}"; - CAL.lbl_duration = "{$MOD.LBL_I_DURATION}"; - CAL.lbl_name = "{$MOD.LBL_I_NAME}"; - CAL.lbl_title = "{$MOD.LBL_I_TITLE}"; - CAL.lbl_related = "{$MOD.LBL_I_RELATED_TO}"; + CAL.lbl_desc = "{$MOD.LBL_INFO_DESC}"; + CAL.lbl_start = "{$MOD.LBL_INFO_START_DT}"; + CAL.lbl_due = "{$MOD.LBL_INFO_DUE_DT}"; + CAL.lbl_duration = "{$MOD.LBL_INFO_DURATION}"; + CAL.lbl_name = "{$MOD.LBL_INFO_NAME}"; + CAL.lbl_title = "{$MOD.LBL_INFO_TITLE}"; + CAL.lbl_related = "{$MOD.LBL_INFO_RELATED_TO}"; + CAL.lbl_hours_abbrev = "{$MOD.LBL_HOURS_ABBREV}"; + CAL.lbl_mins_abbrev = "{$MOD.LBL_MINS_ABBREV}"; CAL.img_edit_inline = "{$img_edit_inline}"; CAL.img_view_inline = "{$img_view_inline}"; CAL.img_close = "{$img_close}"; - CAL.scroll_slot = {$scroll_slot}; - CAL.fit_grid(); {literal} var scrollable = CAL.get("cal-scrollable"); if(scrollable){ scrollable.scrollTop = 15 * CAL.scroll_slot; } - {/literal} - - - - - {if $pview == "shared"} + {/literal} + + {if $view == "shared"} {counter name="un" start=0 print=false assign="un"} {foreach name="shared" from=$shared_ids key=k item=member_id} CAL.shared_users['{$member_id}'] = '{$un}'; @@ -154,7 +155,7 @@ }); }); - CAL.init_record_dialog( + CAL.init_edit_dialog( { width: "{/literal}{$editview_width}{literal}", height: "{/literal}{$editview_height}{literal}" @@ -165,13 +166,13 @@ CAL.fit_grid(); }); - YAHOO.util.Event.on("btn_save","click",function(){ + YAHOO.util.Event.on("btn-save","click",function(){ if(!(check_form('CalendarEditView') && cal_isValidDuration())) return false; CAL.dialog_save(); }); - YAHOO.util.Event.on("btn_send_invites","click",function(){ + YAHOO.util.Event.on("btn-send-invites","click",function(){ if(!(check_form('CalendarEditView') && cal_isValidDuration())) return false; CAL.get("send_invites").value = "1"; @@ -179,76 +180,76 @@ }); - YAHOO.util.Event.on("btn_apply","click",function(){ + YAHOO.util.Event.on("btn-apply","click",function(){ if(!(check_form('CalendarEditView') && cal_isValidDuration())) return false; CAL.dialog_apply(); }); - YAHOO.util.Event.on("btn_delete","click",function(){ + YAHOO.util.Event.on("btn-delete","click",function(){ if(CAL.get("record").value != "") if(confirm(CAL.lbl_confirm_remove)) CAL.dialog_remove(); }); - YAHOO.util.Event.on("btn_cancel","click",function(){ - CAL.recordDialog.cancel(); + YAHOO.util.Event.on("btn-cancel","click",function(){ + CAL.editDialog.cancel(); }); - CAL.select_tab("record_tabs-1"); + CAL.select_tab("cal-tab-1"); - YAHOO.util.Event.on(CAL.get("btn_cancel_settings"), 'click', function(){ + YAHOO.util.Event.on(CAL.get("btn-cancel-settings"), 'click', function(){ CAL.settingsDialog.cancel(); }); - YAHOO.util.Event.on(CAL.get("btn_save_settings"), 'click', function(){ + YAHOO.util.Event.on(CAL.get("btn-save-settings"), 'click', function(){ CAL.get("form_settings").submit(); }); {/literal} - - var ActRecords = [ + var calendar_items = [ {$a_str} ]; {literal} - CAL.each( - ActRecords, - function(i,v){ - CAL.add_item_to_grid(ActRecords[i]); - } - ); + CAL.each(calendar_items, function(i,v){ + CAL.add_item_to_grid(calendar_items[i]); + }); {/literal} + {if $view != "year"} + CAL.fit_grid(); + {/if} + cal_loaded = null; }); </script> -<div id="record_dialog" style="display: none;"> +<div id="cal-edit" style="display: none;"> - <div class="dialog_titlebar hd" id="dialog_titlebar"><span id="title-record_dialog"></span></div> - <div class="dialog_content bd" id="dialog_content"> - <div id="record_tabs" class="yui-navset yui-navset-top yui-content" style="height: auto; padding: 0 2px;"> + <div class="hd"><span id="title-cal-edit"></span></div> + <div class="bd" id="edit-dialog-content"> + <div id="cal-tabs" class="yui-navset yui-navset-top yui-content" style="height: auto; padding: 0 2px;"> <ul class="yui-nav"> - <li id="tab_general"><a tabname="record_tabs-1"><em>{$MOD.LBL_GENERAL_TAB}</em></a></li> - <li id="tab_invitees"><a tabname="record_tabs-2"><em>{$MOD.LBL_PARTICIPANTS_TAB}</em></a></li> + <li id="tab_general"><a tabname="cal-tab-1"><em>{$MOD.LBL_GENERAL_TAB}</em></a></li> + <li id="tab_invitees"><a tabname="cal-tab-2"><em>{$MOD.LBL_PARTICIPANTS_TAB}</em></a></li> </ul> - <div id="record_tabs-1" class="yui-content"> - {include file=$details} + <div id="cal-tab-1" class="yui-content"> + {include file=$form} </div> - <div id="record_tabs-2" class="yui-content"> + <div id="cal-tab-2" class="yui-content"> <div class="h3Row" id="scheduler"></div> </div> </div> </div> - <div id="cal_record_buttons" class="ft"> - <button id="btn_save" class="button" type="button">{$MOD.LBL_SAVE_BUTTON}</button>  - <button id="btn_delete" class="button" type="button">{$MOD.LBL_DELETE_BUTTON}</button>  - <button id="btn_apply" class="button" type="button">{$MOD.LBL_APPLY_BUTTON}</button>  - <button id="btn_send_invites" class="button" type="button">{$MOD.LBL_SEND_INVITES}</button>  - <button id="btn_cancel" class="button" type="button" style="float: right;">{$MOD.LBL_CANCEL_BUTTON}</button>  + <div id="cal-edit-buttons" class="ft"> + <button id="btn-save" class="button" type="button">{$MOD.LBL_SAVE_BUTTON}</button>  + <button id="btn-delete" class="button" type="button">{$MOD.LBL_DELETE_BUTTON}</button>  + <button id="btn-apply" class="button" type="button">{$MOD.LBL_APPLY_BUTTON}</button>  + <button id="btn-send-invites" class="button" type="button">{$MOD.LBL_SEND_INVITES}</button>  + <button id="btn-cancel" class="button" type="button" style="float: right;">{$MOD.LBL_CANCEL_BUTTON}</button>  </div> </div> @@ -287,16 +288,6 @@ YAHOO.util.Event.onDOMReady(function(){ <script type="text/javascript" src="include/javascript/jsclass_async.js"></script> <script type="text/javascript" src="include/javascript/overlibmws.js"></script> -{if $hide_whole_day} -<script type="text/javascript"> - {literal} - var wd = document.getElementById("whole_day_button"); - if(typeof wd != "undefined"){ - wd.style.display = "none"; - } - {/literal} -</script> -{/if} <style type="text/css"> {literal} .schedulerDiv h3{ @@ -304,7 +295,7 @@ YAHOO.util.Event.onDOMReady(function(){ } {/literal} </style> -{if $pview == 'day'} +{if $view == 'day'} <style type="text/css"> {literal} .day_col, .left_time_col{ diff --git a/modules/Calendar/tpls/settings.tpl b/modules/Calendar/tpls/settings.tpl index cc618d46..a30d2b09 100644 --- a/modules/Calendar/tpls/settings.tpl +++ b/modules/Calendar/tpls/settings.tpl @@ -39,7 +39,7 @@ <div class="hd">{$MOD.LBL_SETTINGS_TITLE}</div> <div class="bd"> <form name="settings" id="form_settings" method="POST" action="index.php?module=Calendar&action=SaveSettings"> - <input type="hidden" name="view" value="{$pview}"> + <input type="hidden" name="view" value="{$view}"> <input type="hidden" name="day" value="{$day}"> <input type="hidden" name="month" value="{$month}"> <input type="hidden" name="year" value="{$year}"> @@ -51,11 +51,11 @@ </td> <td> <div id="d_start_time_section"> - <select size="1" id="d_start_hours" name="d_start_hours" tabindex="102"> + <select size="1" id="day_start_hours" name="day_start_hours" tabindex="102"> {$TIME_START_HOUR_OPTIONS1} </select> : - <select size="1" id="d_start_minutes" name="d_start_minutes" tabindex="102"> + <select size="1" id="day_start_minutes" name="day_start_minutes" tabindex="102"> {$TIME_START_MINUTES_OPTIONS1} </select>   @@ -69,11 +69,11 @@ </td> <td> <div id="d_end_time_section"> - <select size="1" id="d_end_hours" name="d_end_hours" tabindex="102"> + <select size="1" id="day_end_hours" name="day_end_hours" tabindex="102"> {$TIME_START_HOUR_OPTIONS2} </select> : - <select size="1" id="d_end_minutes" name="d_end_minutes" tabindex="102"> + <select size="1" id="day_end_minutes" name="day_end_minutes" tabindex="102"> {$TIME_START_MINUTES_OPTIONS2} </select>   @@ -108,8 +108,8 @@ <div style="text-align: right;"> - <button id="btn_save_settings" class="button" type="button">{$MOD.LBL_APPLY_BUTTON}</button>  - <button id="btn_cancel_settings" class="button" type="button">{$MOD.LBL_CANCEL_BUTTON}</button>  + <button id="btn-save-settings" class="button" type="button">{$MOD.LBL_APPLY_BUTTON}</button>  + <button id="btn-cancel-settings" class="button" type="button">{$MOD.LBL_CANCEL_BUTTON}</button>  </div> </div> </div> diff --git a/modules/Calendar/tpls/shared_users.tpl b/modules/Calendar/tpls/shared_users.tpl new file mode 100644 index 00000000..88c6854b --- /dev/null +++ b/modules/Calendar/tpls/shared_users.tpl @@ -0,0 +1,125 @@ +{* +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + +*} + +<div width="100%"> +<div align="right"><button type="button" class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');">{$MOD.LBL_EDIT_USERLIST}</button></div> +</div> + +<script language="javascript"> +{literal} + function up(name){ + var td = document.getElementById(name+'_td'); + var obj = td.getElementsByTagName('select')[0]; + obj =(typeof obj == "string") ? document.getElementById(obj) : obj; + if(obj.tagName.toLowerCase() != "select" && obj.length < 2) + return false; + var sel = new Array(); + + for(i = 0; i < obj.length; i++){ + if(obj[i].selected == true) { + sel[sel.length] = i; + } + } + for(i in sel){ + if(sel[i] != 0 && !obj[sel[i]-1].selected) { + var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value); + obj[sel[i]-1].text = obj[sel[i]].text; + obj[sel[i]-1].value = obj[sel[i]].value; + obj[sel[i]].text = tmp[0]; + obj[sel[i]].value = tmp[1]; + obj[sel[i]-1].selected = true; + obj[sel[i]].selected = false; + } + } + } + function down(name){ + var td = document.getElementById(name+'_td'); + var obj = td.getElementsByTagName('select')[0]; + if(obj.tagName.toLowerCase() != "select" && obj.length < 2) + return false; + var sel = new Array(); + for(i=obj.length-1; i>-1; i--){ + if(obj[i].selected == true) { + sel[sel.length] = i; + } + } + for(i in sel){ + if(sel[i] != obj.length-1 && !obj[sel[i]+1].selected) { + var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value); + obj[sel[i]+1].text = obj[sel[i]].text; + obj[sel[i]+1].value = obj[sel[i]].value; + obj[sel[i]].text = tmp[0]; + obj[sel[i]].value = tmp[1]; + obj[sel[i]+1].selected = true; + obj[sel[i]].selected = false; + } + } + } +{/literal} +</script> + +<div id="shared_cal_edit" style="display: none;"> + <form name="shared_cal" action="index.php" method="post"> + <input type="hidden" name="module" value="Calendar"> + <input type="hidden" name="action" value="index"> + <input type="hidden" name="view" value="shared"> + <table cellpadding="0" cellspacing="3" border="0" align="center"> + <tr><th valign="top" align="center" colspan="2">{$MOD.LBL_SELECT_USERS}</th></tr> + <tr><td valign="top"></td><td valign="top"> + <table cellpadding="1" cellspacing="1" border="0" class="edit view" align="center"> + <tr> + <td valign="top" nowrap=""><b>{$MOD.LBL_USERS}</b></td> + <td valign="top" id="shared_ids_td"> + <select id="shared_ids" name="shared_ids[]" multiple size="8">{$options}</select> + </td> + <td> + <a onclick="up('shared_ids');">{$UP}</a><br> + <a onclick="down('shared_ids');">{$DOWN}</a> + </td> + </tr> + <tr> + <td align="right" colspan="2"> + <input class="button" type="submit" title="{$APP.LBL_SELECT_BUTTON_TITLE}" accesskey="{$APP.LBL_SELECT_BUTTON_KEY}" value="{$APP.LBL_SELECT_BUTTON_LABEL}"> + <input class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');" type="button" title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accesskey="{$APP.LBL_CANCEL_BUTTON_KEY}" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> + </td> + </tr> + </table> + </td></tr> + </table> + </form> +</div> diff --git a/modules/Calendar/views/view.ajaxgetgr.php b/modules/Calendar/views/view.getgr.php similarity index 96% rename from modules/Calendar/views/view.ajaxgetgr.php rename to modules/Calendar/views/view.getgr.php index b28a570c..4ebcd077 100644 --- a/modules/Calendar/views/view.ajaxgetgr.php +++ b/modules/Calendar/views/view.getgr.php @@ -36,9 +36,9 @@ require_once('include/MVC/View/SugarView.php'); -class CalendarViewAjaxGetGR extends SugarView { +class CalendarViewGetGR extends SugarView { - function CalendarViewAjaxGetGR(){ + function CalendarViewGetGR(){ parent::SugarView(); } @@ -59,4 +59,4 @@ class CalendarViewAjaxGetGR extends SugarView { } -?> \ No newline at end of file +?> diff --git a/modules/Calendar/views/view.ajaxgetgrusers.php b/modules/Calendar/views/view.getgrusers.php similarity index 96% rename from modules/Calendar/views/view.ajaxgetgrusers.php rename to modules/Calendar/views/view.getgrusers.php index 1b28c578..5366fc49 100644 --- a/modules/Calendar/views/view.ajaxgetgrusers.php +++ b/modules/Calendar/views/view.getgrusers.php @@ -36,9 +36,9 @@ require_once('include/MVC/View/SugarView.php'); -class CalendarViewAjaxGetGRUsers extends SugarView { +class CalendarViewGetGRUsers extends SugarView { - function CalendarViewAjaxGetGRUsers(){ + function CalendarViewGetGRUsers(){ parent::SugarView(); } @@ -73,4 +73,4 @@ class CalendarViewAjaxGetGRUsers extends SugarView { } -?> \ No newline at end of file +?> diff --git a/modules/Calendar/views/view.ajaxloadform.php b/modules/Calendar/views/view.quickedit.php similarity index 97% rename from modules/Calendar/views/view.ajaxloadform.php rename to modules/Calendar/views/view.quickedit.php index da0183b3..3ae4a50e 100644 --- a/modules/Calendar/views/view.ajaxloadform.php +++ b/modules/Calendar/views/view.quickedit.php @@ -38,11 +38,10 @@ require_once('include/MVC/View/views/view.ajax.php'); require_once('include/EditView/EditView2.php'); -class CalendarViewAjaxLoadForm extends SugarView { +class CalendarViewQuickEdit extends SugarView { var $ev; - var $editable; - + protected $editable; public function preDisplay(){ global $beanFiles,$beanList; @@ -113,7 +112,7 @@ class CalendarViewAjaxLoadForm extends SugarView { 'success' => 'yes', 'module_name' => $this->bean->module_dir, 'record' => $this->bean->id, - 'editview' => $this->editable, + 'edit' => $this->editable, 'html'=> $this->ev->display(false, true), 'gr' => $GRjavascript, ); @@ -123,4 +122,4 @@ class CalendarViewAjaxLoadForm extends SugarView { } } -?> \ No newline at end of file +?> diff --git a/modules/Calendar/views/view.ajaxremove.php b/modules/Calendar/views/view.remove.php similarity index 97% rename from modules/Calendar/views/view.ajaxremove.php rename to modules/Calendar/views/view.remove.php index 2de32e19..51121b51 100644 --- a/modules/Calendar/views/view.ajaxremove.php +++ b/modules/Calendar/views/view.remove.php @@ -36,9 +36,9 @@ require_once('include/MVC/View/SugarView.php'); -class CalendarViewAjaxRemove extends SugarView { +class CalendarViewRemove extends SugarView { - function CalendarViewAjaxRemove(){ + function CalendarViewRemove(){ parent::SugarView(); } @@ -81,4 +81,4 @@ class CalendarViewAjaxRemove extends SugarView { } -?> \ No newline at end of file +?> diff --git a/modules/Calendar/views/view.ajaxreschedule.php b/modules/Calendar/views/view.reschedule.php similarity index 96% rename from modules/Calendar/views/view.ajaxreschedule.php rename to modules/Calendar/views/view.reschedule.php index 85f582d6..75e2ca84 100644 --- a/modules/Calendar/views/view.ajaxreschedule.php +++ b/modules/Calendar/views/view.reschedule.php @@ -36,9 +36,9 @@ require_once('include/MVC/View/SugarView.php'); -class CalendarViewAjaxReschedule extends SugarView { +class CalendarViewReschedule extends SugarView { - function CalendarViewAjaxReschedule(){ + function CalendarViewReschedule(){ parent::SugarView(); } diff --git a/modules/Calendar/views/view.ajaxsave.php b/modules/Calendar/views/view.saveactivity.php similarity index 98% rename from modules/Calendar/views/view.ajaxsave.php rename to modules/Calendar/views/view.saveactivity.php index b79a13f7..5ad0d644 100644 --- a/modules/Calendar/views/view.ajaxsave.php +++ b/modules/Calendar/views/view.saveactivity.php @@ -36,9 +36,9 @@ require_once('include/MVC/View/SugarView.php'); -class CalendarViewAjaxSave extends SugarView { +class CalendarViewSaveActivity extends SugarView { - function CalendarViewAjaxSave(){ + function CalendarViewSave(){ parent::SugarView(); } @@ -138,11 +138,10 @@ class CalendarViewAjaxSave extends SugarView { 'success' => 'yes', 'type' => $type, 'module_name' => $bean->module_dir, - 'timestamp' => $timestamp, - 'time_start' => $GLOBALS['timedate']->fromTimestamp($timestamp)->format($GLOBALS['timedate']->get_time_format()), + 'user_id' => $GLOBALS['current_user']->id, - 'detailview' => 1, - 'editview' => 1, + 'detail' => 1, + 'edit' => 1, 'record_name' => html_entity_decode($bean->name,ENT_QUOTES), 'record' => $bean->id, @@ -150,7 +149,8 @@ class CalendarViewAjaxSave extends SugarView { ); - $json_arr = array_merge($json_arr,$field_arr); + $json_arr = array_merge($json_arr,$field_arr); + $json_arr = array_merge($json_arr,CalendarUtils::get_time_data($bean)); }else{ $json_arr = array( @@ -164,7 +164,7 @@ class CalendarViewAjaxSave extends SugarView { } - function save_activity(&$bean,$notify = true){ + private function save_activity(&$bean,$notify = true){ if($_REQUEST['current_module'] == 'Meetings'){ diff --git a/modules/Calendar/views/view.savesettings.php b/modules/Calendar/views/view.savesettings.php index 7fd84127..dddcb3a3 100644 --- a/modules/Calendar/views/view.savesettings.php +++ b/modules/Calendar/views/view.savesettings.php @@ -47,18 +47,17 @@ class CalendarViewSaveSettings extends SugarView { } function display(){ - global $current_user; - - $db_start = $this->to_db_time($_REQUEST['d_start_hours'],$_REQUEST['d_start_minutes'],$_REQUEST['d_start_meridiem']); - $db_end = $this->to_db_time($_REQUEST['d_end_hours'],$_REQUEST['d_end_minutes'],$_REQUEST['d_end_meridiem']); + global $current_user; + $db_start = $this->to_db_time($_REQUEST['day_start_hours'],$_REQUEST['day_start_minutes'],$_REQUEST['day_start_meridiem']); + $db_end = $this->to_db_time($_REQUEST['day_end_hours'],$_REQUEST['day_end_minutes'],$_REQUEST['day_end_meridiem']); + $current_user->setPreference('day_start_time', $db_start, 0, 'global', $current_user); $current_user->setPreference('day_end_time', $db_end, 0, 'global', $current_user); - + $current_user->setPreference('show_tasks', $_REQUEST['show_tasks'], 0, 'global', $current_user); $current_user->setPreference('show_calls', $_REQUEST['show_calls'], 0, 'global', $current_user); - if(isset($_REQUEST['day']) && !empty($_REQUEST['day'])) header("Location: index.php?module=Calendar&action=index&view=".$_REQUEST['view']."&hour=0&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']); else @@ -83,7 +82,8 @@ class CalendarViewSaveSettings extends SugarView { $minutes = "0".$minutes; return $hours . ":". $minutes; } + } -?> \ No newline at end of file +?> diff --git a/modules/Calls/Call.php b/modules/Calls/Call.php index 559bb502..d0ce4679 100644 --- a/modules/Calls/Call.php +++ b/modules/Calls/Call.php @@ -416,18 +416,12 @@ class Call extends SugarBean //make sure we grab the localized version of the contact name, if a contact is provided if (!empty($this->contact_id)) { - global $locale; - $query = "SELECT first_name, last_name, salutation, title FROM contacts "; - $query .= "WHERE id='$this->contact_id' AND deleted=0"; - $result = $this->db->limitQuery($query,0,1,true," Error filling in contact name fields: "); - - // Get the contact name. - $row = $this->db->fetchByAssoc($result); - - if($row != null) - { - $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], $row['salutation'], $row['title']); - } + global $locale; + // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs + $contact_temp = new Contact(); + $contact_temp->retrieve($this->contact_id); + $contact_temp->_create_proper_name_field(); + $this->contact_name = $contact_temp->full_name; } $call_fields['CONTACT_ID'] = $this->contact_id; diff --git a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php index 54f16c4b..af3d150f 100644 --- a/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php +++ b/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php @@ -76,8 +76,8 @@ class MyCallsDashlet extends DashletGeneric { //join with meeting_users table to process related users $this->seedBean->listview_inner_join = array('LEFT JOIN calls_users c_u on c_u.call_id = calls.id'); - //set the custom query to include assigned meetings - $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR c_u.user_id = \'' . $current_user->id . '\') AND c_u.deleted = 0 '; + //set the custom query to include assigned meetings + $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR c_u.user_id = \'' . $current_user->id . '\') AND c_u.deleted = 0 '; } $this->myItemsOnly = false; diff --git a/modules/Calls/vardefs.php b/modules/Calls/vardefs.php index e7d7b4a1..fff3a5af 100644 --- a/modules/Calls/vardefs.php +++ b/modules/Calls/vardefs.php @@ -384,6 +384,8 @@ $dictionary['Call'] = array('table' => 'calls', 'comment' => 'A Call is an activ 'rhs_table' => 'notes', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', + 'relationship_role_column'=>'parent_type', + 'relationship_role_column_value'=>'Calls', ), ), //This enables optimistic locking for Saves From EditView diff --git a/modules/CampaignLog/CampaignLog.php b/modules/CampaignLog/CampaignLog.php index 00b687ef..1f4e9b03 100644 --- a/modules/CampaignLog/CampaignLog.php +++ b/modules/CampaignLog/CampaignLog.php @@ -89,11 +89,11 @@ class CampaignLog extends SugarBean { if ( ( $this->db->dbType == 'mysql' ) or ( $this->db->dbType == 'oci8' ) ) { - $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name, date_modified from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; + $query="select first_name, last_name, CONCAT(CONCAT(first_name, ' '), last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($this->db->dbType == 'mssql') { - $query="select first_name, last_name, (first_name + ' ' + last_name) name, date_modified from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; + $query="select first_name, last_name, (first_name + ' ' + last_name) name from ".strtolower($temp_array['TARGET_TYPE']) . " where id ='{$temp_array['TARGET_ID']}'"; } if($temp_array['TARGET_TYPE']=='Accounts'){ @@ -111,11 +111,10 @@ class CampaignLog extends SugarBean { }else{ $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], ''); $temp_array['RECIPIENT_NAME']=$full_name; - $temp_array['ACTIVITY_DATE'] = $row['date_modified']; } } $temp_array['RECIPIENT_EMAIL']=$this->retrieve_email_address($temp_array['TARGET_ID']); - + $query = 'select name from email_marketing where id = \'' . $temp_array['MARKETING_ID'] . '\''; $result=$this->db->query($query); $row=$this->db->fetchByAssoc($result); diff --git a/modules/Campaigns/EmailQueue.php b/modules/Campaigns/EmailQueue.php index a06c5937..d3cf5199 100644 --- a/modules/Campaigns/EmailQueue.php +++ b/modules/Campaigns/EmailQueue.php @@ -121,5 +121,4 @@ $header_URL = "Location: index.php?action=DetailView&module=Campaigns&record={$_ $GLOBALS['log']->debug("about to post header URL of: $header_URL"); header($header_URL); -?> - +?> \ No newline at end of file diff --git a/modules/Campaigns/ProspectLink.php b/modules/Campaigns/ProspectLink.php new file mode 100644 index 00000000..42b58acf --- /dev/null +++ b/modules/Campaigns/ProspectLink.php @@ -0,0 +1,123 @@ +<?php +if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + +/********************************************************************************* + +* Description: Bug 40166. Need for return right join for campaign's target list relations. +* All Rights Reserved. +* Contributor(s): ______________________________________.. +********************************************************************************/ + +require_once('data/Link2.php'); + +/** + * @brief Bug #40166. Campaign Log Report will not display Contact/Account Names + */ +class ProspectLink extends Link2 +{ + + /** + * This method changes join of any item to campaign through target list + * if you want to use this join method you should add code below to your vardef.php + * 'link_class' => 'ProspectLink', + * 'link_file' => 'modules/Campaigns/ProspectLink.php' + * + * @see Link::getJoin method + */ + public function getJoin($params, $return_array = false) + { + $join_type= ' INNER JOIN '; + if (isset($params['join_type'])) + { + $join_type = $params['join_type']; + } + $join = ''; + $bean_is_lhs=$this->_get_bean_position(); + + if ( + $this->_relationship->relationship_type == 'one-to-many' + && $bean_is_lhs + ) + { + $table_with_alias = $table = $this->_relationship->rhs_table; + $key = $this->_relationship->rhs_key; + $module = $this->_relationship->rhs_module; + $other_table = (empty($params['left_join_table_alias']) ? $this->_relationship->lhs_table : $params['left_join_table_alias']); + $other_key = $this->_relationship->lhs_key; + $alias_prefix = $table; + if (!empty($params['join_table_alias'])) + { + $table_with_alias = $table. " ".$params['join_table_alias']; + $table = $params['join_table_alias']; + $alias_prefix = $params['join_table_alias']; + } + + $join .= ' '.$join_type.' prospect_list_campaigns '.$alias_prefix.'_plc ON'; + $join .= ' '.$alias_prefix.'_plc.'.$key.' = '.$other_table.'.'.$other_key."\n"; + + // join list targets + $join .= ' '.$join_type.' prospect_lists_prospects '.$alias_prefix.'_plp ON'; + $join .= ' '.$alias_prefix.'_plp.prospect_list_id = '.$alias_prefix.'_plc.prospect_list_id AND'; + $join .= ' '.$alias_prefix.'_plp.related_type = "'.$module.'"'."\n"; + + // join target + $join .= ' '.$join_type.' '.$table_with_alias.' ON'; + $join .= ' '.$table.'.id = '.$alias_prefix.'_plp.related_id AND'; + $join .= ' '.$table.'.deleted=0'."\n"; + + if ($return_array) + { + $ret_arr = array(); + $ret_arr['join'] = $join; + $ret_arr['type'] = $this->_relationship->relationship_type; + if ($bean_is_lhs) + { + $ret_arr['rel_key'] = $this->_relationship->join_key_rhs; + } + else + { + $ret_arr['rel_key'] = $this->_relationship->join_key_lhs; + } + return $ret_arr; + } + return $join; + } else { + return parent::getJoin($params, $return_array); + } + } +} diff --git a/modules/Campaigns/Schedule.html b/modules/Campaigns/Schedule.html index 0fe72a88..1d0a3c24 100644 --- a/modules/Campaigns/Schedule.html +++ b/modules/Campaigns/Schedule.html @@ -57,15 +57,17 @@ <!-- END: list_nav_row --> <tr height="20" > <td scope="col" NOWRAP>{CHECKALL}</td> - <td scope="col" width="40%" NOWRAP><slot>{MOD.LBL_LIST_NAME}</slot></td> - <td scope="col" width="60%" NOWRAP><slot>{MOD.LBL_LIST_PROSPECT_LIST_NAME}</slot></td> + <td scope="col" width="35%" NOWRAP><slot>{MOD.LBL_LIST_NAME}</slot></td> + <td scope="col" width="15%" NOWRAP><slot>{MOD.LBL_STATUS}</slot></td> + <td scope="col" width="50%" NOWRAP><slot>{MOD.LBL_LIST_PROSPECT_LIST_NAME}</slot></td> </tr> <!-- BEGIN: row --> <tr height="20" class="{ROW_COLOR}S1"> <td>{PREROW}</td> <td scope="row" valign=TOP ><slot>{EMAILMARKETING.NAME}</slot></td> - <td valign=TOP ><slot>{EMAILMARKETING.PROSPECT_LIST_NAME}</slot></td> + <td valign=TOP ><slot>{EMAILMARKETING.STATUS}</slot></td> + <td valign=TOP ><slot>{EMAILMARKETING.PROSPECT_LIST_NAME}</slot></td> </tr> <!-- END: row --> diff --git a/modules/Campaigns/Schedule.php b/modules/Campaigns/Schedule.php index 938ce976..885aa6f1 100644 --- a/modules/Campaigns/Schedule.php +++ b/modules/Campaigns/Schedule.php @@ -78,94 +78,104 @@ if ($test) { echo getClassicModuleTitle('Campaigns', array($current_module_strings['LBL_MODULE_SEND_EMAILS']), false); } -$focus = new EmailMarketing(); -if(isset($_REQUEST['record'])) -{ - // we have a query - if (isset($_REQUEST['record'])) $campaign_id = $_REQUEST['record']; +$campaign_id = isset($_REQUEST['record']) ? $_REQUEST['record'] : false; - $where_clauses = Array(); - - if(isset($campaign_id) && !empty($campaign_id)) array_push($where_clauses, "campaign_id = '".$GLOBALS['db']->quote($campaign_id)."'"); +if (!empty($campaign_id)) { + $campaign = new Campaign(); + $campaign->retrieve($campaign_id); +} - $where = ""; - foreach($where_clauses as $clause) +if ($campaign_id && isset($campaign) && $campaign->status == 'Inactive') { + $ss = new Sugar_Smarty(); + $ss->assign('campaignName', $campaign->name); + $ss->display('modules/Campaigns/tpls/campaign-inactive.tpl'); +} else { + $focus = new EmailMarketing(); + if($campaign_id) { - if($where != "") - $where .= " and "; - $where .= $clause; - } + $where_clauses = Array(); - $GLOBALS['log']->info("Here is the where clause for the list view: $where"); -} + if(!empty($campaign_id)) array_push($where_clauses, "campaign_id = '".$GLOBALS['db']->quote($campaign_id)."'"); -$ListView = new ListView(); -$ListView->initNewXTemplate('modules/Campaigns/Schedule.html',$current_module_strings); + $where = ""; + foreach($where_clauses as $clause) + { + if($where != "") + $where .= " and "; + $where .= $clause; + } -if ($test) { - $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER",$current_module_strings['LBL_SCHEDULE_MESSAGE_TEST']); -} else { - $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER",$current_module_strings['LBL_SCHEDULE_MESSAGE_EMAILS']); -} + $GLOBALS['log']->info("Here is the where clause for the list view: $where"); + } -//force multi-select popup -$ListView->process_for_popups=true; -$ListView->multi_select_popup=true; -//end -$ListView->mergeduplicates = false; -$ListView->show_export_button = false; -$ListView->show_select_menu = false; -$ListView->show_delete_button = false; -$ListView->setDisplayHeaderAndFooter(false); -$ListView->xTemplateAssign("RETURN_MODULE",$_POST['return_module']); -$ListView->xTemplateAssign("RETURN_ACTION",$_POST['return_action']); -$ListView->xTemplateAssign("RETURN_ID",$_POST['record']); -$ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']); -$ListView->setQuery($where, "", "name", "EMAILMARKETING"); - -if ($test) { - $ListView->xTemplateAssign("MODE",$_POST['mode']); - //finds all marketing messages that have an association with prospect list of the test. - //this query can be siplified using sub-selects. - $query="select distinct email_marketing.id email_marketing_id from email_marketing "; - $query.=" inner join email_marketing_prospect_lists empl on empl.email_marketing_id = email_marketing.id "; - $query.=" inner join prospect_lists on prospect_lists.id = empl.prospect_list_id "; - $query.=" inner join prospect_list_campaigns plc on plc.prospect_list_id = empl.prospect_list_id "; - $query.=" where empl.deleted=0 "; - $query.=" and prospect_lists.deleted=0 "; - $query.=" and prospect_lists.list_type='test' "; - $query.=" and plc.deleted=0 "; - $query.=" and plc.campaign_id='$campaign_id'"; - $query.=" and email_marketing.campaign_id='$campaign_id'"; - $query.=" and email_marketing.deleted=0 "; - $query.=" and email_marketing.all_prospect_lists=0 "; - - $seed=array(); - - $result=$focus->db->query($query); - while(($row=$focus->db->fetchByAssoc($result)) != null) { - - $bean = new EmailMarketing(); - $bean->retrieve($row['email_marketing_id']); - $bean->mode='test'; - $seed[]=$bean; - } - $query=" select email_marketing.id email_marketing_id from email_marketing "; - $query.=" WHERE email_marketing.campaign_id='$campaign_id'"; - $query.=" and email_marketing.deleted=0 "; - $query.=" and email_marketing.all_prospect_lists=1 "; - - $result=$focus->db->query($query); - while(($row=$focus->db->fetchByAssoc($result)) != null) { - - $bean = new EmailMarketing(); - $bean->retrieve($row['email_marketing_id']); - $bean->mode='test'; - $seed[]=$bean; - } + $ListView = new ListView(); + $ListView->initNewXTemplate('modules/Campaigns/Schedule.html',$current_module_strings); - $ListView->processListView($seed, "main", "EMAILMARKETING"); -} else { - $ListView->processListView($focus, "main", "EMAILMARKETING"); + if ($test) { + $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER",$current_module_strings['LBL_SCHEDULE_MESSAGE_TEST']); + } else { + $ListView->xTemplateAssign("SCHEDULE_MESSAGE_HEADER",$current_module_strings['LBL_SCHEDULE_MESSAGE_EMAILS']); + } + + //force multi-select popup + $ListView->process_for_popups=true; + $ListView->multi_select_popup=true; + //end + $ListView->mergeduplicates = false; + $ListView->show_export_button = false; + $ListView->show_select_menu = false; + $ListView->show_delete_button = false; + $ListView->setDisplayHeaderAndFooter(false); + $ListView->xTemplateAssign("RETURN_MODULE",$_POST['return_module']); + $ListView->xTemplateAssign("RETURN_ACTION",$_POST['return_action']); + $ListView->xTemplateAssign("RETURN_ID",$_POST['record']); + $ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']); + $ListView->setQuery($where, "", "name", "EMAILMARKETING"); + + if ($test) { + $ListView->xTemplateAssign("MODE",$_POST['mode']); + //finds all marketing messages that have an association with prospect list of the test. + //this query can be siplified using sub-selects. + $query="select distinct email_marketing.id email_marketing_id from email_marketing "; + $query.=" inner join email_marketing_prospect_lists empl on empl.email_marketing_id = email_marketing.id "; + $query.=" inner join prospect_lists on prospect_lists.id = empl.prospect_list_id "; + $query.=" inner join prospect_list_campaigns plc on plc.prospect_list_id = empl.prospect_list_id "; + $query.=" where empl.deleted=0 "; + $query.=" and prospect_lists.deleted=0 "; + $query.=" and prospect_lists.list_type='test' "; + $query.=" and plc.deleted=0 "; + $query.=" and plc.campaign_id='$campaign_id'"; + $query.=" and email_marketing.campaign_id='$campaign_id'"; + $query.=" and email_marketing.deleted=0 "; + $query.=" and email_marketing.all_prospect_lists=0 "; + + $seed=array(); + + $result=$focus->db->query($query); + while(($row=$focus->db->fetchByAssoc($result)) != null) { + + $bean = new EmailMarketing(); + $bean->retrieve($row['email_marketing_id']); + $bean->mode='test'; + $seed[]=$bean; + } + $query=" select email_marketing.id email_marketing_id from email_marketing "; + $query.=" WHERE email_marketing.campaign_id='$campaign_id'"; + $query.=" and email_marketing.deleted=0 "; + $query.=" and email_marketing.all_prospect_lists=1 "; + + $result=$focus->db->query($query); + while(($row=$focus->db->fetchByAssoc($result)) != null) { + + $bean = new EmailMarketing(); + $bean->retrieve($row['email_marketing_id']); + $bean->mode='test'; + $seed[]=$bean; + } + + $ListView->processListView($seed, "main", "EMAILMARKETING"); + } else { + $ListView->processListView($focus, "main", "EMAILMARKETING"); + } } ?> \ No newline at end of file diff --git a/modules/Campaigns/tpls/campaign-inactive.tpl b/modules/Campaigns/tpls/campaign-inactive.tpl new file mode 100644 index 00000000..bd0a9ef0 --- /dev/null +++ b/modules/Campaigns/tpls/campaign-inactive.tpl @@ -0,0 +1,39 @@ +{* +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + +*} +Campaign '{$campaignName}' has status 'Inactive'. You have to set campaign status to 'Active'. \ No newline at end of file diff --git a/modules/Campaigns/vardefs.php b/modules/Campaigns/vardefs.php index e2812511..0f42f8fc 100644 --- a/modules/Campaigns/vardefs.php +++ b/modules/Campaigns/vardefs.php @@ -237,6 +237,8 @@ $dictionary['Campaign'] = array ('audited'=>true, 'relationship' => 'campaign_leads', 'source'=>'non-db', 'vname' => 'LBL_LEADS', + 'link_class' => 'ProspectLink', + 'link_file' => 'modules/Campaigns/ProspectLink.php' ), 'opportunities'=> array ( @@ -252,6 +254,8 @@ $dictionary['Campaign'] = array ('audited'=>true, 'relationship' => 'campaign_contacts', 'source'=>'non-db', 'vname' => 'LBL_CONTACTS', + 'link_class' => 'ProspectLink', + 'link_file' => 'modules/Campaigns/ProspectLink.php' ), 'accounts'=> array ( 'name' => 'accounts', @@ -259,6 +263,8 @@ $dictionary['Campaign'] = array ('audited'=>true, 'relationship' => 'campaign_accounts', 'source'=>'non-db', 'vname' => 'LBL_ACCOUNTS', + 'link_class' => 'ProspectLink', + 'link_file' => 'modules/Campaigns/ProspectLink.php' ), diff --git a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php index 0a1ad867..6f196218 100644 --- a/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php +++ b/modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php @@ -227,7 +227,7 @@ class MyPipelineBySalesStageDashlet extends DashletGenericChart $query = "SELECT opportunities.sales_stage, users.user_name, opportunities.assigned_user_id, - count( * ) AS opp_count, + count(*) AS opp_count, sum(amount_usdollar/1000) AS total FROM users,opportunities "; $query .= " WHERE opportunities.assigned_user_id IN ('{$GLOBALS['current_user']->id}') " . diff --git a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php index 929fe3fd..c8c92240 100644 --- a/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php +++ b/modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.php @@ -191,7 +191,7 @@ class PipelineBySalesStageDashlet extends DashletGenericChart $query = " SELECT opportunities.sales_stage, users.user_name, opportunities.assigned_user_id, - count( * ) AS opp_count, + count(*) AS opp_count, sum(amount_usdollar/1000) AS total FROM users,opportunities "; $query .= " WHERE opportunities.date_closed >= ". db_convert("'".$this->pbss_date_start."'",'datetime'). diff --git a/modules/Configurator/tpls/adminwizard.tpl b/modules/Configurator/tpls/adminwizard.tpl index df6587bc..a27cebd2 100644 --- a/modules/Configurator/tpls/adminwizard.tpl +++ b/modules/Configurator/tpls/adminwizard.tpl @@ -214,12 +214,8 @@ function disableReturnSubmission(e) { <tr> <td nowrap="nowrap" scope="row" valign="top">{sugar_translate module='Administration' label='LBL_LOCALE_DEFAULT_NAME_FORMAT'}: </td> <td> - <input onkeyup="setPreview();" size='15' onkeydown="setPreview();" id="default_locale_name_format" type="text" name="default_locale_name_format" value="{$config.default_locale_name_format}"> - <br> - {sugar_translate module='Administration' label='LBL_LOCALE_NAME_FORMAT_DESC'} + {html_options id="default_locale_name_format" name="default_locale_name_format" selected=$config.default_locale_name_format options=$NAMEFORMATS} </td> - <td nowrap="nowrap" scope="row" valign="top">{sugar_translate module='Administration' label='LBL_LOCALE_EXAMPLE_NAME_FORMAT'}: </td> - <td valign="top"><input name="no_value" id="nameTarget" style="border: none;" value="" disabled></td> </tr> </table> </div> diff --git a/modules/Configurator/views/view.adminwizard.php b/modules/Configurator/views/view.adminwizard.php index 0936288d..23bb17f6 100644 --- a/modules/Configurator/views/view.adminwizard.php +++ b/modules/Configurator/views/view.adminwizard.php @@ -96,6 +96,7 @@ class ViewAdminwizard extends SugarView $this->ss->assign('settings', $focus->settings); $this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset'])); $this->ss->assign('getNameJs', $locale->getNameJs()); + $this->ss->assign('NAMEFORMATS', $locale->getPrettyLocaleNameOptions($sugar_config['name_formats'])); $this->ss->assign('JAVASCRIPT',get_set_focus_js(). get_configsettings_js()); $this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png')); $this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']); diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/config.php b/modules/Connectors/connectors/sources/ext/rest/insideview/config.php new file mode 100644 index 00000000..0fab143d --- /dev/null +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/config.php @@ -0,0 +1,44 @@ +<?php +if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + +$config = array ( + 'name' => 'InsideView©', + 'order' => 65, + 'properties' => array ( + ), +); diff --git a/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php b/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php index d639f0d8..178600c1 100644 --- a/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php +++ b/modules/Connectors/connectors/sources/ext/rest/insideview/insideview.php @@ -72,11 +72,6 @@ class ext_rest_insideview extends ext_rest { return $outModuleList; } - // InsideView currently has no web service to control field mappings - public function getMapping() { - return; - } - public function saveMappingHook($mapping) { $removeList = array(); diff --git a/modules/Contacts/SaveContactOpportunityRelationship.php b/modules/Contacts/SaveContactOpportunityRelationship.php index 260de7f0..c44838e7 100644 --- a/modules/Contacts/SaveContactOpportunityRelationship.php +++ b/modules/Contacts/SaveContactOpportunityRelationship.php @@ -77,5 +77,4 @@ $header_URL = "Location: index.php?action={$_REQUEST['return_action']}&module={$ $GLOBALS['log']->debug("about to post header URL of: $header_URL"); header($header_URL); -?> - +?> \ No newline at end of file diff --git a/modules/Contacts/metadata/popupdefs.php b/modules/Contacts/metadata/popupdefs.php index f6077372..b2203e05 100644 --- a/modules/Contacts/metadata/popupdefs.php +++ b/modules/Contacts/metadata/popupdefs.php @@ -48,7 +48,7 @@ $popupMeta = array( 'account_name' => 'accounts.name', 'account_id' => 'accounts.id'), 'searchInputs' => - array('first_name', 'last_name', 'account_name'), + array('first_name', 'last_name', 'account_name', 'email'), 'create' => array('formBase' => 'ContactFormBase.php', 'formBaseClass' => 'ContactFormBase', @@ -86,6 +86,7 @@ $popupMeta = array( array('name' => 'account_name', 'type' => 'varchar',), 'title', 'lead_source', + 'email', array('name' => 'campaign_name', 'displayParams' => array('hideButtons'=>'true', 'size'=>30, 'class'=>'sqsEnabled sqsNoAutofill')), array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))), ) diff --git a/modules/Contacts/tpls/QuickCreate.tpl b/modules/Contacts/tpls/QuickCreate.tpl index ea9a023d..f79ef1cb 100644 --- a/modules/Contacts/tpls/QuickCreate.tpl +++ b/modules/Contacts/tpls/QuickCreate.tpl @@ -63,11 +63,13 @@ {{/if}} {* -- Begin QuickCreate Specific -- *} +{if $smarty.request.action != 'SubpanelEdits'} <input type="hidden" name="primary_address_street" value="{$smarty.request.primary_address_street}"> <input type="hidden" name="primary_address_city" value="{$smarty.request.primary_address_city}"> <input type="hidden" name="primary_address_state" value="{$smarty.request.primary_address_state}"> <input type="hidden" name="primary_address_country" value="{$smarty.request.primary_address_country}"> <input type="hidden" name="primary_address_postalcode" value="{$smarty.request.primary_address_postalcode}"> +{/if} <input type="hidden" name="is_ajax_call" value="1"> <input type="hidden" name="to_pdf" value="1"> {* -- End QuickCreate Specific -- *} diff --git a/modules/Contacts/vardefs.php b/modules/Contacts/vardefs.php index 127eb6c5..a7740f09 100644 --- a/modules/Contacts/vardefs.php +++ b/modules/Contacts/vardefs.php @@ -118,6 +118,20 @@ array ( 'vname' => 'LBL_OPPORTUNITY_ROLE_ID', 'studio' => array('listview' => false), ), + //bug 42902 + 'email'=> array( + 'name' => 'email', + 'type' => 'email', + 'query_type' => 'default', + 'source' => 'non-db', + 'operator' => 'subquery', + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', + 'db_field' => array( + 'id', + ), + 'vname' =>'LBL_ANY_EMAIL', + 'studio' => array('visible'=>false, 'searchview'=>true), + ), 'opportunity_role' => array( 'name' => 'opportunity_role', diff --git a/modules/Contacts/views/view.quickcreate.php b/modules/Contacts/views/view.quickcreate.php new file mode 100644 index 00000000..69f522db --- /dev/null +++ b/modules/Contacts/views/view.quickcreate.php @@ -0,0 +1,59 @@ +<?php +//FILE SUGARCRM flav=pro || flav=sales +if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + +require_once('include/MVC/View/views/view.quickcreate.php'); + +class ContactsViewQuickcreate extends ViewQuickcreate +{ + public function preDisplay() + { + parent::preDisplay(); + if($this->_isDCForm) { + //XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu + // NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks + // resulting in none of the fields properly populating when selecting an account + if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office; + if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street; + if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city; + if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state; + if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country; + if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode; + } + } +} \ No newline at end of file diff --git a/modules/Currencies/Currency.php b/modules/Currencies/Currency.php index 33b0f8bd..b45ec872 100644 --- a/modules/Currencies/Currency.php +++ b/modules/Currencies/Currency.php @@ -471,30 +471,38 @@ function format_money($amount, $for_display = TRUE) { *(default "."). Special case: when num_grp_sep is ".", it will return NULL as the num_grp_sep. * @return array Two element array, first item is num_grp_sep, 2nd item is dec_sep */ -function get_number_seperators($reset_sep = false) { +function get_number_seperators($reset_sep = false) +{ global $current_user, $sugar_config; static $dec_sep = null; static $num_grp_sep = null; - if ( $reset_sep ) { - // This is typically only used during unit-tests + // This is typically only used during unit-tests + // TODO: refactor this. unit tests should not have static dependencies + if ($reset_sep) + { $dec_sep = $num_grp_sep = null; } - if($dec_sep == null) { + if ($dec_sep == null) + { $dec_sep = $sugar_config['default_decimal_seperator']; - if(!empty($current_user->id)){ - $user_dec_sep = $current_user->getPreference('dec_sep'); - $dec_sep =(empty($user_dec_sep) ? $sugar_config['default_decimal_seperator'] : $user_dec_sep); - } + if (!empty($current_user->id)) + { + $user_dec_sep = $current_user->getPreference('dec_sep'); + $dec_sep = (empty($user_dec_sep) ? $sugar_config['default_decimal_seperator'] : $user_dec_sep); + } } - if($num_grp_sep == null) { + + if ($num_grp_sep == null) + { $num_grp_sep = $sugar_config['default_number_grouping_seperator']; - if(!empty($current_user->id)){ - $user_num_grp_sep = $current_user->getPreference('num_grp_sep'); - $num_grp_sep =(empty($user_num_grp_sep) ? $sugar_config['default_number_grouping_seperator'] : $user_num_grp_sep); - } + if (!empty($current_user->id)) + { + $user_num_grp_sep = $current_user->getPreference('num_grp_sep'); + $num_grp_sep = (empty($user_num_grp_sep) ? $sugar_config['default_number_grouping_seperator'] : $user_num_grp_sep); + } } return array($num_grp_sep, $dec_sep); diff --git a/modules/Documents/vardefs.php b/modules/Documents/vardefs.php index 7b48195b..14aaa0a6 100644 --- a/modules/Documents/vardefs.php +++ b/modules/Documents/vardefs.php @@ -125,7 +125,7 @@ $dictionary['Document'] = array('table' => 'documents', 'type' => 'enum', 'len' => 100, 'options' => 'document_category_dom', - 'reportable'=>false, + 'reportable'=>true, ), 'subcategory_id' => @@ -135,7 +135,7 @@ $dictionary['Document'] = array('table' => 'documents', 'type' => 'enum', 'len' => 100, 'options' => 'document_subcategory_dom', - 'reportable'=>false, + 'reportable'=>true, ), 'status_id' => diff --git a/modules/DynamicFields/DynamicField.php b/modules/DynamicFields/DynamicField.php index a3567e59..d82d9c09 100644 --- a/modules/DynamicFields/DynamicField.php +++ b/modules/DynamicFields/DynamicField.php @@ -191,11 +191,7 @@ class DynamicField { global $beanList; if (! empty ( $beanList [$module] )) { - $object = $beanList [$module]; - - if ($object == 'aCase') { - $object = 'Case'; - } + $object = BeanFactory::getObjectName($module); if(empty($GLOBALS['dictionary'][$object]['fields'])){ //if the vardef isn't loaded let's try loading it. @@ -472,8 +468,10 @@ class DynamicField { } $object_name = $beanList[$this->module]; - if ($object_name == 'aCase') { - $object_name = 'Case'; + //Some modules like cases have a bean name that doesn't match the object name + if (empty($GLOBALS['dictionary'][$object_name])) { + $newName = BeanFactory::getObjectName($this->module); + $object_name = $newName != false ? $newName : $object_name; } $GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='" . $this->module . $widget->name . "'"); diff --git a/modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php b/modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php index bfdfcf15..9cafb19a 100644 --- a/modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php +++ b/modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php @@ -228,6 +228,7 @@ class TemplateRelatedTextField extends TemplateText{ $idName = $basename.++$count.'_c' ; } $id->name = $idName ; + $id->reportable = false; $id->save($df); // record the id field's name, and save diff --git a/modules/EmailMan/controller.php b/modules/EmailMan/controller.php index 1ed79c9c..e3571c79 100644 --- a/modules/EmailMan/controller.php +++ b/modules/EmailMan/controller.php @@ -77,7 +77,9 @@ class EmailManController extends SugarController if( !isset($_POST['mail_smtpauth_req']) ) { $_POST['mail_smtpauth_req'] = 0; - $_POST['notify_allow_default_outbound'] = 0; //If smtp auth is disabled ensure outbound is disabled. + if (empty($_POST['campaignConfig'])) { + $_POST['notify_allow_default_outbound'] = 0; // If smtp auth is disabled ensure outbound is disabled. + } } if( !empty($_POST['notify_allow_default_outbound']) ) diff --git a/modules/EmailMarketing/EditView.html b/modules/EmailMarketing/EditView.html index 51dba9cb..5703186b 100644 --- a/modules/EmailMarketing/EditView.html +++ b/modules/EmailMarketing/EditView.html @@ -79,7 +79,7 @@ </tr> <tr> <td scope="row"><slot>{MOD.LBL_START_DATE_TIME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td> - <td class="datafield"><slot><table cellpadding="0" cellspacing="0"><tr><td nowrap><input name='date_start' onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');" id='jscal_field' size='11' tabindex='1' maxlength='10' type="text" value="{DATE_START}"> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{CALENDAR_DATEFORMAT}" id="jscal_trigger" align="absmiddle"> </td> + <td class="datafield"><slot><table cellpadding="0" cellspacing="0"><tr><td nowrap><input name='date_start' onblur="parseDate(this, '{CALENDAR_DATEFORMAT}');" id='date_start_date' size='11' tabindex='1' maxlength='10' type="text" value="{DATE_START}"> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{CALENDAR_DATEFORMAT}" id="jscal_trigger" align="absmiddle"> </td> <td nowrap><input type="text" size='5' maxlength='5' name='time_start' tabindex="1" value="{TIME_START}"/>{TIME_MERIDIEM}</td></tr><tr><td nowrap><span class="dateFormat">{USER_DATEFORMAT}</span></td><td nowrap><span class="dateFormat">{TIME_FORMAT}</span></td></tr></table></slot></td> <td scope="row"><slot>{MOD.LBL_TEMPLATE} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td> <td class="datafield"> @@ -120,7 +120,7 @@ </form> <script type="text/javascript"> Calendar.setup ({ - inputField : "jscal_field", ifFormat : "{CALENDAR_DATEFORMAT}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1 + inputField : "date_start_date", ifFormat : "{CALENDAR_DATEFORMAT}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1 }); function show_edit_template_link(field) { diff --git a/modules/EmailMarketing/vardefs.php b/modules/EmailMarketing/vardefs.php index 72db2184..29c6bba5 100644 --- a/modules/EmailMarketing/vardefs.php +++ b/modules/EmailMarketing/vardefs.php @@ -95,6 +95,7 @@ $dictionary['EmailMarketing'] = array('table' => 'email_marketing' 'type' => 'varchar', 'len' => '255', 'importable' => 'required', + 'required' => true ), 'from_name' => //starting from 4.0 from_name is obsolete..replaced with inbound_email_id array ( @@ -103,6 +104,7 @@ $dictionary['EmailMarketing'] = array('table' => 'email_marketing' 'type' => 'varchar', 'len' => '100', 'importable' => 'required', + 'required' => true ), 'from_addr' => array ( @@ -111,6 +113,7 @@ $dictionary['EmailMarketing'] = array('table' => 'email_marketing' 'type' => 'varchar', 'len' => '100', 'importable' => 'required', + 'required' => true ), 'reply_to_name' => array ( @@ -139,6 +142,7 @@ $dictionary['EmailMarketing'] = array('table' => 'email_marketing' 'vname' => 'LBL_DATE_START', 'type' => 'datetime', 'importable' => 'required', + 'required' => true ), 'template_id' => diff --git a/modules/EmailTemplates/Delete.php b/modules/EmailTemplates/Delete.php index 06fb98f8..d20fe344 100644 --- a/modules/EmailTemplates/Delete.php +++ b/modules/EmailTemplates/Delete.php @@ -56,6 +56,7 @@ if(!$focus->ACLAccess('Delete')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } +sugar_cache_clear('select_array:'.$focus->object_name.'namebase_module=\''.$focus->base_module.'\'name'); $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/EmailTemplates/EditView.php b/modules/EmailTemplates/EditView.php index 10973d5a..edb1ffc2 100644 --- a/modules/EmailTemplates/EditView.php +++ b/modules/EmailTemplates/EditView.php @@ -187,6 +187,11 @@ $xtpl->assign("JSLANG", $jsLang); $xtpl->assign("ID", $focus->id); if(isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", ""); + +//Bug45632 +if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", ""); +//Bug45632 + if(isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", ""); if(isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", ""); if( $focus->published == 'on') diff --git a/modules/EmailTemplates/Save.php b/modules/EmailTemplates/Save.php index a983b32f..faae5096 100644 --- a/modules/EmailTemplates/Save.php +++ b/modules/EmailTemplates/Save.php @@ -50,6 +50,7 @@ $focus = populateFromPost('', $focus); require_once('modules/EmailTemplates/EmailTemplateFormBase.php'); $form = new EmailTemplateFormBase(); +sugar_cache_clear('select_array:'.$focus->object_name.'namebase_module=\''.$focus->base_module.'\'name'); if(isset($_REQUEST['inpopupwindow']) and $_REQUEST['inpopupwindow'] == true) { $focus=$form->handleSave('',false, false); //do not redirect. $body1 = " diff --git a/modules/Emails/EmailUIAjax.php b/modules/Emails/EmailUIAjax.php index 5db88ed8..d8deb4f5 100644 --- a/modules/Emails/EmailUIAjax.php +++ b/modules/Emails/EmailUIAjax.php @@ -59,6 +59,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); $showFolders = unserialize(base64_decode($current_user->getPreference('showFolders', 'Emails'))); + if (isset($_REQUEST['emailUIAction'])) { switch($_REQUEST['emailUIAction']) { @@ -1608,4 +1609,5 @@ eoq; $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: default"); echo "NOOP"; break; - } \ No newline at end of file + } // switch + } // if diff --git a/modules/Emails/javascript/EmailUICompose.js b/modules/Emails/javascript/EmailUICompose.js index c239224a..a92108c8 100644 --- a/modules/Emails/javascript/EmailUICompose.js +++ b/modules/Emails/javascript/EmailUICompose.js @@ -1440,8 +1440,8 @@ SE.composeLayout = { } - var openTag = '<div><span><span>'; - var closeTag = '</span></span></div>'; + var openTag = '<div><span> </span>'; + var closeTag = '<span> </span></div>'; var t = tinyMCE.getInstanceById('htmleditor' + idx); //IE 6 Hack if(typeof(t) != 'undefined') @@ -1502,7 +1502,14 @@ SE.composeLayout = { } else if(SUGAR.email2.userPrefs.signatures.signature_prepend == 'true') { var newHtml = '<br/>' + openTag + newSignature + closeTag + html; } else { - var newHtml = html + openTag + newSignature + closeTag; + var body = html.indexOf('</body>'); + if (body > -1) { + var part1 = html.substr(0, body); + var part2 = html.substr(body, html.length); + var newHtml = part1 + openTag + newSignature + closeTag + part2; + } else { + var newHtml = html + openTag + newSignature + closeTag; + } } //tinyMCE.setContent(newHtml); t.setContent(newHtml); diff --git a/modules/Emails/javascript/ajax.js b/modules/Emails/javascript/ajax.js index 8802fc4e..b9870857 100644 --- a/modules/Emails/javascript/ajax.js +++ b/modules/Emails/javascript/ajax.js @@ -189,7 +189,7 @@ var AjaxObject = { // apply attachment values SUGAR.email2.composeLayout.loadAttachments(a.attachments); - setTimeout("callbackReplyForward.finish(globalA);", 500); + setTimeout("callbackReplyForward.finish(globalA,0,1);", 500); }, /** @@ -1481,18 +1481,26 @@ var callbackRefreshSugarFolders = { }; var callbackReplyForward = { success : AjaxObject.handleReplyForward, - finish : function(a, retryCount) { + finish : function(a, retryCount,isReOrFwDraft) { if (typeof(retryCount) == 'undefined') { retryCount = 0; } else { retryCount++; } + if (typeof(isReOrFwDraft) == 'undefined') { + isReOrFwDraft = 0; + } var idx = SUGAR.email2.composeLayout.currentInstanceId; var t = tinyMCE.getInstanceById('htmleditor' + idx); try { var html = t.getContent(); + html = " "; + //add hr tag if this is not a reply draft or forward draft + if(!isReOrFwDraft){ + html += "<div><hr></div>"; + } + html += a.description; - html = " <div><hr></div>" + a.description; t.setContent(html);// diff --git a/modules/Emails/javascript/grid.js b/modules/Emails/javascript/grid.js index 41e0bfbd..4c6f4a69 100644 --- a/modules/Emails/javascript/grid.js +++ b/modules/Emails/javascript/grid.js @@ -211,8 +211,8 @@ function gridInit() { //Override Paging request construction grid.set("generateRequest", function(oState, oSelf) { oState = oState || {pagination:null, sortedBy:null}; - var sort = (oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[1].getKey(); - var dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc"; + var sort = (oState.sortedBy) ? oState.sortedBy.key : oSelf.getColumnSet().keys[5].getKey(); + var dir = (oState.sortedBy && oState.sortedBy.dir === YAHOO.widget.DataTable.CLASS_ASC) ? "asc" : "desc"; var startIndex = (oState.pagination) ? oState.pagination.recordOffset : 0; var results = (oState.pagination) ? oState.pagination.rowsPerPage : null; // Build the request diff --git a/modules/Home/UnifiedSearchAdvanced.php b/modules/Home/UnifiedSearchAdvanced.php index 0c7f7edf..e477795c 100644 --- a/modules/Home/UnifiedSearchAdvanced.php +++ b/modules/Home/UnifiedSearchAdvanced.php @@ -149,6 +149,16 @@ class UnifiedSearchAdvanced { } + /** + * search + * + * Search function run when user goes to Show All and runs a search again. This outputs the search results + * calling upon the various listview display functions for each module searched on. + * + * Todo: Sync this up with SugarSpot.php search method. + * + * + */ function search() { $unified_search_modules = $this->getUnifiedSearchModules(); @@ -258,6 +268,16 @@ class UnifiedSearchAdvanced { $innerJoins[$field] = $def; $def['innerjoin'] = str_replace('INNER', 'LEFT', $def['innerjoin']); } + + if(isset($seed->field_defs[$field]['type'])) + { + $type = $seed->field_defs[$field]['type']; + if($type == 'int' && !is_numeric($this->query_string)) + { + continue; + } + } + $unifiedSearchFields[ $moduleName ] [ $field ] = $def ; $unifiedSearchFields[ $moduleName ] [ $field ][ 'value' ] = $this->query_string ; } @@ -361,8 +381,7 @@ class UnifiedSearchAdvanced { if (!isset($beanFiles[$beanName])) continue; - if($beanName == 'aCase') $beanName = 'Case'; - + $beanName = BeanFactory::getObjectName($moduleName); $manager = new VardefManager ( ); $manager->loadVardef( $moduleName , $beanName ) ; @@ -385,7 +404,13 @@ class UnifiedSearchAdvanced { if(file_exists("custom/modules/{$moduleName}/metadata/SearchFields.php")) { require "custom/modules/{$moduleName}/metadata/SearchFields.php" ; - } + } + + //If there are $searchFields are empty, just continue, there are no search fields defined for the module + if(empty($searchFields[$moduleName])) + { + continue; + } $isCustomModule = preg_match('/^([a-z0-9]{1,5})_([a-z0-9_]+)$/i' , $moduleName); @@ -416,6 +441,17 @@ class UnifiedSearchAdvanced { } } + foreach ($searchFields[$moduleName] as $field => $def) + { + if ( + isset($def['force_unifiedsearch']) + and $def['force_unifiedsearch'] + ) + { + $fields[$field] = $def; + } + } + if(count($fields) > 0) { $supported_modules [$moduleName] ['fields'] = $fields; if (isset($dictionary[$beanName]['unified_search_default_enabled']) && $dictionary[$beanName]['unified_search_default_enabled'] === TRUE) diff --git a/modules/InboundEmail/DetailView.html b/modules/InboundEmail/DetailView.html index 18ef8abb..0d292f05 100644 --- a/modules/InboundEmail/DetailView.html +++ b/modules/InboundEmail/DetailView.html @@ -63,7 +63,7 @@ <input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='InboundEmail'; this.form.return_action.value='index'; this.form.isDuplicate.value=true; this.form.action.value='EditView'" type="submit" name="Duplicate" value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} "> -<input title="{APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='InboundEmail'; this.form.return_action.value='ListView'; this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')" type="submit" name="Delete" value=" {APP.LBL_DELETE_BUTTON_LABEL} "> +<input title="{APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value='InboundEmail'; this.form.return_action.value='ListView'; this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')" type="submit" name="Delete" id="Delete" value=" {APP.LBL_DELETE_BUTTON_LABEL} "> </form> </td> </tr> diff --git a/modules/InboundEmail/EditView.html b/modules/InboundEmail/EditView.html index d41ab173..e497e0d1 100644 --- a/modules/InboundEmail/EditView.html +++ b/modules/InboundEmail/EditView.html @@ -66,7 +66,7 @@ <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> - <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save'; {CHOOSER_SCRIPT} this.form.return_id.value='{RETURN_ID}'; return checkformdata()" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " {IE_DISABLED}> + <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save'; {CHOOSER_SCRIPT} this.form.return_id.value='{RETURN_ID}'; return checkformdata()" type="submit" name="button" id="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " {IE_DISABLED}> <input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'; if(this.form.record.value == '' && this.form.origin_id.value != '') this.form.record.value=this.form.origin_id.value;" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} "> <input title="{MOD.LBL_TEST_BUTTON_TITLE}" type='button' @@ -93,7 +93,7 @@ <td valign="top" scope="row" width="15%" NOWRAP> <slot>{MOD.LBL_NAME}: <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> </slot></td> <td valign="top" width="35%"> - <slot><input name='name' tabindex='10' size='30' maxlength='255' type="text" value="{NAME}" {IE_DISABLED}></slot></td> + <slot><input name='name' id='name' tabindex='10' size='30' maxlength='255' type="text" value="{NAME}" {IE_DISABLED}></slot></td> <td valign="top" scope="row"> <slot>{MOD.LBL_STATUS}: </slot></td> <td valign="top" width="35%"><slot> @@ -108,7 +108,7 @@ <slot>{MOD.LBL_LOGIN}: <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> </slot></td> <td valign="top" width="35%"> - <slot><input name='email_user' tabindex='70' size='30' maxlength='100' type="text" value="{USER}" autocomplete="off" {IE_DISABLED}></slot></td> + <slot><input name='email_user' id='email_user' tabindex='70' size='30' maxlength='100' type="text" value="{USER}" autocomplete="off" {IE_DISABLED}></slot></td> </tr> <tr> <td valign="top" scope="row" width="15%" NOWRAP> diff --git a/modules/InboundEmail/InboundEmail.js b/modules/InboundEmail/InboundEmail.js index fad64eb3..83a0d38c 100644 --- a/modules/InboundEmail/InboundEmail.js +++ b/modules/InboundEmail/InboundEmail.js @@ -43,7 +43,8 @@ if(word.indexOf('%')>0){fragment1=word.substr(0,word.indexOf('%'));fragment2=wor return words;} function ie_test_open_popup_with_submit(module_name,action,pageTarget,width,height,mail_server,protocol,port,login,password,mailbox,ssl,personal,formName,ie_id) {if(!formName)formName="testSettingsView";var words=getEncryptedPassword(login,password,mailbox);var isPersonal=(personal)?'true':'false';if(!isDataValid(formName,true)){return;} -ie_id=(typeof document.getElementById(formName).ie_id!='undefined')?document.getElementById(formName).ie_id:'';URL='index.php?' +if(typeof(ie_id)=='undefined'||ie_id=='') +ie_id=(typeof document.getElementById(formName).ie_id!='undefined')?document.getElementById(formName).ie_id.value:'';URL='index.php?' +'module='+module_name +'&to_pdf=1' +'&action='+action diff --git a/modules/Leads/metadata/convertdefs.php b/modules/Leads/metadata/convertdefs.php index beecbfeb..bb130a02 100644 --- a/modules/Leads/metadata/convertdefs.php +++ b/modules/Leads/metadata/convertdefs.php @@ -257,6 +257,7 @@ $viewdefs['Calls']['ConvertLead'] = array( $viewdefs['Meetings']['ConvertLead'] = array( 'copyData' => false, 'required' => false, + 'relationship' => 'meetings_users', 'templateMeta' => array( 'form'=>array( 'hidden'=>array( diff --git a/modules/Leads/metadata/popupdefs.php b/modules/Leads/metadata/popupdefs.php index 6a867fa0..dc6f5eda 100644 --- a/modules/Leads/metadata/popupdefs.php +++ b/modules/Leads/metadata/popupdefs.php @@ -67,6 +67,7 @@ $popupMeta = array ( 'name' => 'last_name', 'width' => '10%', ), + 'email', 'account_name' => array ( 'type' => 'varchar', diff --git a/modules/Leads/vardefs.php b/modules/Leads/vardefs.php index 20a0bbfb..2b3d77ce 100644 --- a/modules/Leads/vardefs.php +++ b/modules/Leads/vardefs.php @@ -340,6 +340,20 @@ $dictionary['Lead'] = array('table' => 'leads','audited'=>true, 'unified_search' 'options' => 'dom_meeting_accept_status', 'importable' => 'false', ), + //bug 42902 + 'email'=> array( + 'name' => 'email', + 'type' => 'email', + 'query_type' => 'default', + 'source' => 'non-db', + 'operator' => 'subquery', + 'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE', + 'db_field' => array( + 'id', + ), + 'vname' =>'LBL_ANY_EMAIL', + 'studio' => array('visible'=>false, 'searchview'=>true), + ), 'webtolead_email1' => array ( 'name' => 'webtolead_email1', @@ -454,7 +468,7 @@ $dictionary['Lead'] = array('table' => 'leads','audited'=>true, 'unified_search' array ( 'name' => 'calls', 'type' => 'link', - 'relationship' => 'calls_leads', + 'relationship' => 'lead_calls', 'source'=>'non-db', 'vname'=>'LBL_CALLS', ), diff --git a/modules/Leads/views/view.convertlead.php b/modules/Leads/views/view.convertlead.php index 490f9a96..72689315 100644 --- a/modules/Leads/views/view.convertlead.php +++ b/modules/Leads/views/view.convertlead.php @@ -168,6 +168,23 @@ class ViewConvertLead extends SugarView //Special case where company and person have the same field with a different name $focus->phone_office = $this->focus->phone_work; } + else if (strpos($field, "billing_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ + { + $tmp_field = str_replace("billing_", "primary_", $field); + $focus->field_defs[$field]["type"] = "text"; + if (isset($this->focus->$tmp_field)) { + $focus->$field = $this->focus->$tmp_field; + } + } + + else if (strpos($field, "shipping_address") !== false && $focus->field_defs[$field]["type"] == "varchar") /* Bug 42219 fix */ + { + $tmp_field = str_replace("shipping_", "primary_", $field); + if (isset($this->focus->$tmp_field)) { + $focus->$field = $this->focus->$tmp_field; + } + $focus->field_defs[$field]["type"] = "text"; + } else if (isset($this->focus->$field)) { $focus->$field = $this->focus->$field; @@ -291,17 +308,17 @@ class ViewConvertLead extends SugarView */ protected function handleSave() { - require_once('modules/Campaigns/utils.php'); + require_once('modules/Campaigns/utils.php'); require_once("include/formbase.php"); - $lead = false; - if (!empty($_REQUEST['record'])) - { - $lead = new Lead(); - $lead->retrieve($_REQUEST['record']); - } + $lead = false; + if (!empty($_REQUEST['record'])) + { + $lead = new Lead(); + $lead->retrieve($_REQUEST['record']); + } - global $beanList; - $this->loadDefs(); + global $beanList; + $this->loadDefs(); $beans = array(); $selectedBeans = array(); $selects = array(); @@ -311,40 +328,48 @@ class ViewConvertLead extends SugarView $beans['Contacts']->new_with_id = true; // Bug 39287 - Check for Duplicates on selected modules before save - if ( !empty($_REQUEST['selectedContact']) ) { + if (!empty($_REQUEST['selectedContact'])) + { $beans['Contacts']->retrieve($_REQUEST['selectedContact']); - if ( !empty($beans['Contacts']->id) ) { + if (!empty($beans['Contacts']->id)) + { $beans['Contacts']->new_with_id = false; unset($_REQUEST["convert_create_Contacts"]); unset($_POST["convert_create_Contacts"]); } } - elseif (!empty($_REQUEST["convert_create_Contacts"]) && $_REQUEST["convert_create_Contacts"] != "false" && !isset($_POST['ContinueContact'])) { + elseif (!empty($_REQUEST["convert_create_Contacts"]) && $_REQUEST["convert_create_Contacts"] != "false" && !isset($_POST['ContinueContact'])) + { require_once('modules/Contacts/ContactFormBase.php'); $contactForm = new ContactFormBase(); $duplicateContacts = $contactForm->checkForDuplicates('Contacts'); - if(isset($duplicateContacts)){ - echo $contactForm->buildTableForm($duplicateContacts); + + if (isset($duplicateContacts)) + { + echo $contactForm->buildTableForm($duplicateContacts, 'Contacts'); return; } $this->new_contact = true; } - if ( !empty($_REQUEST['selectedAccount']) ) { + if (!empty($_REQUEST['selectedAccount'])) + { $_REQUEST['account_id'] = $_REQUEST['selectedAccount']; - unset($_REQUEST["convert_create_Accounts"]); - unset($_POST["convert_create_Accounts"]); + unset($_REQUEST["convert_create_Accounts"]); + unset($_POST["convert_create_Accounts"]); } - elseif (!empty($_REQUEST["convert_create_Accounts"]) && $_REQUEST["convert_create_Accounts"] != "false" && empty($_POST['ContinueAccount'])){ + elseif (!empty($_REQUEST["convert_create_Accounts"]) && $_REQUEST["convert_create_Accounts"] != "false" && empty($_POST['ContinueAccount'])) + { require_once('modules/Accounts/AccountFormBase.php'); $accountForm = new AccountFormBase(); $duplicateAccounts = $accountForm->checkForDuplicates('Accounts'); - if(isset($duplicateAccounts)){ + if (isset($duplicateAccounts)) + { echo $accountForm->buildTableForm($duplicateAccounts); return; } } - foreach($this->defs as $module => $vdef) + foreach ($this->defs as $module => $vdef) { //Create a new record if "create" was selected if (!empty($_REQUEST["convert_create_$module"]) && $_REQUEST["convert_create_$module"] != "false") @@ -358,85 +383,117 @@ class ViewConvertLead extends SugarView } //If an existing bean was selected, relate it to the contact - else if (!empty($vdef['ConvertLead']['select'])) { - //Save the new record + else if (!empty($vdef['ConvertLead']['select'])) + { + //Save the new record $select = $vdef['ConvertLead']['select']; - $fieldDef = $beans['Contacts']->field_defs[$select]; - if (!empty($fieldDef['id_name']) && !empty($_REQUEST[$fieldDef['id_name']])) - { - $beans['Contacts']->$fieldDef['id_name'] = $_REQUEST[$fieldDef['id_name']]; - $selects[$module] = $_REQUEST[$fieldDef['id_name']]; - if (!empty($_REQUEST[$select])) - { - $beans['Contacts']->$select = $_REQUEST[$select]; - } - // Bug 39268 - Add the existing beans to a list of beans we'll potentially add the lead's activities to - $bean = loadBean($module); + $fieldDef = $beans['Contacts']->field_defs[$select]; + if (!empty($fieldDef['id_name']) && !empty($_REQUEST[$fieldDef['id_name']])) + { + $beans['Contacts']->$fieldDef['id_name'] = $_REQUEST[$fieldDef['id_name']]; + $selects[$module] = $_REQUEST[$fieldDef['id_name']]; + if (!empty($_REQUEST[$select])) + { + $beans['Contacts']->$select = $_REQUEST[$select]; + } + // Bug 39268 - Add the existing beans to a list of beans we'll potentially add the lead's activities to + $bean = loadBean($module); $bean->retrieve($_REQUEST[$fieldDef['id_name']]); $selectedBeans[$module] = $bean; - } + } } } - $this->handleActivities($lead, $beans); - // Bug 39268 - Add the lead's activities to the selected beans - $this->handleActivities($lead, $selectedBeans); + $this->handleActivities($lead, $beans); + // Bug 39268 - Add the lead's activities to the selected beans + $this->handleActivities($lead, $selectedBeans); - //link selected account to lead if it exists - if(!empty($selectedBeans['Accounts'])){ + //link selected account to lead if it exists + if (!empty($selectedBeans['Accounts'])) + { $lead->account_id = $selectedBeans['Accounts']->id; } //Handle non-contacts relationships - foreach($beans as $bean) + foreach ($beans as $bean) { - if (!empty($lead)) - { - if (empty($bean->assigned_user_id)) - { - $bean->assigned_user_id = $lead->assigned_user_id; - } - $leadsRel = $this->findRelationship($bean, $lead); - if (!empty($leadsRel)) - { - $bean->load_relationship ($leadsRel) ; - if (!$bean->$leadsRel->isParentRelationship()) { - $bean->$leadsRel->add($lead); - } - } - } - //Special case code for opportunities->Accounts - if ($bean->object_name == "Opportunity" && empty($bean->account_id)) - { - if( isset($beans['Accounts'])) { - $bean->account_id = $beans['Accounts']->id; - $bean->account_name = $beans['Accounts']->name; - } - else if (!empty($selects['Accounts'])){ - $bean->account_id = $selects['Accounts']; - } - } + if (!empty($lead)) + { + if (empty($bean->assigned_user_id)) + { + $bean->assigned_user_id = $lead->assigned_user_id; + } + $leadsRel = $this->findRelationship($bean, $lead); + if (!empty($leadsRel)) + { + $bean->load_relationship($leadsRel); + $relObject = $bean->$leadsRel->getRelationshipObject(); + if ($relObject->relationship_type == "one-to-many" && $bean->$leadsRel->_get_bean_position()) + { + $id_field = $relObject->rhs_key; + $lead->$id_field = $bean->id; + } + else + { + $bean->$leadsRel->add($lead->id); + } + } + } + //Special case code for opportunities->Accounts + if ($bean->object_name == "Opportunity" && empty($bean->account_id)) + { + if (isset($beans['Accounts'])) + { + $bean->account_id = $beans['Accounts']->id; + $bean->account_name = $beans['Accounts']->name; + } + else if (!empty($selects['Accounts'])) + { + $bean->account_id = $selects['Accounts']; + } + } - $this->copyAddressFields($bean, $beans['Contacts']); + //create meetings-users relationship + if ($bean->object_name == "Meeting") + { + $bean = $this->setMeetingsUsersRelationship($bean); + } + $this->copyAddressFields($bean, $beans['Contacts']); - $bean->save(); - //if campaign id exists then there should be an entry in campaign_log table for the newly created contact: bug 44522 - if(isset($lead->campaign_id) && $lead->campaign_id != null && $bean->object_name == "Contact"){ - campaign_log_lead_or_contact_entry($lead->campaign_id,$lead, $beans['Contacts'],'contact'); + $bean->save(); + //if campaign id exists then there should be an entry in campaign_log table for the newly created contact: bug 44522 + if (isset($lead->campaign_id) && $lead->campaign_id != null && $bean->object_name == "Contact") + { + campaign_log_lead_or_contact_entry($lead->campaign_id, $lead, $beans['Contacts'], 'contact'); } } if (!empty($lead)) - { //Mark the original Lead converted - $lead->status = "Converted"; - $lead->converted = '1'; - $lead->in_workflow = true; - $lead->save(); - } + { //Mark the original Lead converted + $lead->status = "Converted"; + $lead->converted = '1'; + $lead->in_workflow = true; + $lead->save(); + } $this->displaySaveResults($beans); } + public function setMeetingsUsersRelationship($bean) + { + global $current_user; + $meetingsRel = $this->findRelationshipByName($bean, $this->defs['Meetings']['ConvertLead']['relationship']); + if (!empty($meetingsRel)) + { + $bean->load_relationship($meetingsRel); + $bean->$meetingsRel->add($current_user->id); + return $bean; + } + else + { + return false; + } + } protected function displaySaveResults( $beans ) @@ -747,7 +804,8 @@ class ViewConvertLead extends SugarView require_once("modules/TableDictionary.php"); foreach ($from->field_defs as $field=>$def) { - if (isset($def['type']) && $def['type'] == "link" && isset($def['relationship'])) { + if (isset($def['type']) && $def['type'] == "link" && isset($def['relationship'])) + { $rel_name = $def['relationship']; $rel_def = ""; if (isset($dictionary[$from->object_name]['relationships']) && isset($dictionary[$from->object_name]['relationships'][$rel_name])) @@ -778,6 +836,19 @@ class ViewConvertLead extends SugarView return false; } + protected function findRelationshipByName($from, $rel_name) + { + global $dictionary; + require_once("modules/TableDictionary.php"); + foreach ($from->field_defs as $field => $def) + { + if (isset($def['relationship']) && $def['relationship'] == $rel_name) + { + return $field; + } + } + return false; + } /** * @see SugarView::_getModuleTitleParams() */ diff --git a/modules/MailMerge/Step2.html b/modules/MailMerge/Step2.html index 0a9724bd..db7ca065 100644 --- a/modules/MailMerge/Step2.html +++ b/modules/MailMerge/Step2.html @@ -135,6 +135,8 @@ var mWhere = "{MAILMERGE_WHERE}"; var orderBy = ''; var relModule = ''; var mTerm = ''; +YAHOO.namespace("mailmerge"); +YAHOO.mailmerge.cObj = null; function submit_form() { @@ -161,7 +163,7 @@ function ajaxSuccess(data) dispCount = result.result_count; nextItems_disabled = true; } - if(result.result_count < (mOffset + max)) + if(result.result_count <= (mOffset + max)) { nextItems_disabled = true; } @@ -220,6 +222,9 @@ function ajaxSuccess(data) } function increaseOffset() { + if(isCallInProgress()) + return; + if(!nextItems_disabled) { mOffset += 20; getObjects(); @@ -228,12 +233,23 @@ function increaseOffset() function decreaseOffset() { + if(isCallInProgress()) + return; + if(!prevItems_disabled) { mOffset -= 20; getObjects(); } } +function isCallInProgress() +{ + if(YAHOO.mailmerge.cObj) + return YAHOO.util.Connect.isCallInProgress(YAHOO.mailmerge.cObj); + else + return false; +} + function getObjects() { var prevButton = document.getElementById("prevButton"); @@ -245,8 +261,7 @@ function getObjects() //rrs var qs = 'index.php?module=MailMerge&action=search&qModule='+module+'&rel_module='+relModule+'&term='+mTerm+'&max='+max+'&order_by='+orderBy+'&offset='+mOffset; - var cObj = YAHOO.util.Connect.asyncRequest('GET', qs,{success: ajaxSuccess, failure: ajaxSuccess}, null); - + YAHOO.mailmerge.cObj = YAHOO.util.Connect.asyncRequest('GET', qs,{success: ajaxSuccess, failure: ajaxSuccess}, null); } function moveRight() diff --git a/modules/MailMerge/Step3.php b/modules/MailMerge/Step3.php index 0c2537b0..dfab3f0d 100644 --- a/modules/MailMerge/Step3.php +++ b/modules/MailMerge/Step3.php @@ -210,7 +210,7 @@ foreach($sel_obj as $key => $value) $result = $seed->db->limitQuery($fullQuery, 0, 1, true, "Error performing limit query"); $full_name = ''; $contact_id = ''; - if($row = $seed->db->fetchByAssoc($result, 0)) + if($row = $seed->db->fetchByAssoc($result, 0)) { if($relModule == "Contacts"){ $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']); } diff --git a/modules/MailMerge/controller.php b/modules/MailMerge/controller.php index ec27fdbd..c0fbfad2 100644 --- a/modules/MailMerge/controller.php +++ b/modules/MailMerge/controller.php @@ -60,7 +60,6 @@ class MailMergeController extends SugarController{ if(!empty($module)){ $where = ''; $deleted = '0'; - $using_cp = false; if(!empty($term)) diff --git a/modules/MailMerge/index.php b/modules/MailMerge/index.php index 7e02f7d1..4ba2b35c 100644 --- a/modules/MailMerge/index.php +++ b/modules/MailMerge/index.php @@ -55,5 +55,4 @@ else $step = '1'; } include ('modules/MailMerge/Step'. clean_string($step). '.php'); -?> - +?> \ No newline at end of file diff --git a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php index 16bfc179..a1f8ec7a 100644 --- a/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php +++ b/modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.php @@ -185,4 +185,4 @@ class MyMeetingsDashlet extends DashletGeneric { } } -?> \ No newline at end of file +?> diff --git a/modules/Meetings/Meeting.php b/modules/Meetings/Meeting.php index 6e5749e1..0457308c 100644 --- a/modules/Meetings/Meeting.php +++ b/modules/Meetings/Meeting.php @@ -442,17 +442,11 @@ class Meeting extends SugarBean { //make sure we grab the localized version of the contact name, if a contact is provided if (!empty($this->contact_id)) { global $locale; - $query = "SELECT first_name, last_name, salutation, title FROM contacts "; - $query .= "WHERE id='$this->contact_id' AND deleted=0"; - $result = $this->db->limitQuery($query,0,1,true," Error filling in contact name fields: "); - - // Get the contact name. - $row = $this->db->fetchByAssoc($result); - - if($row != null) - { - $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], $row['salutation'], $row['title']); - } + // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs + $contact_temp = new Contact(); + $contact_temp->retrieve($this->contact_id); + $contact_temp->_create_proper_name_field(); + $this->contact_name = $contact_temp->full_name; } $meeting_fields['CONTACT_ID'] = $this->contact_id; @@ -731,16 +725,58 @@ class Meeting extends SugarBean { } // end class def // External API integration, for the dropdown list of what external API's are available -function getMeetingsExternalApiDropDown($focus = null, $name = null, $value = null, $view = null) { - require_once('include/externalAPI/ExternalAPIFactory.php'); +//TODO: do we really need focus, name and view params for this function +function getMeetingsExternalApiDropDown($focus = null, $name = null, $value = null, $view = null) +{ + global $dictionary, $app_list_strings; + + $cacheKeyName = 'meetings_type_drop_down'; + + $apiList = sugar_cache_retrieve($cacheKeyName); + if ($apiList === null) + { + require_once('include/externalAPI/ExternalAPIFactory.php'); + + $apiList = ExternalAPIFactory::getModuleDropDown('Meetings'); + $apiList = array_merge(array('Sugar'=>$GLOBALS['app_list_strings']['eapm_list']['Sugar']), $apiList); + sugar_cache_put($cacheKeyName, $apiList); + } - $apiList = ExternalAPIFactory::getModuleDropDown('Meetings'); - $apiList = array_merge(array('Sugar'=>$GLOBALS['app_list_strings']['eapm_list']['Sugar']),$apiList); - if(!empty($value) && empty($apiList[$value])){ - $apiList[$value] = $value; + if(!empty($value) && empty($apiList[$value])) + { + $apiList[$value] = $value; } - return $apiList; + //bug 46294: adding list of options to dropdown list + $apiList = array_merge(getMeetingTypeOptions($dictionary, $app_list_strings), $apiList); + return $apiList; } -?> +/** + * Meeting Type Options Array for dropdown list + * @param array $dictionary - getting type name + * @param array $app_list_strings - getting type options + * @return array Meeting Type Options Array for dropdown list + */ +function getMeetingTypeOptions($dictionary, $app_list_strings) +{ + $result = array(); + + // getting name of meeting type to fill dropdown list by its values + if (isset($dictionary['Meeting']['fields']['type']['options'])) + { + $typeName = $dictionary['Meeting']['fields']['type']['options']; + + if (!empty($app_list_strings[$typeName])) + { + $typeList = $app_list_strings[$typeName]; + + foreach ($typeList as $key => $value) + { + $result[$value] = $value; + } + } + } + + return $result; +} diff --git a/modules/Meetings/metadata/editviewdefs.php b/modules/Meetings/metadata/editviewdefs.php index 9f8271c4..cd8c9ad2 100644 --- a/modules/Meetings/metadata/editviewdefs.php +++ b/modules/Meetings/metadata/editviewdefs.php @@ -82,7 +82,7 @@ array ( 'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script> {sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"} <script>toggle_portal_flag();function toggle_portal_flag() {ldelim} {$TOGGLE_JS} {rdelim} -function formSubmitCheck(){ldelim}if(check_form(\'EditView\') && isValidDuration()){ldelim}document.EditView.submit();{rdelim}{rdelim}</script>', +function formSubmitCheck(){ldelim}if(check_form(\'EditView\')){ldelim}document.EditView.submit();{rdelim}{rdelim}</script>', 'useTabs' => false, ), 'panels' => @@ -127,7 +127,7 @@ function formSubmitCheck(){ldelim}if(check_form(\'EditView\') && isValidDuration array ( 'name' => 'duration_hours', 'label' => 'LBL_DURATION', - 'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<div class="duration"><input name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINS}</span></div>', + 'customCode' => '{literal}<script type="text/javascript">function isValidDuration(formName) { var form = document.getElementById(formName); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { return false; } return true; }</script>{/literal}<div class="duration"><input name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} <span class="dateFormat">{$MOD.LBL_HOURS_MINS}</span></div>', ), array ( 'name' => 'location', diff --git a/modules/Meetings/metadata/quickcreatedefs.php b/modules/Meetings/metadata/quickcreatedefs.php index cdbfb608..708b2a9b 100644 --- a/modules/Meetings/metadata/quickcreatedefs.php +++ b/modules/Meetings/metadata/quickcreatedefs.php @@ -51,16 +51,16 @@ array ( array ( array ( - 'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">', + 'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">', ), 'CANCEL', array ( - 'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">', + 'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\');" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">', ), array ( - 'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Meetings\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}', + 'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Meetings\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}', ), ), 'headerTpl' => 'modules/Meetings/tpls/header.tpl', @@ -133,7 +133,7 @@ array ( array ( 'name' => 'duration_hours', 'label' => 'LBL_DURATION', - 'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<div class="duration"><input name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINS}</div>', + 'customCode' => '{literal}<script type="text/javascript">function isValidDuration(formName) { var form = document.getElementById(formName); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { return false; } return true; }</script>{/literal}<div class="duration"><input name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value} {$MOD.LBL_HOURS_MINS}</div>', ), ), diff --git a/modules/Meetings/vardefs.php b/modules/Meetings/vardefs.php index 6e2ee8e5..8b5d7d6a 100644 --- a/modules/Meetings/vardefs.php +++ b/modules/Meetings/vardefs.php @@ -141,6 +141,10 @@ $dictionary['Meeting'] = array('table' => 'meetings', 'comment' => 'Duration (hours)', 'importable' => 'required', 'required' => true, + 'validation' => array ( + 'type' => 'callback', + 'callback' => 'isValidDuration' + ) ), 'duration_minutes' => array ( diff --git a/modules/ModuleBuilder/Module/StudioBrowser.php b/modules/ModuleBuilder/Module/StudioBrowser.php index 17bffc8e..1d6faa6b 100644 --- a/modules/ModuleBuilder/Module/StudioBrowser.php +++ b/modules/ModuleBuilder/Module/StudioBrowser.php @@ -60,7 +60,7 @@ class StudioBrowser{ function loadRelatableModules(){ $d = dir('modules'); while($e = $d->read()){ - if(substr($e, 0, 1) == '.' || !is_dir('modules/' . $e))continue; + if(substr($e, 0, 1) == '.' || !is_dir('modules/' . $e))continue; if(file_exists('modules/' . $e . '/metadata/studio.php') && isset($GLOBALS [ 'beanList' ][$e])) // installed modules must also exist in the beanList { $this->modules[$e] = StudioModuleFactory::getStudioModule( $e ) ; diff --git a/modules/ModuleBuilder/Module/StudioModule.php b/modules/ModuleBuilder/Module/StudioModule.php index 3872dc56..14780547 100644 --- a/modules/ModuleBuilder/Module/StudioModule.php +++ b/modules/ModuleBuilder/Module/StudioModule.php @@ -55,9 +55,7 @@ class StudioModule $moduleNames = array_change_key_case ( $GLOBALS [ 'app_list_strings' ] [ 'moduleList' ] ) ; $this->name = isset ( $moduleNames [ strtolower ( $module ) ] ) ? $moduleNames [ strtolower ( $module ) ] : strtolower ( $module ) ; $this->module = $module ; - $class = $GLOBALS [ 'beanList' ] [ $this->module ] ; - require_once $GLOBALS [ 'beanFiles' ] [ $class ] ; - $this->seed = new $class ( ) ; + $this->seed = BeanFactory::getBean($this->module); $this->fields = $this->seed->field_defs ; //$GLOBALS['log']->debug ( get_class($this)."->__construct($module): ".print_r($this->fields,true) ) ; } @@ -218,7 +216,7 @@ class StudioModule $nodes = $this->getSearch () ; if ( !empty ( $nodes ) ) { - $layouts [ translate('LBL_SEARCH') ] = array ( 'name' => translate('LBL_SEARCH') , 'type' => 'Folder' , 'children' => $nodes , 'action' => "module=ModuleBuilder&action=wizard&view=search&view_module={$this->module}" , 'imageTitle' => 'SearchForm' , 'help' => 'searchBtn' , 'size' => '48') ; + $layouts [ translate('LBL_SEARCH') ] = array ( 'name' => translate('LBL_SEARCH') , 'type' => 'Folder' , 'children' => $nodes , 'action' => "module=ModuleBuilder&action=wizard&view=search&view_module={$this->module}" , 'imageTitle' => 'BasicSearch' , 'help' => 'searchBtn' , 'size' => '48') ; } return $layouts ; diff --git a/modules/ModuleBuilder/controller.php b/modules/ModuleBuilder/controller.php index 2b24149d..10e9a4cc 100644 --- a/modules/ModuleBuilder/controller.php +++ b/modules/ModuleBuilder/controller.php @@ -569,6 +569,7 @@ class ModuleBuilderController extends SugarController $relationships = new UndeployedRelationships ( $module->getModuleDir () ) ; } $relationships->delete ( $_REQUEST [ 'relationship_name' ] ) ; + $relationships->save () ; require_once("data/Relationships/RelationshipFactory.php"); SugarRelationshipFactory::deleteCache(); @@ -622,6 +623,18 @@ class ModuleBuilderController extends SugarController } $module->removeFieldFromLayouts( $field->name ); $this->view = 'modulefields' ; + + if (isset($GLOBALS['current_language']) && isset($_REQUEST['label']) && + isset($_REQUEST['labelValue']) && isset($_REQUEST['view_module'])) { + $this->DeleteLabel($GLOBALS['current_language'], $_REQUEST['label'], $_REQUEST['labelValue'], $_REQUEST['view_module']); + } + } + + function DeleteLabel($language, $label, $labelvalue, $modulename, $basepath = null, $forRelationshipLabel = false) + { + // remove the label + require_once 'modules/ModuleBuilder/parsers/parser.label.php'; + ParserLabel::removeLabel($language, $label, $labelvalue, $modulename, $basepath, $forRelationshipLabel); } function action_CloneField () @@ -774,11 +787,7 @@ class ModuleBuilderController extends SugarController $module_name = $_REQUEST [ 'view_module' ] ; global $beanList; if (isset($beanList[$module_name]) && $beanList[$module_name]!="") { - $objectName = $beanList[$module_name]; - if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules - { - $objectName = 'Case'; - } + $objectName = BeanFactory::getObjectName($module_name); //Load the vardefs for the module to pass to TemplateRange VardefManager::loadVardef($module_name, $objectName, true); diff --git a/modules/ModuleBuilder/parsers/parser.label.php b/modules/ModuleBuilder/parsers/parser.label.php index 7fff1856..61fc6b3e 100644 --- a/modules/ModuleBuilder/parsers/parser.label.php +++ b/modules/ModuleBuilder/parsers/parser.label.php @@ -74,6 +74,80 @@ class ParserLabel extends ModuleBuilderParser } } + /* + * Remove a label from the language pack for a module + * @param string $language Language key, for example 'en_us' + * @param string $label The label to remove + * @param string $labelvalue The value of the label to remove + * @param string $moduleName Name of the module to which to add these labels + * @param string $basepath base path of the language file + * @param string $forRelationshipLabel whether this is a relationship label + */ + static function removeLabel($language, $label, $labelvalue, $moduleName, $basepath = null, $forRelationshipLabel = false) { + $GLOBALS [ 'log' ]->debug ( "ParserLabel->removeLabels($language, \$label, \$labelvalue, $moduleName, $basepath );" ) ; + if (is_null ( $basepath )) + { + $deployedModule = true ; + $basepath = "custom/modules/$moduleName/language" ; + if($forRelationshipLabel){ + $basepath = "custom/modules/$moduleName/Ext/Language" ; + } + if (! is_dir ( $basepath )) + { + $GLOBALS ['log']->debug("$basepath is not a directory."); + return false; + } + } + + $filename = "$basepath/$language.lang.php" ; + if($forRelationshipLabel){ + $filename = "$basepath/$language.lang.ext.php" ; + } + + $dir_exists = is_dir ( $basepath ) ; + + $mod_strings = array ( ) ; + + if ($dir_exists) + { + if (file_exists ($filename)) + { + // obtain $mod_strings + include ($filename) ; + } else { + $GLOBALS ['log']->debug("file $filename does not exist."); + return false; + } + } else { + $GLOBALS ['log']->debug("directory $basepath does not exist."); + return false ; + } + + $changed = false ; + + if (isset($mod_strings[$label]) && $mod_strings[$label]==$labelvalue) { + unset($mod_strings[$label]); + $changed = true; + } + + if ($changed) + { + if (! write_array_to_file ( "mod_strings", $mod_strings, $filename )) { + $GLOBALS [ 'log' ]->fatal ( "Could not write $filename" ) ; + } else { + // if we have a cache to worry about, then clear it now + if ($deployedModule) { + $GLOBALS ['log']->debug ( "PaserLabel->addLabels: clearing language cache" ) ; + $cache_key = "module_language." . $language . $moduleName ; + sugar_cache_clear ( $cache_key ) ; + LanguageManager::clearLanguageCache ( $moduleName, $language ) ; + } + } + } + + return true ; + } + /* * Add a set of labels to the language pack for a module, deployed or undeployed * @param string $language Language key, for example 'en_us' diff --git a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php index 419786f0..bfe61028 100644 --- a/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php +++ b/modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php @@ -439,9 +439,11 @@ class AbstractRelationship * 3. fields: fields within the join table * 4. indicies: indicies on the join table * @param string $relationshipType Cardinality of the relationship, for example, MB_ONETOONE or MB_ONETOMANY or MB_MANYTOMANY + * @param bool $checkExisting check if a realtionship with the given name is already depolyed in this instance. If so, we will clones its table and column names to preserve existing data. */ - function getRelationshipMetaData ($relationshipType) + function getRelationshipMetaData ($relationshipType, $checkExisting = true) { + global $dictionary; $relationshipName = $this->definition [ 'relationship_name' ] ; $lhs_module = $this->lhs_module ; $rhs_module = $this->rhs_module ; @@ -450,30 +452,39 @@ class AbstractRelationship $rhs_table = $this->getTablename ( $rhs_module ) ; $properties = array ( ) ; - - // first define section 1, the relationship element of the metadata entry - - $rel_properties = array ( ) ; - $rel_properties [ 'lhs_module' ] = $lhs_module ; - $rel_properties [ 'lhs_table' ] = $lhs_table ; - $rel_properties [ 'lhs_key' ] = 'id' ; - $rel_properties [ 'rhs_module' ] = $rhs_module ; - $rel_properties [ 'rhs_table' ] = $rhs_table ; - $rel_properties [ 'rhs_key' ] = 'id' ; - - // because the implementation of one-to-many relationships within SugarBean does not use a join table and so requires schema changes to add a foreign key for each new relationship, - // we currently implement all new relationships as many-to-many regardless of the real type and enforce cardinality through the relate fields and subpanels - $rel_properties [ 'relationship_type' ] = MB_MANYTOMANY ; - // but as we need to display the true cardinality in Studio and ModuleBuilder we also record the actual relationship type - // this property is only used by Studio/MB - $properties [ 'true_relationship_type' ] = $relationshipType ; - if ($this->from_studio) - $properties [ 'from_studio' ] = true; - - $rel_properties [ 'join_table' ] = $this->getValidDBName ( $relationshipName."_c" ) ; - // a and b are in case the module relates to itself - $rel_properties [ 'join_key_lhs' ] = $this->getJoinKeyLHS() ; - $rel_properties [ 'join_key_rhs' ] = $this->getJoinKeyRHS() ; + + if ($checkExisting && !empty($dictionary[$relationshipName]) + && !empty($dictionary[$relationshipName][ 'true_relationship_type' ]) + && $dictionary[$relationshipName][ 'true_relationship_type' ] == $relationshipType + && !empty($dictionary[$relationshipName]['relationships'][$relationshipName])) + { + $rel_properties = $dictionary[$relationshipName]['relationships'][$relationshipName]; + } else + { + // first define section 1, the relationship element of the metadata entry + + $rel_properties = array ( ) ; + $rel_properties [ 'lhs_module' ] = $lhs_module ; + $rel_properties [ 'lhs_table' ] = $lhs_table ; + $rel_properties [ 'lhs_key' ] = 'id' ; + $rel_properties [ 'rhs_module' ] = $rhs_module ; + $rel_properties [ 'rhs_table' ] = $rhs_table ; + $rel_properties [ 'rhs_key' ] = 'id' ; + + // because the implementation of one-to-many relationships within SugarBean does not use a join table and so requires schema changes to add a foreign key for each new relationship, + // we currently implement all new relationships as many-to-many regardless of the real type and enforce cardinality through the relate fields and subpanels + $rel_properties [ 'relationship_type' ] = MB_MANYTOMANY ; + // but as we need to display the true cardinality in Studio and ModuleBuilder we also record the actual relationship type + // this property is only used by Studio/MB + $properties [ 'true_relationship_type' ] = $relationshipType ; + if ($this->from_studio) + $properties [ 'from_studio' ] = true; + + $rel_properties [ 'join_table' ] = $this->getValidDBName ( $relationshipName."_c" ) ; + // a and b are in case the module relates to itself + $rel_properties [ 'join_key_lhs' ] = $this->getJoinKeyLHS() ; + $rel_properties [ 'join_key_rhs' ] = $this->getJoinKeyRHS() ; + } // set the extended properties if they exist = for now, many-to-many definitions do not have to contain a role_column even if role_column_value is set; we'll just create a likely name if missing if (isset ( $this->definition [ 'relationship_role_column_value' ] )) diff --git a/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php b/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php index 07c896e9..8b7560ba 100644 --- a/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php +++ b/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php @@ -267,6 +267,17 @@ class UndeployedRelationships extends AbstractRelationships implements Relations $module->save () ; } + else + { + //Bug42170================================ + $appStrings = $module->getAppListStrings () ; + unset($appStrings [ 'parent_type_display' ] [ $module->key_name ]); + unset($appStrings [ 'record_type_display' ] [ $module->key_name ]); + unset($appStrings [ 'record_type_display_notes' ] [ $module->key_name ]); + $module->setAppListStrings ( 'en_us', $appStrings ) ; + $module->save () ; + //Bug42170================================ + } // use an installDefPrefix of <basepath>/SugarModules for compatibility with the rest of ModuleBuilder $this->installDefs = parent::build ( $basepath, "<basepath>/SugarModules", $relationships ) ; diff --git a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php index e55abb80..3300fb00 100644 --- a/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php @@ -195,6 +195,7 @@ class GridLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat }else{ $availableFields [ $key ] = array ( 'name' => $key , 'label' => isset($def [ 'label' ]) ? $def [ 'label' ] : $def['vname'] ) ; // layouts use 'label' not 'vname' for the label entry } + $availableFields[$key]['translatedLabel'] = translate( isset($def [ 'label' ]) ? $def [ 'label' ] : $def['vname'], $this->_moduleName); } diff --git a/modules/ModuleBuilder/parsers/views/History.php b/modules/ModuleBuilder/parsers/views/History.php index 28810efc..0159f14a 100644 --- a/modules/ModuleBuilder/parsers/views/History.php +++ b/modules/ModuleBuilder/parsers/views/History.php @@ -37,8 +37,9 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once 'modules/ModuleBuilder/parsers/constants.php' ; +require_once 'modules/ModuleBuilder/parsers/views/HistoryInterface.php' ; -class History +class History implements HistoryInterface { private $_dirname ; // base directory for the history files @@ -51,35 +52,34 @@ class History * Constructor * @param string $previewFilename The filename which the caller expects for a preview file */ - function __construct ($previewFilename ) + public function __construct ( $previewFilename ) { $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->__construct( {$previewFilename} )" ) ; $this->_previewFilename = $previewFilename ; $this->_list = array ( ) ; - $this->_dirname = dirname ( $this->_previewFilename ) ; - // create the history directory if it does not already exist - if (! is_dir ( $this->_dirname )) - { - mkdir_recursive ( $this->_dirname ) ; - } $this->_basename = basename ( $this->_previewFilename ) ; - // Reconstruct the history from the saved files - foreach ( scandir ( $this->_dirname ) as $filename ) + $this->_dirname = dirname ( $this->_previewFilename ); + $this->_historyLimit = isset ( $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] ) ? $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] : 50 ; + + // create the history directory if it does not already exist + if (!is_dir($this->_dirname)) { + mkdir_recursive($this->_dirname); + } + else { - if ($filename != "." && $filename != "..") + // Reconstruct the history from the saved files + foreach (glob($this->getFileByTimestamp('*')) as $filename) { - // history files are of the form {$basename}_{$timestamp} - if (preg_match ( '/(' . $this->_basename . ')_(.*)/', $filename, $matches ) == 1) - { - $this->_list [ $matches [ 2 ] ] = $matches [ 2 ] ; - } + if(preg_match('/(\d+)$/', $filename, $match)) { + $this->_list [] = $match[1]; + } } } // now sort the files, oldest first if (count ( $this->_list ) > 0) { - ksort ( $this->_list ) ; + sort ( $this->_list ) ; } } @@ -88,7 +88,7 @@ class History * Get the most recent item in the history * @return timestamp of the first item */ - function getCount () + public function getCount () { return count ( $this->_list ) ; } @@ -97,7 +97,7 @@ class History * Get the most recent item in the history * @return timestamp of the first item */ - function getFirst () + public function getFirst () { return end ( $this->_list ) ; } @@ -106,7 +106,7 @@ class History * Get the oldest item in the history (the default layout) * @return timestamp of the last item */ - function getLast () + public function getLast () { return reset ( $this->_list ) ; } @@ -115,7 +115,7 @@ class History * Get the next oldest item in the history * @return timestamp of the next item */ - function getNext () + public function getNext () { return prev ( $this->_list ) ; } @@ -124,7 +124,7 @@ class History * Get the nth item in the history (where the zeroeth record is the most recent) * @return timestamp of the nth item */ - function getNth ($index) + public function getNth ( $index ) { $value = end ( $this->_list ) ; $i = 0 ; @@ -140,41 +140,37 @@ class History * Add an item to the history * @return String A GMT Unix timestamp for this newly added item */ - function append ($path) + public function append ($path) { // make sure we don't have a duplicate filename - highly unusual as two people should not be using Studio/MB concurrently, but when testing quite possible to do two appends within one second... // because so unlikely in normal use we handle this the naive way by waiting a second so our naming scheme doesn't get overelaborated $retries = 0 ; $now = TimeDate::getInstance()->getNow(); - //$time = $now->format('c'); - $time = $now->__get('ts'); - while ( (file_exists ( $this->_previewFilename . "_" . $time ) && $retries < 5) ) + $new_file = null; + for($retries = 0; !file_exists($new_file) && $retries < 5; $retries ++) { $now->modify("+1 second"); $time = $now->__get('ts'); - $retries ++ ; + $new_file = $this->getFileByTimestamp( $time ); } // now we have a unique filename, copy the file into the history - copy ( $path, $this->_previewFilename . "_" . $time ) ; - $this->_list [ $time ] = $time ; + copy ( $path, $new_file ) ; + $this->_list [ ] = $time ; // finally, trim the number of files we're holding in the history to that specified in the configuration - $max_history = (isset ( $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] )) ? $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] : 50 ; - $count = count ( $this->_list ) ; - // truncate the oldest files, keeping only the most recent $GLOBALS['sugar_config']['studio_max_history'] files (zero=keep them all) - if (($max_history != 0) && ($count > $max_history)) + // truncate the oldest files, keeping only the most recent $GLOBALS['sugar_config']['studio_max_history'] files (zero=keep them all) + $to_delete = $this->getCount() - $this->_historyLimit; + if ($this->_historyLimit != 0 && $to_delete) { // most recent files are at the end of the list, so we strip out the first count-max_history records // can't just use array_shift because it renumbers numeric keys (our timestamp keys) to start from zero... - for ( $i = 0 ; $i < $count - $max_history ; $i ++ ) + for ( $i = 0 ; $i < $to_delete ; $i ++ ) { - $timestamp = reset ( $this->_list ) ; - unset ( $this->_list [ $timestamp ] ) ; - if (! unlink ( $this->_dirname . "/" . $this->_basename . "_" . $timestamp )) + $timestamp = array_shift( $this->_list ) ; + if (! unlink ( $this->getFileByTimestamp( $timestamp ) )) { - $GLOBALS [ 'log' ]->warn ( "History.php: unable to remove history file {$this->_basename}_$timestamp from directory {$this->_dirname} - permissions problem?" ) ; - } + $GLOBALS [ 'log' ]->warn ( "History.php: unable to remove history file {$timestamp} from directory {$this->_dirname} - permissions problem?" ) ; } } } @@ -193,9 +189,9 @@ class History * @param Unix timestamp $timestamp GMT Timestamp of the layout to recover * @return GMT Timestamp if successful, null if failure (if the file could not be copied for some reason) */ - function restoreByTimestamp ($timestamp) + public function restoreByTimestamp ($timestamp) { - $filename = $this->_previewFilename . "_" . $timestamp ; + $filename = $this->getFileByTimestamp( $timestamp ); $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . ": restoring from $filename to {$this->_previewFilename}" ) ; if (file_exists ( $filename )) @@ -209,7 +205,7 @@ class History /* * Undo the restore - revert back to the layout before the restore */ - function undoRestore () + public function undoRestore () { if (file_exists ( $this->_previewFilename )) { @@ -217,4 +213,15 @@ class History } } + /** + * Returns full path to history file by timestamp. This function returns file path even if file doesn't exist + * @param $timestamp + * @return string + */ + public function getFileByTimestamp($timestamp) + { + return $this->_dirname . DIRECTORY_SEPARATOR . $this->_basename . '_' . $timestamp ; + } + + } diff --git a/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php b/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php index 4f67bdc6..2cc2d5a6 100644 --- a/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php @@ -197,10 +197,16 @@ class ListLayoutMetaDataParser extends AbstractMetaDataParser implements MetaDat if (is_array($def['studio'])) { $view = !empty($_REQUEST['view']) ? $_REQUEST['view'] : $this->view; - + + // fix for removing email1 field from studio popup searchview - bug 42902 + if($view == 'popupsearch' && $key == 'email1') + { + return false; + } //end bug 42902 + if (!empty($view) && isset($def['studio'][$view]) && ($def['studio'][$view] !== false && (string)$def['studio'][$view] != 'false' && (string)$def['studio'][$view] != 'hidden')) - { - return true; + { + return true; } if (isset($def['studio']['listview']) && ($def['studio']['listview'] !== false && (string)$def['studio']['listview'] != 'false' && (string)$def['studio']['listview'] != 'hidden')) diff --git a/modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php b/modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php index 42a3517b..1bec9f99 100644 --- a/modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php +++ b/modules/ModuleBuilder/parsers/views/SearchViewMetaDataParser.php @@ -123,13 +123,14 @@ class SearchViewMetaDataParser extends ListLayoutMetaDataParser return true; } + if (isset($def [ 'studio' ]) && is_array($def [ 'studio' ]) && isset($def [ 'studio' ]['searchview'])) + { + return $def [ 'studio' ]['searchview'] !== false && + ($def [ 'studio' ]['searchview'] === true || $def [ 'studio' ]['searchview'] != 'false'); + } + if (!parent::isValidField($key, $def)) return false; - - if (isset($def [ 'studio' ]) && is_array($def [ 'studio' ]) && isset($def [ 'studio' ]['searchview'])) - { - return $def [ 'studio' ]['searchview'] !== false && $def [ 'studio' ]['searchview'] != 'false'; - } //Special case to prevent multiple copies of assigned, modified, or created by user on the search view if (empty ($def[ 'studio' ] ) && $key == "assigned_user_name") @@ -189,20 +190,30 @@ class SearchViewMetaDataParser extends ListLayoutMetaDataParser } return $temp ; } - + + + function normalizeDefs($defs) { + $out = array(); + foreach ($defs as $def) + { + if (is_array($def) && isset($def['name'])) + { + $out[strtolower($def['name'])] = $def; + } + } + return $out; + } + function getOriginalViewDefs() { $defs = $this->implementation->getOriginalViewdefs (); $out = array(); if (!empty($defs) && !empty($defs['layout']) && !empty($defs['layout'][$this->_searchLayout])) { - $defs = $defs['layout'][$this->_searchLayout]; - foreach ($defs as $def) - { - if (is_array($def) && isset($def['name'])) - { - $out[strtolower($def['name'])] = $def; - } - } + if($this->_searchLayout == "basic_search" && !empty($defs['layout']["advanced_search"])) + { + $out = $this->normalizeDefs($defs['layout']["advanced_search"]); + } + $out = array_merge($out, $this->normalizeDefs($defs['layout'][$this->_searchLayout])); } return $out; diff --git a/modules/ModuleBuilder/tpls/layoutView.tpl b/modules/ModuleBuilder/tpls/layoutView.tpl index 940cd6cb..3ae178fc 100644 --- a/modules/ModuleBuilder/tpls/layoutView.tpl +++ b/modules/ModuleBuilder/tpls/layoutView.tpl @@ -81,8 +81,8 @@ {assign var="field" value=$col.name} <div class='le_field' id='{$idCount}'> {if ! $fromModuleBuilder && ($col.name != '(filler)')} - {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editFieldProperties(\'{$idCount}\', \'{$col.label}\');{/capture} - {sugar_getimage name="edit_inline" ext=".gif" other_attributes='$otherAttributes'} + {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editFieldProperties('{$idCount}', '{$col.label}');"{/capture} + {sugar_getimage name="edit_inline" ext=".gif" other_attributes=$otherAttributes} {/if} {if isset($col.type) && ($col.type == 'address')} {$icon_address} @@ -145,8 +145,8 @@ <span class='panel_id' id='le_panelid_{$idCount}'>{$panelid}</span> </div> {if $panelid ne 'default'} - {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editPanelProperties(\'{$idCount}\')"{/capture} - {sugar_getimage name="edit_inline" ext=".gif" other_attributes='$otherAttributes'} + {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editPanelProperties('{$idCount}');"{/capture} + {sugar_getimage name="edit_inline" ext=".gif" other_attributes=$otherAttributes} {/if} {counter name='idCount' assign='idCount' print=false} @@ -158,8 +158,8 @@ {assign var="field" value=$col.name} <div class='le_field' id='{$idCount}'> {if ! $fromModuleBuilder && ($col.name != '(filler)')} - {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editFieldProperties(\'{$idCount}\', \'{$col.label}\');"{/capture} - {sugar_getimage name="edit_inline" ext=".gif" other_attributes='$otherAttributes'} + {capture assign="otherAttributes"}class="le_edit" style="float:right; cursor:pointer;" onclick="editFieldProperties('{$idCount}', '{$col.label}');"{/capture} + {sugar_getimage name="edit_inline" ext=".gif" other_attributes=$otherAttributes} {/if} {if isset($col.type) && ($col.type == 'address')} diff --git a/modules/ModuleBuilder/views/view.labels.php b/modules/ModuleBuilder/views/view.labels.php index 1e09d00f..5826d0a7 100644 --- a/modules/ModuleBuilder/views/view.labels.php +++ b/modules/ModuleBuilder/views/view.labels.php @@ -81,12 +81,7 @@ class ViewLabels extends ViewModulefields $smarty->assign('available_languages',get_languages()); - global $beanList; - $objectName = $beanList[$editModule]; - if($objectName == 'aCase') { - $objectName = 'Case'; - } - + $objectName = BeanFactory::getObjectName($editModule); VardefManager::loadVardef($editModule, $objectName); global $dictionary; $vnames = array(); diff --git a/modules/ModuleBuilder/views/view.modulefield.php b/modules/ModuleBuilder/views/view.modulefield.php index 005a8ac8..380c8f2c 100644 --- a/modules/ModuleBuilder/views/view.modulefield.php +++ b/modules/ModuleBuilder/views/view.modulefield.php @@ -142,21 +142,14 @@ class ViewModulefield extends SugarView } if(! isset($_REQUEST['view_package']) || $_REQUEST['view_package'] == 'studio' || empty ( $_REQUEST [ 'view_package' ] ) ) { - $module = new stdClass; $moduleName = $_REQUEST['view_module']; + $objectName = BeanFactory::getObjectName($moduleName); + $module = BeanFactory::getBean($moduleName); - $objectName = $beanList[$moduleName]; - $className = $objectName; - if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules - $objectName = 'Case'; - - $module = new $className(); - VardefManager::loadVardef($moduleName, $objectName,true); global $dictionary; $module->mbvardefs->vardefs = $dictionary[$objectName]; -// $GLOBALS['log']->debug('vardefs from dictionary = '.print_r($module->mbvardefs->vardefs,true)); $module->name = $moduleName; if(!$ac){ $ac = new AjaxCompose(); diff --git a/modules/ModuleBuilder/views/view.modulefields.php b/modules/ModuleBuilder/views/view.modulefields.php index 7170598a..a3849396 100644 --- a/modules/ModuleBuilder/views/view.modulefields.php +++ b/modules/ModuleBuilder/views/view.modulefields.php @@ -74,19 +74,12 @@ class ViewModulefields extends SugarView $studioClass = new stdClass; $studioClass->name = $module_name; - global $beanList; - $objectName = $beanList[$module_name]; - - if($objectName == 'aCase') // Bug 17614 - renamed aCase as Case in vardefs for backwards compatibililty with 451 modules - $objectName = 'Case'; + $objectName = BeanFactory::getObjectName($module_name); VardefManager::loadVardef($module_name, $objectName, true); global $dictionary; $f = array($mod_strings['LBL_HCUSTOM']=>array(), $mod_strings['LBL_HDEFAULT']=>array()); - // TODO: replace this section to select fields to list with the algorithm in AbstractMetaDataImplmentation::validField() - $def = $this->cullFields($dictionary[$objectName]['fields']); - foreach($dictionary[$objectName]['fields'] as $def) { if ($this->isValidStudioField($def)) { diff --git a/modules/Notes/metadata/SearchFields.php b/modules/Notes/metadata/SearchFields.php index 4752120f..8e54053c 100644 --- a/modules/Notes/metadata/SearchFields.php +++ b/modules/Notes/metadata/SearchFields.php @@ -47,7 +47,8 @@ $searchFields['Notes'] = 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), + 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), + 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), //Range Search Support ); ?> diff --git a/modules/Notes/metadata/searchdefs.php b/modules/Notes/metadata/searchdefs.php index f0f3affa..2ad3f6e6 100644 --- a/modules/Notes/metadata/searchdefs.php +++ b/modules/Notes/metadata/searchdefs.php @@ -46,7 +46,7 @@ array ( 'default' => true, 'width' => '10%', ), - + array ('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'), ), 'advanced_search' => array ( diff --git a/modules/ProjectTask/ProjectTask.php b/modules/ProjectTask/ProjectTask.php index ff8ae5af..1c4f69db 100644 --- a/modules/ProjectTask/ProjectTask.php +++ b/modules/ProjectTask/ProjectTask.php @@ -118,6 +118,7 @@ class ProjectTask extends SugarBean { function save($check_notify = FALSE){ $id = parent::save($check_notify); + $this->updateParentProjectTaskPercentage(); return $id; } @@ -355,6 +356,37 @@ class ProjectTask extends SugarBean { } + public function updateParentProjectTaskPercentage() + { + if (empty($this->parent_task_id)) + { + return; + } + $projectId = $this->project_id; + if (!empty($projectId)) + { + $project = new Project(); + $project->retrieve($projectId); + $projectTasks = $project->getAllProjectTasks(); + $dependentTaskId = $this->parent_task_id; + $collectPercentage = 0; + $parentProjectTask = false; + foreach ($projectTasks as $key => $value) + { + if ($value->project_task_id == $dependentTaskId) + { + $parentProjectTask = $value; + continue; + } + $collectPercentage += $value->percent_complete; + } + if ($parentProjectTask) + { + $parentProjectTask->percent_complete = round($collectPercentage / (count($projectTasks) - 1)); + $parentProjectTask->save(isset($GLOBALS['check_notify']) ? $GLOBALS['check_notify'] : ''); + } + } + } } function getUtilizationDropdown($focus, $field, $value, $view) { diff --git a/modules/Roles/DeleteUserRelationship.php b/modules/Roles/DeleteUserRelationship.php index 1b144dcc..a18e994c 100644 --- a/modules/Roles/DeleteUserRelationship.php +++ b/modules/Roles/DeleteUserRelationship.php @@ -58,5 +58,4 @@ $header_URL = "Location: index.php?action={$_REQUEST['return_action']}&module={$ $GLOBALS['log']->debug("about to post header URL of: $header_URL"); header($header_URL); -?> - +?> \ No newline at end of file diff --git a/modules/Roles/SaveUserRelationship.php b/modules/Roles/SaveUserRelationship.php index 35d75fe5..641dbd42 100644 --- a/modules/Roles/SaveUserRelationship.php +++ b/modules/Roles/SaveUserRelationship.php @@ -65,5 +65,4 @@ echo " window.location=\"{$header_URL}\";\n"; echo "// -->\n"; echo "</script>"; -?> - +?> \ No newline at end of file diff --git a/modules/SavedSearch/SavedSearchSelects.tpl b/modules/SavedSearch/SavedSearchSelects.tpl index ef917a91..a46578d2 100644 --- a/modules/SavedSearch/SavedSearchSelects.tpl +++ b/modules/SavedSearch/SavedSearchSelects.tpl @@ -41,7 +41,7 @@ *} {if $SAVED_SEARCHES_OPTIONS != null} -<select style="width: 110px" name='saved_search_select' id='saved_search_select' onChange='SUGAR.savedViews.shortcut_select(this, "{$SEARCH_MODULE}");'> +<select style="width: auto !important; min-width: 150px;" name='saved_search_select' id='saved_search_select' onChange='SUGAR.savedViews.shortcut_select(this, "{$SEARCH_MODULE}");'> {$SAVED_SEARCHES_OPTIONS} </select> <script> diff --git a/modules/Studio/DropDowns/DropDownHelper.php b/modules/Studio/DropDowns/DropDownHelper.php index 691b6804..28b770b5 100644 --- a/modules/Studio/DropDowns/DropDownHelper.php +++ b/modules/Studio/DropDowns/DropDownHelper.php @@ -38,6 +38,7 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('modules/Administration/Common.php'); +require_once('modules/Administration/QuickRepairAndRebuild.php'); class DropDownHelper{ var $modules = array(); function getDropDownModules(){ @@ -162,6 +163,12 @@ class DropDownHelper{ save_custom_app_list_strings_contents($contents, $selected_lang); sugar_cache_reset(); } + // Bug38011 + $repairAndClear = new RepairAndClear(); + $repairAndClear->module_list = array(translate('LBL_ALL_MODULES')); + $repairAndClear->show_output = false; + $repairAndClear->clearJsLangFiles(); + // ~~~~~~~~ } diff --git a/modules/Studio/wizards/RenameModules.php b/modules/Studio/wizards/RenameModules.php index 491bf102..c9c9d496 100644 --- a/modules/Studio/wizards/RenameModules.php +++ b/modules/Studio/wizards/RenameModules.php @@ -595,7 +595,7 @@ class RenameModules { if( isset($dashletData['module']) && $dashletData['module'] == $moduleName && file_exists($dashletData['meta']) ) { - require_once( $dashletData['meta'] ); + require( $dashletData['meta'] ); $dashletTitle = $dashletMeta[$dashletName]['title']; $currentModuleStrings = return_module_language($this->selectedLanguage, $moduleName); $modStringKey = array_search($dashletTitle,$currentModuleStrings); diff --git a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php index c253264b..d66208b8 100644 --- a/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php +++ b/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php @@ -513,7 +513,7 @@ enableQS(false); foreach ( $linkTypesIn as $key => $value ) { $linkTypes[$key] = translate('LBL_LINK_TYPE_'.$value,'SugarFeed'); } - $ss->assign(' ', $linkTypes); + $ss->assign('link_types', $linkTypes); return $ss->fetch('modules/SugarFeed/Dashlets/SugarFeedDashlet/UserPostForm.tpl'); } diff --git a/modules/Tasks/Task.php b/modules/Tasks/Task.php index 2f80f105..b704ff11 100644 --- a/modules/Tasks/Task.php +++ b/modules/Tasks/Task.php @@ -334,18 +334,12 @@ class Task extends SugarBean { //make sure we grab the localized version of the contact name, if a contact is provided if (!empty($this->contact_id)) { - global $locale; - $query = "SELECT first_name, last_name, salutation, title,phone_work FROM contacts "; - $query .= "WHERE id='$this->contact_id' AND deleted=0"; - $result = $this->db->limitQuery($query,0,1,true," Error filling in contact name fields: "); - - // Get the contact name. - $row = $this->db->fetchByAssoc($result); - - if($row != null) - { - $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], $row['salutation'], $row['title']); - $this->contact_phone=$row['phone_work']; + // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs + $contact = new Contact(); + $contact->retrieve($this->contact_id); + if(isset($contact->id)) { + $this->contact_name = $contact->full_name; + $this->contact_phone = $contact->phone_work; } } diff --git a/modules/Tasks/vardefs.php b/modules/Tasks/vardefs.php index 6f20d232..2e4539a2 100644 --- a/modules/Tasks/vardefs.php +++ b/modules/Tasks/vardefs.php @@ -119,8 +119,9 @@ $dictionary['Task'] = array('table' => 'tasks', 'group'=>'parent_name', 'required'=>false, 'len'=>'255', - 'comment' => 'The Sugar object to which the call is related' - ), + 'comment' => 'The Sugar object to which the call is related', + 'options' => 'parent_type_display', +), 'parent_name'=> array( diff --git a/modules/Trackers/BreadCrumbStack.php b/modules/Trackers/BreadCrumbStack.php index a8673ef6..a7ea53d3 100644 --- a/modules/Trackers/BreadCrumbStack.php +++ b/modules/Trackers/BreadCrumbStack.php @@ -83,7 +83,7 @@ class BreadCrumbStack { $history_max_viewed = (!empty($GLOBALS['sugar_config']['history_max_viewed']))? $GLOBALS['sugar_config']['history_max_viewed'] : 50; } - $query = 'SELECT distinct item_id AS item_id, id, item_summary, module_name, monitor_id, date_modified FROM tracker WHERE user_id = \'' . $user_id . '\' AND visible = 1 ' . $module_query . ' ORDER BY date_modified DESC'; + $query = 'SELECT distinct item_id AS item_id, id, item_summary, module_name, monitor_id, date_modified FROM tracker WHERE user_id = \'' . $user_id . '\' AND deleted = 0 AND visible = 1 ' . $module_query . ' ORDER BY date_modified DESC'; $result = $db->limitQuery($query, 0, $history_max_viewed); $items = array(); while(($row = $db->fetchByAssoc($result))) { diff --git a/modules/Trackers/Tracker.php b/modules/Trackers/Tracker.php index 35538cb5..4be4347c 100644 --- a/modules/Trackers/Tracker.php +++ b/modules/Trackers/Tracker.php @@ -99,7 +99,7 @@ class Tracker extends SugarBean $history_max_viewed = (!empty($GLOBALS['sugar_config']['history_max_viewed']))? $GLOBALS['sugar_config']['history_max_viewed'] : 50; } - $query = 'SELECT item_id, item_summary, module_name, id FROM ' . $this->table_name . ' WHERE id = (SELECT MAX(id) as id FROM ' . $this->table_name . ' WHERE user_id = \'' . $user_id . '\' AND visible = 1' . $module_query . ')'; + $query = 'SELECT item_id, item_summary, module_name, id FROM ' . $this->table_name . ' WHERE id = (SELECT MAX(id) as id FROM ' . $this->table_name . ' WHERE user_id = \'' . $user_id . '\' AND deleted = 0 AND visible = 1' . $module_query . ')'; $result = $this->db->limitQuery($query,0,$history_max_viewed,true,$query); while(($row = $this->db->fetchByAssoc($result))) { $breadCrumb->push($row); diff --git a/modules/UpgradeWizard/commit.php b/modules/UpgradeWizard/commit.php index 901cb4d0..3f9b5674 100644 --- a/modules/UpgradeWizard/commit.php +++ b/modules/UpgradeWizard/commit.php @@ -62,7 +62,7 @@ $curr_lang = 'en_us'; if(isset($GLOBALS['current_language']) && ($GLOBALS['current_language'] != null)){ $curr_lang = $GLOBALS['current_language']; } -return_module_language($curr_lang, 'UpgradeWizard'); +return_module_language($curr_lang, 'UpgradeWizard', true); $standardErrorLevel = error_reporting(); diff --git a/modules/UpgradeWizard/index.php b/modules/UpgradeWizard/index.php index 4a6c332a..e0e215fd 100644 --- a/modules/UpgradeWizard/index.php +++ b/modules/UpgradeWizard/index.php @@ -206,20 +206,6 @@ else{ ); } else{ - /* BEGIN TEMP FIX: - This can be removed post 6.1. As this is a new string that is introduced in 6.1, we can't - effectively load it into a pre 6.1 instance. Running - - global $current_language; - $lang = $current_language; - if(empty($lang)) - $lang = $GLOBALS['sugar_config']['default_language']; - require_once('include/SugarObjects/LanguageManager.php'); - LanguageManager::clearLanguageCache('UpgradeWizard',$lang); - LanguageManager::loadModuleLanguage('UpgradeWizard',$lang,true); - - causes strange theme issues with the Upgrade Wizard. - */ if (empty($mod_strings['LBL_UW_TITLE_LAYOUTS'])) $mod_strings['LBL_UW_TITLE_LAYOUTS'] = 'Layouts'; /* END TEMP FIX */ @@ -288,7 +274,10 @@ if($upgradeStepFile == 'end'){ //if(isset($_SESSION['current_db_version']) && substr($_SESSION['current_db_version'],0,1) == 4){ ob_start(); include('modules/ACL/install_actions.php'); + $old_mod_strings = $mod_strings; + $mod_strings = return_module_language($current_language, 'Administration'); include('modules/Administration/RebuildRelationship.php'); + $mod_strings = $old_mod_strings; //also add the cache cleaning here. if(function_exists('deleteCache')){ deleteCache(); @@ -366,7 +355,7 @@ foreach($installeds as $installed) { // cn: bug 9174 - cleared out upgrade dirs, or corrupt entries in upgrade_history give us bad file paths if(is_file($target_manifest)) { - require_once( "$target_manifest" ); + require_once(getUploadRelativeName($target_manifest) ); $name = empty($manifest['name']) ? $filename : $manifest['name']; $description = empty($manifest['description']) ? $mod_strings['LBL_UW_NONE'] : $manifest['description']; diff --git a/modules/UpgradeWizard/preflight.php b/modules/UpgradeWizard/preflight.php index 4827e58b..234e133b 100644 --- a/modules/UpgradeWizard/preflight.php +++ b/modules/UpgradeWizard/preflight.php @@ -287,12 +287,12 @@ $diffs =''; // aw: BUG 10161: check flavor conversion sql files $sqlFile = ''; // cn: bug if($current_version == $targetVersion) { + $type = $db->getScriptName(); if(preg_match('/(.*?)([^0])$/', $current_version, $matches)) { $current_version = $matches[1].'0'; } - $type = $db->getScriptName(); switch($manifest['name']){ case 'SugarCE to SugarPro': $sqlFile = $current_version.'_ce_to_pro_'.$type; @@ -313,6 +313,8 @@ $diffs =''; break; } } else { + $type = $db->dbType; + if($type == 'oci8') $type = 'oracle'; $sqlFile = $current_version.'_to_'.$targetVersion.'_'.$type; } diff --git a/modules/UpgradeWizard/uw_utils.php b/modules/UpgradeWizard/uw_utils.php index 8e2ac84e..2574566c 100644 --- a/modules/UpgradeWizard/uw_utils.php +++ b/modules/UpgradeWizard/uw_utils.php @@ -38,6 +38,22 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); +/** + * Helper function for upgrade - get path from upload:// name + * @param string $path + * return string + */ +function getUploadRelativeName($path) +{ + if(class_exists('UploadFile')) { + return UploadFile::realpath($path); + } + if(substr($path, 0, 9) == "upload://") { + $path = rtrim($GLOBALS['sugar_config']['upload_dir'], "/\\")."/".substr($path, 9); + } + return $path; +} + /** * Backs-up files that are targeted for patch/upgrade to a restore directory * @param string rest_dir Full path to the directory containing the original, replaced files. @@ -51,14 +67,14 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); function commitMakeBackupFiles($rest_dir, $install_file, $unzip_dir, $zip_from_dir, $errors, $path='') { global $mod_strings; // create restore file directory - mkdir_recursive($rest_dir); + sugar_mkdir($rest_dir, 0775, true); if(file_exists($rest_dir) && is_dir($rest_dir)){ logThis('backing up files to be overwritten...', $path); $newFiles = findAllFiles(clean_path($unzip_dir . '/' . $zip_from_dir), array()); // keep this around for canceling - $_SESSION['uw_restore_dir'] = clean_path($rest_dir); + $_SESSION['uw_restore_dir'] = getUploadRelativeName($rest_dir); foreach ($newFiles as $file) { if (strpos($file, 'md5')) @@ -69,10 +85,7 @@ function commitMakeBackupFiles($rest_dir, $install_file, $unzip_dir, $zip_from_d // make sure the directory exists $cleanDir = $rest_dir . '/' . dirname($cleanFile); - if (!is_dir($cleanDir)) { - mkdir_recursive($cleanDir); - } - + sugar_mkdir($cleanDir, 0775, true); $oldFile = clean_path(getcwd() . '/' . $cleanFile); // only copy restore files for replacements - ignore new files from patch @@ -718,7 +731,7 @@ function upgradeUWFilesCopy($allFiles, $from_dir) { if(is_array($file)) { - upgradeUWFilesCopy($file); + upgradeUWFilesCopy($file, $from_dir); } else { $destFile = str_replace($from_dir."/", "", $file); if(!is_dir(dirname($destFile))) { @@ -1832,7 +1845,7 @@ function prepSystemForUpgrade() { if(empty($base_tmp_upgrade_dir)){ $base_tmp_upgrade_dir = $p_base_tmp_upgrade_dir; } - mkdir_recursive($base_tmp_upgrade_dir); + sugar_mkdir($base_tmp_upgrade_dir, 0775, true); if(!isset($subdirs) || empty($subdirs)){ $subdirs = array('full', 'langpack', 'module', 'patch', 'theme'); } @@ -1855,7 +1868,7 @@ function prepSystemForUpgrade() { // make sure dirs exist if($subdirs != null){ foreach($subdirs as $subdir) { - mkdir_recursive("$base_upgrade_dir/$subdir"); + sugar_mkdir("$base_upgrade_dir/$subdir", 0775, true); } } // array of special scripts that are executed during (un)installation-- key is type of script, value is filename @@ -2506,6 +2519,104 @@ function deletePackageOnCancel(){ } } +function parseAndExecuteSqlFile($sqlScript,$forStepQuery='',$resumeFromQuery='') +{ + global $sugar_config; + $alterTableSchema = ''; + $sqlErrors = array(); + if(!isset($_SESSION['sqlSkippedQueries'])){ + $_SESSION['sqlSkippedQueries'] = array(); + } + $db = DBManagerFactory::getInstance(); + $disable_keys = $db->supports("disable_keys"); + if(strpos($resumeFromQuery,",") != false){ + $resumeFromQuery = explode(",",$resumeFromQuery); + } + if(file_exists($sqlScript)) { + $fp = fopen($sqlScript, 'r'); + $contents = stream_get_contents($fp); + $anyScriptChanges =$contents; + $resumeAfterFound = false; + if(rewind($fp)) { + $completeLine = ''; + $count = 0; + while($line = fgets($fp)) { + if(strpos($line, '--') === false) { + $completeLine .= " ".trim($line); + if(strpos($line, ';') !== false) { + $query = ''; + $query = str_replace(';','',$completeLine); + //if resume from query is not null then find out from where + //it should start executing the query. + + if($query != null && $resumeFromQuery != null){ + if(!$resumeAfterFound){ + if(strpos($query,",") != false){ + $queArray = explode(",",$query); + for($i=0;$i<sizeof($resumeFromQuery);$i++){ + if(strcasecmp(trim($resumeFromQuery[$i]),trim($queArray[$i]))==0){ + $resumeAfterFound = true; + } else { + $resumeAfterFound = false; + break; + } + }//for + + } + elseif(strcasecmp(trim($resumeFromQuery),trim($query))==0){ + $resumeAfterFound = true; + } + } + if($resumeAfterFound){ + $count++; + } + // if $count=1 means it is just found so skip the query. Run the next one + if($query != null && $resumeAfterFound && $count >1){ + $tableName = getAlterTable($query); + if($disable_keys && !empty($tableName)) + { + $db->disableKeys($tableName); + } + $db->query($query); + if($db->checkError()){ + //put in the array to use later on + $_SESSION['sqlSkippedQueries'][] = $query; + } + if($disable_keys && !empty($tableName)) + { + $db->enableKeys($tableName); + } + $progQuery[$forStepQuery]=$query; + post_install_progress($progQuery,$action='set'); + }//if + } + elseif($query != null){ + $tableName = getAlterTable($query); + if($disable_keys && !empty($tableName)) + { + $db->disableKeys($tableName); + } + $db->query($query); + if($disable_keys && !empty($tableName)) + { + $db->enableKeys($tableName); + } + $progQuery[$forStepQuery]=$query; + post_install_progress($progQuery,$action='set'); + if($db->checkError()){ + //put in the array to use later on + $_SESSION['sqlSkippedQueries'][] = $query; + } + } + $completeLine = ''; + } + } + }//while + } + } +} + + function getAlterTable($query){ $query = strtolower($query); if (preg_match('/^\s*alter\s+table\s+/', $query)) { @@ -2881,8 +2992,42 @@ function repairDBForUpgrade($execute=false,$path=''){ */ function upgradeUserPreferences() { + // check the current system wide default_locale_name_format and add it to the list if it's not there + global $sugar_config; + upgradeLocaleNameFormat($sugar_config['default_locale_name_format']); + + $db = &DBManagerFactory::getInstance(); + $result = $db->query("SELECT id FROM users where deleted = '0'"); + while($row = $db->fetchByAssoc($result)) + { + $current_user = new User(); + + // get the user's name locale format, check if it's in our list, add it if it's not, keep it as user's default + upgradeLocaleNameFormat($current_user->getPreference('default_locale_name_format')); + + } //while } +/** + * Checks if a locale name format is part of the default list, if not adds it to the config + * @param $name_format string a local name format string such as 's f l' + * @return bool true on successful write to config file, false on failure; + */ +function upgradeLocaleNameFormat($name_format) { + global $sugar_config, $sugar_version, $mod_strings; + if (!in_array($name_format, $sugar_config['name_formats'])) { + $new_config = sugarArrayMerge($sugar_config['name_formats'], array($name_format=>$name_format)); + $sugar_config['name_formats'] = $new_config; + if(!rebuildConfigFile($sugar_config, $sugar_version)) { + logThis('*** ERROR: could not write config.php! - upgrade will fail!'); + $errors[] = $mod_strings['ERR_UW_CONFIG_WRITE']; + return false; + } + } + return true; +} + + function add_custom_modules_favorites_search(){ $module_directories = scandir('modules'); @@ -3990,6 +4135,9 @@ function upgradeSugarCache($file) if(file_exists("$from_dir/include/utils/sugar_file_utils.php")) { $allFiles[] = "$from_dir/include/utils/sugar_file_utils.php"; } + if(file_exists("$from_dir/include/utils/sugar_file_utils.php")) { + $allFiles[] = "$from_dir/include/utils/sugar_file_utils.php"; + } foreach($allFiles as $k => $file) { $destFile = str_replace($from_dir."/", "", $file); @@ -4056,6 +4204,16 @@ function unlinkUpgradeFiles($version) //First check if we even have the scripts_for_patch/files_to_remove directory require_once('modules/UpgradeWizard/UpgradeRemoval.php'); + /* + if(empty($_SESSION['unzip_dir'])) + { + global $sugar_config; + $base_upgrade_dir = $sugar_config['upload_dir'] . "/upgrades"; + $base_tmp_upgrade_dir = "$base_upgrade_dir/temp"; + $_SESSION['unzip_dir'] = mk_temp_dir( $base_tmp_upgrade_dir ); + } + */ + if(isset($_SESSION['unzip_dir']) && file_exists($_SESSION['unzip_dir'].'/scripts/files_to_remove')) { $files_to_remove = glob($_SESSION['unzip_dir'].'/scripts/files_to_remove/*.php'); @@ -4141,12 +4299,12 @@ if (!function_exists("getValidDBName")) if ($ensureUnique) { $md5str = md5($name); - $tail = substr ( $name, -8) ; + $tail = substr ( $name, -11) ; $temp = substr($md5str , strlen($md5str)-4 ); - $result = substr ( $name, 0, 7) . $temp . $tail ; + $result = substr ( $name, 0, 10) . $temp . $tail ; }else if ($len > ($maxLen - 5)) { - $result = substr ( $name, 0, 8) . substr ( $name, 8 - $maxLen + 5); + $result = substr ( $name, 0, 11) . substr ( $name, 11 - $maxLen + 5); } return strtolower ( $result ) ; } diff --git a/modules/UserPreferences/UserPreference.php b/modules/UserPreferences/UserPreference.php index 4fe9761b..3ebde248 100644 --- a/modules/UserPreferences/UserPreference.php +++ b/modules/UserPreferences/UserPreference.php @@ -490,15 +490,4 @@ class UserPreference extends SugarBean unset($newstr); } - /** - * Utility method to see if the current user is the $_userFocus Object - * - * @return bool - */ - protected function isCurrentUser() - { - global $current_user; - - return ($this->_userFocus instanceof User && $current_user instanceof User && $this->_userFocus->id == $current_user->id); - } } diff --git a/modules/Users/Login.php b/modules/Users/Login.php index cb18fe31..70a07cf5 100644 --- a/modules/Users/Login.php +++ b/modules/Users/Login.php @@ -42,11 +42,22 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ -if(isset($_SESSION['authenticated_user_id'])) { - ob_clean(); - header("Location: index.php?module=Home&action=index"); +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)); + sugar_cleanup(true); - return; + return; } global $current_language, $mod_strings, $app_strings; if(isset($_REQUEST['login_language'])){ diff --git a/modules/Users/User.php b/modules/Users/User.php index 14ec9223..c58152c9 100644 --- a/modules/Users/User.php +++ b/modules/Users/User.php @@ -413,24 +413,18 @@ class User extends Person { return $user->_userPreferenceFocus->getPreference($name, $category); } - /** - * Get WHERE clause that fetches all users counted for licensing purposes - * @return string - */ public static function getLicensedUsersWhere() { - return "deleted=0 AND status='Active' AND user_name !='' AND user_name IS NOT NULL AND is_group=0 AND portal_only=0"; + return "deleted=0 AND status='Active' AND user_name IS NOT NULL AND is_group=0 AND portal_only=0 AND ".$GLOBALS['db']->convert('user_name', 'length').">0"; return "1<>1"; } - /** - * (non-PHPdoc) - * @see Person::save() - */ function save($check_notify = false) { $isUpdate = !empty($this->id) && !$this->new_with_id; + $query = "SELECT count(id) as total from users WHERE status='Active' AND deleted=0 AND is_group=0 AND portal_only=0"; + // wp: do not save user_preferences in this table, see user_preferences module $this->user_preferences = ''; @@ -828,10 +822,16 @@ EOQ; $verified = FALSE; } - if (is_admin($current_user)) { - $remaining_admins = $this->db->getOne("SELECT COUNT(*) as c from users where is_admin = 1 AND deleted=0"); + if (($current_user->is_admin == "on")) { + if($this->db->dbType == 'mssql'){ + $query = "SELECT user_name from users where is_admin = 1 AND deleted=0"; + }else{ + $query = "SELECT user_name from users where is_admin = 'on' AND deleted=0"; + } + $result = $this->db->query($query, true, "Error selecting possible duplicate users: "); + $remaining_admins = $this->db->getRowCount($result); - if (($remaining_admins <= 1) && $this->id == $current_user->id && !is_admin($this)) { + if (($remaining_admins <= 1) && ($this->is_admin != "on") && ($this->id == $current_user->id)) { $GLOBALS['log']->debug("Number of remaining administrator accounts: {$remaining_admins}"); $this->error_string .= $mod_strings['ERR_LAST_ADMIN_1'].$this->user_name.$mod_strings['ERR_LAST_ADMIN_2']; $verified = FALSE; @@ -849,14 +849,14 @@ EOQ; function get_list_view_data() { - global $current_user, $mod_strings; + global $current_user; $user_fields = $this->get_list_view_array(); if ($this->is_admin) - $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '',null,null,'.gif',$mod_strings['LBL_CHECKMARK']); + $user_fields['IS_ADMIN_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', ''); elseif (!$this->is_admin) $user_fields['IS_ADMIN'] = ''; if ($this->is_group) - $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', '',null,null,'.gif',$mod_strings['LBL_CHECKMARK']); + $user_fields['IS_GROUP_IMAGE'] = SugarThemeRegistry::current()->getImage('check_inline', ''); else $user_fields['IS_GROUP_IMAGE'] = ''; $user_fields['NAME'] = empty ($this->name) ? '' : $this->name; @@ -1290,13 +1290,13 @@ EOQ; * @return string */ protected function _fixupModuleForACL($module) { - if($module=='ContractTypes') { + if($module=='ContractTypes') { $module = 'Contracts'; } if(preg_match('/Product[a-zA-Z]*/',$module)) { $module = 'Products'; } - + return $module; } /** @@ -1319,9 +1319,9 @@ EOQ; // These modules don't take kindly to the studio trying to play about with them. static $ignoredModuleList = array('iFrames','Feeds','Home','Dashboard','Calendar','Activities','Reports'); - + $actions = ACLAction::getUserActions($this->id); - + foreach ($beanList as $module=>$val) { // Remap the module name $module = $this->_fixupModuleForACL($module); @@ -1335,14 +1335,14 @@ EOQ; } $key = 'module'; - + if (($this->isAdmin() && isset($actions[$module][$key])) ) { $myModules[] = $module; } } - return $myModules; + return $myModules; } /** * Is this user a system wide admin @@ -1389,9 +1389,9 @@ EOQ; if ($this->isAdmin()) { return true; } - + $devModules = $this->getDeveloperModules(); - + $module = $this->_fixupModuleForACL($module); if (in_array($module,$devModules) ) { @@ -1421,9 +1421,9 @@ EOQ; if ($this->isAdmin()) { return true; } - + $adminModules = $this->getAdminModules(); - + $module = $this->_fixupModuleForACL($module); if (in_array($module,$adminModules) ) { @@ -1477,7 +1477,15 @@ EOQ; $alias = substr($ljVal,$spacePos,$onPos-$spacePos); //add null check to end of the Join statement - $ljVal =' LEFT JOIN '.$ljVal.' and '.$alias.'.id is null '; + // Bug #46390 to use id_c field instead of id field for custom tables + if(substr($alias, -5) != '_cstm') + { + $ljVal =' LEFT JOIN '.$ljVal.' and '.$alias.'.id is null '; + } + else + { + $ljVal =' LEFT JOIN '.$ljVal.' and '.$alias.'.id_c is null '; + } //add statement into new string $new_left_str .= $ljVal; @@ -1517,6 +1525,4 @@ EOQ; return $fdow; } - - } diff --git a/modules/Users/UserViewHelper.php b/modules/Users/UserViewHelper.php index 433931f6..2eeb09a7 100644 --- a/modules/Users/UserViewHelper.php +++ b/modules/Users/UserViewHelper.php @@ -529,13 +529,16 @@ class UserViewHelper { //// Date/time format $dformat = $locale->getPrecedentPreference($this->bean->id?'datef':'default_date_format', $this->bean); $tformat = $locale->getPrecedentPreference($this->bean->id?'timef':'default_time_format', $this->bean); + $nformat = $locale->getPrecedentPreference('default_locale_name_format', $this->bean); $timeOptions = get_select_options_with_id($sugar_config['time_formats'], $tformat); $dateOptions = get_select_options_with_id($sugar_config['date_formats'], $dformat); + $nameOptions = get_select_options_with_id($locale->getPrettyLocaleNameOptions($sugar_config['name_formats']), $nformat); $this->ss->assign('TIMEOPTIONS', $timeOptions); $this->ss->assign('DATEOPTIONS', $dateOptions); + $this->ss->assign('NAMEOPTIONS', $nameOptions); $this->ss->assign('DATEFORMAT', $sugar_config['date_formats'][$dformat]); $this->ss->assign('TIMEFORMAT', $sugar_config['time_formats'][$tformat]); - + $this->ss->assign('NAMEFORMAT', $sugar_config['name_formats'][$nformat]); //// Timezone if(empty($this->bean->id)) { // remove default timezone for new users(set later) diff --git a/modules/Users/tpls/EditViewFooter.tpl b/modules/Users/tpls/EditViewFooter.tpl index 8f1fdbed..a3fccb27 100644 --- a/modules/Users/tpls/EditViewFooter.tpl +++ b/modules/Users/tpls/EditViewFooter.tpl @@ -353,12 +353,10 @@ type='text' maxlength='1' size='1' value='{$NUM_GRP_SEP}' onkeydown='setSigDigits();' onkeyup='setSigDigits();'> </slot></td></tr> - {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC} {$MOD.LBL_LOCALE_NAME_FORMAT_DESC}<br />{$MOD.LBL_LOCALE_NAME_FORMAT_DESC_2}{/capture} + {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC} {$MOD.LBL_LOCALE_NAME_FORMAT_DESC}{/capture} <tr> <td scope="row" valign="top">{$MOD.LBL_LOCALE_DEFAULT_NAME_FORMAT}: {sugar_help text=$smarty.capture.SMARTY_LOCALE_NAME_FORMAT_DESC }</td> - <td valign="top"> - <input onkeyup="setPreview();" onkeydown="setPreview();" id="default_locale_name_format" type="text" tabindex='14' name="default_locale_name_format" value="{$default_locale_name_format}"> - </td> + <td valign="top"><slot><select tabindex='14' id="default_locale_name_format" name="default_locale_name_format" selected="{$default_locale_name_format}">{$NAMEOPTIONS}</select></slot></td> <td width="17%" scope="row"><slot>{$MOD.LBL_DECIMAL_SEP}:</slot> {sugar_help text=$MOD.LBL_DECIMAL_SEP_TEXT }</td> <td ><slot> <input tabindex='14' name='dec_sep' id='default_decimal_seperator' @@ -367,8 +365,6 @@ </slot></td> </tr> <tr> - <td scope="row" valign="top"><i>{$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:</i> </td> - <td valign="top"><input tabindex='14' name="no_value" id="nameTarget" value="" style="border: none;" disabled size="50"></td> <td width="17%" scope="row"><slot>{$MOD.LBL_FDOW}:</slot> {sugar_help text=$MOD.LBL_FDOW_TEXT}</td> <td ><slot> <select tabindex='14' name='fdow'>{html_options options=$FDOWOPTIONS selected=$FDOWCURRENT}</select> @@ -455,4 +451,19 @@ onUserEditView(); </div> </div> -{{include file="include/EditView/footer.tpl"}} +<table width="100%" cellpadding="0" cellspacing="0" border="0" class="actionsContainer"> + <tr> + <td> + <input id="Save" title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" + class="button primary" onclick="if (!set_password(document.forms['EditView'],newrules('{$PWDSETTINGS.minpwdlength}','{$PWDSETTINGS.maxpwdlength}','{$REGEX}'))) return false; if (!Admin_check()) return false; document.forms['EditView'].action.value='Save'; {$CHOOSER_SCRIPT} {$REASSIGN_JS} if(verify_data(EditView)) document.forms['EditView'].submit();" + type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" > + <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" + class="button" onclick="document.forms['EditView'].action.value='{$RETURN_ACTION}'; document.forms['EditView'].module.value='{$RETURN_MODULE}'; document.forms['EditView'].record.value='{$RETURN_ID}'; document.forms['EditView'].submit()" + type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"> + {$BUTTONS} + </td> + <td align="right" nowrap> + <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED} + </td> + </tr> +</table> \ No newline at end of file diff --git a/modules/Users/tpls/wizard.tpl b/modules/Users/tpls/wizard.tpl index 09feb62e..2f1d7b1f 100644 --- a/modules/Users/tpls/wizard.tpl +++ b/modules/Users/tpls/wizard.tpl @@ -249,13 +249,9 @@ function disableReturnSubmission(e) { <td colspan="4"><hr /></td> </tr> <tr> - {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC} {$MOD.LBL_LOCALE_NAME_FORMAT_DESC}<br />{$MOD.LBL_LOCALE_NAME_FORMAT_DESC_2}{/capture} + {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC} {$MOD.LBL_LOCALE_NAME_FORMAT_DESC}{/capture} <td nowrap="nowrap" scope="row" valign="top">{$MOD.LBL_LOCALE_DEFAULT_NAME_FORMAT}: {sugar_help text=$smarty.capture.SMARTY_LOCALE_NAME_FORMAT_DESC }</td> - <td valign="top"> - <input onkeyup="setPreview();" onkeydown="setPreview();" id="default_locale_name_format" type="text" tabindex='14' name="default_locale_name_format" value="{$default_locale_name_format}"> - </td> - <td nowrap="nowrap" scope="row" valign="top"><i>{$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:</i> </td> - <td valign="top"><input tabindex='14' name="no_value" id="nameTarget" value="" style="border: none;" disabled size="30"></td> + <td><slot><select id="default_locale_name_format" tabindex='14' name="default_locale_name_format" selected="{$default_locale_name_format}">{$NAMEOPTIONS}</select></slot></td> </tr> </table> </div> diff --git a/modules/Users/views/view.wizard.php b/modules/Users/views/view.wizard.php index 9408a67a..2e3db7c7 100644 --- a/modules/Users/views/view.wizard.php +++ b/modules/Users/views/view.wizard.php @@ -209,6 +209,8 @@ eoq; $this->ss->assign("NEW_EMAIL", $current_user->emailAddress->getEmailAddressWidgetEditView($current_user->id, $current_user->module_dir)); $this->ss->assign('EMAIL_LINK_TYPE', get_select_options_with_id($app_list_strings['dom_email_link_type'], $current_user->getPreference('email_link_type'))); + $this->ss->assign('NAMEOPTIONS', get_select_options_with_id($locale->getPrettyLocaleNameOptions($sugar_config['name_formats']), $current_user->_userPreferenceFocus->getDefaultPreference('default_locale_name_format'))); + // email smtp $systemOutboundEmail = new OutboundEmail(); $systemOutboundEmail = $systemOutboundEmail->getSystemMailerSettings(); diff --git a/service/core/SoapHelperWebService.php b/service/core/SoapHelperWebService.php index 1917e6aa..23f6b881 100644 --- a/service/core/SoapHelperWebService.php +++ b/service/core/SoapHelperWebService.php @@ -197,7 +197,9 @@ function validate_user($user_name, $password){ $GLOBALS['log']->info('Begin: SoapHelperWebServices->validate_authenticated'); if(!empty($session_id)){ session_id($session_id); - session_start(); + if(empty($_SESSION)) { + session_start(); + } if(!empty($_SESSION['is_valid_session']) && $this->is_valid_ip_address('ip_address') && $_SESSION['type'] == 'user'){ global $current_user; diff --git a/service/core/SugarWebServiceImpl.php b/service/core/SugarWebServiceImpl.php index c939a8e7..51d112c8 100644 --- a/service/core/SugarWebServiceImpl.php +++ b/service/core/SugarWebServiceImpl.php @@ -157,7 +157,6 @@ function get_entries($session, $module_name, $ids, $select_fields, $link_name_to * @exception 'SoapFault' -- The SOAP error, if any */ function get_entry_list($session, $module_name, $query, $order_by,$offset, $select_fields, $link_name_to_fields_array, $max_results, $deleted ){ - $GLOBALS['log']->info('Begin: SugarWebServiceImpl->get_entry_list'); global $beanList, $beanFiles; $error = new SoapError(); @@ -200,7 +199,8 @@ function get_entry_list($session, $module_name, $query, $order_by,$offset, $sele if($using_cp){ $response = $seed->retrieveTargetList($query, $select_fields, $offset,-1,-1,$deleted); }else{ - $response = $seed->get_list($order_by, $query, $offset,-1,-1,$deleted); + /* @var $seed SugarBean */ + $response = $seed->get_list($order_by, $query, $offset,-1,-1,$deleted, false, $select_fields); } // else $list = $response['list']; @@ -867,7 +867,7 @@ function get_document_revision($session, $id) { * @param string[] $modules - array of modules to query * @param int $offset - a specified offset in the query * @param int $max_results - max number of records to return - * @return Array return_search_result - Array('Accounts' => array(array('name' => 'first_name', 'value' => 'John', 'name' => 'last_name', 'value' => 'Do'))) + * @return Array 'entry_list' -- Array('Accounts' => array(array('name' => 'first_name', 'value' => 'John', 'name' => 'last_name', 'value' => 'Do'))) * @exception 'SoapFault' -- The SOAP error, if any */ function search_by_module($session, $search_string, $modules, $offset, $max_results){ diff --git a/service/v3_1/SugarWebServiceUtilv3_1.php b/service/v3_1/SugarWebServiceUtilv3_1.php index f1400b7e..ca2ced69 100644 --- a/service/v3_1/SugarWebServiceUtilv3_1.php +++ b/service/v3_1/SugarWebServiceUtilv3_1.php @@ -148,8 +148,7 @@ class SugarWebServiceUtilv3_1 extends SugarWebServiceUtilv3 if (!isset($beanFiles[$beanName])) return array(); - if($beanName == 'aCase') - $beanName = 'Case'; + $beanName = BeanFactory::getObjectName($moduleName); $manager = new VardefManager ( ); $manager->loadVardef( $moduleName , $beanName ) ; diff --git a/sugar_version.php b/sugar_version.php index 5e3ab61a..5ac5d231 100644 --- a/sugar_version.php +++ b/sugar_version.php @@ -38,10 +38,10 @@ -$sugar_version = '6.4.0beta2'; -$sugar_db_version = '6.4.0beta2'; +$sugar_version = '6.4.0beta3'; +$sugar_db_version = '6.4.0beta3'; $sugar_flavor = 'CE'; -$sugar_build = '7080'; -$sugar_timestamp = '2011-10-26 02:10pm'; +$sugar_build = '7099'; +$sugar_timestamp = '2011-11-02 01:03pm'; ?> diff --git a/tests/SugarTestContactUtilities.php b/tests/SugarTestContactUtilities.php index cf95573a..58c8a515 100755 --- a/tests/SugarTestContactUtilities.php +++ b/tests/SugarTestContactUtilities.php @@ -77,7 +77,22 @@ class SugarTestContactUtilities $contact_ids = self::getCreatedContactIds(); $GLOBALS['db']->query('DELETE FROM contacts WHERE id IN (\'' . implode("', '", $contact_ids) . '\')'); } - + + /** + * removeCreatedContactsEmailAddresses + * + * This function removes email addresses that may have been associated with the contacts created + * + * @static + * @return void + */ + public static function removeCreatedContactsEmailAddresses(){ + $contact_ids = self::getCreatedContactIds(); + $GLOBALS['db']->query('DELETE FROM email_addresses WHERE id IN (SELECT DISTINCT email_address_id FROM email_addr_bean_rel WHERE bean_module =\'Contacts\' AND bean_id IN (\'' . implode("', '", $contact_ids) . '\'))'); + $GLOBALS['db']->query('DELETE FROM emails_beans WHERE bean_module=\'Contacts\' AND bean_id IN (\'' . implode("', '", $contact_ids) . '\')'); + $GLOBALS['db']->query('DELETE FROM email_addr_bean_rel WHERE bean_module=\'Contacts\' AND bean_id IN (\'' . implode("', '", $contact_ids) . '\')'); + } + public static function removeCreatedContactsUsersRelationships(){ $contact_ids = self::getCreatedContactIds(); $GLOBALS['db']->query('DELETE FROM contacts_users WHERE contact_id IN (\'' . implode("', '", $contact_ids) . '\')'); diff --git a/tests/SugarTestHelper.php b/tests/SugarTestHelper.php index 54eff9e8..dfd874e6 100755 --- a/tests/SugarTestHelper.php +++ b/tests/SugarTestHelper.php @@ -98,6 +98,9 @@ $focus->retrieveSettings(); $focus->saveSetting('system','adminwizard',1); // include the other test tools +require_once 'SugarTestObjectUtilities.php'; +require_once 'SugarTestProjectUtilities.php'; +require_once 'SugarTestProjectTaskUtilities.php'; require_once 'SugarTestUserUtilities.php'; require_once 'SugarTestLangPackCreator.php'; require_once 'SugarTestThemeUtilities.php'; @@ -128,6 +131,7 @@ class Sugar_PHPUnit_Framework_TestCase extends PHPUnit_Framework_TestCase if(isset($GLOBALS['log'])) { $GLOBALS['log']->info("START TEST: {$this->getName(false)}"); } + SugarCache::instance()->flush(); } protected function assertPostConditions() { @@ -172,6 +176,14 @@ class Sugar_PHPUnit_Framework_OutputTestCase extends PHPUnit_Extensions_OutputTe protected $_notRegex; protected $_outputCheck; + protected function assertPreConditions() + { + if(isset($GLOBALS['log'])) { + $GLOBALS['log']->info("START TEST: {$this->getName(false)}"); + } + SugarCache::instance()->flush(); + } + protected function assertPostConditions() { if(!empty($_REQUEST)) { foreach(array_keys($_REQUEST) as $k) { @@ -190,6 +202,9 @@ class Sugar_PHPUnit_Framework_OutputTestCase extends PHPUnit_Extensions_OutputTe unset($_GET[$k]); } } + if(isset($GLOBALS['log'])) { + $GLOBALS['log']->info("DONE TEST: {$this->getName(false)}"); + } } protected function NotRegexCallback($output) diff --git a/tests/SugarTestLeadUtilities.php b/tests/SugarTestLeadUtilities.php index 2525aeae..fdf14de3 100755 --- a/tests/SugarTestLeadUtilities.php +++ b/tests/SugarTestLeadUtilities.php @@ -76,7 +76,22 @@ class SugarTestLeadUtilities $lead_ids = self::getCreatedLeadIds(); $GLOBALS['db']->query('DELETE FROM leads WHERE id IN (\'' . implode("', '", $lead_ids) . '\')'); } - + + /** + * removeCreatedLeadsEmailAddresses + * + * This function removes email addresses that may have been associated with the leads created + * + * @static + * @return void + */ + public static function removeCreatedLeadsEmailAddresses(){ + $lead_ids = self::getCreatedLeadIds(); + $GLOBALS['db']->query('DELETE FROM email_addresses WHERE id IN (SELECT DISTINCT email_address_id FROM email_addr_bean_rel WHERE bean_module =\'Leads\' AND bean_id IN (\'' . implode("', '", $lead_ids) . '\'))'); + $GLOBALS['db']->query('DELETE FROM emails_beans WHERE bean_module=\'Leads\' AND bean_id IN (\'' . implode("', '", $lead_ids) . '\')'); + $GLOBALS['db']->query('DELETE FROM email_addr_bean_rel WHERE bean_module=\'Leads\' AND bean_id IN (\'' . implode("', '", $lead_ids) . '\')'); + } + public static function removeCreatedLeadsUsersRelationships(){ $lead_ids = self::getCreatedLeadIds(); $GLOBALS['db']->query('DELETE FROM leads_users WHERE lead_id IN (\'' . implode("', '", $lead_ids) . '\')'); diff --git a/tests/SugarTestMeetingUtilities.php b/tests/SugarTestMeetingUtilities.php index 1e667485..5eaf96e5 100755 --- a/tests/SugarTestMeetingUtilities.php +++ b/tests/SugarTestMeetingUtilities.php @@ -42,11 +42,11 @@ class SugarTestMeetingUtilities private function __construct() {} - public static function createMeeting($id = '') + public static function createMeeting($id = '') { $time = mt_rand(); - $name = 'Meeting'; - $meeting = new Meeting(); + $name = 'Meeting'; + $meeting = new Meeting(); $meeting->name = $name . $time; if(!empty($id)) { @@ -61,12 +61,13 @@ class SugarTestMeetingUtilities public static function removeAllCreatedMeetings() { $meeting_ids = self::getCreatedMeetingIds(); - $GLOBALS['db']->query('DELETE FROM meetings WHERE id IN (\'' . implode("', '", $meeting_ids) . '\')'); + $GLOBALS['db']->query(sprintf("DELETE FROM meetings WHERE id IN ('%s')", implode("', '", $meeting_ids))); } - public static function removeMeetingContacts(){ - $meeting_ids = self::getCreatedMeetingIds(); - $GLOBALS['db']->query('DELETE FROM meetings_contacts WHERE meeting_id IN (\'' . implode("', '", $meeting_ids) . '\')'); + public static function removeMeetingContacts() + { + $meeting_ids = self::getCreatedMeetingIds(); + $GLOBALS['db']->query(sprintf("DELETE FROM meetings_contacts WHERE meeting_id IN ('%s')", implode("', '", $meeting_ids))); } public static function addMeetingLeadRelation($meeting_id, $lead_id) { @@ -85,10 +86,17 @@ class SugarTestMeetingUtilities $GLOBALS['db']->query($sql); } + public static function removeMeetingUsers() + { + $meeting_ids = self::getCreatedMeetingIds(); + $GLOBALS['db']->query(sprintf("DELETE FROM meetings_users WHERE meeting_id IN ('%s')", implode("', '", $meeting_ids))); + } + public static function getCreatedMeetingIds() { $meeting_ids = array(); - foreach (self::$_createdMeetings as $meeting) { + foreach (self::$_createdMeetings as $meeting) + { $meeting_ids[] = $meeting->id; } return $meeting_ids; diff --git a/tests/SugarTestObjectUtilities.php b/tests/SugarTestObjectUtilities.php new file mode 100755 index 00000000..909b67b8 --- /dev/null +++ b/tests/SugarTestObjectUtilities.php @@ -0,0 +1,67 @@ +<?php +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + + +class SugarTestObjectUtilities +{ + protected static $_createdInstances = array(); + + private function __construct() + { + + } + + public static function pushObject($project) + { + self::$_createdInstances[] = $project; + } + + public static function removeAllCreatedObjects($tablename) + { + $GLOBALS['db']->query('DELETE FROM ' . $tablename . ' WHERE id IN (\'' . implode("', '", self::getCreatedObjectIds()) . '\')'); + } + + public static function getCreatedObjectIds() + { + $ids = array(); + foreach (self::$_createdInstances as $value) + { + $ids[] = $value->id; + } + return $ids; + } +} \ No newline at end of file diff --git a/tests/SugarTestProjectTaskUtilities.php b/tests/SugarTestProjectTaskUtilities.php new file mode 100755 index 00000000..615318e8 --- /dev/null +++ b/tests/SugarTestProjectTaskUtilities.php @@ -0,0 +1,78 @@ +<?php +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + + +require_once 'modules/ProjectTask/ProjectTask.php'; +class SugarTestProjectTaskUtilities extends SugarTestObjectUtilities +{ + public static $tableName = "project_task"; + + private function __construct() + { + + } + + public static function createProjectTask($projectTaskData) + { + try + { + $projectTask = new ProjectTask(); + $projectTask->project_id = $projectTaskData['project_id']; + $projectTask->parent_task_id = $projectTaskData['parent_task_id']; + $projectTask->project_task_id = $projectTaskData['project_task_id']; + $projectTask->percent_complete = $projectTaskData['percent_complete']; + $projectTask->name = $projectTaskData['name']; + $projectTask->save(); + self::pushObject($projectTask); + return $projectTask; + } + catch (Exception $ex) + { + die("Not all needed params were defined for new project task"); + } + } + + public static function pushProject($project) + { + parent::pushObject($project); + } + + public static function removeAllCreatedProjectTasks() + { + parent::removeAllCreatedObjects(self::$tableName); + } +} diff --git a/tests/SugarTestProjectUtilities.php b/tests/SugarTestProjectUtilities.php new file mode 100755 index 00000000..5189b80d --- /dev/null +++ b/tests/SugarTestProjectUtilities.php @@ -0,0 +1,70 @@ +<?php + +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + + +require_once 'modules/Project/Project.php'; +class SugarTestProjectUtilities extends SugarTestObjectUtilities +{ + public static $tableName = "project"; + + private function __construct() + { + + } + + public static function createProject($id = '') + { + $project = new Project(); + $project->name = "testProject"; + $project->team_id = 1; + $project->team_set_id = 1; + $project->save(); + self::pushObject($project); + return $project; + } + + public static function pushProject($project) + { + parent::pushObject($project); + } + + public static function removeAllCreatedProjects() + { + parent::removeAllCreatedObjects(self::$tableName); + } +} \ No newline at end of file diff --git a/tests/SugarTestViewConvertLeadUtilities.php b/tests/SugarTestViewConvertLeadUtilities.php new file mode 100755 index 00000000..cd19748d --- /dev/null +++ b/tests/SugarTestViewConvertLeadUtilities.php @@ -0,0 +1,55 @@ +<?php +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + +require_once('modules/Leads/views/view.convertlead.php'); + +class SugarTestViewConvertLeadUtilities +{ + private static $_createdViewConvertLeads = array(); + + private function __construct() {} + + public static function createViewConvertLead($id = '') + { + $view_conv_lead = new ViewConvertLead(); + require_once('modules/Leads/metadata/convertdefs.php'); + $view_conv_lead->defs = $viewdefs; + self::$_createdViewConvertLeads[] = $view_conv_lead; + return $view_conv_lead; + } +} +?> \ No newline at end of file diff --git a/tests/data/Bug45896Test.php b/tests/data/Bug45896Test.php new file mode 100755 index 00000000..e0dc1a63 --- /dev/null +++ b/tests/data/Bug45896Test.php @@ -0,0 +1,212 @@ +<?php +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + + +/** + * @brief Try to test download.php for php notices + * @ticket 45896 + */ +class Bug45896Test extends Sugar_PHPUnit_Framework_TestCase +{ + private $curl = null; + private $sessionName = ''; + private $sessionId = ''; + private $backup = array(); + private $user = null; + + /** + * @brief Here we create valid session for anonymous user + * @return void + */ + public function setUp() + { + $this->backup['session.use_cookies'] = ini_get('session.use_cookies'); + ini_set('session.use_cookies', false); + $this->backup['session.use_only_cookies'] = ini_get('session.use_only_cookies'); + ini_set('session.use_only_cookies', false); + + $this->user = SugarTestUserUtilities::createAnonymousUser(); + + $this->curl = curl_init(); + curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($this->curl, CURLOPT_URL, $GLOBALS['sugar_config']['site_url']); + curl_setopt($this->curl, CURLOPT_HEADER, true); + curl_setopt($this->curl, CURLOPT_NOBODY, true); + $headers = curl_exec($this->curl); + $error = curl_errno($this->curl); + if ($error != 0) + { + $this->fail('Curl returns incorrect code'); + } + + $headers = explode("\r\n", trim($headers)); + foreach ($headers as $header) + { + $header = explode(': ', $header, 2); + if ($header[0] == 'Set-Cookie') + { + $header[1] = explode('; ', $header[1]); + $header = reset($header[1]); + $header = explode('=', $header, 2); + $this->sessionName = $header[0]; + $this->sessionId = $header[1]; + } + } + + session_id($this->sessionId); + @session_start(); + $_SESSION['authenticated_user_id'] = $this->user->id; + $_SESSION['authenticated_user_language'] = $GLOBALS['sugar_config']['default_language']; + $_SESSION['unique_key'] = $GLOBALS['sugar_config']['unique_key']; + if ($_SESSION['unique_key'] == false) + { + $this->fail('You must set unique_key value in config.php'); + } + session_write_close(); + } + + /** + * @brief query strings for download random file + * @return array + */ + public function getQueryString() + { + return array( + array('entryPoint=download&id=643da5f0-513c-0933-5222-4e521fc84036&type=SugarFieldImage&isTempFile=1'), + array('entryPoint=download&id=WeShouldTryToDownloadIncorrectFile&type=SugarFieldImage&isTempFile=1'), + array('entryPoint=download&id=WeShouldTryToDownloadIncorrectFile&type=SugarFieldImage'), + array('entryPoint=download&id=WeShouldTryToDownloadIncorrectFile&type=2&isTempFile=1') + ); + } + + /** + * @brief try to download files and to check response for notices + * @dataProvider getQueryString + * @group 45896 + * + * @param array $queryString query string to download any file url + */ + public function testDownload($queryString) + { + $this->markTestSkipped('Need mgusev to fix this test'); + return; + curl_setopt($this->curl, CURLOPT_HEADER, true); + curl_setopt($this->curl, CURLOPT_NOBODY, false); + curl_setopt($this->curl, CURLOPT_URL, $GLOBALS['sugar_config']['site_url'].'?'.$queryString); + curl_setopt( + $this->curl, + CURLOPT_COOKIE, + 'ck_login_id_20='.$this->user->id.'; '. + 'ck_login_language_20=en_us; '. + 'ck_login_theme_20=Sugar; '. + 'globalLinksOpen=true; '. + 'sugar_theme_gm_current=All; '. + 'sugar_user_theme=Sugar; '. + $this->sessionName.'='.$this->sessionId + ); + $content = curl_exec($this->curl); + $error = curl_errno($this->curl); + $stat = curl_getinfo($this->curl); + if ($error != 0) // need only valid curl result + { + $this->fail('Curl returns incorrect code'); + } + elseif ($stat['http_code'] != 200) // need only success header + { + $this->fail('Incorrect HTTP code for test'); + } + + // getting headers + $content = explode("\r\n\r\n", $content, 2); + $content[0] = explode("\r\n", $content[0]); + $headers = array(); + foreach ($content[0] as $header) + { + $header = explode(': ', $header, 2); + if (count($header) != 2) + { + continue; + } + $headers[strtolower($header[0])] = $header[1]; + } + $content = $content[1]; + + // parse for type of content + $headers['content-type'] = explode('/', $headers['content-type'], 2); + $headers['content-type'] = strtolower(reset($headers['content-type'])); + + // thinking what image and application type is valid, text is our test place, other types are fail + switch ($headers['content-type']) { + case 'image' : + case 'application' : + { + $this->assertNotEmpty($content, 'Content should be not empty'); + } + break; + case 'text' : + { + $this->assertContains( + $content, + array( + 'Not a Valid Entry Point', + 'Error. This type is not valid.', + 'Invalid File Reference' + ), + 'Got php notice' + ); + } + break; + default : + { + $this->fail('Received unknown content type'); + } + } + } + + /** + * @brief closing curl connection and restore php.ini parameters + * @return void + */ + public function tearDown() + { + curl_close($this->curl); + foreach ($this->backup as $k=>$v) + { + ini_set($k, $v); + } + } +} diff --git a/tests/data/Bug47949Test.php b/tests/data/Bug47949Test.php new file mode 100755 index 00000000..bb9ca5d9 --- /dev/null +++ b/tests/data/Bug47949Test.php @@ -0,0 +1,76 @@ +<?php + +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU Affero General Public License version 3 as published by the + * Free Software Foundation with the addition of the following permission added + * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK + * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY + * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License along with + * this program; if not, see http://www.gnu.org/licenses or write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA. + * + * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, + * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU Affero General Public License version 3. + * + * In accordance with Section 7(b) of the GNU Affero General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * SugarCRM" logo. If the display of the logo is not reasonably feasible for + * technical reasons, the Appropriate Legal Notices must display the words + * "Powered by SugarCRM". + ********************************************************************************/ + + +require_once('modules/Cases/Case.php'); + +class Bug47949Test extends Sugar_PHPUnit_Framework_TestCase +{ + public function setUp() + { + $this->markTestSkipped('Marking this skipped until we figure out why it is failing.'); + $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + } + + /* + * @group bug47949 + */ + public function testGetRelatedBean() + { + $team_id = 1; + $case = new aCase(); + $case->name = 'testBug47949'; + $case->team_id = $team_id; + $case->team_set_id = 1; + $case->save(); + + $beans = $case->get_linked_beans('teams', 'Team'); + + // teams is based on Link (not Link2), should still work + $this->assertEquals(1, count($beans), 'should have one and only one team'); + $this->assertEquals($team_id, $beans[0]->id, 'incorrect team id, should be ' . $team_id); + + // cleanup + $GLOBALS['db']->query("delete from cases where id= '{$case->id}'"); + } +} diff --git a/tests/include/SugarFields/Fields/File/Bug22505Test.php b/tests/include/Bug45525Test.php similarity index 50% rename from tests/include/SugarFields/Fields/File/Bug22505Test.php rename to tests/include/Bug45525Test.php index 9b96d973..8e71723f 100755 --- a/tests/include/SugarFields/Fields/File/Bug22505Test.php +++ b/tests/include/Bug45525Test.php @@ -34,65 +34,71 @@ * "Powered by SugarCRM". ********************************************************************************/ -require_once('include/SugarFields/Fields/File/SugarFieldFile.php'); - -/** - * @ticket 22505 - * - * Original Bug: Sugar should indicate to customer the max file size that can be uploaded - * - */ -class Bug22505Test extends Sugar_PHPUnit_Framework_TestCase -{ - private $_post_max_size; - private $_upload_max_filesize; - private $_upload_maxsize; - private $_file_field; - - function setUp() - { - $this->_post_max_size = ini_get('post_max_size'); - $this->_upload_max_filesize = ini_get('upload_max_filesize'); - $this->_upload_maxsize = $GLOBALS['sugar_config']['upload_maxsize']; - - $this->_file_field = new Bug22505TestMock('file'); - } - - function tearDown() { - //ini_set('post_max_size',$this->_post_max_size); - //ini_set('upload_max_filesize',$this->_upload_max_filesize); - $GLOBALS['sugar_config']['upload_maxsize'] = $this->_upload_maxsize; - - unset($this->_post_max_size); - unset($this->_upload_max_filesize); - unset($this->_upload_maxsize); - unset($this->_file_field); - } - - function testMaxFileUploadSize() { - $small = '9999'; //9.76 kb - $large = '99999999999999'; - - //Test 1: upload_maxsize is smallest - //ini_set('post_max_size',$small); - //ini_set('upload_max_filesize',$large); - $GLOBALS['sugar_config']['upload_maxsize'] = $small; - $max_size = $this->_file_field->getMaxFileUploadSize(); - - $this->assertEquals($max_size, '9.76 kb','Max file upload size is not 9.76 kb as expected'); - - //Test 2: upload_maxsize is greatest - $GLOBALS['sugar_config']['upload_maxsize'] = $large; - $max_size = $this->_file_field->getMaxFileUploadSize(); - - $this->assertNotEquals($max_size, '9.76 kb','Max file upload size is 9.76 kb which is not expected'); - } -} -class Bug22505TestMock extends SugarFieldFile +class Bug45525 extends Sugar_PHPUnit_Framework_TestCase { - public function getMaxFileUploadSize() + + /** + * @group Bug45525 + */ + var $testLangFile = "cache/upload/myLang.php"; + + public function setUp() + { + if(!file_exists('cache/upload')) + { + mkdir_recursive('cache/upload'); + } + } + + + public function tearDown() { - return parent::getMaxFileUploadSize(); } + + public function testOverwriteDropDown() + { + global $app_list_strings; + $app_list_strings = array("TestList" => array ("A" => "Option A", "B" => "Option B", "C" => "Option C")); + + require_once 'include/utils.php'; + + file_put_contents($this->testLangFile, "<?php\n\$app_list_strings['TestList']['D'] = 'Option D';\n?>"); + + // Initially TestList should have 3 items + $this->assertEquals(3, count($app_list_strings['TestList'])); + + $app_list_strings = _mergeCustomAppListStrings($this->testLangFile, $app_list_strings); + + // After merge with custom language file, TestList should have just 1 item (standard behaviour) + $this->assertEquals(1, count($app_list_strings['TestList'])); + + unlink($this->testLangFile); + + unset($GLOBALS['app_list_strings']); + } + + public function testAppendDropDown() + { + global $app_list_strings; + $app_list_strings = array("TestList" => array ("A" => "Option A", "B" => "Option B", "C" => "Option C")); + + require_once 'include/utils.php'; + + file_put_contents($this->testLangFile, "<?php\n\$exemptDropdowns[] = 'TestList';\n\$app_list_strings['TestList']['D'] = 'Option D';\n?>"); + + // Initially TestList should have 3 items + $this->assertEquals(3, count($app_list_strings['TestList'])); + + $app_list_strings = _mergeCustomAppListStrings($this->testLangFile, $app_list_strings); + + // After merge with custom language file, TestList should have 4 items (after-fix behaviour) + $this->assertEquals(4, count($app_list_strings['TestList'])); + + unlink($this->testLangFile); + + unset($GLOBALS['app_list_strings']); + } + } + diff --git a/tests/include/Dashlets/Bug46217Test.php b/tests/include/Dashlets/Bug46217Test.php new file mode 100755 index 00000000..c75725cd --- /dev/null +++ b/tests/include/Dashlets/Bug46217Test.php @@ -0,0 +1,95 @@ +<?php + +/********************************************************************************* + * SugarCRM Community Edition is a customer relationship management program developed by + * SugarCRM, Inc. Copyright (C) 2004-2011 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". + ********************************************************************************/ + + +/** + * Created: Sep 12, 2011 + */ +include_once('include/Dashlets/DashletRssFeedTitle.php'); + +class Bug46217Test extends Sugar_PHPUnit_Framework_TestCase { + + public $rssFeedClass; + + public function setUp() { + $this->rssFeedClass = new DashletRssFeedTitle(""); + } + + public function tearDown() { + unset($this->rssFeedClass); + } + + public function dataProviderCorrectParse() { + return array( + array('<?xml version="1.0" encoding="UTF-8"?> + <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel> + <title>France Info + http://www.france-info.com + France Info - A la Une + + http://www.france-info.com/IMG/siteon0.gif + France Info + http://www.france-info.com + ', + + 'France Info' + ), + array(' + + + <![CDATA[RSS Title]]> + This is an example of an RSS feed + http://www.someexamplerssdomain.com/main.html + Mon, 06 Sep 2010 00:01:00 +0000 + Mon, 06 Sep 2009 16:45:00 +0000 ', + + 'RSS Title' + ), + ); + } + + /** + * @dataProvider dataProviderCorrectParse + */ + public function testCorrectTitleParse($rssFeed, $expectedTitle) { + $this->rssFeedClass->contents = $rssFeed; + $this->rssFeedClass->getTitle(); + $this->assertEquals($expectedTitle, $this->rssFeedClass->title); + $this->rssFeedClass->convertEncoding(); + $this->assertEquals($expectedTitle, $this->rssFeedClass->title); + } +} \ No newline at end of file diff --git a/tests/include/ListView/ListViewDisplayTest.php b/tests/include/ListView/ListViewDisplayTest.php index d5b841bf..ba384fd6 100755 --- a/tests/include/ListView/ListViewDisplayTest.php +++ b/tests/include/ListView/ListViewDisplayTest.php @@ -213,8 +213,9 @@ class ListViewDisplayTest extends Sugar_PHPUnit_Framework_TestCase $_REQUEST['query'] = ''; $_SESSION['last_search_mod'] = 'foo'; - $this->assertTrue($this->_lvd->shouldProcess('foo')); - $this->assertTrue($this->_lvd->should_process); + //C.L. Because of fix to 40186, the following two tests are now set to assertFalse + $this->assertFalse($this->_lvd->shouldProcess('foo'), 'Assert that ListViewDisplay->shouldProcess is false even if module is the same because no query was specified'); + $this->assertFalse($this->_lvd->should_process, 'Assert that ListViewDisplay->shouldProcess class variable is false'); if ( isset($oldsavequery) ) { $GLOBALS['sugar_config']['save_query'] = $oldsavequery; diff --git a/tests/include/Localization/Bug35413Test.php b/tests/include/Localization/Bug35413Test.php new file mode 100755 index 00000000..af17d2aa --- /dev/null +++ b/tests/include/Localization/Bug35413Test.php @@ -0,0 +1,84 @@ +_localization = new Localization(); + } + + function stringsProvider() + { + return array( + array( + '7cvU3iDI5d7L7O3TIOUg1cfU7N0g3c4g5ezR1NPd5eHU3csg287a', + 'يثشق بهقثىيس ه صاشىف فخ هىرشسفهلشفث غخع', + 'windows-1256' + ), + array( + '7cjT7cjU0+3IwcbExNE=', + 'يبسيبشسيبءئؤؤر', + 'windows-1256' + ) + ); + } + + /** + * Test convert base64 $source to string and convert string from $encoding to utf8. It has to return $utf8string. + * + * @dataProvider stringsProvider + * @ticket 35413 + * @param string $source base64 encoded string in native charset + * @param string $utf8string previous string in utf8 + * @param string $encoding encoding of native string + */ + public function testEncodings($source, $utf8string, $encoding) + { + $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/MassUpdate/MassUpdateTest.php b/tests/include/MassUpdate/MassUpdateTest.php index 1b0de0cc..88fa4dfa 100755 --- a/tests/include/MassUpdate/MassUpdateTest.php +++ b/tests/include/MassUpdate/MassUpdateTest.php @@ -80,10 +80,15 @@ class MassUpdateTest extends Sugar_PHPUnit_Framework_TestCase ); $result = $mass->addStatus('test_dom', 'test_dom', $options); preg_match_all('/value=[\'\"].*?[\'\"]/si', $result, $matches); - $this->assertTrue(isset($matches)); + /* $this->assertTrue(isset($matches)); + $this->assertTrue($matches[0][0] == "value=''"); + $this->assertTrue($matches[0][2] == "value='10'"); + $this->assertTrue($matches[0][3] == "value='20'"); */ $this->assertTrue($matches[0][0] == "value=''"); - $this->assertTrue($matches[0][1] == "value='10'"); - $this->assertTrue($matches[0][3] == "value='30'"); + $this->assertTrue($matches[0][1] == "value='__SugarMassUpdateClearField__'"); + $this->assertTrue($matches[0][2] == "value='10'"); + $this->assertTrue($matches[0][3] == "value='20'"); + $this->assertTrue($matches[0][4] == "value='30'"); } /** @@ -101,8 +106,13 @@ class MassUpdateTest extends Sugar_PHPUnit_Framework_TestCase $result = $mass->addStatusMulti('test_dom', 'test_dom', $options); preg_match_all('/value=[\'\"].*?[\'\"]/si', $result, $matches); $this->assertTrue(isset($matches)); + /*$this->assertTrue($matches[0][0] == "value=''"); + $this->assertTrue($matches[0][2] == "value='10'"); + $this->assertTrue($matches[0][3] == "value='20'"); */ $this->assertTrue($matches[0][0] == "value=''"); - $this->assertTrue($matches[0][1] == "value='10'"); - $this->assertTrue($matches[0][3] == "value='30'"); + $this->assertTrue($matches[0][1] == "value='__SugarMassUpdateClearField__'"); + $this->assertTrue($matches[0][2] == "value='10'"); + $this->assertTrue($matches[0][3] == "value='20'"); + $this->assertTrue($matches[0][4] == "value='30'"); } } diff --git a/tests/include/OutboundEmail/Bug23140Test.php b/tests/include/OutboundEmail/Bug23140Test.php index 2c389033..c196a0a7 100755 --- a/tests/include/OutboundEmail/Bug23140Test.php +++ b/tests/include/OutboundEmail/Bug23140Test.php @@ -1,4 +1,4 @@ -query("DELETE FROM outbound_email WHERE user_id= '{$this->_user->id}'"); if ($this->ob != null) $GLOBALS['db']->query("DELETE FROM outbound_email WHERE id= '{$this->ob->id}'"); if ($this->userOverideAccont != null) $GLOBALS['db']->query("DELETE FROM outbound_email WHERE id= '{$this->userOverideAccont->id}'"); } - + function testSystemAccountMailSettingsChangedUserAccessToUsername() { //User not alloweed to access system email username/password - $GLOBALS['db']->query("INSERT INTO config (category,name,value) VALUES ('notify','allow_default_outbound','2') "); - + $GLOBALS['db']->query("DELETE FROM config where name='allow_default_outbound' AND category='notify'"); + $GLOBALS['db']->query("INSERT INTO config (category,name,value) VALUES ('notify','allow_default_outbound','2')"); + $newSystemPort = 864; $newSystemServer = "system.imap.com"; $newSystemUsername = "system_user_name"; $newSystemPassword = "SYSTEM_PASSWORD"; - + $userID = create_guid(); $ob = new OutboundEmail(); $ob->id = $userID; $ob->new_with_id = TRUE; - $ob->name = 'Sugar Test'; + $ob->name = 'Sugar Test 1'; $ob->type = 'system-override'; $ob->user_id = $this->_user->id; $ob->mail_sendtype = "SMTP"; @@ -87,41 +88,41 @@ class Bug23140Test extends Sugar_PHPUnit_Framework_TestCase $ob->mail_smtppass = "User Pass"; $ob->save(); $this->ob = $ob; - - + + $system = $ob->getSystemMailerSettings(); $system->new_with_id = FALSE; $system->mail_smtpport = $newSystemPort; $system->mail_smtpserver = $newSystemServer; $system->mail_smtpuser = $newSystemUsername; $system->mail_smtppass = $newSystemPassword; - + $system->saveSystem(); - + $obRetrieved = new OutboundEmail(); $obRetrieved->retrieve($userID); - + $this->assertEquals($newSystemPort, $obRetrieved->mail_smtpport, "Could not update users port system-override accounts after system save."); $this->assertEquals($newSystemServer, $obRetrieved->mail_smtpserver, "Could not update users server system-override accounts after system save."); $this->assertEquals($newSystemUsername, $obRetrieved->mail_smtpuser, "Could not update users username system-override accounts after system save."); $this->assertEquals($newSystemPassword, $obRetrieved->mail_smtppass, "Could not update users password system-override accounts after system save."); - + } - - + + function testSystemAccountMailSettingsChangedNoUserAccessToUsername() { //User not alloweed to access system email username/password $GLOBALS['db']->query("DELETE FROM config WHERE category='notify' AND name='allow_default_outbound' "); - + $newSystemPort = 864; $newSystemServer = "system.imap.com"; - + $userID = create_guid(); $ob = new OutboundEmail(); $ob->id = $userID; $ob->new_with_id = TRUE; - $ob->name = 'Sugar Test'; + $ob->name = 'Sugar Test 2'; $ob->type = 'system-override'; $ob->user_id = $this->_user->id; $ob->mail_sendtype = "SMTP"; @@ -129,35 +130,35 @@ class Bug23140Test extends Sugar_PHPUnit_Framework_TestCase $ob->mail_smtppass = "User Pass"; $ob->save(); $this->ob = $ob; - - + + $system = $ob->getSystemMailerSettings(); $system->new_with_id = FALSE; $system->mail_smtpport = $newSystemPort; $system->mail_smtpserver = $newSystemServer; $system->saveSystem(); - + $obRetrieved = new OutboundEmail(); $obRetrieved->retrieve($userID); - + $this->assertEquals($newSystemPort, $obRetrieved->mail_smtpport, "Could not update users system-override accounts after system save."); $this->assertEquals($newSystemServer, $obRetrieved->mail_smtpserver, "Could not update users system-override accounts after system save."); $this->assertEquals("Test User", $obRetrieved->mail_smtpuser, "Could not update users system-override accounts after system save."); $this->assertEquals("User Pass", $obRetrieved->mail_smtppass, "Could not update users system-override accounts after system save."); } - - + + function testUserMailForSystemOverrideRetrieval() { $ob = new OutboundEmail(); - $ob->name = 'Sugar Test'; + $ob->name = 'Sugar Test 3'; $ob->type = 'system-override'; $ob->user_id = $this->_user->id; $ob->mail_sendtype = "SMTP"; $ob->mail_smtpuser = "Test User"; $ob->save(); $this->ob = $ob; - + $retrievedOb = $ob->getUsersMailerForSystemOverride($this->_user->id); $this->assertEquals($ob->name, $retrievedOb->name, "Could not retrieve users system override outbound email account"); $this->assertEquals($ob->type, $retrievedOb->type, "Could not retrieve users system override outbound email account"); @@ -165,71 +166,71 @@ class Bug23140Test extends Sugar_PHPUnit_Framework_TestCase $this->assertEquals($ob->mail_sendtype, $retrievedOb->mail_sendtype, "Could not retrieve users system override outbound email account"); $this->assertEquals("Test User", $retrievedOb->mail_smtpuser, "Could not retrieve users system override outbound email account"); } - + function testDuplicateSystemAccountForUser() { $oe = new OutboundEmail(); $userOverideAccont = $oe->createUserSystemOverrideAccount($this->_user->id, "TEST USER NAME", "TEST PASSWORD"); $this->userOverideAccont = $userOverideAccont; $retrievedOb = $oe->getUsersMailerForSystemOverride($this->_user->id); - + $this->assertEquals("TEST USER NAME", $retrievedOb->mail_smtpuser, "Could not duplicate systems outbound account for user"); $this->assertEquals($this->_user->id, $retrievedOb->user_id, "Could not duplicate systems outbound account for user"); $this->assertEquals("TEST PASSWORD", $retrievedOb->mail_smtppass, "Could not duplicate systems outbound account for user"); $this->assertEquals('system-override', $userOverideAccont->type, "Could not duplicate systems outbound account for user"); } - + function testIsUserAlloweedAccessToSystemOutboundEmail() { $oe = new OutboundEmail(); $GLOBALS['db']->query("DELETE FROM config WHERE category='notify' AND name='allow_default_outbound' "); $emptyTest = $oe->isAllowUserAccessToSystemDefaultOutbound(); $this->assertFalse($emptyTest, "User alloweed access to system outbound email account error"); - + $GLOBALS['db']->query("INSERT INTO config (category,name,value) VALUES ('notify','allow_default_outbound','2') "); $allowTest = $oe->isAllowUserAccessToSystemDefaultOutbound(); $this->assertTrue($allowTest, "User alloweed access to system outbound email account error"); - + $GLOBALS['db']->query("DELETE FROM config WHERE category='notify' AND name='allow_default_outbound' "); $emptyTest = $oe->isAllowUserAccessToSystemDefaultOutbound(); $this->assertFalse($emptyTest, "User alloweed access to system outbound email account error"); - + } - - + + function testIsUserAuthRequiredForOverrideAccount() { $oe = new OutboundEmail(); - + $GLOBALS['db']->query("DELETE FROM config WHERE category='notify' AND name='allow_default_outbound' "); $system = $oe->getSystemMailerSettings(); - + //System does not require auth, no user overide account. $system->mail_smtpauth_req = 0; $system->save(FALSE); - + $notRequired = $oe->doesUserOverrideAccountRequireCredentials($this->_user->id); $this->assertFalse($notRequired, "Test failed for determining if user auth required."); - + //System does require auth, no user overide account. $system->mail_smtpauth_req = 1; $system->save(FALSE); $notRequired = $oe->doesUserOverrideAccountRequireCredentials($this->_user->id); $this->assertTrue($notRequired, "Test failed for determining if user auth required."); - + //System requires auth and users alloweed to use sys defaults. $GLOBALS['db']->query("INSERT INTO config (category,name,value) VALUES ('notify','allow_default_outbound','2') "); $notRequired = $oe->doesUserOverrideAccountRequireCredentials($this->_user->id); $this->assertFalse($notRequired, "Test failed for determining if user auth required."); - - + + //System requires auth but user details are empty and users are not alloweed to use system details.. $GLOBALS['db']->query("DELETE FROM config WHERE category='notify' AND name='allow_default_outbound' "); $userOverideAccont = $oe->createUserSystemOverrideAccount($this->_user->id, "", ""); $this->userOverideAccont = $userOverideAccont; $notRequired = $oe->doesUserOverrideAccountRequireCredentials($this->_user->id); $this->assertTrue($notRequired, "Test failed for determining if user auth required."); - + //User has provided all credentials. $this->userOverideAccont->mail_smtpuser = "TEST USER NAME"; $this->userOverideAccont->mail_smtppass = "TEST PASSWORD"; @@ -237,8 +238,8 @@ class Bug23140Test extends Sugar_PHPUnit_Framework_TestCase $this->userOverideAccont->save(); $notRequired = $oe->doesUserOverrideAccountRequireCredentials($this->_user->id); $this->assertFalse($notRequired, "Test failed for determining if user auth required."); - + } - + } -?> \ No newline at end of file +?> diff --git a/tests/include/SearchForm/Bug45966Test.php b/tests/include/SearchForm/Bug45966Test.php index c31acb40..18b148f9 100755 --- a/tests/include/SearchForm/Bug45966Test.php +++ b/tests/include/SearchForm/Bug45966Test.php @@ -80,9 +80,9 @@ class Bug45966 extends Sugar_PHPUnit_Framework_TestCase { public function tearDown() { unset($this->array); - unset($this->seed); unset($this->form); - SugarTestAccountUtilities::removeAllCreatedAccounts(); + unset($this->seed); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); } diff --git a/tests/include/SearchForm/Bug46713Test.php b/tests/include/SearchForm/Bug46713Test.php index 93f88d88..d83969d8 100755 --- a/tests/include/SearchForm/Bug46713Test.php +++ b/tests/include/SearchForm/Bug46713Test.php @@ -114,7 +114,7 @@ class Bug46713Test extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertGreaterThan(0, strpos($where_clauses[0], "cases.case_number >= '-0.01' AND cases.case_number <= '0.01'")); + $this->assertEquals('cases.case_number = 0', $where_clauses[0]); } } ?> \ No newline at end of file diff --git a/tests/include/SearchForm/RangeSearchTest.php b/tests/include/SearchForm/RangeSearchTest.php index 7b55537b..06b4a053 100755 --- a/tests/include/SearchForm/RangeSearchTest.php +++ b/tests/include/SearchForm/RangeSearchTest.php @@ -143,7 +143,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "opportunities.amount > '10000'"); + $this->assertEquals("opportunities.amount > 10000", $where_clauses[0]); $this->searchForm->searchFields['range_amount'] = array ( 'query_type' => 'default', @@ -153,7 +153,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "opportunities.amount < '10000'"); + $this->assertEquals("opportunities.amount < 10000", $where_clauses[0]); $this->searchForm->searchFields['range_amount'] = array ( 'query_type' => 'default', @@ -163,7 +163,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "opportunities.amount >= '10000'"); + $this->assertEquals("opportunities.amount >= 10000", $where_clauses[0]); $this->searchForm->searchFields['range_amount'] = array ( 'query_type' => 'default', @@ -173,7 +173,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "opportunities.amount <= '10000'"); + $this->assertEquals("opportunities.amount <= 10000", $where_clauses[0]); $this->searchForm->searchFields['range_amount'] = array ( 'query_type' => 'default', @@ -183,7 +183,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "(opportunities.amount IS NULL OR opportunities.amount != '10000')"); + $this->assertEquals("(opportunities.amount IS NULL OR opportunities.amount != 10000)", $where_clauses[0]); $this->searchForm->searchFields['range_amount'] = array ( 'query_type' => 'default', @@ -194,7 +194,7 @@ class RangeSearchTest extends Sugar_PHPUnit_Framework_TestCase ); $where_clauses = $this->searchForm->generateSearchWhere(); - $this->assertEquals($where_clauses[0], "(opportunities.amount >= '9999.99' AND opportunities.amount <= '10000.01')"); + $this->assertEquals("(opportunities.amount >= 9999.99 AND opportunities.amount <= 10000.01)", $where_clauses[0]); } diff --git a/tests/include/Smarty/plugins/FunctionSugarTranslateTest.php b/tests/include/Smarty/plugins/FunctionSugarTranslateTest.php index 046e35a6..16f5929b 100755 --- a/tests/include/Smarty/plugins/FunctionSugarTranslateTest.php +++ b/tests/include/Smarty/plugins/FunctionSugarTranslateTest.php @@ -91,4 +91,49 @@ class FunctionSugarTranslateTest extends Sugar_PHPUnit_Framework_TestCase $smarty) ); } + + public function providerStripColonSting() + { + return array( + array( + "Friend:", + "Friend:", + ), + array( + "Friend : ", + "Friend : ", + ), + array( + ": Friend", + ": Friend", + ), + array( + "Fr:iend", + "Fr:iend", + ), + ); + } + + /** + * @dataProvider providerStripColonSting + * @ticket 41983 + */ + public function testStripColonString($string, $returnedString) + { + $langpack = new SugarTestLangPackCreator(); + $langpack->setModString('LBL_TEST_JS_ESCAPED_STRING', $string, 'Contacts'); + $langpack->save(); + + $smarty = new Sugar_Smarty; + + $this->assertEquals($returnedString, smarty_function_sugar_translate( + array( + 'label' => 'LBL_TEST_JS_ESCAPED_STRING', + 'module' => 'Contacts', + 'trimColon' => false, + ), + $smarty) + ); + } + } diff --git a/tests/include/SugarCharts/Bug42326Test.php b/tests/include/SugarCharts/Bug42326Test.php index b67dde09..b6baaa56 100755 --- a/tests/include/SugarCharts/Bug42326Test.php +++ b/tests/include/SugarCharts/Bug42326Test.php @@ -75,3 +75,5 @@ class Bug42326Test extends Sugar_PHPUnit_Framework_TestCase return $dataset; } } + +?> \ No newline at end of file diff --git a/tests/include/SugarCharts/Bug44696Test.php b/tests/include/SugarCharts/Bug44696Test.php new file mode 100755 index 00000000..d7d26be9 --- /dev/null +++ b/tests/include/SugarCharts/Bug44696Test.php @@ -0,0 +1,167 @@ +group_by = array ('sales_stage', 'user_name'); + $sugarChartObject->data_set = $this->getDataSet(); + $sugarChartObject->base_url = array ('module' => 'Opportunities', + 'action' => 'index', + 'query' => 'true', + 'searchFormTab' => 'advanced_search'); + $sugarChartObject->url_params = array (); + $sugarChartObject->is_currency = true; + // we have 5 users + $sugarChartObject->super_set = array ('will', 'max', 'sarah', 'sally', 'chris'); + $this->sugarChartObject = $sugarChartObject; + } + + public function tearDown() + { + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + } + + public function getDataSet() { + return array ( + array ( + 'sales_stage' => 'Proposal/Price Quote', + 'user_name' => 'max', + 'assigned_user_id' => 'seed_max_id', + 'opp_count' => '1', + 'total' => '50', + 'key' => 'Proposal/Price Quote', + 'value' => 'Proposal/Price Quote', + ), + array ( + 'sales_stage' => 'Proposal/Price Quote', + 'user_name' => 'sally', + 'assigned_user_id' => 'seed_sally_id', + 'opp_count' => '2', + 'total' => '75', + 'key' => 'Proposal/Price Quote', + 'value' => 'Proposal/Price Quote', + ), + ); + } + + /** + * We check, that groups with NULL value remain their order in subgroups tag and won't fall down under not null valued groups. + * This way we guarantee that links will be put correctly to each user in whole user list (will, max, etc.). + */ + public function testCorrectXml() + { + $actual = $this->sugarChartObject->xmlDataGenericChart(); + $expected = $this->compareXml(); + $order = array("\r\n", "\n", "\r", "\t"); + $replace = ""; + // remove all break lines and spaces and tabs + $expected = str_replace($order, $replace, $expected); + $actual = str_replace($order, $replace, $actual); + $this->assertEquals($expected, $actual); + } + + /** + * @return xml string + */ + public function compareXml() + { + $max = 50; + $sally = 75; + $total = $max + $sally; + $max = $this->convertCurrency($max); + $sally = $this->convertCurrency($sally); + $total = $this->convertCurrency($total); + + return " + Proposal/Price Quote + {$total->subAmount} + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote + + + will + NULL + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote + + + max + {$max->subAmount} + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote&assigned_user_id[]=seed_max_id + + + sarah + NULL + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote + + + sally + {$sally->subAmount} + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote&assigned_user_id[]=seed_sally_id + + + chris + NULL + + index.php?module=Opportunities&action=index&query=true&searchFormTab=advanced_search&sales_stage=Proposal%2FPrice+Quote + + "; + } + + public function convertCurrency($value) { + $sub_amount = $this->sugarChartObject->formatNumber($this->sugarChartObject->convertCurrency($value)); + $sub_amount_formatted = $this->sugarChartObject->currency_symbol . $sub_amount . 'K'; + $sub_amount = $this->sugarChartObject->convertCurrency($value); + $return = new stdClass(); + $return->subAmount = $sub_amount; + $return->subAmountFormatted = $sub_amount_formatted; + return $return; + } +} \ No newline at end of file diff --git a/tests/include/SugarEmailAddress/Bug42279Test.php b/tests/include/SugarEmailAddress/Bug42279Test.php new file mode 100755 index 00000000..467b0307 --- /dev/null +++ b/tests/include/SugarEmailAddress/Bug42279Test.php @@ -0,0 +1,78 @@ +contact = SugarTestContactUtilities::createContact(); + + } + + public function tearDown() { + SugarTestContactUtilities::removeAllCreatedContacts(); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + } + + /** + * @group bug42279 + */ + public function testEmailAddressInFetchedRow() { + $sea = new SugarEmailAddress(); + + // this will populate contact->email1 + $sea->populateLegacyFields($this->contact); + $email1 = $this->contact->email1; + + // this should set fetched_row['email1'] to contatc->email1 + $sea->handleLegacyRetrieve($this->contact); + $this->assertEquals($email1, $this->contact->fetched_row['email1']); + } +} diff --git a/tests/include/SugarFields/Fields/Radioenum/SugarFieldRadioenumTest.php b/tests/include/SugarFields/Fields/Radioenum/SugarFieldRadioenumTest.php new file mode 100755 index 00000000..ae8f7b94 --- /dev/null +++ b/tests/include/SugarFields/Fields/Radioenum/SugarFieldRadioenumTest.php @@ -0,0 +1,69 @@ + "value" + ); + protected $_testKey = "key"; + protected $_testValue = "value"; + protected $_testingArrayName = "new_radio_list"; + protected $_testingFieldType = "Radioenum"; + + public function setUp() + { + global $app_list_strings; + $app_list_strings[$this->_testingArrayName] = $this->_testingArray; + } + + public function tearDown() + { + if (!empty($app_list_strings[$this->_testingArrayName])) { + unset($app_list_strings[$this->_testingArrayName]); + } + } + + public function testEmailTemplateFormat() + { + $radioEnumClass = new SugarFieldRadioenum($this->_testingFieldType); + $actualResult = $radioEnumClass->getEmailTemplateValue($this->_testKey, array ("options" => $this->_testingArrayName)); + $this->assertEquals($this->_testValue, $actualResult); + } +} \ No newline at end of file diff --git a/tests/include/SugarObjects/forms/ContactFormBaseTest.php b/tests/include/SugarObjects/forms/ContactFormBaseTest.php index 994b3f39..ac996a41 100755 --- a/tests/include/SugarObjects/forms/ContactFormBaseTest.php +++ b/tests/include/SugarObjects/forms/ContactFormBaseTest.php @@ -60,12 +60,15 @@ public function setup() $this->contact1->first_name = 'Collin'; $this->contact1->last_name = 'Lee'; $this->contact1->save(); + $this->contact1->emailAddress->addAddress('clee@sugarcrm.com', true, false); + $this->contact1->emailAddress->save($this->contact1->id, $this->contact1->module_dir); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); SugarTestContactUtilities::removeAllCreatedContacts(); + SugarTestContactUtilities::removeCreatedContactsEmailAddresses(); unset($this->form); unset($this->contact1); } @@ -95,6 +98,8 @@ public function testCreatingDuplicateContact($first_name, $last_name, $hasDuplic { $_POST['first_name'] = $first_name; $_POST['last_name'] = $last_name; + $_POST['Contacts0emailAddresss0'] = 'clee@sugarcrm.com'; + $rows = $this->form->checkForDuplicates(); if($hasDuplicate) diff --git a/tests/include/SugarObjects/forms/LeadFormBaseTest.php b/tests/include/SugarObjects/forms/LeadFormBaseTest.php index ef779849..4342df30 100755 --- a/tests/include/SugarObjects/forms/LeadFormBaseTest.php +++ b/tests/include/SugarObjects/forms/LeadFormBaseTest.php @@ -60,12 +60,15 @@ public function setup() $this->lead1->first_name = 'Collin'; $this->lead1->last_name = 'Lee'; $this->lead1->save(); + $this->lead1->emailAddress->addAddress('clee@sugarcrm.com', true, false); + $this->lead1->emailAddress->save($this->lead1->id, $this->lead1->module_dir); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); SugarTestLeadUtilities::removeAllCreatedLeads(); + SugarTestLeadUtilities::removeCreatedLeadsEmailAddresses(); unset($this->form); unset($this->lead1); } @@ -95,6 +98,8 @@ public function testCreatingDuplicateLead($first_name, $last_name, $hasDuplicate { $_POST['first_name'] = $first_name; $_POST['last_name'] = $last_name; + $_POST['Leads0emailAddresss0'] = 'clee@sugarcrm.com'; + $rows = $this->form->checkForDuplicates(); if($hasDuplicate) diff --git a/tests/include/ValidDBNameTest.php b/tests/include/ValidDBNameTest.php index 55e346e3..c1b07532 100755 --- a/tests/include/ValidDBNameTest.php +++ b/tests/include/ValidDBNameTest.php @@ -47,14 +47,6 @@ class ValidDBNameTest extends Sugar_PHPUnit_Framework_TestCase ); } - public function testLongNameEffected() - { - $this->assertNotEquals( - getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_opportunities'), - getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1_opportunities') - ); - } - public function testmaxLengthParam() { $this->assertEquals( @@ -108,4 +100,14 @@ class ValidDBNameTest extends Sugar_PHPUnit_Framework_TestCase $this->assertFalse(isValidDBName('sugar crm', 'mssql')); $this->assertFalse(isValidDBName('#sugarCRM_ver6', 'mssql')); } -} \ No newline at end of file + + public function testLongNameAffected() + { + $this->assertNotEquals( + getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_opportunities', true), + getValidDBName('eeeee_eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1_opportunities', true) + ); + } +} + +?> \ No newline at end of file diff --git a/tests/include/database/DBManagerTest.php b/tests/include/database/DBManagerTest.php index f12d31b1..2c205cd8 100755 --- a/tests/include/database/DBManagerTest.php +++ b/tests/include/database/DBManagerTest.php @@ -1552,14 +1552,14 @@ class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase */ public function test_Bug34892_MssqlNotClearingErrorResults() { - // execute a bad query - $this->_db->query("select dsdsdsdsdsdsdsdsdsd", false, "test_Bug34892_MssqlNotClearingErrorResults", true); - // assert it found an error - $this->assertNotEmpty($this->_db->lastError(), "lastError should return true as a result of the previous illegal query"); - // now, execute a good query - $this->_db->query("select * from config"); - // and make no error messages are asserted - $this->assertEmpty($this->_db->lastError(), "lastError should have cleared the previous error and return false of the last legal query"); + // execute a bad query + $this->_db->query("select dsdsdsdsdsdsdsdsdsd", false, "test_Bug34892_MssqlNotClearingErrorResults", true); + // assert it found an error + $this->assertNotEmpty($this->_db->lastError(), "lastError should return true as a result of the previous illegal query"); + // now, execute a good query + $this->_db->query("select * from config"); + // and make no error messages are asserted + $this->assertEmpty($this->_db->lastError(), "lastError should have cleared the previous error and return false of the last legal query"); } public function vardefProvider() diff --git a/tests/modules/Calendar/CalendarTest.php b/tests/modules/Calendar/CalendarTest.php index 2345b336..78509bd7 100755 --- a/tests/modules/Calendar/CalendarTest.php +++ b/tests/modules/Calendar/CalendarTest.php @@ -123,7 +123,7 @@ class CalendarTest extends Sugar_PHPUnit_Framework_TestCase { $cal->acts_arr[$GLOBALS['current_user']->id][] = new CalendarActivity($meeting); $cal->load_activities(); - $this->assertEquals($cal->ActRecords[0]['time_start'],$this->time_date->swap_formats("2012-01-01 11:00pm" , 'Y-m-d h:ia', $format['time']),"Time should remain the same after load_activities"); + $this->assertEquals($cal->items[0]['time_start'],$this->time_date->swap_formats("2012-01-01 11:00pm" , 'Y-m-d h:ia', $format['time']),"Time should remain the same after load_activities"); } public function testHandleOffset(){ diff --git a/tests/modules/Calls/Bug39161Test.php b/tests/modules/Calls/Bug39161Test.php index 1fbae331..a9b08f55 100755 --- a/tests/modules/Calls/Bug39161Test.php +++ b/tests/modules/Calls/Bug39161Test.php @@ -36,18 +36,35 @@ require_once("modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php"); require_once("modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php"); +require_once 'modules/ModuleBuilder/parsers/views/AbstractMetaDataParser.php' ; +require_once 'modules/ModuleBuilder/parsers/views/MetaDataParserInterface.php' ; + class Bug39161Test extends Sugar_PHPUnit_Framework_TestCase { + /* + public function setUp() + { + $lv = new ListLayoutMetaDataParser('EditView', 'Calls'); + } + */ public function testCallsContactStudioViews() { $seed = new Call(); $def = $seed->field_defs['contact_name']; - //Skip this for now, too problematic to test - //$this->assertTrue(ListLayoutMetaDataParser::validField($def['name'], $def)); - + $lv = new ListLayoutMetaDataParserMock2(MB_LISTVIEW, 'Calls'); + $this->assertTrue($lv->isValidField($def['name'], $def)); $this->assertFalse(GridLayoutMetaDataParser::validField($def, 'editview')); $this->assertFalse(GridLayoutMetaDataParser::validField($def, 'detailview')); $this->assertFalse(GridLayoutMetaDataParser::validField($def, 'quickcreate')); } +} + +class ListLayoutMetaDataParserMock2 extends ListLayoutMetaDataParser +{ + function __construct ($view , $moduleName , $packageName = '') + { + $this->view = $view; + } + } \ No newline at end of file diff --git a/tests/modules/Contacts/Bug36989Test.php b/tests/modules/Contacts/Bug36989Test.php new file mode 100755 index 00000000..e17bdc9a --- /dev/null +++ b/tests/modules/Contacts/Bug36989Test.php @@ -0,0 +1,92 @@ +markTestIncomplete('This test is not working.'); + $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + require('include/modules.php'); + $GLOBALS['beanList'] = $beanList; + $GLOBALS['beanFiles'] = $beanFiles; + $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); + + + if(file_exists('custom/modules/Contacts/metadata/SearchFields.php')) + { + $this->customSearchFields = file_get_contents('custom/modules/Contacts/metadata/SearchFields.php'); + unlink('custom/modules/Contacts/metadata/SearchFields.php'); + } + + $this->searchFieldsBackup = file_get_contents('modules/Contacts/metadata/SearchFields.php'); + file_put_contents('modules/Contacts/metadata/SearchFields.php', ' array());'); + + } + + public function tearDown() + { + file_put_contents('modules/Contacts/metadata/SearchFields.php', $this->searchFieldsBackup); + + if(!empty($this->customSearchFields)) + { + file_put_contents('custom/modules/Contacts/metadata/SearchFields.php', $this->customSearchFields); + } + + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($GLOBALS['current_user']); + unset($GLOBALS['app_strings']); + + } + + function testOverrideSearchFields() { + $list = new ViewList(); + $list->module = "Contacts"; + $list->seed = new Contact(); + $list->prepareSearchForm(); + $this->assertTrue(isset($list->searchForm->searchFields['test'])); + } +} +?> diff --git a/tests/modules/Currencies/CurrencyTest.php b/tests/modules/Currencies/CurrencyTest.php index 1cca4546..7ce153f5 100755 --- a/tests/modules/Currencies/CurrencyTest.php +++ b/tests/modules/Currencies/CurrencyTest.php @@ -45,8 +45,8 @@ class CurrencyTest extends Sugar_PHPUnit_Framework_TestCase { global $current_user; $this->previousCurrentUser = $current_user; $current_user = SugarTestUserUtilities::createAnonymousUser(); - $current_user->setPreference('num_grp_sep', ',', 0, 'global'); - $current_user->setPreference('dec_sep', '.', 0, 'global'); + $current_user->setPreference('number_grouping_seperator', ',', 0, 'global'); + $current_user->setPreference('decimal_seperator', '.', 0, 'global'); $current_user->save(); //Force reset on dec_sep and num_grp_sep because the dec_sep and num_grp_sep values are stored as static variables get_number_seperators(true); @@ -65,7 +65,7 @@ class CurrencyTest extends Sugar_PHPUnit_Framework_TestCase { $testValue = "$100,000.50"; $unformattedValue = unformat_number($testValue); - $this->assertEquals($unformattedValue, 100000.50, "Assert that $100,000.50 becomes 100000.50"); + $this->assertEquals($unformattedValue, 100000.50, "Assert that $100,000.50 becomes 100000.50. Formatted value is: ".$unformattedValue); //Switch the num_grp_sep and dec_sep values $current_user->setPreference('num_grp_sep', '.'); @@ -77,7 +77,7 @@ class CurrencyTest extends Sugar_PHPUnit_Framework_TestCase { $testValue = "$100.000,50"; $unformattedValue = unformat_number($testValue); - $this->assertEquals($unformattedValue, 100000.50, "Assert that $100.000,50 becomes 100000.50"); + $this->assertEquals($unformattedValue, 100000.50, "Assert that $100.000,50 becomes 100000.50. Formatted value is: ".$unformattedValue); } @@ -87,7 +87,7 @@ class CurrencyTest extends Sugar_PHPUnit_Framework_TestCase { $testValue = "100000.50"; $formattedValue = format_number($testValue); - $this->assertEquals($formattedValue, "100,000.50", "Assert that 100000.50 becomes 100,000.50"); + $this->assertEquals($formattedValue, "100,000.50", "Assert that 100000.50 becomes 100,000.50. Formatted value is: ".$formattedValue); //Switch the num_grp_sep and dec_sep values $current_user->setPreference('num_grp_sep', '.'); @@ -99,7 +99,7 @@ class CurrencyTest extends Sugar_PHPUnit_Framework_TestCase { $testValue = "100000.50"; $formattedValue = format_number($testValue); - $this->assertEquals($formattedValue, "100.000,50", "Assert that 100000.50 becomes 100.000,50"); + $this->assertEquals($formattedValue, "100.000,50", "Assert that 100000.50 becomes 100.000,50. Formatted value is: ".$formattedValue); } } diff --git a/tests/modules/Emails/Bug40527Test.php b/tests/modules/Emails/Bug40527Test.php index fd8effec..a691ef6d 100755 --- a/tests/modules/Emails/Bug40527Test.php +++ b/tests/modules/Emails/Bug40527Test.php @@ -45,6 +45,9 @@ class Bug40527Test extends Sugar_PHPUnit_Framework_TestCase public function setUp() { + global $app_strings, $app_list_strings; + $app_strings = return_application_language($GLOBALS['current_language']); + $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']); $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $this->contact = SugarTestContactUtilities::createContact(); $this->account = SugarTestAccountUtilities::createAccount(); diff --git a/tests/modules/Emails/Bug40911Test.php b/tests/modules/Emails/Bug40911Test.php index 59275ed0..8e464eab 100755 --- a/tests/modules/Emails/Bug40911Test.php +++ b/tests/modules/Emails/Bug40911Test.php @@ -57,6 +57,9 @@ class Bug40911 extends Sugar_PHPUnit_Framework_TestCase */ public function testSaveNewFolder() { + $this->markTestSkipped('This test takes to long to run'); + return; + global $current_user, $app_strings; $email = new Email(); diff --git a/tests/modules/Employees/Bug46923Test.php b/tests/modules/Employees/Bug46923Test.php index 74eab40f..a7139606 100755 --- a/tests/modules/Employees/Bug46923Test.php +++ b/tests/modules/Employees/Bug46923Test.php @@ -44,6 +44,11 @@ class Bug46923Test extends Sugar_PHPUnit_Framework_OutputTestCase public function setUp() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, 1); + $beanList = array(); + $beanFiles = array(); + require('include/modules.php'); + $GLOBALS['beanList'] = $beanList; + $GLOBALS['beanFiles'] = $beanFiles; } public function tearDown() diff --git a/tests/modules/Home/Bug42961Test.php b/tests/modules/Home/Bug42961Test.php new file mode 100755 index 00000000..4149a1dc --- /dev/null +++ b/tests/modules/Home/Bug42961Test.php @@ -0,0 +1,74 @@ +buildCache(); + $this->assertFileExists($GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php', 'Here should be cache file with data'); + include $GLOBALS['sugar_config']['cache_dir'].'modules/unified_search_modules.php'; + $force_unifiedsearch = 0; + foreach ($unified_search_modules as $moduleName=>$moduleInformation) + { + foreach ($moduleInformation['fields'] as $fieldName=>$fieldInformation) + { + if (key_exists('force_unifiedsearch', $fieldInformation)) { + $force_unifiedsearch++; + } + } + } + $this->assertGreaterThan(0, $force_unifiedsearch, 'Here should be fields with force_unifiedsearch key'); + } +} \ No newline at end of file diff --git a/tests/modules/Home/Bug43653Test.php b/tests/modules/Home/Bug43653Test.php index e8abe606..788d3251 100755 --- a/tests/modules/Home/Bug43653Test.php +++ b/tests/modules/Home/Bug43653Test.php @@ -37,7 +37,6 @@ class Bug43653Test extends Sugar_PHPUnit_Framework_OutputTestCase { - public function setUp() { $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); diff --git a/tests/modules/Home/UnifiedSearchAdvancedTest.php b/tests/modules/Home/UnifiedSearchAdvancedTest.php index bbd7f4a4..2381fbdd 100755 --- a/tests/modules/Home/UnifiedSearchAdvancedTest.php +++ b/tests/modules/Home/UnifiedSearchAdvancedTest.php @@ -72,7 +72,8 @@ class UnifiedSearchAdvancedTest extends Sugar_PHPUnit_Framework_OutputTestCase $this->_hasUnifiedSearchModulesDisplay = true; copy('custom/modules/unified_search_modules_display.php', 'custom/modules/unified_search_modules_display.php.bak'); unlink('custom/modules/unified_search_modules_display.php'); - } + } + } @@ -96,6 +97,23 @@ class UnifiedSearchAdvancedTest extends Sugar_PHPUnit_Framework_OutputTestCase } else { unlink('custom/modules/unified_search_modules_display.php'); } + + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + + if(isset($_REQUEST['module'])) + { + unset($_REQUEST['module']); + } + + if(isset($_REQUEST['query_string'])) + { + unset($_REQUEST['query_string']); + } + + if(isset($_REQUEST['enabled_modules'])) + { + unset($_REQUEST['enabled_modules']); + } } public function testSearchByFirstName() @@ -125,7 +143,7 @@ class UnifiedSearchAdvancedTest extends Sugar_PHPUnit_Framework_OutputTestCase public function testUserPreferencesSearch() { - global $mod_strings, $modListHeader, $app_strings, $beanList, $beanFiles; + global $mod_strings, $modListHeader, $app_strings, $beanList, $beanFiles, $current_user; require('config.php'); require('include/modules.php'); @@ -133,14 +151,20 @@ class UnifiedSearchAdvancedTest extends Sugar_PHPUnit_Framework_OutputTestCase $_REQUEST['enabled_modules'] = 'Accounts,Contacts'; $usa->saveGlobalSearchSettings(); + + $current_user->setPreference('globalSearch', array('Accounts', 'Contacts'), 0, 'search'); + $current_user->savePreferencesToDB(); + $_REQUEST = array(); $_REQUEST['query_string'] = $this->_contact->first_name.' '.$this->_contact->last_name; $_REQUEST['module'] = 'Home'; $usa->search(); - global $current_user; + $modules = $current_user->getPreference('globalSearch', 'search'); $this->assertEquals(count($modules), 2, 'Assert that there are two modules in the user preferences as defined from the global search'); - $this->assertTrue(isset($modules['Accounts']) && isset($modules['Contacts']), 'Assert that the Accounts and Contacts modules have been added'); + + $this->assertEquals('Accounts', $modules[0], 'Assert that the Accounts module has been added'); + $this->assertEquals('Contacts', $modules[1], 'Assert that the Contacts module has been added'); } } diff --git a/tests/modules/Leads/ConvertLeadTests.php b/tests/modules/Leads/ConvertLeadTests.php index 5953ee3e..eb50453a 100755 --- a/tests/modules/Leads/ConvertLeadTests.php +++ b/tests/modules/Leads/ConvertLeadTests.php @@ -53,10 +53,11 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase unset($GLOBALS['current_user']); } - /** - * @group bug39787 - */ - public function testOpportunityNameValueFilled(){ + /** + * @group bug39787 + */ + public function testOpportunityNameValueFilled() + { $lead = SugarTestLeadUtilities::createLead(); $lead->opportunity_name = 'SBizzle Dollar Store'; $lead->save(); @@ -98,6 +99,7 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase unset($_REQUEST['record']); SugarTestLeadUtilities::removeAllCreatedLeads(); } + /** * @group bug44033 */ @@ -437,6 +439,24 @@ class ConvertLeadTests extends Sugar_PHPUnit_Framework_TestCase SugarTestAccountUtilities::removeAllCreatedAccounts(); SugarTestLeadUtilities::removeAllCreatedLeads(); } + + public function testMeetingsUsersRelationships() + { + global $current_user; + + $bean = SugarTestMeetingUtilities::createMeeting(); + $convert_lead = SugarTestViewConvertLeadUtilities::createViewConvertLead(); + + if ($bean->object_name == "Meeting") + { + $convert_lead->setMeetingsUsersRelationship($bean); + } + + $this->assertTrue(is_object($bean->users), "Relationship wasn't set."); + + SugarTestMeetingUtilities::removeMeetingUsers(); + SugarTestMeetingUtilities::removeAllCreatedMeetings(); + } } class TestViewConvertLead extends ViewConvertLead diff --git a/tests/modules/Meetings/Bug45287Test.php b/tests/modules/Meetings/Bug45287Test.php index 76ebc347..abd332d1 100755 --- a/tests/modules/Meetings/Bug45287Test.php +++ b/tests/modules/Meetings/Bug45287Test.php @@ -45,10 +45,11 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase var $meetingsArr; var $searchDefs; var $searchFields; + var $timedate; public function setup() { - global $current_user, $timedate; + global $current_user; // Create Anon User setted on GMT+2 TimeZone $current_user = SugarTestUserUtilities::createAnonymousUser(); $current_user->setPreference('datef', "d/m/Y"); @@ -56,7 +57,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase $current_user->setPreference('timezone', "Europe/Rome"); // new object to avoid TZ caching - $timedate = new TimeDate(); + $this->timedate = new TimeDate(); $this->meetingsArr = array(); @@ -67,7 +68,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase { $this->meetingsArr[$cnt] = new Meeting(); $this->meetingsArr[$cnt]->name = 'Bug45287 Meeting ' . ($cnt + 1); - $this->meetingsArr[$cnt]->date_start = $timedate->to_display_date_time(gmdate("Y-m-d H:i:s", mktime(10+$cnt, 30, 00, 7, $d, 2011))); + $this->meetingsArr[$cnt]->date_start = $this->timedate->to_display_date_time(gmdate("Y-m-d H:i:s", mktime(10+$cnt, 30, 00, 7, $d, 2011))); $this->meetingsArr[$cnt]->save(); $d++; $cnt++; @@ -117,6 +118,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase unset($this->meetingsArr); unset($this->searchDefs); unset($this->searchFields); + unset($this->timedate); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } @@ -124,7 +126,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase public function testRetrieveByExactDate() { - global $current_user, $timedate; + global $current_user; $_REQUEST = $_POST = array("module" => "Meetings", "action" => "index", @@ -147,7 +149,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase $w = $srch->generateSearchWhere(); // Due to daylight savings, I cannot hardcode intervals... - $GMTDates = $timedate->getDayStartEndGMT("2011-07-14"); + $GMTDates = $this->timedate->getDayStartEndGMT("2011-07-14"); // Current User is on GMT+2. // Asking for meeting of 14 July 2011, I expect to search (GMT) from 13 July at 22:00 until 14 July at 22:00 (excluded) @@ -159,7 +161,7 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase public function testRetrieveByDaterange() { - global $current_user, $timedate; + global $current_user; $_REQUEST = $_POST = array("module" => "Meetings", "action" => "index", @@ -183,8 +185,8 @@ class Bug45287Test extends Sugar_PHPUnit_Framework_TestCase $w = $srch->generateSearchWhere(); // Due to daylight savings, I cannot hardcode intervals... - $GMTDatesStart = $timedate->getDayStartEndGMT("2011-07-13"); - $GMTDatesEnd = $timedate->getDayStartEndGMT("2011-07-14"); + $GMTDatesStart = $this->timedate->getDayStartEndGMT("2011-07-13"); + $GMTDatesEnd = $this->timedate->getDayStartEndGMT("2011-07-14"); // Current User is on GMT+2. // Asking for meeting between 13 and 14 July 2011, I expect to search (GMT) from 12 July at 22:00 until 14 July at 22:00 (excluded) diff --git a/tests/modules/Meetings/Bug45287_2Test.php b/tests/modules/Meetings/Bug45287_2Test.php index 1d419efb..66322082 100755 --- a/tests/modules/Meetings/Bug45287_2Test.php +++ b/tests/modules/Meetings/Bug45287_2Test.php @@ -45,10 +45,12 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase var $meetingsArr; var $searchDefs; var $searchFields; + var $timedate; + public function setup() { - global $current_user, $timedate; + global $current_user; // Create Anon User setted on PDT TimeZone $current_user = SugarTestUserUtilities::createAnonymousUser(); $current_user->setPreference('datef', "d/m/Y"); @@ -56,7 +58,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase $current_user->setPreference('timezone', "America/Los_Angeles"); // new object to avoid TZ caching - $timedate = new TimeDate(); + $this->timedate = new TimeDate(); $this->meetingsArr = array(); @@ -67,7 +69,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase { $this->meetingsArr[$cnt] = new Meeting(); $this->meetingsArr[$cnt]->name = 'Bug45287 Meeting ' . ($cnt + 1); - $this->meetingsArr[$cnt]->date_start = $timedate->to_display_date_time(gmdate("Y-m-d H:i:s", mktime(10+$cnt, 30, 00, 7, $d, 2011))); + $this->meetingsArr[$cnt]->date_start = $this->timedate->to_display_date_time(gmdate("Y-m-d H:i:s", mktime(10+$cnt, 30, 00, 7, $d, 2011))); $this->meetingsArr[$cnt]->save(); $d++; $cnt++; @@ -117,6 +119,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase unset($this->meetingsArr); unset($this->searchDefs); unset($this->searchFields); + unset($this->timezone); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } @@ -124,7 +127,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase public function testRetrieveByExactDate() { - global $current_user, $timedate; + global $current_user; $_REQUEST = $_POST = array("module" => "Meetings", "action" => "index", @@ -147,7 +150,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase $w = $srch->generateSearchWhere(); // Due to daylight savings, I cannot hardcode intervals... - $GMTDates = $timedate->getDayStartEndGMT("2011-07-14"); + $GMTDates = $this->timedate->getDayStartEndGMT("2011-07-14"); // Current User is on GMT-7. // Asking for meeting of 14 July 2011, I expect to search (GMT) from 14 July at 07:00 until 15 July at 07:00 (excluded) @@ -159,7 +162,7 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase public function testRetrieveByDaterange() { - global $current_user, $timedate; + global $current_user; $_REQUEST = $_POST = array("module" => "Meetings", "action" => "index", @@ -183,9 +186,9 @@ class Bug45287_2Test extends Sugar_PHPUnit_Framework_TestCase $w = $srch->generateSearchWhere(); // Due to daylight savings, I cannot hardcode intervals... - $GMTDatesStart = $timedate->getDayStartEndGMT("2011-07-13"); - $GMTDatesEnd = $timedate->getDayStartEndGMT("2011-07-14"); - + $GMTDatesStart = $this->timedate->getDayStartEndGMT("2011-07-13"); + $GMTDatesEnd = $this->timedate->getDayStartEndGMT("2011-07-14"); + // Current User is on GMT-7. // Asking for meeting between 13 and 14 July 2011, I expect to search from 13 July at 07:00 until 15 July at 07:00 (excluded) $expectedWhere = "meetings.date_start >= " . $GLOBALS['db']->convert($GLOBALS['db']->quoted($GMTDatesStart['start']), 'datetime') . diff --git a/tests/modules/Meetings/Bug46294Test.php b/tests/modules/Meetings/Bug46294Test.php new file mode 100755 index 00000000..ea7a73d9 --- /dev/null +++ b/tests/modules/Meetings/Bug46294Test.php @@ -0,0 +1,101 @@ + array( + 'fields' => array( + 'type' => array( + 'options' => '' + ) + ) + ) + ); + var $dictionaryOptionsEmpty = array('Meeting' => array( + 'fields' => array( + 'type' => array() + //empty + ) + ) + ); + var $dictionaryOptionsSet = array('Meeting' => array( + 'fields' => array( + 'type' => array( + 'options' => 'type_list' + ) + ) + ) + ); + var $dictionaryTypeListNotExists = array('Meeting' => array( + 'fields' => array( + 'type' => array( + 'options' => 'type_not_exists' + ) + ) + ) + ); + var $appListStrings = array('type_list' => array( + 'breakfast' => 'breakfast', + 'lunch' => 'lunch', + 'dinner' => 'dinner' + ) + ); + + var $appListStringsEmpty = array('type_list' => array()); + + /** + * @dataProvider provider + */ + public function testGetMeetingTypeOptions($dictionary, $appList, $isEmpty) + { + $result = getMeetingTypeOptions($dictionary, $appList, $isEmpty); + $this->assertEquals($isEmpty, empty($result)); + } + + public function provider() + { + return array( + array($this->dictionaryOptionsSet, $this->appListStrings, false), + array($this->dictionaryOptionsNotSet, $this->appListStrings, true), + array($this->dictionaryOptionsEmpty, $this->appListStrings, true), + array($this->dictionaryTypeListNotExists, $this->appListStrings, true), + array($this->dictionaryOptionsSet, $this->appListStringsEmpty, true) + ); + } +} \ No newline at end of file diff --git a/tests/modules/ModuleBuilder/parsers/SearchViewMetaDataParserTest.php b/tests/modules/ModuleBuilder/parsers/SearchViewMetaDataParserTest.php new file mode 100755 index 00000000..5ac8e6a9 --- /dev/null +++ b/tests/modules/ModuleBuilder/parsers/SearchViewMetaDataParserTest.php @@ -0,0 +1,366 @@ + + array( + 'maxColumns' => '3', + 'widths' => + array( + 'label' => '10', + 'field' => '30', + ), + ), + 'layout' => + array( + 'basic_search' => + array( + 'name' => + array( + 'name' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'current_user_only' => + array( + 'name' => 'current_user_only', + 'label' => 'LBL_CURRENT_USER_FILTER', + 'type' => 'bool', + 'default' => true, + 'width' => '10%', + ), + 0 => + array( + 'name' => 'favorites_only', + 'label' => 'LBL_FAVORITES_FILTER', + 'type' => 'bool', + ), + ), + 'advanced_search' => + array( + 'name' => + array( + 'name' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'website' => + array( + 'name' => 'website', + 'default' => true, + 'width' => '10%', + ), + 'phone' => + array( + 'name' => 'phone', + 'label' => 'LBL_ANY_PHONE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'email' => + array( + 'name' => 'email', + 'label' => 'LBL_ANY_EMAIL', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_street' => + array( + 'name' => 'address_street', + 'label' => 'LBL_ANY_ADDRESS', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_city' => + array( + 'name' => 'address_city', + 'label' => 'LBL_CITY', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_state' => + array( + 'name' => 'address_state', + 'label' => 'LBL_STATE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_postalcode' => + array( + 'name' => 'address_postalcode', + 'label' => 'LBL_POSTAL_CODE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'billing_address_country' => + array( + 'name' => 'billing_address_country', + 'label' => 'LBL_COUNTRY', + 'type' => 'name', + 'options' => 'countries_dom', + 'default' => true, + 'width' => '10%', + ), + 'account_type' => + array( + 'name' => 'account_type', + 'default' => true, + 'width' => '10%', + ), + 'industry' => + array( + 'name' => 'industry', + 'default' => true, + 'width' => '10%', + ), + 'assigned_user_id' => + array( + 'name' => 'assigned_user_id', + 'type' => 'enum', + 'label' => 'LBL_ASSIGNED_TO', + 'function' => + array( + 'name' => 'get_user_array', + 'params' => + array( + 0 => false, + ), + ), + 'default' => true, + 'width' => '10%', + ), + 0 => + array( + 'name' => 'favorites_only', + 'label' => 'LBL_FAVORITES_FILTER', + 'type' => 'bool', + ), + ), + ), + ); + + $expectedResult = array( + 'name' => + array( + 'name' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'website' => + array( + 'name' => 'website', + 'default' => true, + 'width' => '10%', + ), + 'phone' => + array( + 'name' => 'phone', + 'label' => 'LBL_ANY_PHONE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'email' => + array( + 'name' => 'email', + 'label' => 'LBL_ANY_EMAIL', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_street' => + array( + 'name' => 'address_street', + 'label' => 'LBL_ANY_ADDRESS', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_city' => + array( + 'name' => 'address_city', + 'label' => 'LBL_CITY', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_state' => + array( + 'name' => 'address_state', + 'label' => 'LBL_STATE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'address_postalcode' => + array( + 'name' => 'address_postalcode', + 'label' => 'LBL_POSTAL_CODE', + 'type' => 'name', + 'default' => true, + 'width' => '10%', + ), + 'billing_address_country' => + array( + 'name' => 'billing_address_country', + 'label' => 'LBL_COUNTRY', + 'type' => 'name', + 'options' => 'countries_dom', + 'default' => true, + 'width' => '10%', + ), + 'account_type' => + array( + 'name' => 'account_type', + 'default' => true, + 'width' => '10%', + ), + 'industry' => + array( + 'name' => 'industry', + 'default' => true, + 'width' => '10%', + ), + 'assigned_user_id' => + array( + 'name' => 'assigned_user_id', + 'type' => 'enum', + 'label' => 'LBL_ASSIGNED_TO', + 'function' => + array( + 'name' => 'get_user_array', + 'params' => + array( + 0 => false, + ), + ), + 'default' => true, + 'width' => '10%', + ), + 'favorites_only' => + array( + 'name' => 'favorites_only', + 'label' => 'LBL_FAVORITES_FILTER', + 'type' => 'bool', + ), + 'current_user_only' => + array( + 'name' => 'current_user_only', + 'label' => 'LBL_CURRENT_USER_FILTER', + 'type' => 'bool', + 'default' => true, + 'width' => '10%', + ), + ); + + // We use a derived class to aid in stubbing out test properties and functions + $parser = new SearchViewMetaDataParserTestDerivative("basic_search"); + + // Creating a mock object for the DeployedMetaDataImplementation + + $impl = $this->getMock('DeployedMetaDataImplementation', + array('getOriginalViewdefs'), + array(), + 'DeployedMetaDataImplementation_Mock', + FALSE); + + // Making the getOriginalViewdefs function return the test viewdefs and verify that it is being called once + $impl->expects($this->once()) + ->method('getOriginalViewdefs') + ->will($this->returnValue($orgViewDefs)); + + // Replace the protected implementation with our Mock object + $parser->setImpl($impl); + + // Execute the method under test + $result = $parser->getOriginalViewDefs(); + + // Verify that the returned result matches our expectations + $this->assertEquals($result, $expectedResult); + + //echo "Done"; + } + +} + +/** + * Using derived helper class from SearchViewMetaDataParser to avoid having to fully + * initialize the whole class and to give us the flexibility to replace the + * Deploy/Undeploy MetaDataImplementation + */ +class SearchViewMetaDataParserTestDerivative extends SearchViewMetaDataParser +{ + function __construct ($layout){ + $this->_searchLayout = $layout; + } + + function setImpl($impl) { + $this->implementation = $impl; + } +} \ No newline at end of file diff --git a/tests/modules/Home/Bug39610Test.php b/tests/modules/ModuleBuilder/parsers/views/HistoryTest.php similarity index 53% rename from tests/modules/Home/Bug39610Test.php rename to tests/modules/ModuleBuilder/parsers/views/HistoryTest.php index 6f70919d..2f25e1fc 100755 --- a/tests/modules/Home/Bug39610Test.php +++ b/tests/modules/ModuleBuilder/parsers/views/HistoryTest.php @@ -35,65 +35,66 @@ ********************************************************************************/ -require_once 'include/EditView/SubpanelQuickCreate.php'; +require_once("modules/ModuleBuilder/parsers/views/History.php"); -class Bug39610Test extends Sugar_PHPUnit_Framework_TestCase +class HistoryTest extends PHPUnit_Framework_TestCase { + + /** + * @var string + */ + private $_path; + + /** + * @var History + */ + private $_history; + public function setUp() { - global $app_strings, $app_list_strings; - $app_strings = return_application_language($GLOBALS['current_language']); - $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']); - $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); + $this->_path = tempnam(sys_get_temp_dir() . 'tmp', 'history'); + $this->_history = new History($this->_path); } - - public function tearDown() + + public function testConstructor() { - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - unset($GLOBALS['current_user']); + $this->assertTrue(is_dir($this->getHistoryDir()), "__constructor() creates unique directory for file history"); } - - public function testUseCustomViewAndCustomClassName() + + public function testAppendAndRestore() { - $target_module = 'Contacts'; - sugar_mkdir('custom/modules/'. $target_module . '/views/',null,true); - if( $fh = @fopen('custom/modules/'. $target_module . '/views/view.edit.php', 'w') ) - { -$string = <<_history->append($this->_path); + $this->assertTrue(file_exists($this->_history->getFileByTimestamp($time)), '->append() creates history file'); + $this->assertEquals($this->_history->restoreByTimestamp( $time ), $time, '->restoreByTimestamp() returns correct timestamp'); + } - public function CustomContactsViewEdit() - { - \$GLOBALS['CustomContactsSubpanelQuickCreated'] = true; - } -}; -?> -EOQ; - fputs( $fh, $string); - fclose( $fh ); - } + public function testUndoRestore() + { + $this->_history->undoRestore(); + $this->assertFalse(file_exists($this->_path), '->undoRestore removes file'); + } + public function testPositioning() + { + $other_file = tempnam(sys_get_temp_dir(), 'history'); - $subpanelMock = new SubpanelQuickCreateMockBug39610Test($target_module, 'SubpanelQuickCreate'); - $this->assertTrue(!empty($GLOBALS['CustomContactsSubpanelQuickCreated']), "Assert that CustomContactsEditView constructor was called"); - @unlink('custom/modules/'. $target_module . '/views/view.subpanelquickcreate.php'); - } + $el1 = $this->_history->append($other_file); + $el2 = $this->_history->append($other_file); + $el3 = $this->_history->append($other_file); -} + $this->assertEquals($this->_history->getCount(), 3); + $this->assertEquals($this->_history->getFirst(), $el3); + $this->assertEquals($this->_history->getLast(), $el1); + $this->assertEquals($this->_history->getNth(1), $el2); + $this->assertEquals($this->_history->getNext(), $el1); + $this->assertFalse($this->_history->getNext()); + unlink($other_file); + } -class SubpanelQuickCreateMockBug39610Test extends SubpanelQuickCreate -{ - public function SubpanelQuickCreateMockBug39610Test($module, $view='QuickCreate', $proccessOverride = false) - { - parent::SubpanelQuickCreate($module, $view, $proccessOverride); - } - - public function process() - { - //no-op - } -} + private function getHistoryDir() + { + return dirname($this->_path); + } + +} \ No newline at end of file diff --git a/tests/modules/ProjectTask/Bug46350Test.php b/tests/modules/ProjectTask/Bug46350Test.php new file mode 100755 index 00000000..2352262a --- /dev/null +++ b/tests/modules/ProjectTask/Bug46350Test.php @@ -0,0 +1,137 @@ +_user = SugarTestUserUtilities::createAnonymousUser(); + $GLOBALS['current_user'] = $this->_user; + $this->project = SugarTestProjectUtilities::createProject(); + $projectId = $this->project->id; + $projectTasksData = array ( + 'parentTask' => array ( + 'project_id' => $projectId, + 'parent_task_id' => '', + 'project_task_id' => 1, + 'percent_complete' => $this->countAverage(array ($this->oldPercentValue, $this->defaultStaticSecondPercent)), + 'name' => 'Task 1', + ), + 'firstChildTask' => array ( + 'project_id' => $projectId, + 'parent_task_id' => 1, + 'project_task_id' => 2, + 'percent_complete' => $this->oldPercentValue, + 'name' => 'Task 2', + ), + 'secondChildTask' => array ( + 'project_id' => $projectId, + 'parent_task_id' => 1, + 'project_task_id' => 3, + 'percent_complete' => $this->defaultStaticSecondPercent, + 'name' => 'Task 3', + ), + ); + foreach ($projectTasksData as $key => $value) + { + $this->projectTasks[$key] = SugarTestProjectTaskUtilities::createProjectTask($value); + } + } + + public function tearDown() + { + SugarTestProjectUtilities::removeAllCreatedProjects(); + SugarTestProjectTaskUtilities::removeAllCreatedProjectTasks(); + SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); + unset($this->project); + unset($this->projectTasks); + unset($this->_user); + unset($GLOBALS['current_user']); + } + + public function countAverage($values) + { + $count = 0; + foreach ($values as $key => $value) + { + $count += $value; + } + return (round($count / count($values))); + } + + public function testResourceName() + { + $processingTask = $this->projectTasks['firstChildTask']; + $processingTask->percent_complete = $this->newPercentValue; + $processingTask->save(); + + /** + * New method testing + */ + $processingTask->updateParentProjectTaskPercentage(); + + $testparentTask = new ProjectTask(); + $testparentTask->retrieve($this->projectTasks['parentTask']->id); + + $average = $this->countAverage(array ($this->newPercentValue, $this->projectTasks['secondChildTask']->percent_complete)); + $this->assertEquals($average, $testparentTask->percent_complete); + } +} \ No newline at end of file diff --git a/tests/modules/ProspectLists/Bug36422Test.php b/tests/modules/ProspectLists/Bug36422Test.php deleted file mode 100755 index 8b274c8e..00000000 --- a/tests/modules/ProspectLists/Bug36422Test.php +++ /dev/null @@ -1,158 +0,0 @@ -account_id = $account->id; - $contact->save(); - return $contact; - } - - /** - * Create ProspectList instance - * @param Contact instance to attach to prospect list - */ - public static function createProspectList($contact = null) - { - $prospectList = new ProspectList(); - $prospectList->name = "test"; - $prospectList->save(); - self::$_createdProspectListsIds[] = $prospectList->id; - - if ($contact instanceof Contact) { - self::attachContactToProspectList($prospectList, $contact); - } - - return $prospectList; - } - - /** - * - * Attach Contact to prospect list - * @param ProspectList $prospectList prospect list instance - * @param Contact $contact contact instance - */ - public static function attachContactToProspectList($prospectList, $contact) - { - $prospectList->load_relationship('contacts'); - $prospectList->contacts->add($contact->id,array()); - } - - /** - * Set up - create prospect list with 2 contacts - */ - public function setUp() - { - global $current_user, $beanList, $beanFiles; - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - - $current_user = SugarTestUserUtilities::createAnonymousUser();; - $this->_contacts[] = self::createContact(); - $this->_contacts[] = self::createContact(); - $this->_prospectList = self::createProspectList($this->_contacts[0]); - self::attachContactToProspectList($this->_prospectList, $this->_contacts[1]); - } - - /** - * Clear all created data - * @see PHPUnit_Framework_TestCase::tearDown() - */ - public function tearDown() - { - SugarTestContactUtilities::removeAllCreatedContacts(); - SugarTestAccountUtilities::removeAllCreatedAccounts(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - $this->_clearProspects(); - } - - /** - * Test if email exists within report - */ - public function testEmailExistsExportList() - { - $content = export("ProspectLists", $this->_prospectList->id, true); - $this->assertContains($this->_contacts[0]->email1, $content, "Report should contain email of created contact"); - $this->assertContains($this->_contacts[1]->email1, $content, "Report should contain email of created contact"); - - $this->_contacts[0]->email1 = "changed" . $this->_contacts[0]->email1; - $this->_contacts[0]->save(); - - $this->_contacts[1]->email1 = "changed" . $this->_contacts[1]->email1; - $this->_contacts[1]->save(); - - $content = export("ProspectLists", $this->_prospectList->id, true); - $this->assertContains($this->_contacts[0]->email1, $content, "Report should contain email of created contact"); - $this->assertContains($this->_contacts[1]->email1, $content, "Report should contain email of created contact"); - } - - private function _clearProspects() - { - $ids = implode("', '", self::$_createdProspectListsIds); - $GLOBALS['db']->query('DELETE FROM prospect_list_campaigns WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists_prospects WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists WHERE id IN (\'' . $ids . '\')'); - } -} \ No newline at end of file diff --git a/tests/modules/ProspectLists/Bug41569Test.php b/tests/modules/ProspectLists/Bug41569Test.php deleted file mode 100755 index 92f75cc3..00000000 --- a/tests/modules/ProspectLists/Bug41569Test.php +++ /dev/null @@ -1,158 +0,0 @@ -save(); - return $contact; - } - - /** - * Create ProspectList instance - * @param Contact instance to attach to prospect list - */ - public static function createProspectList($contact = null) - { - $prospectList = new ProspectList(); - $prospectList->name = "test"; - $prospectList->save(); - self::$_createdProspectListsIds[] = $prospectList->id; - - if ($contact instanceof Contact) { - self::attachContactToProspectList($prospectList, $contact); - } - - return $prospectList; - } - - /** - * - * Attach Contact to prospect list - * @param ProspectList $prospectList prospect list instance - * @param Contact $contact contact instance - */ - public static function attachContactToProspectList($prospectList, $contact) - { - $prospectList->load_relationship('contacts'); - $prospectList->contacts->add($contact->id,array()); - } - - /** - * Set up - create prospect list with 2 contacts - */ - public function setUp() - { - global $current_user; - $current_user = SugarTestUserUtilities::createAnonymousUser();; - - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - $GLOBALS['beanList'] = $beanList; - $GLOBALS['beanFiles'] = $beanFiles; - - $this->_contacts[] = self::createContact(); - $this->_contacts[] = self::createContact(); - $this->_prospectList = self::createProspectList($this->_contacts[0]); - self::attachContactToProspectList($this->_prospectList, $this->_contacts[1]); - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - $GLOBALS['beanList'] = $beanList; - $GLOBALS['beanFiles'] = $beanFiles; - } - - /** - * Clear all created data - * @see PHPUnit_Framework_TestCase::tearDown() - */ - public function tearDown() - { - SugarTestContactUtilities::removeAllCreatedContacts(); - SugarTestAccountUtilities::removeAllCreatedAccounts(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - $this->_clearProspects(); - unset($GLOBALS['current_user']); - unset($GLOBALS['beanList']); - unset($GLOBALS['beanFiles']); - - } - - /** - * Test if email exists within report - */ - public function testContactExistExportList() - { - $content = export("ProspectLists", $this->_prospectList->id, true); - $this->assertContains($this->_contacts[0]->first_name, $content, "Report should contain email of created contact"); - $this->assertContains($this->_contacts[1]->first_name, $content, "Report should contain email of created contact"); - } - - private function _clearProspects() - { - $ids = implode("', '", self::$_createdProspectListsIds); - $GLOBALS['db']->query('DELETE FROM prospect_list_campaigns WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists_prospects WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists WHERE id IN (\'' . $ids . '\')'); - } -} \ No newline at end of file diff --git a/tests/modules/ProspectLists/Bug43478Test.php b/tests/modules/ProspectLists/Bug43478Test.php deleted file mode 100755 index 9dfc320b..00000000 --- a/tests/modules/ProspectLists/Bug43478Test.php +++ /dev/null @@ -1,157 +0,0 @@ -account_id = $account->id; - $contact->primary_address_state = 'Test adress state'; - $contact->save(); - return $contact; - } - - /** - * Create ProspectList instance - * @param Contact instance to attach to prospect list - */ - public static function createProspectList($contact = null) - { - $prospectList = new ProspectList(); - $prospectList->name = "test"; - $prospectList->save(); - self::$_createdProspectListsIds[] = $prospectList->id; - - if ($contact instanceof Contact) { - self::attachContactToProspectList($prospectList, $contact); - } - - return $prospectList; - } - - /** - * - * Attach Contact to prospect list - * @param ProspectList $prospectList prospect list instance - * @param Contact $contact contact instance - */ - public static function attachContactToProspectList($prospectList, $contact) - { - $prospectList->load_relationship('contacts'); - $prospectList->contacts->add($contact->id,array()); - } - - /** - * Set up - create prospect list with 2 contacts - */ - public function setUp() - { - global $current_user; - $current_user = SugarTestUserUtilities::createAnonymousUser(); - - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - $GLOBALS['beanList'] = $beanList; - $GLOBALS['beanFiles'] = $beanFiles; - - $contact = self::createContact(); - $contact->primary_address_state = 'Test adress state'; - $this->_contacts[] = $contact; - $this->_contacts[] = self::createContact(); - $this->_prospectList = self::createProspectList($this->_contacts[0]); - self::attachContactToProspectList($this->_prospectList, $this->_contacts[1]); - } - - /** - * Clear all created data - * @see PHPUnit_Framework_TestCase::tearDown() - */ - public function tearDown() - { - SugarTestContactUtilities::removeAllCreatedContacts(); - SugarTestAccountUtilities::removeAllCreatedAccounts(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - $this->_clearProspects(); - unset($GLOBALS['current_user']); - unset($GLOBALS['beanList']); - unset($GLOBALS['beanFiles']); - } - - /** - * Test if email exists within report - */ - public function testEmailExistsExportList() - { - $content = export("ProspectLists", $this->_prospectList->id, true); - $this->assertContains("Test adress state", $content); - } - - private function _clearProspects() - { - $ids = implode("', '", self::$_createdProspectListsIds); - $GLOBALS['db']->query('DELETE FROM prospect_list_campaigns WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists_prospects WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists WHERE id IN (\'' . $ids . '\')'); - } -} -?> diff --git a/tests/modules/ProspectLists/Bug43805Test.php b/tests/modules/ProspectLists/Bug43805Test.php deleted file mode 100755 index 13eef04f..00000000 --- a/tests/modules/ProspectLists/Bug43805Test.php +++ /dev/null @@ -1,155 +0,0 @@ -save(); - return $prospect; - - } - - /** - * Create ProspectList instance - * @param prospect instance to attach to prospect list - */ - public static function createProspectList($prospect = null) - { - $prospectList = new ProspectList(); - $prospectList->name = "TargetList_code"; - $prospectList->save(); - self::$_createdProspectListsIds[] = $prospectList->id; - - if ($prospect instanceof Prospect) { - self::attachProspectToProspectList($prospectList, $prospect); - } - - return $prospectList; - } - - /** - * - * Attach Prospect to prospect list - * @param ProspectList $prospectList prospect list instance - * @param prospect $prospect prospect instance - */ - public static function attachProspectToProspectList($prospectList, $prospect) - { - $prospectList->load_relationship('prospects'); - $prospectList->prospects->add($prospect->id,array()); - } - - /** - * Set up - create prospect list with 1 prospect - */ - public function setUp() - { - global $current_user; - $current_user = SugarTestUserUtilities::createAnonymousUser();; - - $beanList = array(); - $beanFiles = array(); - require('include/modules.php'); - $GLOBALS['beanList'] = $beanList; - $GLOBALS['beanFiles'] = $beanFiles; - - $this->_prospects[] = self::createProspect(); - $this->_prospectList = self::createProspectList($this->_prospects[0]); - self::attachProspectToProspectList($this->_prospectList, $this->_prospects[0]); - } - - /** - * Clear all created data - * @see PHPUnit_Framework_TestCase::tearDown() - */ - public function tearDown() - { - SugarTestProspectUtilities::removeAllCreatedProspects(); - SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); - $this->_clearProspects(); - unset($GLOBALS['current_user']); - unset($GLOBALS['beanList']); - unset($GLOBALS['beanFiles']); - } - - /** - * Test if Title exists within report - */ - public function testTitleExistsExportList() - { - $content = export("ProspectLists", $this->_prospectList->id, true); - - $this->assertContains($this->_prospects[0]->title, $content, "Report should contain title of created Prospect"); - - } - - private function _clearProspects() - { - $ids = implode("', '", self::$_createdProspectListsIds); - $GLOBALS['db']->query('DELETE FROM prospect_list_campaigns WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists_prospects WHERE prospect_list_id IN (\'' . $ids . '\')'); - $GLOBALS['db']->query('DELETE FROM prospect_lists WHERE id IN (\'' . $ids . '\')'); - } -} \ No newline at end of file diff --git a/tests/modules/Reports/Bug47277Test.php b/tests/modules/Reports/Bug47277Test.php new file mode 100755 index 00000000..e0db95d5 --- /dev/null +++ b/tests/modules/Reports/Bug47277Test.php @@ -0,0 +1,52 @@ +assertEquals("{$sourceString} ('')", string_format($string, $args)); + } +} \ No newline at end of file diff --git a/tests/modules/UpgradeWizard/Bug36845Test.php b/tests/modules/UpgradeWizard/Bug36845Test.php index ebabeae3..732f65cc 100755 --- a/tests/modules/UpgradeWizard/Bug36845Test.php +++ b/tests/modules/UpgradeWizard/Bug36845Test.php @@ -44,7 +44,13 @@ class Bug36845Test extends Sugar_PHPUnit_Framework_TestCase public function setUp() { + //$this->markTestIncomplete('Revisit this test. Seems to be corrupting unified search'); + + global $beanFiles, $beanList; + require('include/modules.php'); + if(file_exists(sugar_cached('modules/unified_search_modules.php'))) + { $this->has_custom_unified_search_modules = true; copy(sugar_cached('modules/unified_search_modules.php'), sugar_cached('modules/unified_search_modules.php.bak')); @@ -66,7 +72,7 @@ class Bug36845Test extends Sugar_PHPUnit_Framework_TestCase $the_string = <<module}"] = array ( 'name' => array( 'query_type'=>'default'), 'account_type'=> array('query_type'=>'default', 'options' => 'account_type_dom', 'template_var' => 'ACCOUNT_TYPE_OPTIONS'), @@ -136,9 +142,9 @@ EOQ; fwrite( $fp, $the_string ); fclose( $fp ); - require('include/modules.php'); global $beanFiles, $beanList; + $beanFiles['clabc_Bug36845Test'] = 'modules/clabc_Bug36845Test/clabc_Bug36845Test.php'; $beanList['clabc_Bug36845Test'] = 'clabc_Bug36845Test'; @@ -146,6 +152,10 @@ EOQ; public function tearDown() { + //Unset the clabc_Bug36845Test references + unset($GLOBALS['beanList']['clabc_Bug36845Test']); + unset($GLOBALS['beanFiles']['clabc_Bug36845Test']); + if(file_exists(sugar_cached('modules/unified_search_modules.php'))) { unlink(sugar_cached('modules/unified_search_modules.php')); @@ -166,6 +176,11 @@ EOQ; { copy('custom/modules/unified_search_modules_display.php.bak', 'custom/modules/unified_search_modules_display.php'); unlink('custom/modules/unified_search_modules_display.php.bak'); + } + + if(file_exists("custom/{$this->module_dir}/metadata")) + { + rmdir_recursive("custom/{$this->module_dir}/metadata"); } if(file_exists($this->module_dir)) @@ -200,9 +215,10 @@ EOQ; require_once('modules/Home/UnifiedSearchAdvanced.php'); $usa = new UnifiedSearchAdvanced(); $usa->buildCache(); + $this->assertTrue(file_exists(sugar_cached('modules/unified_search_modules.php')), 'Assert that we have a unified_search_modules.php file'); include(sugar_cached('modules/unified_search_modules.php')); - $this->assertTrue(!isset($unified_search_modules['clabc_Bug36845Test']), 'Assert that the custom module was not added to unified_search_modules.php'); + $this->assertTrue(empty($unified_search_modules['clabc_Bug36845Test']), 'Assert that the custom module was not added to unified_search_modules.php'); } @@ -220,5 +236,6 @@ EOQ; $usa->saveGlobalSearchSettings(); $this->assertTrue(file_exists('custom/modules/unified_search_modules_display.php'), 'Assert that unified_search_modules_display.php file was created'); } + } diff --git a/tests/modules/UpgradeWizard/Bug39757Test.php b/tests/modules/UpgradeWizard/Bug39757Test.php index 667949b4..3f33563a 100755 --- a/tests/modules/UpgradeWizard/Bug39757Test.php +++ b/tests/modules/UpgradeWizard/Bug39757Test.php @@ -59,7 +59,7 @@ class Bug39757Test extends Sugar_PHPUnit_Framework_TestCase public function tearDown() { - $sql = "DELETE FROM MEETINGS WHERE id = '{$this->_meetingId}'"; + $sql = "DELETE FROM meetings WHERE id = '{$this->_meetingId}'"; $GLOBALS['db']->query($sql); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); diff --git a/tests/service/Bug47650Test.php b/tests/service/Bug47650Test.php new file mode 100755 index 00000000..54b94258 --- /dev/null +++ b/tests/service/Bug47650Test.php @@ -0,0 +1,91 @@ +_soapURL = $GLOBALS['sugar_config']['site_url'].'/service/v2/soap.php'; + SugarTestAccountUtilities::createAccount(); + SugarTestAccountUtilities::createAccount(); + parent::setUp(); + } + + /** + * Remove anything that was used during this test + * + */ + public function tearDown() + { + parent::tearDown(); + SugarTestAccountUtilities::removeAllCreatedAccounts(); + global $soap_version_test_accountId, $soap_version_test_opportunityId, $soap_version_test_contactId; + unset($soap_version_test_accountId); + unset($soap_version_test_opportunityId); + unset($soap_version_test_contactId); + } + + public function testGetEntryListWithFourFieldsFields() + { + $this->_login(); + $result = $this->_soapClient->call('get_entry_list', + array( + 'session'=>$this->_sessionId, + "module_name" => 'Accounts', + '', + '', + 0, + "select_fields" => array('id', 'name', 'account_type', 'industry'), + null, + 'max_results' => 1 + ) + ); + + $this->assertEquals(4, count($result['entry_list'][0]['name_value_list']), 'More than four fields were returned'); + } // fn +} diff --git a/tests/service/RESTAPI3Test.php b/tests/service/RESTAPI3Test.php index 8a33497e..88a765b7 100755 --- a/tests/service/RESTAPI3Test.php +++ b/tests/service/RESTAPI3Test.php @@ -47,20 +47,41 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase private static $helperObject; + private $_unified_search_modules_content; + public function setUp() { + global $beanList, $beanFiles; + include('include/modules.php'); + //Reload langauge strings $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']); $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']); $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts'); //Create an anonymous user for login purposes/ - $this->_user = SugarTestUserUtilities::createAnonymousUser(); - $this->_user->status = 'Active'; - $this->_user->is_admin = 1; - $this->_user->save(); + $this->_user = new User(); + $this->_user->retrieve('1'); $GLOBALS['current_user'] = $this->_user; self::$helperObject = new APIv3Helper(); + + + if(file_exists(sugar_cached('modules/unified_search_modules.php'))) + { + $this->unified_search_modules_content = file_get_contents(sugar_cached('modules/unified_search_modules.php')); + unlink(sugar_cached('modules/unified_search_modules.php')); + } + + require_once('modules/Home/UnifiedSearchAdvanced.php'); + $unifiedSearchAdvanced = new UnifiedSearchAdvanced(); + $_REQUEST['enabled_modules'] = 'Accounts,Contacts,Opportunities'; + $unifiedSearchAdvanced->saveGlobalSearchSettings(); + + $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' "); + $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' "); + $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' "); + + //$this->useOutputBuffering = false; } public function tearDown() @@ -70,6 +91,15 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase unset($GLOBALS['app_list_strings']); unset($GLOBALS['app_strings']); unset($GLOBALS['mod_strings']); + + if(!empty($this->unified_search_modules_content)) + { + file_put_contents(sugar_cached('modules/unified_search_modules.php'), $this->unified_search_modules_content); + } + + $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' "); + $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' "); + $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' "); } protected function _makeRESTCall($method,$parameters) @@ -150,9 +180,6 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase $this->assertTrue( self::$helperObject->findBeanIdFromEntryList($results['entry_list'],$seedData[2]['id'],'Contacts') ); $this->assertTrue( self::$helperObject->findBeanIdFromEntryList($results['entry_list'],$seedData[3]['id'],'Opportunities') ); $this->assertFalse( self::$helperObject->findBeanIdFromEntryList($results['entry_list'],$seedData[4]['id'],'Opportunities') ); - $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' "); - $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' "); - $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' "); } public function testSearchByModuleWithReturnFields() @@ -184,10 +211,6 @@ class RESTAPI3Test extends Sugar_PHPUnit_Framework_TestCase $this->assertEquals($seedData[2]['fieldValue'], self::$helperObject->findFieldByNameFromEntryList($results['entry_list'],$seedData[2]['id'],'Contacts', $seedData[2]['fieldName'])); $this->assertEquals($seedData[3]['fieldValue'], self::$helperObject->findFieldByNameFromEntryList($results['entry_list'],$seedData[3]['id'],'Opportunities', $seedData[3]['fieldName'])); $this->assertFalse(self::$helperObject->findFieldByNameFromEntryList($results['entry_list'],$seedData[4]['id'],'Opportunities', $seedData[4]['fieldName'])); - - $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' "); - $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' "); - $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' "); } public function testGetServerInformation() diff --git a/tests/service/SOAPAPI1Test.php b/tests/service/SOAPAPI1Test.php index c0daf16e..745bb108 100755 --- a/tests/service/SOAPAPI1Test.php +++ b/tests/service/SOAPAPI1Test.php @@ -96,7 +96,7 @@ class SOAPAPI1Test extends SOAPTestCase { $modules = array('Contacts'); $result = $this->_soapClient->call('search_by_module', array('user_name' => $GLOBALS['current_user']->user_name, 'password' => $GLOBALS['current_user']->user_hash, 'search_string' => $this->_contact->email1, 'modules' => $modules, 'offset' => 0, 'max_results' => 10)); - $this->assertTrue(!empty($result) && count($result['entry_list']) > 0, 'Incorrect number of results returned. HTTP Response: '.$this->_soapClient->response); + $this->assertTrue(!empty($result) && count($result['entry_list']) > 0, 'Incorrect number of results returned. HTTP Response: '.$this->_soapClient->response); $this->assertEquals($result['entry_list'][0]['name_value_list'][1]['name'], 'first_name' && $result['entry_list'][0]['name_value_list'][1]['value'] == $this->_contact->first_name, 'Incorrect result returned'); } diff --git a/themes/Sugar5/css/style.css b/themes/Sugar5/css/style.css index a0d914cf..16a5812a 100644 --- a/themes/Sugar5/css/style.css +++ b/themes/Sugar5/css/style.css @@ -774,7 +774,7 @@ margin-top: 0; { width: 5em; } -.list tr th, .list tr td[scope=col], +.td_alt, .list tr th, .list tr td[scope=col], .edit .list tr th, .edit .list tr td[scope=col] { font-size: 11px; diff --git a/themes/Sugar5/tpls/_head.tpl b/themes/Sugar5/tpls/_head.tpl index 89fb0387..a9e7fe10 100644 --- a/themes/Sugar5/tpls/_head.tpl +++ b/themes/Sugar5/tpls/_head.tpl @@ -50,6 +50,7 @@ SUGAR.themes.theme_name = '{/literal}{$THEME}{literal}'; SUGAR.themes.theme_ie6compat = {/literal}{$THEME_IE6COMPAT}{literal}; SUGAR.themes.hide_image = '{/literal}{sugar_getimagepath file="hide.gif"}{literal}'; SUGAR.themes.show_image = '{/literal}{sugar_getimagepath file="show.gif"}{literal}'; +SUGAR.themes.loading_image = '{/literal}{sugar_getimagepath file="img_loading.gif"}{literal}'; SUGAR.themes.allThemes = eval({/literal}{$allThemes}{literal}); if ( YAHOO.env.ua ) UA = YAHOO.env.ua; -- 2.45.0