Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/jjwg_Maps/views/view.quick_radius.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if(!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewQuick_Radius extends SugarView {
6 8
 
@@ -10,8 +12,10 @@  discard block
 block discarded – undo
10 12
 
11 13
 	function display() {
12 14
 	
13
-        if (!isset($_REQUEST['quick_address'])) $_REQUEST['quick_address'] = '';
14
-?>
15
+        if (!isset($_REQUEST['quick_address'])) {
16
+            $_REQUEST['quick_address'] = '';
17
+        }
18
+        ?>
15 19
 
16 20
 <div class="moduleTitle"><h2><?php echo $GLOBALS['mod_strings']['LBL_MAP_QUICK_RADIUS']; ?><div class="clear"></div></h2></div>
17 21
 <div class="clear"></div>
@@ -38,7 +42,9 @@  discard block
 block discarded – undo
38 42
             <select id="display_module" tabindex="111" title="<?php echo $GLOBALS['mod_strings']['LBL_MODULE_TYPE']; ?>" name="display_module">
39 43
                 <?php foreach ($GLOBALS['jjwg_config']['valid_geocode_modules'] as $module) { ?>
40 44
                     <option value="<?php echo htmlspecialchars($module); ?>" <?php 
41
-                    if (!empty($_REQUEST['display_module']) && $module == $_REQUEST['display_module']) echo 'selected="selected"';
45
+                    if (!empty($_REQUEST['display_module']) && $module == $_REQUEST['display_module']) {
46
+                        echo 'selected="selected"';
47
+                    }
42 48
                     ?>><?php echo htmlspecialchars($GLOBALS['app_list_strings']['moduleList'][$module]); ?>
43 49
                 <?php } ?>
44 50
             </select>
@@ -54,7 +60,9 @@  discard block
 block discarded – undo
54 60
             <select id="unit_type" tabindex="131" title="<?php echo $GLOBALS['mod_strings']['LBL_DISTANCE']; ?>" name="unit_type">
55 61
                 <?php foreach ($GLOBALS['app_list_strings']['map_unit_type_list'] as $key=>$value) { ?>
56 62
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
57
-                    if ($key == $_REQUEST['unit_type']) echo 'selected="selected"';
63
+                    if ($key == $_REQUEST['unit_type']) {
64
+                        echo 'selected="selected"';
65
+                    }
58 66
                     ?>><?php echo htmlspecialchars($value); ?>
59 67
                 <?php } ?>
60 68
             </select>
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.config.php 1 patch
Braces   +45 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewConfig extends SugarView {
6 8
 
@@ -113,7 +115,9 @@  discard block
 block discarded – undo
113 115
                 name="address_type_Accounts" title="">
114 116
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
115 117
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
116
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Accounts']) echo 'selected="selected"';
118
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Accounts']) {
119
+                        echo 'selected="selected"';
120
+                    }
117 121
                     ?>><?php echo htmlspecialchars($value); ?></option>
118 122
                 <?php } ?>
119 123
             </select>
@@ -130,7 +134,9 @@  discard block
 block discarded – undo
130 134
                 name="address_type_Contacts" title="">
131 135
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
132 136
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
133
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Contacts']) echo 'selected="selected"';
137
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Contacts']) {
138
+                        echo 'selected="selected"';
139
+                    }
134 140
                     ?>><?php echo htmlspecialchars($value); ?></option>
135 141
                 <?php } ?>
136 142
             </select>
@@ -147,7 +153,9 @@  discard block
 block discarded – undo
147 153
                 name="address_type_Leads" title="">
148 154
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
149 155
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
150
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Leads']) echo 'selected="selected"';
156
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Leads']) {
157
+                        echo 'selected="selected"';
158
+                    }
151 159
                     ?>><?php echo htmlspecialchars($value); ?></option>
152 160
                 <?php } ?>
153 161
             </select>
@@ -164,7 +172,9 @@  discard block
 block discarded – undo
164 172
                 name="address_type_Opportunities" title="">
165 173
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
166 174
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
167
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Opportunities']) echo 'selected="selected"';
175
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Opportunities']) {
176
+                        echo 'selected="selected"';
177
+                    }
168 178
                     ?>><?php echo htmlspecialchars($value); ?></option>
169 179
                 <?php } ?>
170 180
             </select>
@@ -182,7 +192,9 @@  discard block
 block discarded – undo
182 192
                 name="address_type_Cases" title="">
183 193
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
184 194
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
185
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Cases']) echo 'selected="selected"';
195
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Cases']) {
196
+                        echo 'selected="selected"';
197
+                    }
186 198
                     ?>><?php echo htmlspecialchars($value); ?></option>
187 199
                 <?php } ?>
188 200
             </select>
@@ -200,7 +212,9 @@  discard block
 block discarded – undo
200 212
                 name="address_type_Project" title="">
201 213
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
202 214
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
203
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Project']) echo 'selected="selected"';
215
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Project']) {
216
+                        echo 'selected="selected"';
217
+                    }
204 218
                     ?>><?php echo htmlspecialchars($value); ?></option>
205 219
                 <?php } ?>
206 220
             </select>
@@ -218,7 +232,9 @@  discard block
 block discarded – undo
218 232
                 name="address_type_Meetings" title="">
219 233
                 <?php foreach ($address_types_flex_relate as $key=>$value) { ?>
220 234
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
221
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Meetings']) echo 'selected="selected"';
235
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Meetings']) {
236
+                        echo 'selected="selected"';
237
+                    }
222 238
                     ?>><?php echo htmlspecialchars($value); ?></option>
223 239
                 <?php } ?>
224 240
             </select>
@@ -234,7 +250,9 @@  discard block
 block discarded – undo
234 250
                 name="address_type_Prospects" title="">
235 251
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
236 252
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
237
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Prospects']) echo 'selected="selected"';
253
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Prospects']) {
254
+                        echo 'selected="selected"';
255
+                    }
238 256
                     ?>><?php echo htmlspecialchars($value); ?></option>
239 257
                 <?php } ?>
240 258
             </select>
@@ -255,7 +273,9 @@  discard block
 block discarded – undo
255 273
                 name="address_type_<?php echo $module; ?>" title="">
256 274
                 <?php foreach ($address_types_all as $key=>$value) { ?>
257 275
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
258
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type'][$module]) echo 'selected="selected"';
276
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type'][$module]) {
277
+                        echo 'selected="selected"';
278
+                    }
259 279
                     ?>><?php echo htmlspecialchars($value); ?></option>
260 280
                 <?php } ?>
261 281
             </select>
@@ -449,7 +469,9 @@  discard block
 block discarded – undo
449 469
                 name="allow_approximate_location_type" title="">
450 470
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
451 471
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
452
-                    if ($key == $enabled) echo 'selected="selected"';
472
+                    if ($key == $enabled) {
473
+                        echo 'selected="selected"';
474
+                    }
453 475
                     ?>><?php echo htmlspecialchars($value); ?>
454 476
                 <?php } ?>
455 477
             </select>
@@ -493,7 +515,9 @@  discard block
 block discarded – undo
493 515
                 name="address_cache_get_enabled" title="">
494 516
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
495 517
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
496
-                    if ($key == $enabled) echo 'selected="selected"';
518
+                    if ($key == $enabled) {
519
+                        echo 'selected="selected"';
520
+                    }
497 521
                     ?>><?php echo htmlspecialchars($value); ?>
498 522
                 <?php } ?>
499 523
             </select>
@@ -511,7 +535,9 @@  discard block
 block discarded – undo
511 535
                 name="address_cache_save_enabled" title="">
512 536
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
513 537
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
514
-                    if ($key == $enabled) echo 'selected="selected"';
538
+                    if ($key == $enabled) {
539
+                        echo 'selected="selected"';
540
+                    }
515 541
                     ?>><?php echo htmlspecialchars($value); ?>
516 542
                 <?php } ?>
517 543
             </select>
@@ -541,7 +567,9 @@  discard block
 block discarded – undo
541 567
                 name="logic_hooks_enabled" title="">
542 568
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
543 569
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
544
-                    if ($key == $enabled) echo 'selected="selected"';
570
+                    if ($key == $enabled) {
571
+                        echo 'selected="selected"';
572
+                    }
545 573
                     ?>><?php echo htmlspecialchars($value); ?>
546 574
                 <?php } ?>
547 575
             </select>
@@ -609,7 +637,9 @@  discard block
 block discarded – undo
609 637
                 name="map_default_unit_type" title="">
610 638
                 <?php foreach ($unit_types as $key=>$value) { ?>
611 639
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
612
-                    if ($key == $GLOBALS['jjwg_config']['map_default_unit_type']) echo 'selected="selected"';
640
+                    if ($key == $GLOBALS['jjwg_config']['map_default_unit_type']) {
641
+                        echo 'selected="selected"';
642
+                    }
613 643
                     ?>><?php echo htmlspecialchars($value); ?>
614 644
                 <?php } ?>
615 645
             </select>
Please login to merge, or discard this patch.
modules/SecurityGroups/SecurityGroup.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,7 +163,9 @@  discard block
 block discarded – undo
163 163
         $GLOBALS['log']->debug("SecuritySuite: groupHasAccess $query");
164 164
         $result = $db->query($query);
165 165
         $row = $db->fetchByAssoc($result);
166
-        if(isset($row) && $row['results']>0) return true;
166
+        if(isset($row) && $row['results']>0) {
167
+            return true;
168
+        }
167 169
 
168 170
         return false;
169 171
     }
@@ -401,7 +403,10 @@  discard block
 block discarded – undo
401 403
     }
402 404
 
403 405
     static function inherit_parentQuery(&$focus, $parent_type, $parent_id, $focus_id, $focus_module_dir) {
404
-        if(empty($parent_type) || empty($parent_id)) return; //no info passed
406
+        if(empty($parent_type) || empty($parent_id)) {
407
+            return;
408
+        }
409
+        //no info passed
405 410
 
406 411
         /** can speed this up by doing one query */
407 412
         //should be just one query but need a unique guid for each insert
Please login to merge, or discard this patch.
modules/SecurityGroups/SecurityGroupUserRelationship.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 
4 6
 
5 7
 require_once('data/SugarBean.php');
@@ -83,10 +85,11 @@  discard block
 block discarded – undo
83 85
         $query = "SELECT id, first_name, last_name, user_name FROM users ";
84 86
         $where_auto = "deleted=0";
85 87
 
86
-        if($where != "")
87
-            $query .= "where $where AND ".$where_auto;
88
-        else
89
-            $query .= "where ".$where_auto;
88
+        if($where != "") {
89
+                    $query .= "where $where AND ".$where_auto;
90
+        } else {
91
+                    $query .= "where ".$where_auto;
92
+        }
90 93
 
91 94
         $query .= " ORDER BY last_name, first_name";
92 95
 
Please login to merge, or discard this patch.
modules/SecurityGroups/SecurityGroupMessage.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?PHP
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 
4 6
 class SecurityGroupMessage extends Basic {
5 7
 	var $new_schema = true;
@@ -91,7 +93,10 @@  discard block
 block discarded – undo
91 93
 			$securitygroup_id = null; //6.4.0
92 94
 		}
93 95
 		$message = new SecurityGroupMessage();
94
-		if(empty($text)) return; // || !$feed->ACLAccess('save', true) )return;
96
+		if(empty($text)) {
97
+		    return;
98
+		}
99
+		// || !$feed->ACLAccess('save', true) )return;
95 100
 
96 101
 		$text = strip_tags($text);
97 102
 		$message->name = '';
@@ -120,18 +125,18 @@  discard block
 block discarded – undo
120 125
 		if($weeks == 1){
121 126
 			$result = translate('LBL_TIME_LAST_WEEK','SugarFeed').' ';
122 127
 			return $result;
123
-		}else if($weeks > 1){
128
+		} else if($weeks > 1){
124 129
 			$result .= $weeks . ' '.translate('LBL_TIME_WEEKS','SugarFeed').' ';
125 130
 			if($days > 0) { 
126 131
                 $result .= $days . ' '.translate('LBL_TIME_DAYS','SugarFeed').' ';
127 132
             }
128
-		}else{
133
+		} else{
129 134
 			if($days == 1){
130 135
 				$result = translate('LBL_TIME_YESTERDAY','SugarFeed').' ';
131 136
 				return $result;
132
-			}else if($days > 1){
137
+			} else if($days > 1){
133 138
 				$result .= $days . ' '. translate('LBL_TIME_DAYS','SugarFeed').' ';
134
-			}else{
139
+			} else{
135 140
 				if($hours == 1) {
136 141
                     $result .= $hours . ' '.translate('LBL_TIME_HOUR','SugarFeed').' ';
137 142
                 } else {
Please login to merge, or discard this patch.
modules/SecurityGroups/AssignGroups.php 1 patch
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 
4 6
 
5 7
 class AssignGroups {
@@ -14,7 +16,9 @@  discard block
 block discarded – undo
14 16
 		&& empty($bean->fetched_row['id']) && $bean->module_dir != "Users" && $bean->module_dir != "SugarFeed") {		
15 17
 		//Upload an attachment to an Email Template and save. If user with multi groups - popup select option
16 18
 		//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;
19
+		if(!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) {
20
+		    return;
21
+		}
18 22
 
19 23
 		if(!empty($_REQUEST['securitygroup_list'])) {
20 24
 			require_once('modules/SecurityGroups/SecurityGroup.php');
@@ -38,9 +42,7 @@  discard block
 block discarded – undo
38 42
 			unset($_SESSION['securitysuite_error']); //to be safe
39 43
 			$_SESSION['securitysuite_error'] = $ss_mod_strings['LBL_ERROR_DUPLICATE'];
40 44
 		}
41
-	}
42
-
43
-	else if(isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true
45
+	} else if(isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true
44 46
 		&& empty($bean->fetched_row['id']) && $bean->module_dir == "Users"
45 47
 		&& isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature' ) { //Bug: 589
46 48
 
@@ -63,7 +65,9 @@  discard block
 block discarded – undo
63 65
 
64 66
 function popup_onload($event, $arguments)
65 67
 {
66
-	if(!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) return;
68
+	if(!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) {
69
+	    return;
70
+	}
67 71
 
68 72
 /** //test user popup
69 73
 	//always have this loaded
@@ -74,7 +78,9 @@  discard block
 block discarded – undo
74 78
 	$module = $_REQUEST['module'];
75 79
 	$action = $_REQUEST['action'];
76 80
 
77
-	if(isset($action) && ($action == "Save" || $action == "SetTimezone")) return;  
81
+	if(isset($action) && ($action == "Save" || $action == "SetTimezone")) {
82
+	    return;
83
+	}
78 84
 
79 85
 	if( (
80 86
 			//(isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true)
Please login to merge, or discard this patch.
modules/Contacts/disablePortalUser.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +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')) {
25
+    define('sugarEntry', true);
26
+}
25 27
 require_once 'modules/AOP_Case_Updates/util.php';
26 28
 if(!isAOPEnabled()){
27 29
     return;
@@ -40,12 +42,12 @@  discard block
 block discarded – undo
40 42
     if(!$res->success){
41 43
         $msg = $res->error ? $res->error : $mod_strings['LBL_DISABLE_PORTAL_USER_FAILED'];
42 44
         SugarApplication::appendErrorMessage($msg);
43
-    }else{
45
+    } else{
44 46
         $bean->portal_account_disabled = 1;
45 47
         $bean->save(false);
46 48
         SugarApplication::appendErrorMessage($mod_strings['LBL_DISABLE_PORTAL_USER_SUCCESS']);
47 49
     }
48
-}else{
50
+} else{
49 51
     SugarApplication::appendErrorMessage($mod_strings['LBL_NO_JOOMLA_URL']);
50 52
 }
51 53
 
Please login to merge, or discard this patch.
modules/Contacts/metadata/additionalDetails.php 1 patch
Braces   +45 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -56,26 +58,52 @@  discard block
 block discarded – undo
56 58
 
57 59
     if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
58 60
 		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
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)) 
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>';
61
+		!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
62
+    			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
63
+    }
64
+	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) {
65
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
66
+	}
67
+	if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) {
68
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>';
69
+	}
70
+	if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) {
71
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>';
72
+	}
73
+	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) {
74
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
75
+	}
76
+	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) {
77
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
78
+	}
79
+	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) {
80
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
81
+	}
82
+	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
83
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
84
+	}
85
+	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) {
86
+			$overlib_string .= '<br>';
87
+	}
88
+	if(!empty($fields['PHONE_MOBILE'])) {
89
+	    $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
90
+	}
91
+	if(!empty($fields['PHONE_HOME'])) {
92
+	    $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
93
+	}
94
+	if(!empty($fields['PHONE_OTHER'])) {
95
+	    $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
96
+	}
73 97
 
74
-	if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
98
+	if(!empty($fields['DATE_MODIFIED'])) {
99
+	    $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>';
100
+	}
75 101
 	
76 102
 	if(!empty($fields['DESCRIPTION'])) { 
77 103
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
78
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
104
+		if(strlen($fields['DESCRIPTION']) > 300) {
105
+		    $overlib_string .= '...';
106
+		}
79 107
 	}	
80 108
 	
81 109
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.
modules/Contacts/views/view.quickcreate.php 1 patch
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 //FILE SUGARCRM flav=pro || flav=sales
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if(!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 /*********************************************************************************
5 7
  * SugarCRM Community Edition is a customer relationship management program developed by
6 8
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -51,12 +53,24 @@  discard block
 block discarded – undo
51 53
     		//XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu
52 54
     		//          NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks
53 55
     		//          resulting in none of the fields properly populating when selecting an account
54
-    		if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office;
55
-    		if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
56
-    		if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
57
-    		if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
58
-    		if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
59
-    		if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
56
+    		if(!empty($this->bean->phone_office)) {
57
+    		    $_REQUEST['phone_work'] = $this->bean->phone_office;
58
+    		}
59
+    		if(!empty($this->bean->billing_address_street)) {
60
+    		    $_REQUEST['primary_address_street'] = $this->bean->billing_address_street;
61
+    		}
62
+    		if(!empty($this->bean->billing_address_city)) {
63
+    		    $_REQUEST['primary_address_city'] = $this->bean->billing_address_city;
64
+    		}
65
+    		if(!empty($this->bean->billing_address_state)) {
66
+    		    $_REQUEST['primary_address_state'] = $this->bean->billing_address_state;
67
+    		}
68
+    		if(!empty($this->bean->billing_address_country)) {
69
+    		    $_REQUEST['primary_address_country'] = $this->bean->billing_address_country;
70
+    		}
71
+    		if(!empty($this->bean->billing_address_postalcode)) {
72
+    		    $_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode;
73
+    		}
60 74
 	   	}
61 75
     }    
62 76
 }
63 77
\ No newline at end of file
Please login to merge, or discard this patch.