Permalink
Browse files

Release 6.5.8

  • Loading branch information...
1 parent 8fda759 commit f6ed54c0e6c5a0dd6a56c359091fe9eaefc555d6 @tsuoying tsuoying committed Nov 20, 2012
Showing with 2,542 additions and 581 deletions.
  1. +66 −16 ModuleInstall/ModuleScanner.php
  2. +4 −1 cache/include/javascript/sugar_grp1.js
  3. +3 −3 cache/include/javascript/sugar_grp_emails.js
  4. +1 −15 cache/include/javascript/sugar_grp_jsolait.js
  5. +3 −3 cache/include/javascript/sugar_grp_quickcomp.js
  6. +1 −1 data/Link2.php
  7. +20 −4 data/Relationships/SugarRelationship.php
  8. +69 −19 data/SugarBean.php
  9. +65 −64 files.md5
  10. +2 −2 include/DetailView/header.tpl
  11. +1 −1 include/EditView/EditView.tpl
  12. +0 −1 include/HTMLPurifier/HTMLPurifier.standalone.php
  13. +1 −1 include/MVC/View/views/view.importvcard.php
  14. +1 −1 include/MVC/View/views/view.importvcardsave.php
  15. +1 −1 include/MVC/View/views/view.popup.php
  16. +20 −21 include/Smarty/Smarty_Compiler.class.php
  17. +1 −0 include/Smarty/plugins/function.sugar_button.php
  18. +25 −8 include/SugarCharts/SugarChart.php
  19. +58 −29 include/SugarEmailAddress/SugarEmailAddress.php
  20. +18 −0 include/SugarLogger/LoggerManager.php
  21. +13 −3 include/SugarTheme/SugarTheme.php
  22. +3 −2 include/clean.php
  23. +16 −8 include/database/MssqlManager.php
  24. +52 −39 include/generic/SugarWidgets/SugarWidgetFieldcurrency.php
  25. +121 −0 include/generic/SugarWidgets/SugarWidgetFieldcurrency_id.php
  26. +6 −2 include/generic/SugarWidgets/SugarWidgetReportField.php
  27. +1 −1 include/generic/SugarWidgets/SugarWidgetSubPanelIcon.php
  28. +1 −1 include/globalControlLinks.php
  29. +4 −1 include/javascript/sugar_3.js
  30. +1 −2 include/utils.php
  31. +11 −1 jssource/src_files/include/javascript/sugar_3.js
  32. +0 −64 jssource/src_files/modules/Meetings/jsclass_scheduler.js
  33. +10 −9 modules/ACLActions/ACLAction.php
  34. +11 −3 modules/Activities/EmailReminder.php
  35. +1 −7 modules/Administration/Locale.php
  36. +8 −2 modules/Administration/UpgradeWizard.php
  37. +1 −0 modules/Administration/UpgradeWizardCommon.php
  38. +3 −2 modules/Administration/UpgradeWizard_prepare.php
  39. +2 −1 modules/Administration/language/en_us.lang.php
  40. +2 −2 modules/Calendar/tpls/main.tpl
  41. +6 −1 modules/Calls/CallFormBase.php
  42. +0 −1 modules/Calls/language/en_us.lang.php
  43. +1 −7 modules/Calls/metadata/editviewdefs.php
  44. +0 −11 modules/Calls/vardefs.php
  45. +9 −3 modules/Emails/EmailUI.php
  46. +1 −1 modules/Emails/javascript/EmailUICompose.js
  47. +2 −2 modules/Emails/javascript/ajax.js
  48. +1 −1 modules/Emails/javascript/composeEmailTemplate.js
  49. +12 −0 modules/Import/ImportDuplicateCheck.php
  50. +1 −1 modules/InboundEmail/InboundEmail.php
  51. +17 −10 modules/Leads/tpls/ConvertLead.tpl
  52. +21 −0 modules/Leads/views/view.convertlead.php
  53. +11 −8 modules/Meetings/Meeting.php
  54. +6 −0 modules/Meetings/MeetingFormBase.php
  55. +1 −15 modules/Meetings/jsclass_scheduler.js
  56. +0 −1 modules/Meetings/language/en_us.lang.php
  57. +7 −10 modules/Meetings/metadata/editviewdefs.php
  58. +0 −11 modules/Meetings/vardefs.php
  59. +94 −20 modules/ModuleBuilder/MB/MBPackage.php
  60. +10 −2 modules/ProjectTask/views/view.list.php
  61. +9 −2 modules/SchedulersJobs/SchedulersJob.php
  62. +12 −9 modules/Tasks/Task.php
  63. +16 −9 modules/Users/User.php
  64. +4 −4 sugar_version.php
  65. +23 −0 tests/ModuleInstall/ModuleScannerTest.php
  66. +1 −0 tests/SugarTestHelper.php
  67. +9 −4 tests/SugarTestOpportunityUtilities.php
  68. +183 −0 tests/SugarTestSugarEmailAddressUtilities.php
  69. +139 −0 tests/data/Bug56652Test.php
  70. +151 −0 tests/data/Relationships/Bug56904Test.php
  71. +82 −1 tests/data/SugarBeanTest.php
  72. +136 −70 tests/include/SugarCharts/Bug44696Test.php
  73. +150 −0 tests/include/SugarEmailAddress/SugarEmailAddressAddChangeTest.php
  74. +27 −11 tests/include/SugarLogger/SugarLoggerTest.php
  75. +207 −0 tests/include/generic/SugarWidgets/Bug51568Test.php
  76. +136 −0 tests/include/generic/SugarWidgets/Bug57902Test.php
  77. +119 −0 tests/modules/Import/Bug51264Test.php
  78. +4 −3 tests/modules/Import/ImportCacheFilesTest.php
  79. +2 −1 tests/modules/Import/ImportDuplicateCheckTest.php
  80. +96 −0 tests/modules/InboundEmail/AttachmentHeaderTest.php
  81. +86 −0 tests/modules/Meetings/Bug53516Test.php
  82. +76 −20 tests/modules/ModuleBuilder/Bug45339Test.php
  83. +45 −0 tests/modules/SNIP/Bug53942Test.ics
  84. +1 −1 tests/modules/SchedulersJobs/RunnableSchedulersJobsTest.php
  85. +1 −0 themes/Sugar5/tpls/_head.tpl
@@ -56,6 +56,13 @@ class ModuleScanner{
);
+ /**
+ * config settings
+ * @var array
+ */
+ private $config = array();
+ private $config_hash;
+
private $blackListExempt = array();
private $classBlackListExempt = array();
@@ -392,20 +399,24 @@ public function printToWiki(){
}
public function __construct(){
- if(!empty($GLOBALS['sugar_config']['moduleInstaller']['blackListExempt'])){
- $this->blackListExempt = array_merge($this->blackListExempt, $GLOBALS['sugar_config']['moduleInstaller']['blackListExempt']);
+ if(!empty($GLOBALS['sugar_config']['moduleInstaller'])) {
+ $this->config = $GLOBALS['sugar_config']['moduleInstaller'];
+ }
+
+ if(!empty($this->config['blackListExempt'])){
+ $this->blackListExempt = array_merge($this->blackListExempt, $this->config['blackListExempt']);
}
- if(!empty($GLOBALS['sugar_config']['moduleInstaller']['blackList'])){
- $this->blackList = array_merge($this->blackList, $GLOBALS['sugar_config']['moduleInstaller']['blackList']);
+ if(!empty($this->config['blackList'])){
+ $this->blackList = array_merge($this->blackList, $this->config['blackList']);
}
- if(!empty($GLOBALS['sugar_config']['moduleInstaller']['classBlackListExempt'])){
- $this->classBlackListExempt = array_merge($this->classBlackListExempt, $GLOBALS['sugar_config']['moduleInstaller']['classBlackListExempt']);
+ if(!empty($this->config['classBlackListExempt'])){
+ $this->classBlackListExempt = array_merge($this->classBlackListExempt, $this->config['classBlackListExempt']);
}
- if(!empty($GLOBALS['sugar_config']['moduleInstaller']['classBlackList'])){
- $this->classBlackList = array_merge($this->classBlackList, $GLOBALS['sugar_config']['moduleInstaller']['classBlackList']);
+ if(!empty($this->config['classBlackList'])){
+ $this->classBlackList = array_merge($this->classBlackList, $this->config['classBlackList']);
}
- if(!empty($GLOBALS['sugar_config']['moduleInstaller']['validExt'])){
- $this->validExt = array_merge($this->validExt, $GLOBALS['sugar_config']['moduleInstaller']['validExt']);
+ if(!empty($this->config['validExt'])){
+ $this->validExt = array_merge($this->validExt, $this->config['validExt']);
}
}
@@ -596,20 +607,24 @@ public function scanManifest($manifestPath){
if(!empty($fileIssues)){
return $fileIssues;
}
- include($manifestPath);
-
+ $this->lockConfig();
+ list($manifest, $installdefs) = MSLoadManifest($manifestPath);
+ $fileIssues = $this->checkConfig($manifestPath);
+ if(!empty($fileIssues)){
+ return $fileIssues;
+ }
//scan for disabled actions
- if(isset($GLOBALS['sugar_config']['moduleInstaller']['disableActions'])){
- foreach($GLOBALS['sugar_config']['moduleInstaller']['disableActions'] as $action){
+ if(isset($this->config['disableActions'])){
+ foreach($this->config['disableActions'] as $action){
if(isset($installdefs[$this->manifestMap[$action]])){
$issues[] = translate('ML_INVALID_ACTION_IN_MANIFEST') . $this->manifestMap[$action];
}
}
}
//now lets scan for files that will override our files
- if(empty($GLOBALS['sugar_config']['moduleInstaller']['disableRestrictedCopy']) && isset($installdefs['copy'])){
+ if(empty($this->config['disableRestrictedCopy']) && isset($installdefs['copy'])){
foreach($installdefs['copy'] as $copy){
$from = str_replace('<basepath>', $this->pathToModule, $copy['from']);
$to = $copy['to'];
@@ -683,7 +698,7 @@ function scanCopy($from, $to){
public function scanPackage($path){
$this->pathToModule = $path;
$this->scanManifest($path . '/manifest.php');
- if(empty($GLOBALS['sugar_config']['moduleInstaller']['disableFileScan'])){
+ if(empty($this->config['disableFileScan'])){
$this->scanDir($path);
}
}
@@ -719,8 +734,43 @@ public function displayIssues($package='Package'){
}
+ /**
+ * Lock config settings
+ */
+ public function lockConfig()
+ {
+ if(empty($this->config_hash)) {
+ $this->config_hash = md5(serialize($GLOBALS['sugar_config']));
+ }
+ }
+
+ /**
+ * Check if config was modified. Return
+ * @param string $file
+ * @return array Errors if something wrong, false if no problems
+ */
+ public function checkConfig($file)
+ {
+ $config_hash_after = md5(serialize($GLOBALS['sugar_config']));
+ if($config_hash_after != $this->config_hash) {
+ $this->issues['file'][$file] = array(translate('ML_CONFIG_OVERRIDE'));
+ return $this->issues;
+ }
+ return false;
+ }
}
+/**
+ * Load manifest file
+ * Outside of the class to isolate the context
+ * @param string $manifest_file
+ * @return array
+ */
+function MSLoadManifest($manifest_file)
+{
+ include( $manifest_file );
+ return array($manifest, $installdefs);
+}
?>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -303,7 +303,7 @@ public function getSide() {
{
if ((strtolower($this->def['side']) == 'left' || $this->def['side'] == REL_LHS)
//Some relationships make have left in the vardef erroneously if generated by module builder
- && $this->name != $this->relationship->def['join_key_lhs'])
+ && (empty($this->relationship->def['join_key_lhs']) || $this->name != $this->relationship->def['join_key_lhs']))
{
return REL_LHS ;
}
@@ -115,25 +115,33 @@
/**
* @param $link Link2 removes all the beans associated with this link from the relationship
- * @return boolean true if it was successful, false if it was not
+ * @return boolean true if all beans were successfully removed or there
+ * were not related beans, false otherwise
*/
public function removeAll($link)
{
$focus = $link->getFocus();
$related = $link->getBeans();
+ $result = true;
foreach($related as $relBean)
{
if (empty($relBean->id)) {
continue;
}
if ($link->getSide() == REL_LHS)
- return $this->remove($focus, $relBean);
+ {
+ $sub_result = $this->remove($focus, $relBean);
+ }
else
- return $this->remove($relBean, $focus);
+ {
+ $sub_result = $this->remove($relBean, $focus);
+ }
+
+ $result = $result && $sub_result;
}
- return false;
+ return $result;
}
/**
@@ -434,6 +442,14 @@ public static function resaveRelatedBeans()
{
$bean->save();
}
+ else
+ {
+ // Bug 55942 save the in-save id which will be used to send workflow alert later
+ if (isset($bean->id) && !empty($_SESSION['WORKFLOW_ALERTS']))
+ {
+ $_SESSION['WORKFLOW_ALERTS']['id'] = $bean->id;
+ }
+ }
}
}
Oops, something went wrong.

0 comments on commit f6ed54c

Please sign in to comment.