@@ -1,5 +1,5 @@ discard block |
||
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,27 +55,27 @@ discard block |
||
55 | 55 | //if the contract has been executed or selected_revision is same as latest revision |
56 | 56 | //then hide the latest button. |
57 | 57 | //if the contract state is executed or document is not a template hide this action. |
58 | - if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or |
|
59 | - $layout_def['fields']['SELECTED_REVISION_ID']== $layout_def['fields']['LATEST_REVISION_ID']) { |
|
58 | + if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS'] == 'executed') or |
|
59 | + $layout_def['fields']['SELECTED_REVISION_ID'] == $layout_def['fields']['LATEST_REVISION_ID']) { |
|
60 | 60 | return ""; |
61 | 61 | } |
62 | 62 | |
63 | 63 | global $app_strings; |
64 | 64 | |
65 | 65 | |
66 | - $href = 'index.php?module=' . $layout_def['module'] |
|
67 | - . '&action=' . 'GetLatestRevision' |
|
68 | - . '&record=' . $layout_def['fields']['ID'] |
|
69 | - . '&return_module=' . $_REQUEST['module'] |
|
70 | - . '&return_action=' . 'DetailView' |
|
71 | - . '&return_id=' . $_REQUEST['record'] |
|
72 | - . '&get_latest_for_id=' . $layout_def['fields']['LINKED_ID']; |
|
66 | + $href = 'index.php?module='.$layout_def['module'] |
|
67 | + . '&action='.'GetLatestRevision' |
|
68 | + . '&record='.$layout_def['fields']['ID'] |
|
69 | + . '&return_module='.$_REQUEST['module'] |
|
70 | + . '&return_action='.'DetailView' |
|
71 | + . '&return_id='.$_REQUEST['record'] |
|
72 | + . '&get_latest_for_id='.$layout_def['fields']['LINKED_ID']; |
|
73 | 73 | |
74 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'getLatestDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_GET_LATEST']); |
|
75 | - if($layout_def['EditView']){ |
|
76 | - return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_GET_LATEST_TOOLTIP'] ."'" |
|
77 | - . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_GET_LATEST'] .'</a> '; |
|
78 | - }else{ |
|
74 | + $edit_icon_html = SugarThemeRegistry::current()->getImage('getLatestDocument', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_GET_LATEST']); |
|
75 | + if ($layout_def['EditView']) { |
|
76 | + return '<a href="'.$href.'"'."title ='".$app_strings['LNK_GET_LATEST_TOOLTIP']."'" |
|
77 | + . 'class="listViewTdToolsS1">'.$edit_icon_html.' '.$app_strings['LNK_GET_LATEST'].'</a> '; |
|
78 | + } else { |
|
79 | 79 | return ''; |
80 | 80 | } |
81 | 81 | } |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | //$accesskey = $app_strings['LBL_NEW_BUTTON_KEY']; |
61 | 61 | $value = $app_strings['LBL_NEW_BUTTON_LABEL']; |
62 | 62 | $this->module = 'Leads'; |
63 | - if( ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)){ |
|
63 | + if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) { |
|
64 | 64 | $button = "<input title='$title'class='button' type='button' name='button' value=' $value ' disabled/>\n"; |
65 | 65 | return $button; |
66 | 66 | } |
@@ -69,52 +69,52 @@ discard block |
||
69 | 69 | |
70 | 70 | //from accounts |
71 | 71 | if ($defines['focus']->object_name == 'Account') { |
72 | - if(isset($defines['focus']->billing_address_street)) |
|
72 | + if (isset($defines['focus']->billing_address_street)) |
|
73 | 73 | $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street; |
74 | - if(isset($defines['focus']->billing_address_city)) |
|
74 | + if (isset($defines['focus']->billing_address_city)) |
|
75 | 75 | $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city; |
76 | - if(isset($defines['focus']->billing_address_state)) |
|
76 | + if (isset($defines['focus']->billing_address_state)) |
|
77 | 77 | $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state; |
78 | - if(isset($defines['focus']->billing_address_country)) |
|
78 | + if (isset($defines['focus']->billing_address_country)) |
|
79 | 79 | $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country; |
80 | - if(isset($defines['focus']->billing_address_postalcode)) |
|
80 | + if (isset($defines['focus']->billing_address_postalcode)) |
|
81 | 81 | $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode; |
82 | - if(isset($defines['focus']->phone_office)) |
|
82 | + if (isset($defines['focus']->phone_office)) |
|
83 | 83 | $additionalFormFields['phone_work'] = $defines['focus']->phone_office; |
84 | - if(isset($defines['focus']->id)) |
|
84 | + if (isset($defines['focus']->id)) |
|
85 | 85 | $additionalFormFields['account_id'] = $defines['focus']->id; |
86 | 86 | } |
87 | 87 | //from contacts |
88 | 88 | if ($defines['focus']->object_name == 'Contact') { |
89 | - if(isset($defines['focus']->salutation)) |
|
89 | + if (isset($defines['focus']->salutation)) |
|
90 | 90 | $additionalFormFields['salutation'] = $defines['focus']->salutation; |
91 | - if(isset($defines['focus']->first_name)) |
|
91 | + if (isset($defines['focus']->first_name)) |
|
92 | 92 | $additionalFormFields['first_name'] = $defines['focus']->first_name; |
93 | - if(isset($defines['focus']->last_name)) |
|
93 | + if (isset($defines['focus']->last_name)) |
|
94 | 94 | $additionalFormFields['last_name'] = $defines['focus']->last_name; |
95 | - if(isset($defines['focus']->primary_address_street)) |
|
95 | + if (isset($defines['focus']->primary_address_street)) |
|
96 | 96 | $additionalFormFields['primary_address_street'] = $defines['focus']->primary_address_street; |
97 | - if(isset($defines['focus']->primary_address_city)) |
|
97 | + if (isset($defines['focus']->primary_address_city)) |
|
98 | 98 | $additionalFormFields['primary_address_city'] = $defines['focus']->primary_address_city; |
99 | - if(isset($defines['focus']->primary_address_state)) |
|
99 | + if (isset($defines['focus']->primary_address_state)) |
|
100 | 100 | $additionalFormFields['primary_address_state'] = $defines['focus']->primary_address_state; |
101 | - if(isset($defines['focus']->primary_address_country)) |
|
101 | + if (isset($defines['focus']->primary_address_country)) |
|
102 | 102 | $additionalFormFields['primary_address_country'] = $defines['focus']->primary_address_country; |
103 | - if(isset($defines['focus']->primary_address_postalcode)) |
|
103 | + if (isset($defines['focus']->primary_address_postalcode)) |
|
104 | 104 | $additionalFormFields['primary_address_postalcode'] = $defines['focus']->primary_address_postalcode; |
105 | - if(isset($defines['focus']->phone_work)) |
|
105 | + if (isset($defines['focus']->phone_work)) |
|
106 | 106 | $additionalFormFields['phone_work'] = $defines['focus']->phone_work; |
107 | - if(isset($defines['focus']->id)) |
|
107 | + if (isset($defines['focus']->id)) |
|
108 | 108 | $additionalFormFields['contact_id'] = $defines['focus']->id; |
109 | 109 | } |
110 | 110 | |
111 | 111 | //from opportunities |
112 | 112 | if ($defines['focus']->object_name == 'Opportunity') { |
113 | - if(isset($defines['focus']->id)) |
|
113 | + if (isset($defines['focus']->id)) |
|
114 | 114 | $additionalFormFields['opportunity_id'] = $defines['focus']->id; |
115 | - if(isset($defines['focus']->account_name)) |
|
115 | + if (isset($defines['focus']->account_name)) |
|
116 | 116 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
117 | - if(isset($defines['focus']->account_id)) |
|
117 | + if (isset($defines['focus']->account_id)) |
|
118 | 118 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
119 | 119 | } |
120 | 120 |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -58,18 +58,18 @@ discard block |
||
58 | 58 | { |
59 | 59 | $values[] = $layout_def['input_name0']; |
60 | 60 | } |
61 | - $html = '<select name="' . $layout_def['name'] . '[]" multiple="true">'; |
|
61 | + $html = '<select name="'.$layout_def['name'].'[]" multiple="true">'; |
|
62 | 62 | |
63 | 63 | $query = $this->displayInputQuery($layout_def); |
64 | 64 | $result = $this->reporter->db->query($query); |
65 | 65 | while ($row = $this->reporter->db->fetchByAssoc($result)) |
66 | 66 | { |
67 | - $html .= '<option value="' . $row['id'] . '"'; |
|
67 | + $html .= '<option value="'.$row['id'].'"'; |
|
68 | 68 | if (in_array($row['id'], $values)) |
69 | 69 | { |
70 | 70 | $html .= ' selected="selected"'; |
71 | 71 | } |
72 | - $html .= '>' . htmlspecialchars($row['title']) . '</option>'; |
|
72 | + $html .= '>'.htmlspecialchars($row['title']).'</option>'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $html .= '</select>'; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $ids[] = $row['id']; |
135 | 135 | } |
136 | 136 | $layout_def['name'] = 'id'; |
137 | - return $this->_get_column_select($layout_def) . " IN ('" . implode("', '", $ids) . "')"; |
|
137 | + return $this->_get_column_select($layout_def)." IN ('".implode("', '", $ids)."')"; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $module = isset($layout_def['custom_module']) ? $layout_def['custom_module'] : $layout_def['module']; |
155 | 155 | $seed = BeanFactory::getBean($module); |
156 | 156 | |
157 | - foreach($layout_def['input_name0'] as $beanId) |
|
157 | + foreach ($layout_def['input_name0'] as $beanId) |
|
158 | 158 | { |
159 | 159 | if (!empty($relation->lhs_module) && !empty($relation->rhs_module) |
160 | 160 | && $relation->lhs_module == $relation->rhs_module) { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | } |
172 | 172 | $ids = array_unique($ids); |
173 | 173 | $layout_def['name'] = 'id'; |
174 | - return $this->_get_column_select($layout_def) . " IN ('" . implode("', '", $ids) . "')"; |
|
174 | + return $this->_get_column_select($layout_def)." IN ('".implode("', '", $ids)."')"; |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | //for to_pdf/to_csv |
@@ -180,14 +180,14 @@ discard block |
||
180 | 180 | $field_def = $reporter->all_fields[$layout_def['column_key']]; |
181 | 181 | $display = strtoupper($field_def['secondary_table'].'_name'); |
182 | 182 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
183 | - if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
|
183 | + if (!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])) { |
|
184 | 184 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
185 | 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 | 189 | } |
190 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
190 | + elseif (!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])) { |
|
191 | 191 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
192 | 192 | } |
193 | 193 | $cell = $layout_def['fields'][$display]; |
@@ -200,14 +200,14 @@ discard block |
||
200 | 200 | $display = strtoupper($field_def['secondary_table'].'_name'); |
201 | 201 | |
202 | 202 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
203 | - if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
|
203 | + if (!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])) { |
|
204 | 204 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
205 | 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']])) |
|
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']])) |
|
207 | 207 | { |
208 | 208 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']]['join_table_alias'].'_name'); |
209 | 209 | } |
210 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
210 | + elseif (!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])) { |
|
211 | 211 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
212 | 212 | } |
213 | 213 | $recordField = $this->getTruncatedColumnAlias(strtoupper($layout_def['table_alias']).'_'.strtoupper($layout_def['name'])); |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -45,16 +45,16 @@ discard block |
||
45 | 45 | { |
46 | 46 | function displayListPlain($layout_def) { |
47 | 47 | |
48 | - $value= $this->_get_list_value($layout_def); |
|
48 | + $value = $this->_get_list_value($layout_def); |
|
49 | 49 | |
50 | - if (isset($layout_def['widget_type']) && $layout_def['widget_type'] =='checkbox') { |
|
50 | + if (isset($layout_def['widget_type']) && $layout_def['widget_type'] == 'checkbox') { |
|
51 | 51 | |
52 | - if ($value != '' && ($value == 'on' || intval($value) == 1 || $value == 'yes')) |
|
52 | + if ($value != '' && ($value == 'on' || intval($value) == 1 || $value == 'yes')) |
|
53 | 53 | { |
54 | 54 | return " <input name='checkbox_display' class='checkbox' type='checkbox' disabled='true' checked>"; |
55 | 55 | } |
56 | 56 | //Modification to allow checkboxes to be displayed correctly in subpanel |
57 | - if ($layout_def['checkbox_value']=='true'){ |
|
57 | + if ($layout_def['checkbox_value'] == 'true') { |
|
58 | 58 | return " <input name='".$layout_def['module']."checkbox_display[]' class='checkbox' type='checkbox' id='".$layout_def['module']."checkbox_display_id[]' value=\"".$layout_def['fields']['ID']."\" onclick=''>"; |
59 | 59 | } |
60 | 60 |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | { |
48 | 48 | function display($defines, $additionalFormFields = NULL, $nonbutton = false) |
49 | 49 | { |
50 | - if((ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true) || |
|
51 | - $defines['module'] == "History" & !ACLController::checkAccess("Emails", 'edit', true))){ |
|
50 | + if ((ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true) || |
|
51 | + $defines['module'] == "History" & !ACLController::checkAccess("Emails", 'edit', true))) { |
|
52 | 52 | $temp = ''; |
53 | 53 | return $temp; |
54 | 54 | } |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | $additionalFormFields['parent_id'] = $defines['focus']->id; |
69 | 69 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
70 | 70 | |
71 | - if(isset($defines['focus']->email1)) |
|
71 | + if (isset($defines['focus']->email1)) |
|
72 | 72 | { |
73 | 73 | $additionalFormFields['to_email_addrs'] = $defines['focus']->email1; |
74 | 74 | } |
75 | - if(ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)){ |
|
75 | + if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) { |
|
76 | 76 | $button = "<input id='".preg_replace('[ ]', '', $value)."_button' title='$title' class='button' type='button' name='".preg_replace('[ ]', '', mb_strtolower($value, 'UTF-8'))."_button' value='$value' disabled/>\n"; |
77 | 77 | return $button; |
78 | 78 | } |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $module = ''; |
53 | 53 | $record = ''; |
54 | 54 | |
55 | - if(isset($layout_def['varname'])) |
|
55 | + if (isset($layout_def['varname'])) |
|
56 | 56 | { |
57 | 57 | $key = strtoupper($layout_def['varname']); |
58 | 58 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | |
71 | - if(empty($layout_def['target_record_key'])) |
|
71 | + if (empty($layout_def['target_record_key'])) |
|
72 | 72 | { |
73 | 73 | $record = $layout_def['fields']['ID']; |
74 | 74 | } |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | $record = $layout_def['fields'][$record_key]; |
79 | 79 | } |
80 | 80 | |
81 | - if(!empty($layout_def['target_module_key'])) { |
|
81 | + if (!empty($layout_def['target_module_key'])) { |
|
82 | 82 | if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) { |
83 | - $module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])]; |
|
83 | + $module = $layout_def['fields'][strtoupper($layout_def['target_module_key'])]; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | 87 | if (empty($module)) { |
88 | - if(empty($layout_def['target_module'])) |
|
88 | + if (empty($layout_def['target_module'])) |
|
89 | 89 | { |
90 | 90 | $module = $layout_def['module']; |
91 | 91 | } |
@@ -98,21 +98,21 @@ discard block |
||
98 | 98 | //links to email module now need additional information. |
99 | 99 | //this is to resolve the information about the target of the emails. necessitated by feature that allow |
100 | 100 | //only on email record for the whole campaign. |
101 | - $parent=''; |
|
101 | + $parent = ''; |
|
102 | 102 | if (!empty($layout_def['parent_info'])) { |
103 | - if (!empty($focus)){ |
|
104 | - $parent="&parent_id=".$focus->id; |
|
105 | - $parent.="&parent_module=".$focus->module_dir; |
|
103 | + if (!empty($focus)) { |
|
104 | + $parent = "&parent_id=".$focus->id; |
|
105 | + $parent .= "&parent_module=".$focus->module_dir; |
|
106 | 106 | } |
107 | 107 | } else { |
108 | - if(!empty($layout_def['parent_id'])) { |
|
108 | + if (!empty($layout_def['parent_id'])) { |
|
109 | 109 | if (isset($layout_def['fields'][strtoupper($layout_def['parent_id'])])) { |
110 | - $parent.="&parent_id=".$layout_def['fields'][strtoupper($layout_def['parent_id'])]; |
|
110 | + $parent .= "&parent_id=".$layout_def['fields'][strtoupper($layout_def['parent_id'])]; |
|
111 | 111 | } |
112 | 112 | } |
113 | - if(!empty($layout_def['parent_module'])) { |
|
113 | + if (!empty($layout_def['parent_module'])) { |
|
114 | 114 | if (isset($layout_def['fields'][strtoupper($layout_def['parent_module'])])) { |
115 | - $parent.="&parent_module=".$layout_def['fields'][strtoupper($layout_def['parent_module'])]; |
|
115 | + $parent .= "&parent_module=".$layout_def['fields'][strtoupper($layout_def['parent_module'])]; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $action = 'DetailView'; |
121 | 121 | $value = $layout_def['fields'][$key]; |
122 | 122 | global $current_user; |
123 | - if( !empty($record) && |
|
123 | + if (!empty($record) && |
|
124 | 124 | ($layout_def['DetailView'] && !$layout_def['owner_module'] |
125 | 125 | || $layout_def['DetailView'] && !ACLController::moduleSupportsACL($layout_def['owner_module']) |
126 | 126 | || ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id))) |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | { |
131 | 131 | $link = "index.php?module=$module&action=$action&record={$record}{$parent}"; |
132 | 132 | } |
133 | - return '<a href="' . $link . '" >'."$value</a>"; |
|
133 | + return '<a href="'.$link.'" >'."$value</a>"; |
|
134 | 134 | |
135 | - }else{ |
|
135 | + } else { |
|
136 | 136 | return $value; |
137 | 137 | } |
138 | 138 |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | $parent_record_id = $_REQUEST['record']; |
60 | 60 | $parent_module = $_REQUEST['module']; |
61 | 61 | |
62 | - if ($layout_def['module'] == 'Holidays'){ |
|
62 | + if ($layout_def['module'] == 'Holidays') { |
|
63 | 63 | $action = 'DeleteHolidayRelationship'; |
64 | 64 | } |
65 | - else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){ |
|
65 | + else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts') { |
|
66 | 66 | $action = 'DeleteResourceRelationship'; |
67 | 67 | } |
68 | - else{ |
|
68 | + else { |
|
69 | 69 | $action = 'DeleteRelationship'; |
70 | 70 | } |
71 | 71 | |
72 | 72 | $record = $layout_def['fields']['ID']; |
73 | - $current_module=$layout_def['module']; |
|
74 | - $hideremove=false; |
|
73 | + $current_module = $layout_def['module']; |
|
74 | + $hideremove = false; |
|
75 | 75 | |
76 | 76 | $return_module = $_REQUEST['module']; |
77 | 77 | $return_action = 'SubPanelViewer'; |
@@ -83,43 +83,43 @@ discard block |
||
83 | 83 | |
84 | 84 | $focus->retrieve($return_id); |
85 | 85 | |
86 | - if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)){ |
|
86 | + if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)) { |
|
87 | 87 | $is_owner = true; |
88 | 88 | } |
89 | - else{ |
|
89 | + else { |
|
90 | 90 | $is_owner = false; |
91 | 91 | } |
92 | 92 | |
93 | 93 | if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) { |
94 | - $linked_field= $layout_def['linked_field_set'] ; |
|
94 | + $linked_field = $layout_def['linked_field_set']; |
|
95 | 95 | } else { |
96 | 96 | $linked_field = $layout_def['linked_field']; |
97 | 97 | } |
98 | 98 | $refresh_page = 0; |
99 | - if(!empty($layout_def['refresh_page'])){ |
|
99 | + if (!empty($layout_def['refresh_page'])) { |
|
100 | 100 | $refresh_page = 1; |
101 | 101 | } |
102 | 102 | $return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1"; |
103 | 103 | |
104 | 104 | $icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']); |
105 | - $icon_remove_html = SugarThemeRegistry::current()->getImage( 'delete_inline', 'align="absmiddle" border="0"',null,null,'.gif','');//setting alt to blank on purpose on subpanels for 508 |
|
105 | + $icon_remove_html = SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', ''); //setting alt to blank on purpose on subpanels for 508 |
|
106 | 106 | $remove_url = $layout_def['start_link_wrapper'] |
107 | 107 | . "index.php?module=$parent_module" |
108 | 108 | . "&action=$action" |
109 | 109 | . "&record=$parent_record_id" |
110 | 110 | . "&linked_field=$linked_field" |
111 | 111 | . "&linked_id=$record" |
112 | - . "&return_url=" . urlencode(urlencode($return_url)) |
|
112 | + . "&return_url=".urlencode(urlencode($return_url)) |
|
113 | 113 | . "&refresh_page=1" |
114 | 114 | . $layout_def['end_link_wrapper']; |
115 | 115 | $remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION']; |
116 | 116 | //based on listview since that lets you select records |
117 | - if($layout_def['ListView'] && !$hideremove && $is_owner) { |
|
118 | - return '<a href="' . $remove_url . '"' |
|
117 | + if ($layout_def['ListView'] && !$hideremove && $is_owner) { |
|
118 | + return '<a href="'.$remove_url.'"' |
|
119 | 119 | . ' class="listViewTdToolsS1"' |
120 | 120 | . " onclick=\"return confirm('$remove_confirmation_text');\"" |
121 | 121 | . ">$icon_remove_html $icon_remove_text</a>"; |
122 | - }else{ |
|
122 | + } else { |
|
123 | 123 | return ''; |
124 | 124 | } |
125 | 125 | } |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -42,22 +42,22 @@ discard block |
||
42 | 42 | |
43 | 43 | class SugarWidgetFieldMultiEnum extends SugarWidgetFieldEnum { |
44 | 44 | public function queryFilternot_one_of(&$layout_def) { |
45 | - $arr = array (); |
|
45 | + $arr = array(); |
|
46 | 46 | foreach ($layout_def['input_name0'] as $value) { |
47 | 47 | array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); |
48 | 48 | } |
49 | 49 | $reporter = $this->layout_manager->getAttribute("reporter"); |
50 | 50 | |
51 | - $col_name = $this->_get_column_select($layout_def) . " NOT LIKE " ; |
|
51 | + $col_name = $this->_get_column_select($layout_def)." NOT LIKE "; |
|
52 | 52 | $arr_count = count($arr); |
53 | 53 | $query = ""; |
54 | - foreach($arr as $key=>$val) { |
|
54 | + foreach ($arr as $key=>$val) { |
|
55 | 55 | $query .= $col_name; |
56 | 56 | $value = preg_replace("/^'/", "'%", $val, 1); |
57 | 57 | $value = preg_replace("/'$/", "%'", $value, 1); |
58 | 58 | $query .= $value; |
59 | 59 | if ($key != ($arr_count - 1)) |
60 | - $query.= " OR " ; |
|
60 | + $query .= " OR "; |
|
61 | 61 | } |
62 | 62 | return '('.$query.')'; |
63 | 63 | } |
@@ -66,24 +66,24 @@ discard block |
||
66 | 66 | //Fix for inaccurate filtering of contacts in Contacts dashlet on multiselects. |
67 | 67 | $arr = array(); |
68 | 68 | foreach ($layout_def['input_name0'] as $value) { |
69 | - if($value != ""){ |
|
69 | + if ($value != "") { |
|
70 | 70 | array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); |
71 | - }else{ |
|
71 | + } else { |
|
72 | 72 | array_push($arr, "'^^'"); |
73 | 73 | } |
74 | 74 | } |
75 | 75 | $reporter = $this->layout_manager->getAttribute("reporter"); |
76 | 76 | |
77 | - $col_name = $this->_get_column_select($layout_def) . " LIKE " ; |
|
77 | + $col_name = $this->_get_column_select($layout_def)." LIKE "; |
|
78 | 78 | $arr_count = count($arr); |
79 | 79 | $query = ""; |
80 | - foreach($arr as $key=>$val) { |
|
80 | + foreach ($arr as $key=>$val) { |
|
81 | 81 | $query .= $col_name; |
82 | 82 | $value = preg_replace("/^'/", "'%", $val, 1); |
83 | 83 | $value = preg_replace("/'$/", "%'", $value, 1); |
84 | 84 | $query .= $value; |
85 | 85 | if ($key != ($arr_count - 1)) |
86 | - $query.= " OR " ; |
|
86 | + $query .= " OR "; |
|
87 | 87 | } |
88 | 88 | return '('.$query.')'; |
89 | 89 | } |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | { |
47 | 47 | global $timedate; |
48 | 48 | // i guess qualifier and column_function are the same.. |
49 | - if (! empty($layout_def['column_function'])) { |
|
49 | + if (!empty($layout_def['column_function'])) { |
|
50 | 50 | $func_name = 'displayList'.$layout_def['column_function']; |
51 | - if ( method_exists($this,$func_name)) { |
|
51 | + if (method_exists($this, $func_name)) { |
|
52 | 52 | $display = $this->$func_name($layout_def); |
53 | 53 | return $display; |
54 | 54 | } |