Permalink
Browse files

Release 6.1.5

  • Loading branch information...
1 parent c49c378 commit cffbac394e259f3aeaa1b9b307628d79d62ced90 John Mertic committed May 11, 2011
Showing with 4,192 additions and 3,082 deletions.
  1. +42 −0 crossdomain.xml
  2. +12 −0 data/SugarBean.php
  3. +19 −12 download.php
  4. +159 −158 files.md5
  5. +56 −47 include/ListView/ListViewDisplay.php
  6. +1 −12 include/MVC/Controller/entry_point_registry.php
  7. +169 −83 include/MVC/SugarApplication.php
  8. +8 −3 include/MVC/View/views/view.list.php
  9. +10 −9 include/MassUpdate.php
  10. +87 −58 include/OutboundEmail/OutboundEmail.php
  11. +317 −250 include/Pear/HTML_Safe/Safe.php
  12. +1 −1 include/Popups/tpls/PopupGeneric.tpl
  13. +5 −2 include/SearchForm/SearchForm2.php
  14. +2 −1 include/SubPanel/SubPanelTiles.js
  15. +56 −46 include/SugarEmailAddress/SugarEmailAddress.php
  16. +2 −1 include/SugarFields/Fields/Datetimecombo/Datetimecombo.js
  17. +1 −1 include/SugarFields/Fields/Datetimecombo/EditView.tpl
  18. +5 −0 include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php
  19. +4 −0 include/SugarFolders/SugarFolders.php
  20. +1 −0 include/SugarObjects/templates/file/language/en_us.lang.php
  21. +1 −1 include/SugarObjects/templates/file/vardefs.php
  22. +2 −1 include/VarDefHandler/vardef_meta_arrays.php
  23. +20 −8 include/database/MssqlManager.php
  24. +0 −1 include/entryPoint.php
  25. +5 −1 include/generic/SugarWidgets/SugarWidgetFieldenum.php
  26. +25 −9 include/javascript/javascript.php
  27. +3 −3 include/javascript/jsclass_base.js
  28. +27 −17 include/javascript/sugar_3.js
  29. +27 −17 include/javascript/sugar_grp1.js
  30. +567 −574 include/javascript/sugar_grp_emails.js
  31. +282 −283 include/javascript/sugar_grp_quickcomp.js
  32. +2 −1 include/language/en_us.lang.php
  33. +143 −41 include/utils.php
  34. +13 −2 include/utils/external_cache/SugarCache_Memcache.php
  35. +6 −0 include/utils/file_utils.php
  36. +1 −1 include/utils/mvc_utils.php
  37. +6 −6 install.php
  38. +1 −0 install/install_utils.php
  39. +2 −1 jssource/src_files/include/SubPanel/SubPanelTiles.js
  40. +22 −8 jssource/src_files/include/SugarFields/Fields/Datetimecombo/Datetimecombo.js
  41. +11 −11 jssource/src_files/include/javascript/jsclass_base.js
  42. +244 −140 jssource/src_files/include/javascript/sugar_3.js
  43. +28 −27 jssource/src_files/modules/InboundEmail/InboundEmail.js
  44. +15 −8 modules/Administration/DiagnosticDownload.php
  45. +7 −2 modules/Administration/DiagnosticRun.php
  46. +1 −0 modules/Administration/UpgradeAccess.php
  47. +3 −2 modules/Administration/UpgradeWizard.php
  48. +9 −0 modules/Calls/vardefs.php
  49. +24 −15 modules/Configurator/Configurator.php
  50. +11 −15 modules/Configurator/SugarpdfSettings.php
  51. +8 −7 modules/Configurator/UploadFileCheck.php
  52. +24 −0 modules/Configurator/controller.php
  53. +5 −4 modules/Configurator/tpls/EditView.tpl
  54. +2 −2 modules/DocumentRevisions/language/en_us.lang.php
  55. +2 −1 modules/Documents/language/en_us.lang.php
  56. +1 −1 modules/Documents/metadata/detailviewdefs.php
  57. +1 −1 modules/Documents/vardefs.php
  58. +6 −4 modules/DynamicFields/DynamicField.php
  59. +0 −4 modules/EmailMan/Forms.php
  60. +6 −1 modules/EmailMan/Save.php
  61. +15 −4 modules/EmailMan/testOutboundEmail.php
  62. +38 −34 modules/EmailMan/tpls/config.tpl
  63. +33 −33 modules/EmailMan/views/view.config.php
  64. +8 −4 modules/Emails/Compose.php
  65. +147 −122 modules/Emails/Email.php
  66. +141 −139 modules/Emails/EmailUI.php
  67. +63 −47 modules/Emails/EmailUIAjax.php
  68. +2 −2 modules/Emails/javascript/Email.js
  69. +282 −289 modules/Emails/javascript/EmailUI.js
  70. +196 −196 modules/Emails/javascript/EmailUICompose.js
  71. +86 −87 modules/Emails/javascript/ajax.js
  72. +19 −18 modules/Emails/templates/editAccountDialogue.tpl
  73. +6 −3 modules/Emails/templates/outboundDialog.tpl
  74. +19 −8 modules/Home/Dashlets/iFrameDashlet/iFrameDashlet.php
  75. +5 −3 modules/Import/ImportFile.php
  76. +22 −22 modules/Import/tpls/step3.tpl
  77. +14 −6 modules/InboundEmail/EditView.html
  78. +21 −20 modules/InboundEmail/EditView.php
  79. +3 −2 modules/InboundEmail/InboundEmail.js
  80. +44 −5 modules/InboundEmail/InboundEmail.php
  81. +10 −6 modules/InboundEmail/Popup.php
  82. +23 −25 modules/InboundEmail/Save.php
  83. +7 −2 modules/InboundEmail/ShowInboundFoldersList.php
  84. +11 −1 modules/Leads/views/view.convertlead.php
  85. +9 −0 modules/Meetings/vardefs.php
  86. +4 −0 modules/MergeRecords/SaveMerge.php
  87. +38 −0 modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php
  88. +1 −1 modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php
  89. +1 −1 modules/ModuleBuilder/views/view.listview.php
  90. +4 −4 modules/MySettings/StoreQuery.php
  91. +2 −1 modules/Opportunities/vardefs.php
  92. +3 −3 modules/Schedulers/EditView.html
  93. +4 −1 modules/Schedulers/EditView.php
  94. +2 −0 modules/Schedulers/language/en_us.lang.php
  95. +9 −4 modules/SchedulersJobs/SchedulersJob.php
  96. +2 −0 modules/Tasks/vardefs.php
  97. +10 −9 modules/Users/EditView.php
  98. +61 −53 modules/Users/EditView.tpl
  99. +7 −7 modules/Users/User.php
  100. +5 −0 modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php
  101. +24 −3 soap/SoapPortalHelper.php
  102. +4 −4 sugar_version.php
  103. +23 −1 tests/SugarTestImportUtilities.php
  104. +23 −0 tests/data/fixUpFormatting.php
  105. +45 −0 tests/include/SugarFields/Fields/Datetimecombo/Bug41114Test.php
  106. +38 −8 tests/modules/EmailAddresses/EmailAddressTest.php
  107. +12 −0 tests/modules/Import/ImportFileTest.php
  108. +49 −0 tests/modules/InboundEmail/Bug43554Test.php
  109. +77 −0 tests/modules/Leads/Bug40209Test.php
View
@@ -0,0 +1,42 @@
+<!--
+/*********************************************************************************
+ * SugarCRM 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".
+ ********************************************************************************/
+
+-->
+<?xml version="1.0"?>
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+<site-control permitted-cross-domain-policies="none"/>
+</cross-domain-policy>
View
@@ -2027,6 +2027,10 @@ function fixUpFormatting()
case 'datetime':
case 'datetimecombo':
if(empty($this->$field)) break;
+ if ($this->$field == 'NULL') {
+ $this->$field = '';
+ break;
+ }
if ( ! preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/',$this->$field) ) {
// This appears to be formatted in user date/time
$this->$field = $timedate->to_db($this->$field);
@@ -2035,6 +2039,10 @@ function fixUpFormatting()
break;
case 'date':
if(empty($this->$field)) break;
+ if ($this->$field == 'NULL') {
+ $this->$field = '';
+ break;
+ }
if ( ! preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$this->$field) ) {
// This date appears to be formatted in the user's format
$this->$field = $timedate->to_db_date($this->$field, false);
@@ -2043,6 +2051,10 @@ function fixUpFormatting()
break;
case 'time':
if(empty($this->$field)) break;
+ if ($this->$field == 'NULL') {
+ $this->$field = '';
+ break;
+ }
if ( preg_match('/(am|pm)/i',$this->$field) ) {
// This time appears to be formatted in the user's format
$this->$field = $timedate->to_db_time($timedate->to_display_date(gmdate('Y-m-d')).' '.$this->$field);
View
@@ -72,10 +72,10 @@
$local_location = (isset($_REQUEST['isTempFile'])) ? "{$GLOBALS['sugar_config']['cache_dir']}/modules/Emails/{$_REQUEST['ieId']}/attachments/{$_REQUEST['id']}"
: $GLOBALS['sugar_config']['upload_dir']."/".$_REQUEST['id'];
- if(isset($_REQUEST['isTempFile']) && ($_REQUEST['type']=="SugarFieldImage")) {
- $local_location = $GLOBALS['sugar_config']['upload_dir']."/".$_REQUEST['id'];
+ if(isset($_REQUEST['isTempFile']) && ($_REQUEST['type']=="SugarFieldImage")) {
+ $local_location = $GLOBALS['sugar_config']['upload_dir']."/".$_REQUEST['id'];
}
-
+
if(!file_exists( $local_location ) || strpos($local_location, "..")) {
die($app_strings['ERR_INVALID_FILE_REFERENCE']);
}
@@ -87,7 +87,7 @@
$query = "SELECT filename name FROM document_revisions INNER JOIN documents ON documents.id = document_revisions.document_id ";
$query .= "WHERE document_revisions.id = '" . $_REQUEST['id'] ."'";
} elseif($file_type == 'kbdocuments') {
- $query="SELECT document_revisions.filename name FROM document_revisions INNER JOIN kbdocument_revisions ON document_revisions.id = kbdocument_revisions.document_revision_id INNER JOIN kbdocuments ON kbdocument_revisions.kbdocument_id = kbdocuments.id ";
+ $query="SELECT document_revisions.filename name FROM document_revisions INNER JOIN kbdocument_revisions ON document_revisions.id = kbdocument_revisions.document_revision_id INNER JOIN kbdocuments ON kbdocument_revisions.kbdocument_id = kbdocuments.id ";
$query .= "WHERE document_revisions.id = '" . $_REQUEST['id'] ."'";
} elseif($file_type == 'notes') {
$query = "SELECT filename name FROM notes ";
@@ -117,29 +117,36 @@
$download_location = $local_location;
$name = $_REQUEST['tempName'];
}
-
+
if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']))
- {
+ {
$name = urlencode($name);
$name = str_replace("+", "_", $name);
}
header("Pragma: public");
header("Cache-Control: maxage=1, post-check=0, pre-check=0");
- if(isset($_REQUEST['isTempFile']) && ($_REQUEST['type']=="SugarFieldImage"))
- header("Content-type: image");
- else {
- header("Content-type: application/force-download");
- header("Content-disposition: attachment; filename=\"".$name."\";");
+ if(isset($_REQUEST['isTempFile']) && ($_REQUEST['type']=="SugarFieldImage")) {
+ $mime = getimagesize($download_location);
+ if(!empty($mime)) {
+ header("Content-Type: {$mime['mime']}");
+ } else {
+ header("Content-Type: image/png");
+ }
+ } else {
+ header("Content-Type: application/force-download");
+ header("Content-Disposition: attachment; filename=\"".$name."\";");
}
+ // disable content type sniffing in MSIE
+ header("X-Content-Type-Options: nosniff");
header("Content-Length: " . filesize($local_location));
header("Expires: 0");
set_time_limit(0);
@ob_end_clean();
ob_start();
- echo file_get_contents($download_location);
+ readfile($download_location);
@ob_flush();
}
}
Oops, something went wrong.

0 comments on commit cffbac3

Please sign in to comment.