Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/jjwg_Maps/jjwg_Maps_Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 require_once('include/utils.php');
5 5
 require_once('include/export_utils.php');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
   echo '<input type="hidden" name="module" value="jjwg_Maps">'."\n";
57 57
   echo '<input type="hidden" name="action" value="map_display">'."\n";
58 58
   foreach (array_keys($_REQUEST) as $key) {
59
-    if (!in_array($key, array('action','module','entryPoint','display_module', 'quick_address'))) {
59
+    if (!in_array($key, array('action', 'module', 'entryPoint', 'display_module', 'quick_address'))) {
60 60
       echo '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($_REQUEST[$key]).'">'."\n";
61 61
     }
62 62
   }
Please login to merge, or discard this patch.
modules/SecurityGroups/VersionCheck.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 
5 5
 class VersionCheck {
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
 		global $current_user;
10 10
 	
11 11
 		require_once('include/utils.php');
12
-		if(is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
12
+		if (is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
13 13
 			//require_once('modules/SecurityGroups/SecurityGroup.php');
14 14
 			
15 15
 			//check to see if the securitysuite version
16 16
 			//matches the sugar version. If not then display an error messag
17 17
 			
18 18
 			global $sugar_config;
19
-			if(empty($sugar_config['securitysuite_version'])
19
+			if (empty($sugar_config['securitysuite_version'])
20 20
 				|| $sugar_config['securitysuite_version'] != $sugar_config['sugar_version']
21 21
 			) {
22 22
 				$securitysuite_warning = "Warning! SecuritySuite no longer matches the version of Sugar that you are running. "
Please login to merge, or discard this patch.
modules/SecurityGroups/SaveSecurityGroupUserRelationship.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 require_once('modules/SecurityGroups/SecurityGroupUserRelationship.php');
5 5
 
@@ -10,29 +10,29 @@  discard block
 block discarded – undo
10 10
 
11 11
 $focus->retrieve($_REQUEST['record']);
12 12
 
13
-foreach($focus->column_fields as $field)
13
+foreach ($focus->column_fields as $field)
14 14
 {
15 15
     safe_map($field, $focus, true);
16 16
 }
17 17
 
18
-foreach($focus->additional_column_fields as $field)
18
+foreach ($focus->additional_column_fields as $field)
19 19
 {
20 20
     safe_map($field, $focus, true);
21 21
 }
22 22
 
23 23
 // send them to the edit screen.
24
-if(isset($_REQUEST['record']) && $_REQUEST['record'] != "")
24
+if (isset($_REQUEST['record']) && $_REQUEST['record'] != "")
25 25
 {
26 26
     $recordID = $_REQUEST['record'];
27 27
 }
28 28
 
29
-    if( isset($_POST['noninheritable']) && $_POST['noninheritable'] == '1') {
29
+    if (isset($_POST['noninheritable']) && $_POST['noninheritable'] == '1') {
30 30
         $focus->noninheritable = 1;
31 31
     } else {
32 32
         $focus->noninheritable = 0;
33 33
     }
34 34
 
35
-    if( isset($_POST['primary_group']) && $_POST['primary_group'] == '1') {
35
+    if (isset($_POST['primary_group']) && $_POST['primary_group'] == '1') {
36 36
         $focus->primary_group = 1;
37 37
         //unset all other primary groups for this user
38 38
         global $db;
Please login to merge, or discard this patch.
modules/SecurityGroups/AssignGroups.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 
5 5
 class AssignGroups {
@@ -9,28 +9,28 @@  discard block
 block discarded – undo
9 9
 	global $sugar_config;
10 10
 
11 11
 	//only process if action is Save (meaning a user has triggered this event and not the portal or automated process)
12
-	if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'Save' 
12
+	if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'Save' 
13 13
 		&& isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true
14 14
 		&& empty($bean->fetched_row['id']) && $bean->module_dir != "Users" && $bean->module_dir != "SugarFeed") {		
15 15
 		//Upload an attachment to an Email Template and save. If user with multi groups - popup select option
16 16
 		//it will redirect to notes instead of EmailTemplate and relationship will fail...check below to avoid
17
-		if(!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) return;
17
+		if (!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) return;
18 18
 
19
-		if(!empty($_REQUEST['securitygroup_list'])) {
19
+		if (!empty($_REQUEST['securitygroup_list'])) {
20 20
 			require_once('modules/SecurityGroups/SecurityGroup.php');
21 21
 			$groupFocus = new SecurityGroup();
22 22
 			$security_modules = $groupFocus->getSecurityModules();
23 23
 			//sanity check
24
-			if(in_array($bean->module_dir,array_keys($security_modules))) {
24
+			if (in_array($bean->module_dir, array_keys($security_modules))) {
25 25
 				//add each group in securitygroup_list to new record
26
-				$rel_name = $groupFocus->getLinkName($bean->module_dir,"SecurityGroups");
26
+				$rel_name = $groupFocus->getLinkName($bean->module_dir, "SecurityGroups");
27 27
 
28 28
 				$bean->load_relationship($rel_name);
29
-				foreach($_REQUEST['securitygroup_list'] as $group_id) {
29
+				foreach ($_REQUEST['securitygroup_list'] as $group_id) {
30 30
 					$bean->$rel_name->add($group_id);
31 31
 				}
32 32
 			}
33
-		} else if(!empty($_REQUEST['dup_checked'])) {
33
+		} else if (!empty($_REQUEST['dup_checked'])) {
34 34
 			//well...ShowDuplicates doesn't pass through request vars unless they are defined in the module vardefs
35 35
 			//so we are screwed here...
36 36
 			global $current_language;
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 		}
41 41
 	}
42 42
 
43
-	else if(isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true
43
+	else if (isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true
44 44
 		&& empty($bean->fetched_row['id']) && $bean->module_dir == "Users"
45
-		&& isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature' ) { //Bug: 589
45
+		&& isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature') { //Bug: 589
46 46
 
47 47
 		//$_REQUEST['return_module'] = $bean->module_dir;
48 48
 		//$_REQUEST['return_action'] = "DetailView";
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		
51 51
 		//$_SESSION['securitygroups_popup_'.$bean->module_dir] = $bean->id;
52 52
 		
53
-		if(!isset($_SESSION['securitygroups_popup'])) {
53
+		if (!isset($_SESSION['securitygroups_popup'])) {
54 54
 			$_SESSION['securitygroups_popup'] = array();
55 55
 		}
56 56
 		$_SESSION['securitygroups_popup'][] = array(
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 function popup_onload($event, $arguments)
65 65
 {
66
-	if(!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) return;
66
+	if (!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) return;
67 67
 
68 68
 /** //test user popup
69 69
 	//always have this loaded
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 	$module = $_REQUEST['module'];
75 75
 	$action = $_REQUEST['action'];
76 76
 
77
-	if(isset($action) && ($action == "Save" || $action == "SetTimezone")) return;  
77
+	if (isset($action) && ($action == "Save" || $action == "SetTimezone")) return;  
78 78
 
79
-	if( (
79
+	if ((
80 80
 			//(isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true)
81 81
 			//|| 
82 82
 			($module == "Users" && isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true)
@@ -86,17 +86,17 @@  discard block
 block discarded – undo
86 86
 		&& !empty($_SESSION['securitygroups_popup'])
87 87
 	) {	
88 88
 
89
-		foreach($_SESSION['securitygroups_popup'] as $popup_index => $popup) {
89
+		foreach ($_SESSION['securitygroups_popup'] as $popup_index => $popup) {
90 90
 			$record_id = $popup['id'];
91 91
 			$module = $popup['module'];
92 92
 			unset($_SESSION['securitygroups_popup'][$popup_index]);
93 93
 			
94 94
 			require_once('modules/SecurityGroups/SecurityGroup.php');
95 95
 			$groupFocus = new SecurityGroup();
96
-			if($module == 'Users') {
96
+			if ($module == 'Users') {
97 97
 				$rel_name = "SecurityGroups";
98 98
 			} else {
99
-				$rel_name = $groupFocus->getLinkName($module,"SecurityGroups");
99
+				$rel_name = $groupFocus->getLinkName($module, "SecurityGroups");
100 100
 			}
101 101
 
102 102
 				//this only works if on the detail view of the record actually saved...
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
     $action = $_REQUEST['action'];
122 122
     $module = $_REQUEST['module'];
123 123
   
124
-  	$no_mass_assign_list = array("Emails"=>"Emails","ACLRoles"=>"ACLRoles"); //,"Users"=>"Users");
124
+  	$no_mass_assign_list = array("Emails"=>"Emails", "ACLRoles"=>"ACLRoles"); //,"Users"=>"Users");
125 125
     //check if security suite enabled
126 126
     $action = strtolower($action);
127
-    if(isset($module) && ($action == "list" || $action == "index" || $action == "listview") 
127
+    if (isset($module) && ($action == "list" || $action == "index" || $action == "listview") 
128 128
     	&& (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != true)
129
-    	&& !array_key_exists($module,$no_mass_assign_list)
129
+    	&& !array_key_exists($module, $no_mass_assign_list)
130 130
     	) {
131 131
    		global $current_user;
132
-   		if(is_admin($current_user) || ACLAction::getUserAccessLevel($current_user->id,"SecurityGroups", 'access') == ACL_ALLOW_ENABLED) {
132
+   		if (is_admin($current_user) || ACLAction::getUserAccessLevel($current_user->id, "SecurityGroups", 'access') == ACL_ALLOW_ENABLED) {
133 133
 
134 134
 			require_once('modules/SecurityGroups/SecurityGroup.php');
135 135
 			$groupFocus = new SecurityGroup();
136 136
 			$security_modules = $groupFocus->getSecurityModules();
137 137
 			//if(in_array($module,$security_modules)) {
138
-			if(in_array($module,array_keys($security_modules))) {
138
+			if (in_array($module, array_keys($security_modules))) {
139 139
 
140 140
 				global $app_strings;
141 141
 
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
 
145 145
 				$form_header = get_form_header($current_module_strings['LBL_MASS_ASSIGN'], '', false);
146 146
 
147
-				$groups = $groupFocus->get_list("name","",0,-99,-99);
147
+				$groups = $groupFocus->get_list("name", "", 0, -99, -99);
148 148
 				$options = array(""=>"");
149
-				foreach($groups['list'] as $group) {
149
+				foreach ($groups['list'] as $group) {
150 150
 					$options[$group->id] = $group->name;
151 151
 				}
152
-				$group_options =  get_select_options_with_id($options, "");
152
+				$group_options = get_select_options_with_id($options, "");
153 153
 
154 154
 				$mass_assign = <<<EOQ
155 155
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     }
271 271
 
272 272
 	//if after a save...
273
-	if(!empty($_SESSION['securitysuite_error'])) {
273
+	if (!empty($_SESSION['securitysuite_error'])) {
274 274
 		$lbl_securitysuite_error = $_SESSION['securitysuite_error'];
275 275
 		unset($_SESSION['securitysuite_error']);
276 276
 		echo <<<EOQ
Please login to merge, or discard this patch.
modules/Contacts/ContactsQuickCreate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
   
56 56
         $this->ss->assign("SALUTATION_OPTIONS", get_select_options_with_id($app_list_strings['salutation_dom'], ''));
57 57
 
58
-        if($this->viaAJAX) { // override for ajax call
58
+        if ($this->viaAJAX) { // override for ajax call
59 59
             $this->ss->assign('saveOnclick', "onclick='if(check_form(\"contactsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contacts\"); else return false;'");
60 60
             $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contacts\")';");
61 61
         }
Please login to merge, or discard this patch.
modules/Contacts/SaveContactOpportunityRelationship.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 
56 56
 $focus->retrieve($_REQUEST['record']);
57 57
 
58
-foreach($focus->column_fields as $field)
58
+foreach ($focus->column_fields as $field)
59 59
 {
60 60
 	safe_map($field, $focus, true);
61 61
 }
62 62
 
63
-foreach($focus->additional_column_fields as $field)
63
+foreach ($focus->additional_column_fields as $field)
64 64
 {
65 65
 	safe_map($field, $focus, true);
66 66
 }
67 67
 
68 68
 // send them to the edit screen.
69
-if(isset($_REQUEST['record']) && $_REQUEST['record'] != "")
69
+if (isset($_REQUEST['record']) && $_REQUEST['record'] != "")
70 70
 {
71 71
     $recordID = $_REQUEST['record'];
72 72
 }
Please login to merge, or discard this patch.
modules/Contacts/disablePortalUser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @author Salesagility Ltd <[email protected]>
23 23
  */
24
-if(!defined('sugarEntry'))define('sugarEntry', true);
24
+if (!defined('sugarEntry'))define('sugarEntry', true);
25 25
 require_once 'modules/AOP_Case_Updates/util.php';
26
-if(!isAOPEnabled()){
26
+if (!isAOPEnabled()) {
27 27
     return;
28 28
 }
29 29
 global $sugar_config, $mod_strings;
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
 $bean = new Contact();
34 34
 $bean->retrieve($_REQUEST['record']);
35 35
 
36
-if(array_key_exists("aop",$sugar_config) && array_key_exists("joomla_url",$sugar_config['aop'])){
36
+if (array_key_exists("aop", $sugar_config) && array_key_exists("joomla_url", $sugar_config['aop'])) {
37 37
     $portalURL = $sugar_config['aop']['joomla_url'];
38 38
     $wbsv = file_get_contents($portalURL.'/index.php?option=com_advancedopenportal&task=disable_user&sug='.$_REQUEST['record'].'&uid='.$bean->joomla_account_id);
39 39
     $res = json_decode($wbsv);
40
-    if(!$res->success){
40
+    if (!$res->success) {
41 41
         $msg = $res->error ? $res->error : $mod_strings['LBL_DISABLE_PORTAL_USER_FAILED'];
42 42
         SugarApplication::appendErrorMessage($msg);
43
-    }else{
43
+    } else {
44 44
         $bean->portal_account_disabled = 1;
45 45
         $bean->save(false);
46 46
         SugarApplication::appendErrorMessage($mod_strings['LBL_DISABLE_PORTAL_USER_SUCCESS']);
47 47
     }
48
-}else{
48
+} else {
49 49
     SugarApplication::appendErrorMessage($mod_strings['LBL_NO_JOOMLA_URL']);
50 50
 }
51 51
 
Please login to merge, or discard this patch.
modules/Contacts/metadata/additionalDetails.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -41,41 +41,41 @@  discard block
 block discarded – undo
41 41
 
42 42
 function additionalDetailsContact($fields) {
43 43
 	static $mod_strings;
44
-	if(empty($mod_strings)) {
44
+	if (empty($mod_strings)) {
45 45
 		global $current_language;
46 46
 		$mod_strings = return_module_language($current_language, 'Contacts');
47 47
 	}
48 48
 	 
49 49
 	$overlib_string = '';
50
-    if(!empty($fields['ID'])) {
51
-        $overlib_string .= '<input type="hidden" value="'. $fields['ID'];
50
+    if (!empty($fields['ID'])) {
51
+        $overlib_string .= '<input type="hidden" value="'.$fields['ID'];
52 52
         $overlib_string .= '">';
53 53
     }
54 54
 
55
-    $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Contacts.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>';
55
+    $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName='.SugarThemeRegistry::current()->name.'&imageName=Contacts.gif"/> '.$mod_strings['LBL_CONTACT'].'</h2>';
56 56
 
57
-    if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
57
+    if (!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
58 58
 		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
59 59
 		!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
60
-			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
61
-	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
62
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
63
-	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
64
-	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
65
-	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
66
-	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
67
-	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
68
-	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
60
+			$overlib_string .= '<b>'.$mod_strings['LBL_PRIMARY_ADDRESS'].'</b><br>';
61
+	if (!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'].'<br>';
62
+	if (!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'].'<br>';
63
+	if (!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'].'<br>';
64
+	if (!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'].', ';
65
+	if (!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'].' ';
66
+	if (!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'].' ';
67
+	if (!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'].'<br>';
68
+	if (strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
69 69
 		$overlib_string .= '<br>';  
70
-	if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
71
-	if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
72
-	if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
70
+	if (!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'.$mod_strings['LBL_MOBILE_PHONE'].'</b> <span class="phone">'.$fields['PHONE_MOBILE'].'</span><br>';
71
+	if (!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'.$mod_strings['LBL_HOME_PHONE'].'</b> <span class="phone">'.$fields['PHONE_HOME'].'</span><br>';
72
+	if (!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'.$mod_strings['LBL_OTHER_PHONE'].'</b> <span class="phone">'.$fields['PHONE_OTHER'].'</span><br>';
73 73
 
74
-	if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
74
+	if (!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'.$mod_strings['LBL_DATE_MODIFIED'].'</b> '.$fields['DATE_MODIFIED'].'<br>';
75 75
 	
76
-	if(!empty($fields['DESCRIPTION'])) { 
77
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
78
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
76
+	if (!empty($fields['DESCRIPTION'])) { 
77
+		$overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300);
78
+		if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
79 79
 	}	
80 80
 	
81 81
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.
modules/Contacts/metadata/popupdefsEmail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 						'create' =>
55 55
 							array('formBase' => 'ContactFormBase.php',
56 56
 									'formBaseClass' => 'ContactFormBase',
57
-									'getFormBodyParams' => array('','','ContactSave'),
57
+									'getFormBodyParams' => array('', '', 'ContactSave'),
58 58
 									'createButton' => 'LNK_NEW_CONTACT'
59 59
 								  ),
60 60
 						'templateForm' => 'modules/Contacts/Email_picker.html',
Please login to merge, or discard this patch.