@@ -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,18 +55,18 @@ discard block |
||
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 | } |
@@ -21,9 +21,9 @@ discard block |
||
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 |
||
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 |
@@ -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. |
@@ -41,41 +41,41 @@ discard block |
||
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', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'sort_by' => 'date_start', |
50 | 50 | 'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE', |
51 | 51 | 'type' => 'collection', |
52 | - 'subpanel_name' => 'activities', //this values is not associated with a physical file. |
|
52 | + 'subpanel_name' => 'activities', //this values is not associated with a physical file. |
|
53 | 53 | 'module' => 'Activities', |
54 | 54 | |
55 | 55 | 'top_buttons' => array( |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'sort_by' => 'date_entered', |
89 | 89 | 'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE', |
90 | 90 | 'type' => 'collection', |
91 | - 'subpanel_name' => 'history', //this values is not associated with a physical file. |
|
91 | + 'subpanel_name' => 'history', //this values is not associated with a physical file. |
|
92 | 92 | 'module' => 'History', |
93 | 93 | |
94 | 94 | 'top_buttons' => array( |
@@ -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. |
@@ -54,7 +54,7 @@ discard block |
||
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', |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | $viewdefs ['Contacts'] = |
41 | -array ( |
|
41 | +array( |
|
42 | 42 | 'EditView' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'templateMeta' => |
45 | - array ( |
|
45 | + array( |
|
46 | 46 | 'form' => |
47 | - array ( |
|
47 | + array( |
|
48 | 48 | 'hidden' => |
49 | - array ( |
|
49 | + array( |
|
50 | 50 | 0 => '<input type="hidden" name="opportunity_id" value="{$smarty.request.opportunity_id}">', |
51 | 51 | 1 => '<input type="hidden" name="case_id" value="{$smarty.request.case_id}">', |
52 | 52 | 2 => '<input type="hidden" name="bug_id" value="{$smarty.request.bug_id}">', |
@@ -56,68 +56,68 @@ discard block |
||
56 | 56 | ), |
57 | 57 | 'maxColumns' => '2', |
58 | 58 | 'widths' => |
59 | - array ( |
|
59 | + array( |
|
60 | 60 | 0 => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 'label' => '10', |
63 | 63 | 'field' => '30', |
64 | 64 | ), |
65 | 65 | 1 => |
66 | - array ( |
|
66 | + array( |
|
67 | 67 | 'label' => '10', |
68 | 68 | 'field' => '30', |
69 | 69 | ), |
70 | 70 | ), |
71 | 71 | 'useTabs' => false, |
72 | 72 | 'tabDefs' => |
73 | - array ( |
|
73 | + array( |
|
74 | 74 | 'LBL_CONTACT_INFORMATION' => |
75 | - array ( |
|
75 | + array( |
|
76 | 76 | 'newTab' => false, |
77 | 77 | 'panelDefault' => 'expanded', |
78 | 78 | ), |
79 | 79 | 'LBL_PANEL_ADVANCED' => |
80 | - array ( |
|
80 | + array( |
|
81 | 81 | 'newTab' => false, |
82 | 82 | 'panelDefault' => 'expanded', |
83 | 83 | ), |
84 | 84 | ), |
85 | 85 | ), |
86 | 86 | 'panels' => |
87 | - array ( |
|
87 | + array( |
|
88 | 88 | 'lbl_contact_information' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 0 => |
91 | - array ( |
|
91 | + array( |
|
92 | 92 | 0 => |
93 | - array ( |
|
93 | + array( |
|
94 | 94 | 'name' => 'first_name', |
95 | 95 | 'customCode' => '{html_options name="salutation" id="salutation" options=$fields.salutation.options selected=$fields.salutation.value} <input name="first_name" id="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">', |
96 | 96 | ), |
97 | 97 | 1 => |
98 | - array ( |
|
98 | + array( |
|
99 | 99 | 'name' => 'last_name', |
100 | 100 | ), |
101 | 101 | ), |
102 | 102 | 1 => |
103 | - array ( |
|
103 | + array( |
|
104 | 104 | 0 => |
105 | - array ( |
|
105 | + array( |
|
106 | 106 | 'name' => 'phone_work', |
107 | 107 | 'comment' => 'Work phone number of the contact', |
108 | 108 | 'label' => 'LBL_OFFICE_PHONE', |
109 | 109 | ), |
110 | 110 | 1 => |
111 | - array ( |
|
111 | + array( |
|
112 | 112 | 'name' => 'phone_mobile', |
113 | 113 | 'comment' => 'Mobile phone number of the contact', |
114 | 114 | 'label' => 'LBL_MOBILE_PHONE', |
115 | 115 | ), |
116 | 116 | ), |
117 | 117 | 2 => |
118 | - array ( |
|
118 | + array( |
|
119 | 119 | 0 => |
120 | - array ( |
|
120 | + array( |
|
121 | 121 | 'name' => 'title', |
122 | 122 | 'comment' => 'The title of the contact', |
123 | 123 | 'label' => 'LBL_TITLE', |
@@ -125,46 +125,46 @@ discard block |
||
125 | 125 | 1 => 'department', |
126 | 126 | ), |
127 | 127 | 3 => |
128 | - array ( |
|
128 | + array( |
|
129 | 129 | 0 => |
130 | - array ( |
|
130 | + array( |
|
131 | 131 | 'name' => 'account_name', |
132 | 132 | 'displayParams' => |
133 | - array ( |
|
133 | + array( |
|
134 | 134 | 'key' => 'billing', |
135 | 135 | 'copy' => 'primary', |
136 | 136 | 'billingKey' => 'primary', |
137 | 137 | 'additionalFields' => |
138 | - array ( |
|
138 | + array( |
|
139 | 139 | 'phone_office' => 'phone_work', |
140 | 140 | ), |
141 | 141 | ), |
142 | 142 | ), |
143 | 143 | 1 => |
144 | - array ( |
|
144 | + array( |
|
145 | 145 | 'name' => 'phone_fax', |
146 | 146 | 'comment' => 'Contact fax number', |
147 | 147 | 'label' => 'LBL_FAX_PHONE', |
148 | 148 | ), |
149 | 149 | ), |
150 | 150 | 4 => |
151 | - array ( |
|
151 | + array( |
|
152 | 152 | 0 => |
153 | - array ( |
|
153 | + array( |
|
154 | 154 | 'name' => 'email1', |
155 | 155 | 'studio' => 'false', |
156 | 156 | 'label' => 'LBL_EMAIL_ADDRESS', |
157 | 157 | ), |
158 | 158 | ), |
159 | 159 | 5 => |
160 | - array ( |
|
160 | + array( |
|
161 | 161 | 0 => |
162 | - array ( |
|
162 | + array( |
|
163 | 163 | 'name' => 'primary_address_street', |
164 | 164 | 'hideLabel' => true, |
165 | 165 | 'type' => 'address', |
166 | 166 | 'displayParams' => |
167 | - array ( |
|
167 | + array( |
|
168 | 168 | 'key' => 'primary', |
169 | 169 | 'rows' => 2, |
170 | 170 | 'cols' => 30, |
@@ -172,12 +172,12 @@ discard block |
||
172 | 172 | ), |
173 | 173 | ), |
174 | 174 | 1 => |
175 | - array ( |
|
175 | + array( |
|
176 | 176 | 'name' => 'alt_address_street', |
177 | 177 | 'hideLabel' => true, |
178 | 178 | 'type' => 'address', |
179 | 179 | 'displayParams' => |
180 | - array ( |
|
180 | + array( |
|
181 | 181 | 'key' => 'alt', |
182 | 182 | 'copy' => 'primary', |
183 | 183 | 'rows' => 2, |
@@ -187,38 +187,38 @@ discard block |
||
187 | 187 | ), |
188 | 188 | ), |
189 | 189 | 6 => |
190 | - array ( |
|
190 | + array( |
|
191 | 191 | 0 => |
192 | - array ( |
|
192 | + array( |
|
193 | 193 | 'name' => 'description', |
194 | 194 | 'label' => 'LBL_DESCRIPTION', |
195 | 195 | ), |
196 | 196 | 1 => '', |
197 | 197 | ), |
198 | 198 | 7 => |
199 | - array ( |
|
199 | + array( |
|
200 | 200 | 0 => |
201 | - array ( |
|
201 | + array( |
|
202 | 202 | 'name' => 'assigned_user_name', |
203 | 203 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
204 | 204 | ), |
205 | 205 | ), |
206 | 206 | ), |
207 | 207 | 'LBL_PANEL_ADVANCED' => |
208 | - array ( |
|
208 | + array( |
|
209 | 209 | 0 => |
210 | - array ( |
|
210 | + array( |
|
211 | 211 | 0 => |
212 | - array ( |
|
212 | + array( |
|
213 | 213 | 'name' => 'lead_source', |
214 | 214 | 'comment' => 'How did the contact come about', |
215 | 215 | 'label' => 'LBL_LEAD_SOURCE', |
216 | 216 | ), |
217 | 217 | ), |
218 | 218 | 1 => |
219 | - array ( |
|
219 | + array( |
|
220 | 220 | 0 => |
221 | - array ( |
|
221 | + array( |
|
222 | 222 | 'name' => 'report_to_name', |
223 | 223 | 'label' => 'LBL_REPORTS_TO', |
224 | 224 | ), |
@@ -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,7 +55,7 @@ discard block |
||
55 | 55 | 'create' => |
56 | 56 | array('formBase' => 'ContactFormBase.php', |
57 | 57 | 'formBaseClass' => 'ContactFormBase', |
58 | - 'getFormBodyParams' => array('','','ContactSave'), |
|
58 | + 'getFormBodyParams' => array('', '', 'ContactSave'), |
|
59 | 59 | 'createButton' => 'LNK_NEW_CONTACT' |
60 | 60 | ), |
61 | 61 | 'listviewdefs' => array( |
@@ -43,27 +43,27 @@ discard block |
||
43 | 43 | 'maxColumnsBasic' => '4', |
44 | 44 | 'widths' => array('label' => '10', 'field' => '30'), |
45 | 45 | ), |
46 | - 'layout' => array ( |
|
46 | + 'layout' => array( |
|
47 | 47 | 'basic_search' => |
48 | - array ( |
|
49 | - array('name'=>'search_name','label' =>'LBL_NAME', 'type' => 'name'), |
|
50 | - array ( |
|
48 | + array( |
|
49 | + array('name'=>'search_name', 'label' =>'LBL_NAME', 'type' => 'name'), |
|
50 | + array( |
|
51 | 51 | 'name' => 'current_user_only', |
52 | 52 | 'label' => 'LBL_CURRENT_USER_FILTER', |
53 | 53 | 'type' => 'bool', |
54 | 54 | ), |
55 | - array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
|
55 | + array('name' => 'favorites_only', 'label' => 'LBL_FAVORITES_FILTER', 'type' => 'bool',), |
|
56 | 56 | ), |
57 | 57 | 'advanced_search' => |
58 | - array ( |
|
58 | + array( |
|
59 | 59 | 'first_name' => |
60 | - array ( |
|
60 | + array( |
|
61 | 61 | 'name' => 'first_name', |
62 | 62 | 'default' => true, |
63 | 63 | 'width' => '10%', |
64 | 64 | ), |
65 | 65 | 'email' => |
66 | - array ( |
|
66 | + array( |
|
67 | 67 | 'name' => 'email', |
68 | 68 | 'label' => 'LBL_ANY_EMAIL', |
69 | 69 | 'type' => 'name', |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'width' => '10%', |
72 | 72 | ), |
73 | 73 | 'phone' => |
74 | - array ( |
|
74 | + array( |
|
75 | 75 | 'name' => 'phone', |
76 | 76 | 'label' => 'LBL_ANY_PHONE', |
77 | 77 | 'type' => 'name', |
@@ -79,13 +79,13 @@ discard block |
||
79 | 79 | 'width' => '10%', |
80 | 80 | ), |
81 | 81 | 'last_name' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 'name' => 'last_name', |
84 | 84 | 'default' => true, |
85 | 85 | 'width' => '10%', |
86 | 86 | ), |
87 | 87 | 'address_street' => |
88 | - array ( |
|
88 | + array( |
|
89 | 89 | 'name' => 'address_street', |
90 | 90 | 'label' => 'LBL_ANY_ADDRESS', |
91 | 91 | 'type' => 'name', |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | 'width' => '10%', |
94 | 94 | ), |
95 | 95 | 'address_city' => |
96 | - array ( |
|
96 | + array( |
|
97 | 97 | 'name' => 'address_city', |
98 | 98 | 'label' => 'LBL_CITY', |
99 | 99 | 'type' => 'name', |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | 'width' => '10%', |
102 | 102 | ), |
103 | 103 | 'account_name' => |
104 | - array ( |
|
104 | + array( |
|
105 | 105 | 'name' => 'account_name', |
106 | 106 | 'default' => true, |
107 | 107 | 'width' => '10%', |
108 | 108 | ), |
109 | 109 | 'address_state' => |
110 | - array ( |
|
110 | + array( |
|
111 | 111 | 'name' => 'address_state', |
112 | 112 | 'label' => 'LBL_STATE', |
113 | 113 | 'type' => 'name', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'width' => '10%', |
116 | 116 | ), |
117 | 117 | 'address_postalcode' => |
118 | - array ( |
|
118 | + array( |
|
119 | 119 | 'name' => 'address_postalcode', |
120 | 120 | 'label' => 'LBL_POSTAL_CODE', |
121 | 121 | 'type' => 'name', |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | 'width' => '10%', |
124 | 124 | ), |
125 | 125 | 'assigned_user_id' => |
126 | - array ( |
|
126 | + array( |
|
127 | 127 | 'name' => 'assigned_user_id', |
128 | 128 | 'type' => 'enum', |
129 | 129 | 'label' => 'LBL_ASSIGNED_TO', |
130 | 130 | 'function' => |
131 | - array ( |
|
131 | + array( |
|
132 | 132 | 'name' => 'get_user_array', |
133 | 133 | 'params' => |
134 | - array ( |
|
134 | + array( |
|
135 | 135 | 0 => false, |
136 | 136 | ), |
137 | 137 | ), |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | 'width' => '10%', |
140 | 140 | ), |
141 | 141 | 'primary_address_country' => |
142 | - array ( |
|
142 | + array( |
|
143 | 143 | 'name' => 'primary_address_country', |
144 | 144 | 'label' => 'LBL_COUNTRY', |
145 | 145 | 'type' => 'name', |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | 'width' => '10%', |
149 | 149 | ), |
150 | 150 | 'lead_source' => |
151 | - array ( |
|
151 | + array( |
|
152 | 152 | 'name' => 'lead_source', |
153 | 153 | 'default' => true, |
154 | 154 | 'width' => '10%', |
@@ -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. |
@@ -40,14 +40,14 @@ discard block |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Contacts"; |
42 | 42 | $searchFields['Contacts'] = |
43 | - array ( |
|
44 | - 'first_name' => array( 'query_type'=>'default'), |
|
43 | + array( |
|
44 | + 'first_name' => array('query_type'=>'default'), |
|
45 | 45 | 'last_name'=> array('query_type'=>'default'), |
46 | - 'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true), |
|
47 | - 'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')), |
|
48 | - 'lead_source'=> array('query_type'=>'default','operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
46 | + 'search_name'=> array('query_type'=>'default', 'db_field'=>array('first_name', 'last_name'), 'force_unifiedsearch'=>true), |
|
47 | + 'account_name'=> array('query_type'=>'default', 'db_field'=>array('accounts.name')), |
|
48 | + 'lead_source'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'), |
|
49 | 49 | 'do_not_call'=> array('query_type'=>'default', 'input_type' => 'checkbox', 'operator'=>'='), |
50 | - 'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work','phone_other','phone_fax','assistant_phone')), |
|
50 | + 'phone'=> array('query_type'=>'default', 'db_field'=>array('phone_mobile', 'phone_work', 'phone_other', 'phone_fax', 'assistant_phone')), |
|
51 | 51 | 'email'=> array( |
52 | 52 | 'query_type' => 'default', |
53 | 53 | 'operator' => 'subquery', |
@@ -62,25 +62,25 @@ discard block |
||
62 | 62 | 'subquery' => 'SELECT favorites.parent_id FROM favorites |
63 | 63 | WHERE favorites.deleted = 0 |
64 | 64 | and favorites.parent_type = "'.$module_name.'" |
65 | - and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}', |
|
65 | + and favorites.assigned_user_id = "' .$current_user->id.'") OR NOT ({0}', |
|
66 | 66 | 'db_field'=>array('id')), |
67 | 67 | 'assistant'=> array('query_type'=>'default'), |
68 | - 'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')), |
|
69 | - 'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')), |
|
70 | - 'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')), |
|
71 | - 'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')), |
|
72 | - 'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')), |
|
73 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
68 | + 'address_street'=> array('query_type'=>'default', 'db_field'=>array('primary_address_street', 'alt_address_street')), |
|
69 | + 'address_city'=> array('query_type'=>'default', 'db_field'=>array('primary_address_city', 'alt_address_city')), |
|
70 | + 'address_state'=> array('query_type'=>'default', 'db_field'=>array('primary_address_state', 'alt_address_state')), |
|
71 | + 'address_postalcode'=> array('query_type'=>'default', 'db_field'=>array('primary_address_postalcode', 'alt_address_postalcode')), |
|
72 | + 'address_country'=> array('query_type'=>'default', 'db_field'=>array('primary_address_country', 'alt_address_country')), |
|
73 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
74 | 74 | 'assigned_user_id'=> array('query_type'=>'default'), |
75 | - 'account_id'=> array('query_type'=>'default','db_field'=>array('accounts.id')), |
|
75 | + 'account_id'=> array('query_type'=>'default', 'db_field'=>array('accounts.id')), |
|
76 | 76 | 'campaign_name'=> array('query_type'=>'default'), |
77 | 77 | //Range Search Support |
78 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
80 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
81 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
82 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
83 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
80 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
81 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
82 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
83 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
84 | 84 | //Range Search Support |
85 | 85 | ); |
86 | 86 | ?> |