@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -69,53 +71,73 @@ discard block |
||
69 | 71 | |
70 | 72 | //from accounts |
71 | 73 | if ($defines['focus']->object_name == 'Account') { |
72 | - if(isset($defines['focus']->billing_address_street)) |
|
73 | - $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street; |
|
74 | - if(isset($defines['focus']->billing_address_city)) |
|
75 | - $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city; |
|
76 | - if(isset($defines['focus']->billing_address_state)) |
|
77 | - $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state; |
|
78 | - if(isset($defines['focus']->billing_address_country)) |
|
79 | - $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country; |
|
80 | - if(isset($defines['focus']->billing_address_postalcode)) |
|
81 | - $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode; |
|
82 | - if(isset($defines['focus']->phone_office)) |
|
83 | - $additionalFormFields['phone_work'] = $defines['focus']->phone_office; |
|
84 | - if(isset($defines['focus']->id)) |
|
85 | - $additionalFormFields['account_id'] = $defines['focus']->id; |
|
74 | + if(isset($defines['focus']->billing_address_street)) { |
|
75 | + $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street; |
|
76 | + } |
|
77 | + if(isset($defines['focus']->billing_address_city)) { |
|
78 | + $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city; |
|
79 | + } |
|
80 | + if(isset($defines['focus']->billing_address_state)) { |
|
81 | + $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state; |
|
82 | + } |
|
83 | + if(isset($defines['focus']->billing_address_country)) { |
|
84 | + $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country; |
|
85 | + } |
|
86 | + if(isset($defines['focus']->billing_address_postalcode)) { |
|
87 | + $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode; |
|
88 | + } |
|
89 | + if(isset($defines['focus']->phone_office)) { |
|
90 | + $additionalFormFields['phone_work'] = $defines['focus']->phone_office; |
|
91 | + } |
|
92 | + if(isset($defines['focus']->id)) { |
|
93 | + $additionalFormFields['account_id'] = $defines['focus']->id; |
|
94 | + } |
|
86 | 95 | } |
87 | 96 | //from contacts |
88 | 97 | if ($defines['focus']->object_name == 'Contact') { |
89 | - if(isset($defines['focus']->salutation)) |
|
90 | - $additionalFormFields['salutation'] = $defines['focus']->salutation; |
|
91 | - if(isset($defines['focus']->first_name)) |
|
92 | - $additionalFormFields['first_name'] = $defines['focus']->first_name; |
|
93 | - if(isset($defines['focus']->last_name)) |
|
94 | - $additionalFormFields['last_name'] = $defines['focus']->last_name; |
|
95 | - if(isset($defines['focus']->primary_address_street)) |
|
96 | - $additionalFormFields['primary_address_street'] = $defines['focus']->primary_address_street; |
|
97 | - if(isset($defines['focus']->primary_address_city)) |
|
98 | - $additionalFormFields['primary_address_city'] = $defines['focus']->primary_address_city; |
|
99 | - if(isset($defines['focus']->primary_address_state)) |
|
100 | - $additionalFormFields['primary_address_state'] = $defines['focus']->primary_address_state; |
|
101 | - if(isset($defines['focus']->primary_address_country)) |
|
102 | - $additionalFormFields['primary_address_country'] = $defines['focus']->primary_address_country; |
|
103 | - if(isset($defines['focus']->primary_address_postalcode)) |
|
104 | - $additionalFormFields['primary_address_postalcode'] = $defines['focus']->primary_address_postalcode; |
|
105 | - if(isset($defines['focus']->phone_work)) |
|
106 | - $additionalFormFields['phone_work'] = $defines['focus']->phone_work; |
|
107 | - if(isset($defines['focus']->id)) |
|
108 | - $additionalFormFields['contact_id'] = $defines['focus']->id; |
|
98 | + if(isset($defines['focus']->salutation)) { |
|
99 | + $additionalFormFields['salutation'] = $defines['focus']->salutation; |
|
100 | + } |
|
101 | + if(isset($defines['focus']->first_name)) { |
|
102 | + $additionalFormFields['first_name'] = $defines['focus']->first_name; |
|
103 | + } |
|
104 | + if(isset($defines['focus']->last_name)) { |
|
105 | + $additionalFormFields['last_name'] = $defines['focus']->last_name; |
|
106 | + } |
|
107 | + if(isset($defines['focus']->primary_address_street)) { |
|
108 | + $additionalFormFields['primary_address_street'] = $defines['focus']->primary_address_street; |
|
109 | + } |
|
110 | + if(isset($defines['focus']->primary_address_city)) { |
|
111 | + $additionalFormFields['primary_address_city'] = $defines['focus']->primary_address_city; |
|
112 | + } |
|
113 | + if(isset($defines['focus']->primary_address_state)) { |
|
114 | + $additionalFormFields['primary_address_state'] = $defines['focus']->primary_address_state; |
|
115 | + } |
|
116 | + if(isset($defines['focus']->primary_address_country)) { |
|
117 | + $additionalFormFields['primary_address_country'] = $defines['focus']->primary_address_country; |
|
118 | + } |
|
119 | + if(isset($defines['focus']->primary_address_postalcode)) { |
|
120 | + $additionalFormFields['primary_address_postalcode'] = $defines['focus']->primary_address_postalcode; |
|
121 | + } |
|
122 | + if(isset($defines['focus']->phone_work)) { |
|
123 | + $additionalFormFields['phone_work'] = $defines['focus']->phone_work; |
|
124 | + } |
|
125 | + if(isset($defines['focus']->id)) { |
|
126 | + $additionalFormFields['contact_id'] = $defines['focus']->id; |
|
127 | + } |
|
109 | 128 | } |
110 | 129 | |
111 | 130 | //from opportunities |
112 | 131 | if ($defines['focus']->object_name == 'Opportunity') { |
113 | - if(isset($defines['focus']->id)) |
|
114 | - $additionalFormFields['opportunity_id'] = $defines['focus']->id; |
|
115 | - if(isset($defines['focus']->account_name)) |
|
116 | - $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
117 | - if(isset($defines['focus']->account_id)) |
|
118 | - $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
132 | + if(isset($defines['focus']->id)) { |
|
133 | + $additionalFormFields['opportunity_id'] = $defines['focus']->id; |
|
134 | + } |
|
135 | + if(isset($defines['focus']->account_name)) { |
|
136 | + $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
137 | + } |
|
138 | + if(isset($defines['focus']->account_id)) { |
|
139 | + $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
140 | + } |
|
119 | 141 | } |
120 | 142 | |
121 | 143 | $button = $this->_get_form($defines, $additionalFormFields); |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -53,8 +55,7 @@ discard block |
||
53 | 55 | if (is_array($layout_def['input_name0'])) |
54 | 56 | { |
55 | 57 | $values = $layout_def['input_name0']; |
56 | - } |
|
57 | - else |
|
58 | + } else |
|
58 | 59 | { |
59 | 60 | $values[] = $layout_def['input_name0']; |
60 | 61 | } |
@@ -182,12 +183,10 @@ discard block |
||
182 | 183 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
183 | 184 | if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
184 | 185 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
185 | - } |
|
186 | - elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
186 | + } elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
187 | 187 | { |
188 | 188 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']]['join_table_alias'].'_name'); |
189 | - } |
|
190 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
189 | + } elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
191 | 190 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
192 | 191 | } |
193 | 192 | $cell = $layout_def['fields'][$display]; |
@@ -202,12 +201,10 @@ discard block |
||
202 | 201 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
203 | 202 | if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
204 | 203 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
205 | - } |
|
206 | - elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
204 | + } elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
207 | 205 | { |
208 | 206 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']]['join_table_alias'].'_name'); |
209 | - } |
|
210 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
207 | + } elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
211 | 208 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
212 | 209 | } |
213 | 210 | $recordField = $this->getTruncatedColumnAlias(strtoupper($layout_def['table_alias']).'_'.strtoupper($layout_def['name'])); |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -55,8 +57,7 @@ discard block |
||
55 | 57 | if(isset($layout_def['varname'])) |
56 | 58 | { |
57 | 59 | $key = strtoupper($layout_def['varname']); |
58 | - } |
|
59 | - else |
|
60 | + } else |
|
60 | 61 | { |
61 | 62 | $key = $this->_get_column_alias($layout_def); |
62 | 63 | $key = strtoupper($key); |
@@ -71,8 +72,7 @@ discard block |
||
71 | 72 | if(empty($layout_def['target_record_key'])) |
72 | 73 | { |
73 | 74 | $record = $layout_def['fields']['ID']; |
74 | - } |
|
75 | - else |
|
75 | + } else |
|
76 | 76 | { |
77 | 77 | $record_key = strtoupper($layout_def['target_record_key']); |
78 | 78 | $record = $layout_def['fields'][$record_key]; |
@@ -88,8 +88,7 @@ discard block |
||
88 | 88 | if(empty($layout_def['target_module'])) |
89 | 89 | { |
90 | 90 | $module = $layout_def['module']; |
91 | - } |
|
92 | - else |
|
91 | + } else |
|
93 | 92 | { |
94 | 93 | $module = $layout_def['target_module']; |
95 | 94 | } |
@@ -132,7 +131,7 @@ discard block |
||
132 | 131 | } |
133 | 132 | return '<a href="' . $link . '" >'."$value</a>"; |
134 | 133 | |
135 | - }else{ |
|
134 | + } else{ |
|
136 | 135 | return $value; |
137 | 136 | } |
138 | 137 |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -61,11 +63,9 @@ discard block |
||
61 | 63 | |
62 | 64 | if ($layout_def['module'] == 'Holidays'){ |
63 | 65 | $action = 'DeleteHolidayRelationship'; |
64 | - } |
|
65 | - else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){ |
|
66 | + } else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){ |
|
66 | 67 | $action = 'DeleteResourceRelationship'; |
67 | - } |
|
68 | - else{ |
|
68 | + } else{ |
|
69 | 69 | $action = 'DeleteRelationship'; |
70 | 70 | } |
71 | 71 | |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)){ |
87 | 87 | $is_owner = true; |
88 | - } |
|
89 | - else{ |
|
88 | + } else{ |
|
90 | 89 | $is_owner = false; |
91 | 90 | } |
92 | 91 | |
@@ -119,7 +118,7 @@ discard block |
||
119 | 118 | . ' class="listViewTdToolsS1"' |
120 | 119 | . " onclick=\"return confirm('$remove_confirmation_text');\"" |
121 | 120 | . ">$icon_remove_html $icon_remove_text</a>"; |
122 | - }else{ |
|
121 | + } else{ |
|
123 | 122 | return ''; |
124 | 123 | } |
125 | 124 | } |
@@ -1,5 +1,7 @@ discard block |
||
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,8 +58,9 @@ discard block |
||
56 | 58 | $value = preg_replace("/^'/", "'%", $val, 1); |
57 | 59 | $value = preg_replace("/'$/", "%'", $value, 1); |
58 | 60 | $query .= $value; |
59 | - if ($key != ($arr_count - 1)) |
|
60 | - $query.= " OR " ; |
|
61 | + if ($key != ($arr_count - 1)) { |
|
62 | + $query.= " OR " ; |
|
63 | + } |
|
61 | 64 | } |
62 | 65 | return '('.$query.')'; |
63 | 66 | } |
@@ -68,7 +71,7 @@ discard block |
||
68 | 71 | foreach ($layout_def['input_name0'] as $value) { |
69 | 72 | if($value != ""){ |
70 | 73 | array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); |
71 | - }else{ |
|
74 | + } else{ |
|
72 | 75 | array_push($arr, "'^^'"); |
73 | 76 | } |
74 | 77 | } |
@@ -82,8 +85,9 @@ discard block |
||
82 | 85 | $value = preg_replace("/^'/", "'%", $val, 1); |
83 | 86 | $value = preg_replace("/'$/", "%'", $value, 1); |
84 | 87 | $query .= $value; |
85 | - if ($key != ($arr_count - 1)) |
|
86 | - $query.= " OR " ; |
|
88 | + if ($key != ($arr_count - 1)) { |
|
89 | + $query.= " OR " ; |
|
90 | + } |
|
87 | 91 | } |
88 | 92 | return '('.$query.')'; |
89 | 93 | } |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -49,18 +51,15 @@ discard block |
||
49 | 51 | if(!empty($layout_def['remove_blank']) && $layout_def['remove_blank']) { |
50 | 52 | if ( is_array($layout_def['options']) ) { |
51 | 53 | $ops = $layout_def['options']; |
52 | - } |
|
53 | - elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ |
|
54 | + } elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ |
|
54 | 55 | $ops = $app_list_strings[$layout_def['options']]; |
55 | 56 | if(array_key_exists('', $app_list_strings[$layout_def['options']])) { |
56 | 57 | unset($ops['']); |
57 | 58 | } |
58 | - } |
|
59 | - else{ |
|
59 | + } else{ |
|
60 | 60 | $ops = array(); |
61 | 61 | } |
62 | - } |
|
63 | - else { |
|
62 | + } else { |
|
64 | 63 | $ops = $app_list_strings[$layout_def['options']]; |
65 | 64 | } |
66 | 65 |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -184,19 +186,20 @@ discard block |
||
184 | 186 | function queryOrderBy($layout_def) |
185 | 187 | { |
186 | 188 | $field_def = array(); |
187 | - if(!empty($this->reporter->all_fields[$layout_def['column_key']])) $field_def = $this->reporter->all_fields[$layout_def['column_key']]; |
|
189 | + if(!empty($this->reporter->all_fields[$layout_def['column_key']])) { |
|
190 | + $field_def = $this->reporter->all_fields[$layout_def['column_key']]; |
|
191 | + } |
|
188 | 192 | |
189 | 193 | if (!empty($layout_def['group_function'])) |
190 | 194 | { |
191 | 195 | $order_by = $this->_get_column_alias($layout_def); |
192 | - } |
|
193 | - elseif (!empty($field_def['sort_on'])) |
|
196 | + } elseif (!empty($field_def['sort_on'])) |
|
194 | 197 | { |
195 | 198 | $order_by = $layout_def['table_alias'].".".$field_def['sort_on']; |
196 | - if(!empty($field_def['sort_on2'])) |
|
197 | - $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2']; |
|
198 | - } |
|
199 | - else { |
|
199 | + if(!empty($field_def['sort_on2'])) { |
|
200 | + $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2']; |
|
201 | + } |
|
202 | + } else { |
|
200 | 203 | $order_by = $this->_get_column_alias($layout_def)." \n"; |
201 | 204 | } |
202 | 205 |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -95,7 +97,7 @@ discard block |
||
95 | 97 | function & displayList($layout_def) { |
96 | 98 | if(!empty($layout_def['column_key'])){ |
97 | 99 | $field_def = $this->reporter->all_fields[$layout_def['column_key']]; |
98 | - }else if(!empty($layout_def['fields'])){ |
|
100 | + } else if(!empty($layout_def['fields'])){ |
|
99 | 101 | $field_def = $layout_def['fields']; |
100 | 102 | } |
101 | 103 | $cell = $this->displayListPlain($layout_def); |
@@ -129,13 +131,13 @@ discard block |
||
129 | 131 | function & displayListPlain($layout_def) { |
130 | 132 | if(!empty($layout_def['column_key'])){ |
131 | 133 | $field_def = $this->reporter->all_fields[$layout_def['column_key']]; |
132 | - }else if(!empty($layout_def['fields'])){ |
|
134 | + } else if(!empty($layout_def['fields'])){ |
|
133 | 135 | $field_def = $layout_def['fields']; |
134 | 136 | } |
135 | 137 | |
136 | 138 | if (!empty($layout_def['table_key'] ) &&( empty ($field_def['fields']) || empty ($field_def['fields'][0]) || empty ($field_def['fields'][1]))){ |
137 | 139 | $value = $this->_get_list_value($layout_def); |
138 | - }else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){ |
|
140 | + } else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){ |
|
139 | 141 | $key = strtoupper($layout_def['name']); |
140 | 142 | $value = $layout_def['fields'][$key]; |
141 | 143 | } |
@@ -143,7 +145,7 @@ discard block |
||
143 | 145 | |
144 | 146 | if(isset($field_def['options'])){ |
145 | 147 | $cell = translate($field_def['options'], $field_def['module'], $value); |
146 | - }else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){ |
|
148 | + } else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){ |
|
147 | 149 | global $beanFiles; |
148 | 150 | if(empty($beanFiles)) { |
149 | 151 | include('include/modules.php'); |
@@ -202,18 +204,15 @@ discard block |
||
202 | 204 | if(!empty($layout_def['remove_blank']) && $layout_def['remove_blank']) { |
203 | 205 | if ( isset($layout_def['options']) && is_array($layout_def['options']) ) { |
204 | 206 | $ops = $layout_def['options']; |
205 | - } |
|
206 | - elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ |
|
207 | + } elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ |
|
207 | 208 | $ops = $app_list_strings[$layout_def['options']]; |
208 | 209 | if(array_key_exists('', $app_list_strings[$layout_def['options']])) { |
209 | 210 | unset($ops['']); |
210 | 211 | } |
211 | - } |
|
212 | - else{ |
|
212 | + } else{ |
|
213 | 213 | $ops = array(); |
214 | 214 | } |
215 | - } |
|
216 | - else { |
|
215 | + } else { |
|
217 | 216 | $ops = $app_list_strings[$layout_def['options']]; |
218 | 217 | } |
219 | 218 |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -68,7 +70,7 @@ discard block |
||
68 | 70 | return '<a href="' . $href . '"' |
69 | 71 | . "id=\"$unique_id\"" |
70 | 72 | . 'class="listViewTdToolsS1">' . $app_strings['LNK_EDIT'] .'</a> '; |
71 | - }else{ |
|
73 | + } else{ |
|
72 | 74 | return ''; |
73 | 75 | } |
74 | 76 | } |