@@ -50,51 +50,51 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | class ProspectList extends SugarBean { |
53 | - var $field_name_map; |
|
54 | - |
|
55 | - // Stored fields |
|
56 | - var $id; |
|
57 | - var $date_entered; |
|
58 | - var $date_modified; |
|
59 | - var $modified_user_id; |
|
60 | - var $assigned_user_id; |
|
61 | - var $created_by; |
|
62 | - var $created_by_name; |
|
63 | - var $modified_by_name; |
|
64 | - var $list_type; |
|
65 | - var $domain_name; |
|
66 | - |
|
67 | - var $name; |
|
68 | - var $description; |
|
69 | - |
|
70 | - // These are related |
|
71 | - var $assigned_user_name; |
|
72 | - var $prospect_id; |
|
73 | - var $contact_id; |
|
74 | - var $lead_id; |
|
75 | - |
|
76 | - // module name definitions and table relations |
|
77 | - var $table_name = "prospect_lists"; |
|
78 | - var $module_dir = 'ProspectLists'; |
|
79 | - var $rel_prospects_table = "prospect_lists_prospects"; |
|
80 | - var $object_name = "ProspectList"; |
|
81 | - |
|
82 | - // This is used to retrieve related fields from form posts. |
|
83 | - var $additional_column_fields = array( |
|
84 | - 'assigned_user_name', 'assigned_user_id', 'campaign_id', |
|
85 | - ); |
|
86 | - var $relationship_fields = array( |
|
87 | - 'campaign_id'=>'campaigns', |
|
88 | - 'prospect_list_prospects' => 'prospects', |
|
89 | - ); |
|
53 | + var $field_name_map; |
|
54 | + |
|
55 | + // Stored fields |
|
56 | + var $id; |
|
57 | + var $date_entered; |
|
58 | + var $date_modified; |
|
59 | + var $modified_user_id; |
|
60 | + var $assigned_user_id; |
|
61 | + var $created_by; |
|
62 | + var $created_by_name; |
|
63 | + var $modified_by_name; |
|
64 | + var $list_type; |
|
65 | + var $domain_name; |
|
66 | + |
|
67 | + var $name; |
|
68 | + var $description; |
|
69 | + |
|
70 | + // These are related |
|
71 | + var $assigned_user_name; |
|
72 | + var $prospect_id; |
|
73 | + var $contact_id; |
|
74 | + var $lead_id; |
|
75 | + |
|
76 | + // module name definitions and table relations |
|
77 | + var $table_name = "prospect_lists"; |
|
78 | + var $module_dir = 'ProspectLists'; |
|
79 | + var $rel_prospects_table = "prospect_lists_prospects"; |
|
80 | + var $object_name = "ProspectList"; |
|
81 | + |
|
82 | + // This is used to retrieve related fields from form posts. |
|
83 | + var $additional_column_fields = array( |
|
84 | + 'assigned_user_name', 'assigned_user_id', 'campaign_id', |
|
85 | + ); |
|
86 | + var $relationship_fields = array( |
|
87 | + 'campaign_id'=>'campaigns', |
|
88 | + 'prospect_list_prospects' => 'prospects', |
|
89 | + ); |
|
90 | 90 | |
91 | 91 | var $entry_count; |
92 | 92 | |
93 | 93 | public function __construct() { |
94 | - global $sugar_config; |
|
95 | - parent::__construct(); |
|
94 | + global $sugar_config; |
|
95 | + parent::__construct(); |
|
96 | 96 | |
97 | - } |
|
97 | + } |
|
98 | 98 | |
99 | 99 | /** |
100 | 100 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
@@ -111,61 +111,61 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | |
114 | - var $new_schema = true; |
|
114 | + var $new_schema = true; |
|
115 | 115 | |
116 | - function get_summary_text() |
|
117 | - { |
|
118 | - return "$this->name"; |
|
119 | - } |
|
116 | + function get_summary_text() |
|
117 | + { |
|
118 | + return "$this->name"; |
|
119 | + } |
|
120 | 120 | |
121 | - function create_list_query($order_by, $where, $show_deleted = 0) |
|
122 | - { |
|
121 | + function create_list_query($order_by, $where, $show_deleted = 0) |
|
122 | + { |
|
123 | 123 | $custom_join = $this->getCustomJoin(); |
124 | 124 | |
125 | - $query = "SELECT "; |
|
126 | - $query .= "users.user_name as assigned_user_name, "; |
|
127 | - $query .= "prospect_lists.*"; |
|
125 | + $query = "SELECT "; |
|
126 | + $query .= "users.user_name as assigned_user_name, "; |
|
127 | + $query .= "prospect_lists.*"; |
|
128 | 128 | |
129 | 129 | $query .= $custom_join['select']; |
130 | - $query .= " FROM prospect_lists "; |
|
130 | + $query .= " FROM prospect_lists "; |
|
131 | 131 | |
132 | - $query .= "LEFT JOIN users |
|
132 | + $query .= "LEFT JOIN users |
|
133 | 133 | ON prospect_lists.assigned_user_id=users.id "; |
134 | 134 | |
135 | 135 | $query .= $custom_join['join']; |
136 | 136 | |
137 | - $where_auto = '1=1'; |
|
138 | - if($show_deleted == 0){ |
|
139 | - $where_auto = "$this->table_name.deleted=0"; |
|
140 | - }else if($show_deleted == 1){ |
|
141 | - $where_auto = "$this->table_name.deleted=1"; |
|
142 | - } |
|
137 | + $where_auto = '1=1'; |
|
138 | + if($show_deleted == 0){ |
|
139 | + $where_auto = "$this->table_name.deleted=0"; |
|
140 | + }else if($show_deleted == 1){ |
|
141 | + $where_auto = "$this->table_name.deleted=1"; |
|
142 | + } |
|
143 | 143 | |
144 | - if($where != "") |
|
145 | - $query .= "where $where AND ".$where_auto; |
|
146 | - else |
|
147 | - $query .= "where ".$where_auto; |
|
144 | + if($where != "") |
|
145 | + $query .= "where $where AND ".$where_auto; |
|
146 | + else |
|
147 | + $query .= "where ".$where_auto; |
|
148 | 148 | |
149 | - if($order_by != "") |
|
150 | - $query .= " ORDER BY $order_by"; |
|
151 | - else |
|
152 | - $query .= " ORDER BY prospect_lists.name"; |
|
149 | + if($order_by != "") |
|
150 | + $query .= " ORDER BY $order_by"; |
|
151 | + else |
|
152 | + $query .= " ORDER BY prospect_lists.name"; |
|
153 | 153 | |
154 | - return $query; |
|
155 | - } |
|
154 | + return $query; |
|
155 | + } |
|
156 | 156 | |
157 | 157 | |
158 | - function create_export_query($order_by, $where) |
|
159 | - { |
|
158 | + function create_export_query($order_by, $where) |
|
159 | + { |
|
160 | 160 | |
161 | 161 | $query = "SELECT |
162 | 162 | prospect_lists.*, |
163 | 163 | users.user_name as assigned_user_name "; |
164 | - $query .= "FROM prospect_lists "; |
|
165 | - $query .= "LEFT JOIN users |
|
164 | + $query .= "FROM prospect_lists "; |
|
165 | + $query .= "LEFT JOIN users |
|
166 | 166 | ON prospect_lists.assigned_user_id=users.id "; |
167 | 167 | |
168 | - $where_auto = " prospect_lists.deleted=0"; |
|
168 | + $where_auto = " prospect_lists.deleted=0"; |
|
169 | 169 | |
170 | 170 | if($where != "") |
171 | 171 | $query .= " WHERE $where AND ".$where_auto; |
@@ -179,47 +179,47 @@ discard block |
||
179 | 179 | return $query; |
180 | 180 | } |
181 | 181 | |
182 | - function create_export_members_query($record_id) |
|
183 | - { |
|
184 | - $members = array( 'Accounts' => array('has_custom_fields' => false, 'fields' => array()), |
|
185 | - 'Contacts' => array('has_custom_fields' => false, 'fields' => array()), |
|
186 | - 'Users' => array('has_custom_fields' => false, 'fields' => array()), |
|
187 | - 'Prospects' => array('has_custom_fields' => false, 'fields' => array()), |
|
188 | - 'Leads' => array('has_custom_fields' => false, 'fields' => array()) |
|
189 | - ); |
|
190 | - |
|
191 | - // query all custom fields in the fields_meta_data table for the modules which are being exported |
|
192 | - $db = DBManagerFactory::getInstance(); |
|
193 | - $result = $db->query("select name, custom_module from fields_meta_data where custom_module in ('" . |
|
194 | - implode("', '", array_keys($members)) . "')", |
|
195 | - true, |
|
196 | - "ProspectList::create_export_members_query() : error querying custom fields"); |
|
197 | - |
|
198 | - // cycle through the custom fields and put them in the members array according to |
|
199 | - // what module the field belongs |
|
200 | - // take into account that the same custom field may exist in more modules |
|
201 | - while($val = $db->fetchByAssoc($result, false)) |
|
202 | - { |
|
203 | - $fieldname = $val['name']; |
|
204 | - |
|
205 | - foreach($members as $membername => &$memberarr) |
|
206 | - { |
|
207 | - // if the field belongs to this module, then query it in the cstm table |
|
208 | - if ($membername == $val['custom_module']) |
|
209 | - { |
|
210 | - $memberarr['has_custom_fields'] = true; |
|
211 | - $memberarr['fields'][$fieldname] = |
|
212 | - strtolower($membername) . '_cstm.'.$fieldname . ' AS ' . $fieldname; |
|
213 | - } |
|
214 | - // else, only if for this module no entry exists for this field, query an empty string |
|
215 | - else if (!isset($memberarr['fields'][$val['name']])) |
|
216 | - { |
|
217 | - $memberarr['fields'][$fieldname] = "'' AS " . $fieldname; |
|
218 | - } |
|
219 | - } |
|
220 | - } |
|
221 | - |
|
222 | - $leads_query = "SELECT l.id AS id, 'Leads' AS related_type, '' AS \"name\", l.first_name AS first_name, l.last_name AS last_name, l.title AS title, l.salutation AS salutation, |
|
182 | + function create_export_members_query($record_id) |
|
183 | + { |
|
184 | + $members = array( 'Accounts' => array('has_custom_fields' => false, 'fields' => array()), |
|
185 | + 'Contacts' => array('has_custom_fields' => false, 'fields' => array()), |
|
186 | + 'Users' => array('has_custom_fields' => false, 'fields' => array()), |
|
187 | + 'Prospects' => array('has_custom_fields' => false, 'fields' => array()), |
|
188 | + 'Leads' => array('has_custom_fields' => false, 'fields' => array()) |
|
189 | + ); |
|
190 | + |
|
191 | + // query all custom fields in the fields_meta_data table for the modules which are being exported |
|
192 | + $db = DBManagerFactory::getInstance(); |
|
193 | + $result = $db->query("select name, custom_module from fields_meta_data where custom_module in ('" . |
|
194 | + implode("', '", array_keys($members)) . "')", |
|
195 | + true, |
|
196 | + "ProspectList::create_export_members_query() : error querying custom fields"); |
|
197 | + |
|
198 | + // cycle through the custom fields and put them in the members array according to |
|
199 | + // what module the field belongs |
|
200 | + // take into account that the same custom field may exist in more modules |
|
201 | + while($val = $db->fetchByAssoc($result, false)) |
|
202 | + { |
|
203 | + $fieldname = $val['name']; |
|
204 | + |
|
205 | + foreach($members as $membername => &$memberarr) |
|
206 | + { |
|
207 | + // if the field belongs to this module, then query it in the cstm table |
|
208 | + if ($membername == $val['custom_module']) |
|
209 | + { |
|
210 | + $memberarr['has_custom_fields'] = true; |
|
211 | + $memberarr['fields'][$fieldname] = |
|
212 | + strtolower($membername) . '_cstm.'.$fieldname . ' AS ' . $fieldname; |
|
213 | + } |
|
214 | + // else, only if for this module no entry exists for this field, query an empty string |
|
215 | + else if (!isset($memberarr['fields'][$val['name']])) |
|
216 | + { |
|
217 | + $memberarr['fields'][$fieldname] = "'' AS " . $fieldname; |
|
218 | + } |
|
219 | + } |
|
220 | + } |
|
221 | + |
|
222 | + $leads_query = "SELECT l.id AS id, 'Leads' AS related_type, '' AS \"name\", l.first_name AS first_name, l.last_name AS last_name, l.title AS title, l.salutation AS salutation, |
|
223 | 223 | l.primary_address_street AS primary_address_street,l.primary_address_city AS primary_address_city, l.primary_address_state AS primary_address_state, l.primary_address_postalcode AS primary_address_postalcode, l.primary_address_country AS primary_address_country, |
224 | 224 | l.account_name AS account_name, |
225 | 225 | ea.email_address AS primary_email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | AND l.deleted=0 |
235 | 235 | AND (ear.deleted=0 OR ear.deleted IS NULL)"; |
236 | 236 | |
237 | - $users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name,u.title AS title, '' AS salutation, |
|
237 | + $users_query = "SELECT u.id AS id, 'Users' AS related_type, '' AS \"name\", u.first_name AS first_name, u.last_name AS last_name,u.title AS title, '' AS salutation, |
|
238 | 238 | u.address_street AS primary_address_street,u.address_city AS primary_address_city, u.address_state AS primary_address_state, u.address_postalcode AS primary_address_postalcode, u.address_country AS primary_address_country, |
239 | 239 | '' AS account_name, |
240 | 240 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | AND u.deleted=0 |
250 | 250 | AND (ear.deleted=0 OR ear.deleted IS NULL)"; |
251 | 251 | |
252 | - $contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name,c.title AS title, c.salutation AS salutation, |
|
252 | + $contacts_query = "SELECT c.id AS id, 'Contacts' AS related_type, '' AS \"name\", c.first_name AS first_name, c.last_name AS last_name,c.title AS title, c.salutation AS salutation, |
|
253 | 253 | c.primary_address_street AS primary_address_street,c.primary_address_city AS primary_address_city, c.primary_address_state AS primary_address_state, c.primary_address_postalcode AS primary_address_postalcode, c.primary_address_country AS primary_address_country, |
254 | 254 | a.name AS account_name, |
255 | 255 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | AND c.deleted=0 |
266 | 266 | AND (ear.deleted=0 OR ear.deleted IS NULL)"; |
267 | 267 | |
268 | - $prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,p.title AS title, p.salutation AS salutation, |
|
268 | + $prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,p.title AS title, p.salutation AS salutation, |
|
269 | 269 | p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, p.primary_address_state AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country, |
270 | 270 | p.account_name AS account_name, |
271 | 271 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | AND p.deleted=0 |
281 | 281 | AND (ear.deleted=0 OR ear.deleted IS NULL)"; |
282 | 282 | |
283 | - $accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name,'' AS title, '' AS salutation, |
|
283 | + $accounts_query = "SELECT a.id AS id, 'Accounts' AS related_type, a.name AS \"name\", '' AS first_name, '' AS last_name,'' AS title, '' AS salutation, |
|
284 | 284 | a.billing_address_street AS primary_address_street,a.billing_address_city AS primary_address_city, a.billing_address_state AS primary_address_state, a.billing_address_postalcode AS primary_address_postalcode, a.billing_address_country AS primary_address_country, |
285 | 285 | '' AS account_name, |
286 | 286 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
@@ -294,115 +294,115 @@ discard block |
||
294 | 294 | WHERE plp.prospect_list_id = $record_id AND plp.deleted=0 |
295 | 295 | AND a.deleted=0 |
296 | 296 | AND (ear.deleted=0 OR ear.deleted IS NULL)"; |
297 | - $order_by = "ORDER BY related_type, id, primary_address DESC"; |
|
298 | - $query = "$leads_query UNION ALL $users_query UNION ALL $contacts_query UNION ALL $prospects_query UNION ALL $accounts_query $order_by"; |
|
299 | - return $query; |
|
300 | - } |
|
297 | + $order_by = "ORDER BY related_type, id, primary_address DESC"; |
|
298 | + $query = "$leads_query UNION ALL $users_query UNION ALL $contacts_query UNION ALL $prospects_query UNION ALL $accounts_query $order_by"; |
|
299 | + return $query; |
|
300 | + } |
|
301 | 301 | |
302 | - function save_relationship_changes($is_update, $exclude = array()) |
|
302 | + function save_relationship_changes($is_update, $exclude = array()) |
|
303 | 303 | { |
304 | - parent::save_relationship_changes($is_update, $exclude); |
|
305 | - if($this->lead_id != "") |
|
306 | - $this->set_prospect_relationship($this->id, $this->lead_id, "lead"); |
|
307 | - if($this->contact_id != "") |
|
308 | - $this->set_prospect_relationship($this->id, $this->contact_id, "contact"); |
|
309 | - if($this->prospect_id != "") |
|
310 | - $this->set_prospect_relationship($this->id, $this->contact_id, "prospect"); |
|
304 | + parent::save_relationship_changes($is_update, $exclude); |
|
305 | + if($this->lead_id != "") |
|
306 | + $this->set_prospect_relationship($this->id, $this->lead_id, "lead"); |
|
307 | + if($this->contact_id != "") |
|
308 | + $this->set_prospect_relationship($this->id, $this->contact_id, "contact"); |
|
309 | + if($this->prospect_id != "") |
|
310 | + $this->set_prospect_relationship($this->id, $this->contact_id, "prospect"); |
|
311 | 311 | } |
312 | 312 | |
313 | - function set_prospect_relationship($prospect_list_id, &$link_ids, $link_name) |
|
314 | - { |
|
315 | - $link_field = sprintf("%s_id", $link_name); |
|
313 | + function set_prospect_relationship($prospect_list_id, &$link_ids, $link_name) |
|
314 | + { |
|
315 | + $link_field = sprintf("%s_id", $link_name); |
|
316 | 316 | |
317 | - foreach($link_ids as $link_id) |
|
318 | - { |
|
319 | - $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
320 | - } |
|
321 | - } |
|
317 | + foreach($link_ids as $link_id) |
|
318 | + { |
|
319 | + $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
320 | + } |
|
321 | + } |
|
322 | 322 | |
323 | - function set_prospect_relationship_single($prospect_list_id, $link_id, $link_name) |
|
324 | - { |
|
325 | - $link_field = sprintf("%s_id", $link_name); |
|
323 | + function set_prospect_relationship_single($prospect_list_id, $link_id, $link_name) |
|
324 | + { |
|
325 | + $link_field = sprintf("%s_id", $link_name); |
|
326 | 326 | |
327 | - $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
328 | - } |
|
327 | + $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
328 | + } |
|
329 | 329 | |
330 | 330 | |
331 | - function clear_prospect_relationship($prospect_list_id, $link_id, $link_name) |
|
332 | - { |
|
333 | - $link_field = sprintf("%s_id", $link_name); |
|
334 | - $where_clause = " AND $link_field = '$link_id' "; |
|
331 | + function clear_prospect_relationship($prospect_list_id, $link_id, $link_name) |
|
332 | + { |
|
333 | + $link_field = sprintf("%s_id", $link_name); |
|
334 | + $where_clause = " AND $link_field = '$link_id' "; |
|
335 | 335 | |
336 | - $query = sprintf("DELETE FROM prospect_lists_prospects WHERE prospect_list_id='%s' AND deleted = '0' %s", $prospect_list_id, $where_clause); |
|
336 | + $query = sprintf("DELETE FROM prospect_lists_prospects WHERE prospect_list_id='%s' AND deleted = '0' %s", $prospect_list_id, $where_clause); |
|
337 | 337 | |
338 | - $this->db->query($query, true, "Error clearing prospect/prospect_list relationship: "); |
|
339 | - } |
|
338 | + $this->db->query($query, true, "Error clearing prospect/prospect_list relationship: "); |
|
339 | + } |
|
340 | 340 | |
341 | 341 | |
342 | - function mark_relationships_deleted($id) |
|
343 | - { |
|
344 | - } |
|
342 | + function mark_relationships_deleted($id) |
|
343 | + { |
|
344 | + } |
|
345 | 345 | |
346 | - function fill_in_additional_list_fields() |
|
347 | - { |
|
348 | - } |
|
346 | + function fill_in_additional_list_fields() |
|
347 | + { |
|
348 | + } |
|
349 | 349 | |
350 | - function fill_in_additional_detail_fields() |
|
351 | - { |
|
352 | - parent::fill_in_additional_detail_fields(); |
|
350 | + function fill_in_additional_detail_fields() |
|
351 | + { |
|
352 | + parent::fill_in_additional_detail_fields(); |
|
353 | 353 | $this->entry_count = $this->get_entry_count(); |
354 | - } |
|
354 | + } |
|
355 | 355 | |
356 | 356 | |
357 | - function update_currency_id($fromid, $toid){ |
|
358 | - } |
|
357 | + function update_currency_id($fromid, $toid){ |
|
358 | + } |
|
359 | 359 | |
360 | 360 | |
361 | - function get_entry_count() |
|
362 | - { |
|
363 | - $query = "SELECT count(*) AS num FROM prospect_lists_prospects WHERE prospect_list_id='$this->id' AND deleted = '0'"; |
|
364 | - $result = $this->db->query($query, true, "Grabbing prospect_list entry count"); |
|
361 | + function get_entry_count() |
|
362 | + { |
|
363 | + $query = "SELECT count(*) AS num FROM prospect_lists_prospects WHERE prospect_list_id='$this->id' AND deleted = '0'"; |
|
364 | + $result = $this->db->query($query, true, "Grabbing prospect_list entry count"); |
|
365 | 365 | |
366 | - $row = $this->db->fetchByAssoc($result); |
|
366 | + $row = $this->db->fetchByAssoc($result); |
|
367 | 367 | |
368 | - if($row) |
|
369 | - return $row['num']; |
|
370 | - else |
|
371 | - return 0; |
|
372 | - } |
|
368 | + if($row) |
|
369 | + return $row['num']; |
|
370 | + else |
|
371 | + return 0; |
|
372 | + } |
|
373 | 373 | |
374 | 374 | |
375 | - function get_list_view_data(){ |
|
376 | - $temp_array = $this->get_list_view_array(); |
|
377 | - $temp_array["ENTRY_COUNT"] = $this->get_entry_count(); |
|
378 | - return $temp_array; |
|
379 | - } |
|
380 | - /** |
|
375 | + function get_list_view_data(){ |
|
376 | + $temp_array = $this->get_list_view_array(); |
|
377 | + $temp_array["ENTRY_COUNT"] = $this->get_entry_count(); |
|
378 | + return $temp_array; |
|
379 | + } |
|
380 | + /** |
|
381 | 381 | builds a generic search based on the query string using or |
382 | 382 | do not include any $this-> because this is called on without having the class instantiated |
383 | - */ |
|
384 | - function build_generic_where_clause ($the_query_string) |
|
385 | - { |
|
386 | - $where_clauses = Array(); |
|
387 | - $the_query_string = $GLOBALS['db']->quote($the_query_string); |
|
388 | - array_push($where_clauses, "prospect_lists.name like '$the_query_string%'"); |
|
389 | - |
|
390 | - $the_where = ""; |
|
391 | - foreach($where_clauses as $clause) |
|
392 | - { |
|
393 | - if($the_where != "") $the_where .= " or "; |
|
394 | - $the_where .= $clause; |
|
395 | - } |
|
383 | + */ |
|
384 | + function build_generic_where_clause ($the_query_string) |
|
385 | + { |
|
386 | + $where_clauses = Array(); |
|
387 | + $the_query_string = $GLOBALS['db']->quote($the_query_string); |
|
388 | + array_push($where_clauses, "prospect_lists.name like '$the_query_string%'"); |
|
389 | + |
|
390 | + $the_where = ""; |
|
391 | + foreach($where_clauses as $clause) |
|
392 | + { |
|
393 | + if($the_where != "") $the_where .= " or "; |
|
394 | + $the_where .= $clause; |
|
395 | + } |
|
396 | 396 | |
397 | 397 | |
398 | - return $the_where; |
|
399 | - } |
|
398 | + return $the_where; |
|
399 | + } |
|
400 | 400 | |
401 | - function save($check_notify = FALSE) { |
|
401 | + function save($check_notify = FALSE) { |
|
402 | 402 | |
403 | - return parent::save($check_notify); |
|
403 | + return parent::save($check_notify); |
|
404 | 404 | |
405 | - } |
|
405 | + } |
|
406 | 406 | |
407 | 407 | function mark_deleted($id){ |
408 | 408 | $query = "UPDATE prospect_lists_prospects SET deleted = 1 WHERE prospect_list_id = '{$id}' "; |
@@ -410,12 +410,12 @@ discard block |
||
410 | 410 | return parent::mark_deleted($id); |
411 | 411 | } |
412 | 412 | |
413 | - function bean_implements($interface){ |
|
414 | - switch($interface){ |
|
415 | - case 'ACL':return true; |
|
416 | - } |
|
417 | - return false; |
|
418 | - } |
|
413 | + function bean_implements($interface){ |
|
414 | + switch($interface){ |
|
415 | + case 'ACL':return true; |
|
416 | + } |
|
417 | + return false; |
|
418 | + } |
|
419 | 419 | |
420 | 420 | } |
421 | 421 |
@@ -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. |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | /** |
100 | 100 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
101 | 101 | */ |
102 | - public function ProspectList(){ |
|
102 | + public function ProspectList() { |
|
103 | 103 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
104 | - if(isset($GLOBALS['log'])) { |
|
104 | + if (isset($GLOBALS['log'])) { |
|
105 | 105 | $GLOBALS['log']->deprecated($deprecatedMessage); |
106 | 106 | } |
107 | 107 | else { |
@@ -135,18 +135,18 @@ discard block |
||
135 | 135 | $query .= $custom_join['join']; |
136 | 136 | |
137 | 137 | $where_auto = '1=1'; |
138 | - if($show_deleted == 0){ |
|
138 | + if ($show_deleted == 0) { |
|
139 | 139 | $where_auto = "$this->table_name.deleted=0"; |
140 | - }else if($show_deleted == 1){ |
|
140 | + } else if ($show_deleted == 1) { |
|
141 | 141 | $where_auto = "$this->table_name.deleted=1"; |
142 | 142 | } |
143 | 143 | |
144 | - if($where != "") |
|
144 | + if ($where != "") |
|
145 | 145 | $query .= "where $where AND ".$where_auto; |
146 | 146 | else |
147 | 147 | $query .= "where ".$where_auto; |
148 | 148 | |
149 | - if($order_by != "") |
|
149 | + if ($order_by != "") |
|
150 | 150 | $query .= " ORDER BY $order_by"; |
151 | 151 | else |
152 | 152 | $query .= " ORDER BY prospect_lists.name"; |
@@ -162,17 +162,17 @@ discard block |
||
162 | 162 | prospect_lists.*, |
163 | 163 | users.user_name as assigned_user_name "; |
164 | 164 | $query .= "FROM prospect_lists "; |
165 | - $query .= "LEFT JOIN users |
|
165 | + $query .= "LEFT JOIN users |
|
166 | 166 | ON prospect_lists.assigned_user_id=users.id "; |
167 | 167 | |
168 | 168 | $where_auto = " prospect_lists.deleted=0"; |
169 | 169 | |
170 | - if($where != "") |
|
170 | + if ($where != "") |
|
171 | 171 | $query .= " WHERE $where AND ".$where_auto; |
172 | 172 | else |
173 | 173 | $query .= " WHERE ".$where_auto; |
174 | 174 | |
175 | - if($order_by != "") |
|
175 | + if ($order_by != "") |
|
176 | 176 | $query .= " ORDER BY $order_by"; |
177 | 177 | else |
178 | 178 | $query .= " ORDER BY prospect_lists.name"; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | function create_export_members_query($record_id) |
183 | 183 | { |
184 | - $members = array( 'Accounts' => array('has_custom_fields' => false, 'fields' => array()), |
|
184 | + $members = array('Accounts' => array('has_custom_fields' => false, 'fields' => array()), |
|
185 | 185 | 'Contacts' => array('has_custom_fields' => false, 'fields' => array()), |
186 | 186 | 'Users' => array('has_custom_fields' => false, 'fields' => array()), |
187 | 187 | 'Prospects' => array('has_custom_fields' => false, 'fields' => array()), |
@@ -190,31 +190,31 @@ discard block |
||
190 | 190 | |
191 | 191 | // query all custom fields in the fields_meta_data table for the modules which are being exported |
192 | 192 | $db = DBManagerFactory::getInstance(); |
193 | - $result = $db->query("select name, custom_module from fields_meta_data where custom_module in ('" . |
|
194 | - implode("', '", array_keys($members)) . "')", |
|
193 | + $result = $db->query("select name, custom_module from fields_meta_data where custom_module in ('". |
|
194 | + implode("', '", array_keys($members))."')", |
|
195 | 195 | true, |
196 | 196 | "ProspectList::create_export_members_query() : error querying custom fields"); |
197 | 197 | |
198 | 198 | // cycle through the custom fields and put them in the members array according to |
199 | 199 | // what module the field belongs |
200 | 200 | // take into account that the same custom field may exist in more modules |
201 | - while($val = $db->fetchByAssoc($result, false)) |
|
201 | + while ($val = $db->fetchByAssoc($result, false)) |
|
202 | 202 | { |
203 | 203 | $fieldname = $val['name']; |
204 | 204 | |
205 | - foreach($members as $membername => &$memberarr) |
|
205 | + foreach ($members as $membername => &$memberarr) |
|
206 | 206 | { |
207 | 207 | // if the field belongs to this module, then query it in the cstm table |
208 | 208 | if ($membername == $val['custom_module']) |
209 | 209 | { |
210 | 210 | $memberarr['has_custom_fields'] = true; |
211 | 211 | $memberarr['fields'][$fieldname] = |
212 | - strtolower($membername) . '_cstm.'.$fieldname . ' AS ' . $fieldname; |
|
212 | + strtolower($membername).'_cstm.'.$fieldname.' AS '.$fieldname; |
|
213 | 213 | } |
214 | 214 | // else, only if for this module no entry exists for this field, query an empty string |
215 | 215 | else if (!isset($memberarr['fields'][$val['name']])) |
216 | 216 | { |
217 | - $memberarr['fields'][$fieldname] = "'' AS " . $fieldname; |
|
217 | + $memberarr['fields'][$fieldname] = "'' AS ".$fieldname; |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | l.account_name AS account_name, |
225 | 225 | ea.email_address AS primary_email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
226 | 226 | l.do_not_call AS do_not_call, l.phone_fax AS phone_fax, l.phone_other AS phone_other, l.phone_home AS phone_home, l.phone_mobile AS phone_mobile, l.phone_work AS phone_work |
227 | - ".(count($members['Leads']['fields']) ? ', ' : '') . implode(', ', $members['Leads']['fields'])." |
|
227 | + ".(count($members['Leads']['fields']) ? ', ' : '').implode(', ', $members['Leads']['fields'])." |
|
228 | 228 | FROM prospect_lists_prospects plp |
229 | 229 | INNER JOIN leads l ON plp.related_id=l.id |
230 | 230 | ".($members['Leads']['has_custom_fields'] ? 'LEFT join leads_cstm ON l.id = leads_cstm.id_c' : '')." |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | '' AS account_name, |
240 | 240 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
241 | 241 | 0 AS do_not_call, u.phone_fax AS phone_fax, u.phone_other AS phone_other, u.phone_home AS phone_home, u.phone_mobile AS phone_mobile, u.phone_work AS phone_work |
242 | - ".(count($members['Users']['fields']) ? ', ' : '') . implode(', ', $members['Users']['fields'])." |
|
242 | + ".(count($members['Users']['fields']) ? ', ' : '').implode(', ', $members['Users']['fields'])." |
|
243 | 243 | FROM prospect_lists_prospects plp |
244 | 244 | INNER JOIN users u ON plp.related_id=u.id |
245 | 245 | ".($members['Users']['has_custom_fields'] ? 'LEFT join users_cstm ON u.id = users_cstm.id_c' : '')." |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | a.name AS account_name, |
255 | 255 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
256 | 256 | c.do_not_call AS do_not_call, c.phone_fax AS phone_fax, c.phone_other AS phone_other, c.phone_home AS phone_home, c.phone_mobile AS phone_mobile, c.phone_work AS phone_work |
257 | - ".(count($members['Contacts']['fields']) ? ', ' : '') . implode(', ', $members['Contacts']['fields'])." |
|
257 | + ".(count($members['Contacts']['fields']) ? ', ' : '').implode(', ', $members['Contacts']['fields'])." |
|
258 | 258 | FROM prospect_lists_prospects plp |
259 | 259 | INNER JOIN contacts c ON plp.related_id=c.id LEFT JOIN accounts_contacts ac ON ac.contact_id=c.id |
260 | 260 | LEFT JOIN accounts a ON ac.account_id=a.id AND ac.deleted=0 |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | p.account_name AS account_name, |
271 | 271 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
272 | 272 | p.do_not_call AS do_not_call, p.phone_fax AS phone_fax, p.phone_other AS phone_other, p.phone_home AS phone_home, p.phone_mobile AS phone_mobile, p.phone_work AS phone_work |
273 | - ".(count($members['Prospects']['fields']) ? ', ' : '') . implode(', ', $members['Prospects']['fields'])." |
|
273 | + ".(count($members['Prospects']['fields']) ? ', ' : '').implode(', ', $members['Prospects']['fields'])." |
|
274 | 274 | FROM prospect_lists_prospects plp |
275 | 275 | INNER JOIN prospects p ON plp.related_id=p.id |
276 | 276 | ".($members['Prospects']['has_custom_fields'] ? 'LEFT join prospects_cstm ON p.id = prospects_cstm.id_c' : '')." |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | '' AS account_name, |
286 | 286 | ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address, |
287 | 287 | 0 AS do_not_call, a.phone_fax as phone_fax, a.phone_alternate AS phone_other, '' AS phone_home, '' AS phone_mobile, a.phone_office AS phone_office |
288 | - ".(count($members['Accounts']['fields']) ? ', ' : '') . implode(', ', $members['Accounts']['fields'])." |
|
288 | + ".(count($members['Accounts']['fields']) ? ', ' : '').implode(', ', $members['Accounts']['fields'])." |
|
289 | 289 | FROM prospect_lists_prospects plp |
290 | 290 | INNER JOIN accounts a ON plp.related_id=a.id |
291 | 291 | ".($members['Accounts']['has_custom_fields'] ? 'LEFT join accounts_cstm ON a.id = accounts_cstm.id_c' : '')." |
@@ -302,11 +302,11 @@ discard block |
||
302 | 302 | function save_relationship_changes($is_update, $exclude = array()) |
303 | 303 | { |
304 | 304 | parent::save_relationship_changes($is_update, $exclude); |
305 | - if($this->lead_id != "") |
|
305 | + if ($this->lead_id != "") |
|
306 | 306 | $this->set_prospect_relationship($this->id, $this->lead_id, "lead"); |
307 | - if($this->contact_id != "") |
|
307 | + if ($this->contact_id != "") |
|
308 | 308 | $this->set_prospect_relationship($this->id, $this->contact_id, "contact"); |
309 | - if($this->prospect_id != "") |
|
309 | + if ($this->prospect_id != "") |
|
310 | 310 | $this->set_prospect_relationship($this->id, $this->contact_id, "prospect"); |
311 | 311 | } |
312 | 312 | |
@@ -314,9 +314,9 @@ discard block |
||
314 | 314 | { |
315 | 315 | $link_field = sprintf("%s_id", $link_name); |
316 | 316 | |
317 | - foreach($link_ids as $link_id) |
|
317 | + foreach ($link_ids as $link_id) |
|
318 | 318 | { |
319 | - $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
319 | + $this->set_relationship('prospect_lists_prospects', array($link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id)); |
|
320 | 320 | } |
321 | 321 | } |
322 | 322 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | { |
325 | 325 | $link_field = sprintf("%s_id", $link_name); |
326 | 326 | |
327 | - $this->set_relationship('prospect_lists_prospects', array( $link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id )); |
|
327 | + $this->set_relationship('prospect_lists_prospects', array($link_field=>$link_id, 'prospect_list_id'=>$prospect_list_id)); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | |
356 | 356 | |
357 | - function update_currency_id($fromid, $toid){ |
|
357 | + function update_currency_id($fromid, $toid) { |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | |
@@ -365,14 +365,14 @@ discard block |
||
365 | 365 | |
366 | 366 | $row = $this->db->fetchByAssoc($result); |
367 | 367 | |
368 | - if($row) |
|
368 | + if ($row) |
|
369 | 369 | return $row['num']; |
370 | 370 | else |
371 | 371 | return 0; |
372 | 372 | } |
373 | 373 | |
374 | 374 | |
375 | - function get_list_view_data(){ |
|
375 | + function get_list_view_data() { |
|
376 | 376 | $temp_array = $this->get_list_view_array(); |
377 | 377 | $temp_array["ENTRY_COUNT"] = $this->get_entry_count(); |
378 | 378 | return $temp_array; |
@@ -381,16 +381,16 @@ discard block |
||
381 | 381 | builds a generic search based on the query string using or |
382 | 382 | do not include any $this-> because this is called on without having the class instantiated |
383 | 383 | */ |
384 | - function build_generic_where_clause ($the_query_string) |
|
384 | + function build_generic_where_clause($the_query_string) |
|
385 | 385 | { |
386 | 386 | $where_clauses = Array(); |
387 | 387 | $the_query_string = $GLOBALS['db']->quote($the_query_string); |
388 | 388 | array_push($where_clauses, "prospect_lists.name like '$the_query_string%'"); |
389 | 389 | |
390 | 390 | $the_where = ""; |
391 | - foreach($where_clauses as $clause) |
|
391 | + foreach ($where_clauses as $clause) |
|
392 | 392 | { |
393 | - if($the_where != "") $the_where .= " or "; |
|
393 | + if ($the_where != "") $the_where .= " or "; |
|
394 | 394 | $the_where .= $clause; |
395 | 395 | } |
396 | 396 | |
@@ -404,14 +404,14 @@ discard block |
||
404 | 404 | |
405 | 405 | } |
406 | 406 | |
407 | - function mark_deleted($id){ |
|
407 | + function mark_deleted($id) { |
|
408 | 408 | $query = "UPDATE prospect_lists_prospects SET deleted = 1 WHERE prospect_list_id = '{$id}' "; |
409 | 409 | $this->db->query($query); |
410 | 410 | return parent::mark_deleted($id); |
411 | 411 | } |
412 | 412 | |
413 | - function bean_implements($interface){ |
|
414 | - switch($interface){ |
|
413 | + function bean_implements($interface) { |
|
414 | + switch ($interface) { |
|
415 | 415 | case 'ACL':return true; |
416 | 416 | } |
417 | 417 | return false; |
@@ -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. |
@@ -103,8 +105,7 @@ discard block |
||
103 | 105 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
104 | 106 | if(isset($GLOBALS['log'])) { |
105 | 107 | $GLOBALS['log']->deprecated($deprecatedMessage); |
106 | - } |
|
107 | - else { |
|
108 | + } else { |
|
108 | 109 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
109 | 110 | } |
110 | 111 | self::__construct(); |
@@ -137,19 +138,21 @@ discard block |
||
137 | 138 | $where_auto = '1=1'; |
138 | 139 | if($show_deleted == 0){ |
139 | 140 | $where_auto = "$this->table_name.deleted=0"; |
140 | - }else if($show_deleted == 1){ |
|
141 | + } else if($show_deleted == 1){ |
|
141 | 142 | $where_auto = "$this->table_name.deleted=1"; |
142 | 143 | } |
143 | 144 | |
144 | - if($where != "") |
|
145 | - $query .= "where $where AND ".$where_auto; |
|
146 | - else |
|
147 | - $query .= "where ".$where_auto; |
|
145 | + if($where != "") { |
|
146 | + $query .= "where $where AND ".$where_auto; |
|
147 | + } else { |
|
148 | + $query .= "where ".$where_auto; |
|
149 | + } |
|
148 | 150 | |
149 | - if($order_by != "") |
|
150 | - $query .= " ORDER BY $order_by"; |
|
151 | - else |
|
152 | - $query .= " ORDER BY prospect_lists.name"; |
|
151 | + if($order_by != "") { |
|
152 | + $query .= " ORDER BY $order_by"; |
|
153 | + } else { |
|
154 | + $query .= " ORDER BY prospect_lists.name"; |
|
155 | + } |
|
153 | 156 | |
154 | 157 | return $query; |
155 | 158 | } |
@@ -167,15 +170,17 @@ discard block |
||
167 | 170 | |
168 | 171 | $where_auto = " prospect_lists.deleted=0"; |
169 | 172 | |
170 | - if($where != "") |
|
171 | - $query .= " WHERE $where AND ".$where_auto; |
|
172 | - else |
|
173 | - $query .= " WHERE ".$where_auto; |
|
173 | + if($where != "") { |
|
174 | + $query .= " WHERE $where AND ".$where_auto; |
|
175 | + } else { |
|
176 | + $query .= " WHERE ".$where_auto; |
|
177 | + } |
|
174 | 178 | |
175 | - if($order_by != "") |
|
176 | - $query .= " ORDER BY $order_by"; |
|
177 | - else |
|
178 | - $query .= " ORDER BY prospect_lists.name"; |
|
179 | + if($order_by != "") { |
|
180 | + $query .= " ORDER BY $order_by"; |
|
181 | + } else { |
|
182 | + $query .= " ORDER BY prospect_lists.name"; |
|
183 | + } |
|
179 | 184 | return $query; |
180 | 185 | } |
181 | 186 | |
@@ -302,12 +307,15 @@ discard block |
||
302 | 307 | function save_relationship_changes($is_update, $exclude = array()) |
303 | 308 | { |
304 | 309 | parent::save_relationship_changes($is_update, $exclude); |
305 | - if($this->lead_id != "") |
|
306 | - $this->set_prospect_relationship($this->id, $this->lead_id, "lead"); |
|
307 | - if($this->contact_id != "") |
|
308 | - $this->set_prospect_relationship($this->id, $this->contact_id, "contact"); |
|
309 | - if($this->prospect_id != "") |
|
310 | - $this->set_prospect_relationship($this->id, $this->contact_id, "prospect"); |
|
310 | + if($this->lead_id != "") { |
|
311 | + $this->set_prospect_relationship($this->id, $this->lead_id, "lead"); |
|
312 | + } |
|
313 | + if($this->contact_id != "") { |
|
314 | + $this->set_prospect_relationship($this->id, $this->contact_id, "contact"); |
|
315 | + } |
|
316 | + if($this->prospect_id != "") { |
|
317 | + $this->set_prospect_relationship($this->id, $this->contact_id, "prospect"); |
|
318 | + } |
|
311 | 319 | } |
312 | 320 | |
313 | 321 | function set_prospect_relationship($prospect_list_id, &$link_ids, $link_name) |
@@ -365,10 +373,11 @@ discard block |
||
365 | 373 | |
366 | 374 | $row = $this->db->fetchByAssoc($result); |
367 | 375 | |
368 | - if($row) |
|
369 | - return $row['num']; |
|
370 | - else |
|
371 | - return 0; |
|
376 | + if($row) { |
|
377 | + return $row['num']; |
|
378 | + } else { |
|
379 | + return 0; |
|
380 | + } |
|
372 | 381 | } |
373 | 382 | |
374 | 383 | |
@@ -390,7 +399,9 @@ discard block |
||
390 | 399 | $the_where = ""; |
391 | 400 | foreach($where_clauses as $clause) |
392 | 401 | { |
393 | - if($the_where != "") $the_where .= " or "; |
|
402 | + if($the_where != "") { |
|
403 | + $the_where .= " or "; |
|
404 | + } |
|
394 | 405 | $the_where .= $clause; |
395 | 406 | } |
396 | 407 |
@@ -3,150 +3,150 @@ discard block |
||
3 | 3 | class EmployeeTest extends PHPUnit_Framework_TestCase { |
4 | 4 | |
5 | 5 | |
6 | - public function testEmployee() { |
|
6 | + public function testEmployee() { |
|
7 | 7 | |
8 | - //execute the contructor and check for the Object type and attributes |
|
9 | - $employee = new Employee(); |
|
10 | - $this->assertInstanceOf('Employee',$employee); |
|
11 | - $this->assertInstanceOf('Person',$employee); |
|
12 | - $this->assertInstanceOf('SugarBean',$employee); |
|
8 | + //execute the contructor and check for the Object type and attributes |
|
9 | + $employee = new Employee(); |
|
10 | + $this->assertInstanceOf('Employee',$employee); |
|
11 | + $this->assertInstanceOf('Person',$employee); |
|
12 | + $this->assertInstanceOf('SugarBean',$employee); |
|
13 | 13 | |
14 | - $this->assertAttributeEquals('Employees', 'module_dir', $employee); |
|
15 | - $this->assertAttributeEquals('Employee', 'object_name', $employee); |
|
16 | - $this->assertAttributeEquals('users', 'table_name', $employee); |
|
17 | - $this->assertAttributeEquals(true, 'new_schema', $employee); |
|
14 | + $this->assertAttributeEquals('Employees', 'module_dir', $employee); |
|
15 | + $this->assertAttributeEquals('Employee', 'object_name', $employee); |
|
16 | + $this->assertAttributeEquals('users', 'table_name', $employee); |
|
17 | + $this->assertAttributeEquals(true, 'new_schema', $employee); |
|
18 | 18 | |
19 | - } |
|
19 | + } |
|
20 | 20 | |
21 | 21 | |
22 | - public function testget_summary_text() { |
|
22 | + public function testget_summary_text() { |
|
23 | 23 | |
24 | - error_reporting(E_ERROR | E_PARSE); |
|
24 | + error_reporting(E_ERROR | E_PARSE); |
|
25 | 25 | |
26 | - $employee = new Employee(); |
|
26 | + $employee = new Employee(); |
|
27 | 27 | |
28 | - //test without setting name |
|
29 | - $this->assertEquals(' ',$employee->get_summary_text()); |
|
28 | + //test without setting name |
|
29 | + $this->assertEquals(' ',$employee->get_summary_text()); |
|
30 | 30 | |
31 | - //test with name set |
|
32 | - $employee->retrieve(1); |
|
33 | - $this->assertEquals('Administrator',$employee->get_summary_text()); |
|
31 | + //test with name set |
|
32 | + $employee->retrieve(1); |
|
33 | + $this->assertEquals('Administrator',$employee->get_summary_text()); |
|
34 | 34 | |
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | - public function testfill_in_additional_list_fields() { |
|
39 | - |
|
40 | - $employee = new Employee(); |
|
41 | - |
|
42 | - //execute the method and test if it works and does not throws an exception. |
|
43 | - try { |
|
44 | - $employee->fill_in_additional_list_fields(); |
|
45 | - $this->assertTrue(true); |
|
46 | - } |
|
47 | - catch (Exception $e) { |
|
48 | - $this->fail(); |
|
49 | - } |
|
50 | - |
|
51 | - } |
|
38 | + public function testfill_in_additional_list_fields() { |
|
52 | 39 | |
53 | - public function testfill_in_additional_detail_fields() |
|
54 | - { |
|
55 | - $employee = new Employee(); |
|
40 | + $employee = new Employee(); |
|
56 | 41 | |
42 | + //execute the method and test if it works and does not throws an exception. |
|
43 | + try { |
|
44 | + $employee->fill_in_additional_list_fields(); |
|
45 | + $this->assertTrue(true); |
|
46 | + } |
|
47 | + catch (Exception $e) { |
|
48 | + $this->fail(); |
|
49 | + } |
|
57 | 50 | |
58 | - //test with a empty employee bean |
|
59 | - $employee->fill_in_additional_detail_fields(); |
|
60 | - $this->assertEquals("", $employee->reports_to_name); |
|
51 | + } |
|
61 | 52 | |
53 | + public function testfill_in_additional_detail_fields() |
|
54 | + { |
|
55 | + $employee = new Employee(); |
|
62 | 56 | |
63 | - //test with a valid employee bean |
|
64 | - $employee->retrieve(1); |
|
65 | - $employee->fill_in_additional_detail_fields(); |
|
66 | - $this->assertEquals("", $employee->reports_to_name); |
|
67 | 57 | |
68 | - } |
|
58 | + //test with a empty employee bean |
|
59 | + $employee->fill_in_additional_detail_fields(); |
|
60 | + $this->assertEquals("", $employee->reports_to_name); |
|
69 | 61 | |
70 | - public function testretrieve_employee_id() |
|
71 | - { |
|
72 | - $employee = new Employee(); |
|
73 | - //$this->assertEquals('1' ,$employee->retrieve_employee_id('admin')); |
|
74 | 62 | |
75 | - $this->markTestSkipped('Bug in query: employee_name parameter is wrongly used as user_name'); |
|
63 | + //test with a valid employee bean |
|
64 | + $employee->retrieve(1); |
|
65 | + $employee->fill_in_additional_detail_fields(); |
|
66 | + $this->assertEquals("", $employee->reports_to_name); |
|
76 | 67 | |
77 | - } |
|
68 | + } |
|
78 | 69 | |
70 | + public function testretrieve_employee_id() |
|
71 | + { |
|
72 | + $employee = new Employee(); |
|
73 | + //$this->assertEquals('1' ,$employee->retrieve_employee_id('admin')); |
|
79 | 74 | |
80 | - public function testverify_data() |
|
81 | - { |
|
82 | - $employee = new Employee(); |
|
83 | - $this->assertEquals(true ,$employee->verify_data() ); |
|
75 | + $this->markTestSkipped('Bug in query: employee_name parameter is wrongly used as user_name'); |
|
84 | 76 | |
85 | - } |
|
77 | + } |
|
86 | 78 | |
87 | - public function testget_list_view_data(){ |
|
88 | 79 | |
89 | - $employee = new Employee(); |
|
80 | + public function testverify_data() |
|
81 | + { |
|
82 | + $employee = new Employee(); |
|
83 | + $this->assertEquals(true ,$employee->verify_data() ); |
|
90 | 84 | |
91 | - $expected = array ( |
|
92 | - 'SUGAR_LOGIN' => '1', |
|
93 | - 'FULL_NAME' => ' ', |
|
94 | - 'NAME' => ' ', |
|
95 | - 'IS_ADMIN' => '0', |
|
96 | - 'EXTERNAL_AUTH_ONLY' => '0', |
|
97 | - 'RECEIVE_NOTIFICATIONS' => '1', |
|
98 | - 'DELETED' => 0, |
|
99 | - 'PORTAL_ONLY' => '0', |
|
100 | - 'SHOW_ON_EMPLOYEES' => '1', |
|
101 | - 'ENCODED_NAME' => ' ', |
|
102 | - 'EMAIL1' => '', |
|
103 | - 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Employees\\u0026parent_id=\\u0026parent_name=+\\u0026to_addrs_ids=\\u0026to_addrs_names=\\u0026to_addrs_emails=\\u0026to_email_addrs=+%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Employees\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Employees","parent_id":"","parent_name":" ","to_addrs_ids":"","to_addrs_names":"","to_addrs_emails":"","to_email_addrs":" \\u003C\\u003E","return_module":"Employees","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
104 | - 'MESSENGER_TYPE' => '', |
|
105 | - 'REPORTS_TO_NAME' => NULL, |
|
106 | - ); |
|
85 | + } |
|
107 | 86 | |
108 | - $actual = $employee->get_list_view_data(); |
|
109 | - $this->assertSame($expected, $actual); |
|
87 | + public function testget_list_view_data(){ |
|
88 | + |
|
89 | + $employee = new Employee(); |
|
90 | + |
|
91 | + $expected = array ( |
|
92 | + 'SUGAR_LOGIN' => '1', |
|
93 | + 'FULL_NAME' => ' ', |
|
94 | + 'NAME' => ' ', |
|
95 | + 'IS_ADMIN' => '0', |
|
96 | + 'EXTERNAL_AUTH_ONLY' => '0', |
|
97 | + 'RECEIVE_NOTIFICATIONS' => '1', |
|
98 | + 'DELETED' => 0, |
|
99 | + 'PORTAL_ONLY' => '0', |
|
100 | + 'SHOW_ON_EMPLOYEES' => '1', |
|
101 | + 'ENCODED_NAME' => ' ', |
|
102 | + 'EMAIL1' => '', |
|
103 | + 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Employees\\u0026parent_id=\\u0026parent_name=+\\u0026to_addrs_ids=\\u0026to_addrs_names=\\u0026to_addrs_emails=\\u0026to_email_addrs=+%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Employees\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Employees","parent_id":"","parent_name":" ","to_addrs_ids":"","to_addrs_names":"","to_addrs_emails":"","to_email_addrs":" \\u003C\\u003E","return_module":"Employees","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
104 | + 'MESSENGER_TYPE' => '', |
|
105 | + 'REPORTS_TO_NAME' => NULL, |
|
106 | + ); |
|
107 | + |
|
108 | + $actual = $employee->get_list_view_data(); |
|
109 | + $this->assertSame($expected, $actual); |
|
110 | 110 | |
111 | - } |
|
111 | + } |
|
112 | 112 | |
113 | - public function testlist_view_parse_additional_sections(){ |
|
113 | + public function testlist_view_parse_additional_sections(){ |
|
114 | 114 | |
115 | - $employee = new Employee(); |
|
115 | + $employee = new Employee(); |
|
116 | 116 | |
117 | - //execute the method and test if it works and does not throws an exception. |
|
118 | - try { |
|
119 | - $employee->list_view_parse_additional_sections(new Sugar_Smarty(), $xTemplateSection); |
|
120 | - $this->assertTrue(true); |
|
121 | - } |
|
122 | - catch (Exception $e) { |
|
123 | - $this->fail(); |
|
124 | - } |
|
117 | + //execute the method and test if it works and does not throws an exception. |
|
118 | + try { |
|
119 | + $employee->list_view_parse_additional_sections(new Sugar_Smarty(), $xTemplateSection); |
|
120 | + $this->assertTrue(true); |
|
121 | + } |
|
122 | + catch (Exception $e) { |
|
123 | + $this->fail(); |
|
124 | + } |
|
125 | 125 | |
126 | - } |
|
126 | + } |
|
127 | 127 | |
128 | 128 | |
129 | - public function testcreate_export_query() { |
|
129 | + public function testcreate_export_query() { |
|
130 | 130 | |
131 | - $employee = new Employee(); |
|
131 | + $employee = new Employee(); |
|
132 | 132 | |
133 | - //test with empty string params |
|
134 | - $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.deleted = 0 ORDER BY users.user_name"; |
|
135 | - $actual = $employee->create_export_query('',''); |
|
136 | - $this->assertSame($expected,$actual); |
|
133 | + //test with empty string params |
|
134 | + $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.deleted = 0 ORDER BY users.user_name"; |
|
135 | + $actual = $employee->create_export_query('',''); |
|
136 | + $this->assertSame($expected,$actual); |
|
137 | 137 | |
138 | 138 | |
139 | - //test with valid string params |
|
140 | - $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.user_name=\"\" AND users.deleted = 0 ORDER BY users.id"; |
|
141 | - $actual = $employee->create_export_query('users.id','users.user_name=""'); |
|
142 | - $this->assertSame($expected,$actual); |
|
139 | + //test with valid string params |
|
140 | + $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.user_name=\"\" AND users.deleted = 0 ORDER BY users.id"; |
|
141 | + $actual = $employee->create_export_query('users.id','users.user_name=""'); |
|
142 | + $this->assertSame($expected,$actual); |
|
143 | 143 | |
144 | - } |
|
144 | + } |
|
145 | 145 | |
146 | 146 | /** |
147 | 147 | * @todo: NEEDS FIXING! |
148 | 148 | */ |
149 | - public function testcreate_new_list_query() |
|
149 | + public function testcreate_new_list_query() |
|
150 | 150 | { |
151 | 151 | /* |
152 | 152 | $employee = new Employee(); |
@@ -168,9 +168,9 @@ discard block |
||
168 | 168 | |
169 | 169 | public function testhasCustomFields() |
170 | 170 | { |
171 | - $employee = new Employee(); |
|
172 | - $result = $employee->hasCustomFields(); |
|
173 | - $this->assertEquals(false,$result); |
|
171 | + $employee = new Employee(); |
|
172 | + $result = $employee->hasCustomFields(); |
|
173 | + $this->assertEquals(false,$result); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | } |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | |
8 | 8 | //execute the contructor and check for the Object type and attributes |
9 | 9 | $employee = new Employee(); |
10 | - $this->assertInstanceOf('Employee',$employee); |
|
11 | - $this->assertInstanceOf('Person',$employee); |
|
12 | - $this->assertInstanceOf('SugarBean',$employee); |
|
10 | + $this->assertInstanceOf('Employee', $employee); |
|
11 | + $this->assertInstanceOf('Person', $employee); |
|
12 | + $this->assertInstanceOf('SugarBean', $employee); |
|
13 | 13 | |
14 | 14 | $this->assertAttributeEquals('Employees', 'module_dir', $employee); |
15 | 15 | $this->assertAttributeEquals('Employee', 'object_name', $employee); |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $employee = new Employee(); |
27 | 27 | |
28 | 28 | //test without setting name |
29 | - $this->assertEquals(' ',$employee->get_summary_text()); |
|
29 | + $this->assertEquals(' ', $employee->get_summary_text()); |
|
30 | 30 | |
31 | 31 | //test with name set |
32 | 32 | $employee->retrieve(1); |
33 | - $this->assertEquals('Administrator',$employee->get_summary_text()); |
|
33 | + $this->assertEquals('Administrator', $employee->get_summary_text()); |
|
34 | 34 | |
35 | 35 | } |
36 | 36 | |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | public function testverify_data() |
81 | 81 | { |
82 | 82 | $employee = new Employee(); |
83 | - $this->assertEquals(true ,$employee->verify_data() ); |
|
83 | + $this->assertEquals(true, $employee->verify_data()); |
|
84 | 84 | |
85 | 85 | } |
86 | 86 | |
87 | - public function testget_list_view_data(){ |
|
87 | + public function testget_list_view_data() { |
|
88 | 88 | |
89 | 89 | $employee = new Employee(); |
90 | 90 | |
91 | - $expected = array ( |
|
91 | + $expected = array( |
|
92 | 92 | 'SUGAR_LOGIN' => '1', |
93 | 93 | 'FULL_NAME' => ' ', |
94 | 94 | 'NAME' => ' ', |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | } |
112 | 112 | |
113 | - public function testlist_view_parse_additional_sections(){ |
|
113 | + public function testlist_view_parse_additional_sections() { |
|
114 | 114 | |
115 | 115 | $employee = new Employee(); |
116 | 116 | |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | |
133 | 133 | //test with empty string params |
134 | 134 | $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.deleted = 0 ORDER BY users.user_name"; |
135 | - $actual = $employee->create_export_query('',''); |
|
136 | - $this->assertSame($expected,$actual); |
|
135 | + $actual = $employee->create_export_query('', ''); |
|
136 | + $this->assertSame($expected, $actual); |
|
137 | 137 | |
138 | 138 | |
139 | 139 | //test with valid string params |
140 | 140 | $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.user_name=\"\" AND users.deleted = 0 ORDER BY users.id"; |
141 | - $actual = $employee->create_export_query('users.id','users.user_name=""'); |
|
142 | - $this->assertSame($expected,$actual); |
|
141 | + $actual = $employee->create_export_query('users.id', 'users.user_name=""'); |
|
142 | + $this->assertSame($expected, $actual); |
|
143 | 143 | |
144 | 144 | } |
145 | 145 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | { |
171 | 171 | $employee = new Employee(); |
172 | 172 | $result = $employee->hasCustomFields(); |
173 | - $this->assertEquals(false,$result); |
|
173 | + $this->assertEquals(false, $result); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | } |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | $mod_strings = array ( |
49 | 49 | 'LBL_DELETE_USER_CONFIRM' => 'When the User record is deleted, the corresponding Employee record will also be deleted. After the user is deleted, any workflow definitions and reports involving the user might need to be updated.<br/><br/> Deleting a User record cannot be undone.', |
50 | 50 | |
51 | - 'LBL_DELETE_GROUP_CONFIRM' => 'Are you sure you want to delete this Group User? Click OK to delete the User record.<br/>After clicking OK, you will be given the ability to reassign records assigned to the Group User to another user.', |
|
52 | - 'LBL_DELETE_PORTAL_CONFIRM' => 'Are you sure you want to delete this Portal API User? Click OK to delete the User record.', |
|
51 | + 'LBL_DELETE_GROUP_CONFIRM' => 'Are you sure you want to delete this Group User? Click OK to delete the User record.<br/>After clicking OK, you will be given the ability to reassign records assigned to the Group User to another user.', |
|
52 | + 'LBL_DELETE_PORTAL_CONFIRM' => 'Are you sure you want to delete this Portal API User? Click OK to delete the User record.', |
|
53 | 53 | |
54 | 54 | |
55 | 55 | 'LNK_IMPORT_USERS' => 'Import Users', |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | 'LBL_ENABLE_NOTIFICATIONS' => 'Enable Desktop Notifications', |
599 | 599 | 'LBL_LIST_NONINHERITABLE' => "Not Inheritable", |
600 | 600 | 'LBL_PRIMARY_GROUP' => "Primary Group", |
601 | - 'LBL_PASSWORD_MIS_MATCH' => 'mis-match', |
|
601 | + 'LBL_PASSWORD_MIS_MATCH' => 'mis-match', |
|
602 | 602 | ); // END STRINGS DEFS |
603 | 603 | |
604 | 604 | ?> |
@@ -311,17 +311,17 @@ discard block |
||
311 | 311 | $this->optimistic_lock = true; |
312 | 312 | } |
313 | 313 | } |
314 | - $loaded_defs[$this->object_name]['column_fields'] =& $this->column_fields; |
|
315 | - $loaded_defs[$this->object_name]['list_fields'] =& $this->list_fields; |
|
316 | - $loaded_defs[$this->object_name]['required_fields'] =& $this->required_fields; |
|
317 | - $loaded_defs[$this->object_name]['field_name_map'] =& $this->field_name_map; |
|
318 | - $loaded_defs[$this->object_name]['field_defs'] =& $this->field_defs; |
|
314 | + $loaded_defs[$this->object_name]['column_fields'] = & $this->column_fields; |
|
315 | + $loaded_defs[$this->object_name]['list_fields'] = & $this->list_fields; |
|
316 | + $loaded_defs[$this->object_name]['required_fields'] = & $this->required_fields; |
|
317 | + $loaded_defs[$this->object_name]['field_name_map'] = & $this->field_name_map; |
|
318 | + $loaded_defs[$this->object_name]['field_defs'] = & $this->field_defs; |
|
319 | 319 | } else { |
320 | - $this->column_fields =& $loaded_defs[$this->object_name]['column_fields']; |
|
321 | - $this->list_fields =& $loaded_defs[$this->object_name]['list_fields']; |
|
322 | - $this->required_fields =& $loaded_defs[$this->object_name]['required_fields']; |
|
323 | - $this->field_name_map =& $loaded_defs[$this->object_name]['field_name_map']; |
|
324 | - $this->field_defs =& $loaded_defs[$this->object_name]['field_defs']; |
|
320 | + $this->column_fields = & $loaded_defs[$this->object_name]['column_fields']; |
|
321 | + $this->list_fields = & $loaded_defs[$this->object_name]['list_fields']; |
|
322 | + $this->required_fields = & $loaded_defs[$this->object_name]['required_fields']; |
|
323 | + $this->field_name_map = & $loaded_defs[$this->object_name]['field_name_map']; |
|
324 | + $this->field_defs = & $loaded_defs[$this->object_name]['field_defs']; |
|
325 | 325 | $this->added_custom_field_defs = true; |
326 | 326 | |
327 | 327 | if (!isset($this->custom_fields) && |
@@ -343,9 +343,9 @@ discard block |
||
343 | 343 | /** |
344 | 344 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
345 | 345 | */ |
346 | - public function SugarBean(){ |
|
346 | + public function SugarBean() { |
|
347 | 347 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
348 | - if(isset($GLOBALS['log'])) { |
|
348 | + if (isset($GLOBALS['log'])) { |
|
349 | 349 | $GLOBALS['log']->deprecated($deprecatedMessage); |
350 | 350 | } |
351 | 351 | else { |
@@ -457,14 +457,14 @@ discard block |
||
457 | 457 | { |
458 | 458 | //load the module dictionary if not supplied. |
459 | 459 | if ((!isset($dictionary) or empty($dictionary)) && !empty($module_dir)) { |
460 | - $filename = 'modules/' . $module_dir . '/vardefs.php'; |
|
460 | + $filename = 'modules/'.$module_dir.'/vardefs.php'; |
|
461 | 461 | if (file_exists($filename)) { |
462 | 462 | include($filename); |
463 | 463 | } |
464 | 464 | } |
465 | 465 | if (!is_array($dictionary) or !array_key_exists($key, $dictionary)) { |
466 | - $GLOBALS['log']->fatal("removeRelationshipMeta: Metadata for table " . $tablename . " does not exist"); |
|
467 | - display_notice("meta data absent for table " . $tablename . " keyed to $key "); |
|
466 | + $GLOBALS['log']->fatal("removeRelationshipMeta: Metadata for table ".$tablename." does not exist"); |
|
467 | + display_notice("meta data absent for table ".$tablename." keyed to $key "); |
|
468 | 468 | } else { |
469 | 469 | if (isset($dictionary[$key]['relationships'])) { |
470 | 470 | $RelationshipDefs = $dictionary[$key]['relationships']; |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | //load the module dictionary if not supplied. |
496 | 496 | if (empty($dictionary) && !empty($module_dir)) { |
497 | 497 | if ($is_custom) { |
498 | - $filename = 'custom/modules/' . $module_dir . '/Ext/Vardefs/vardefs.ext.php'; |
|
498 | + $filename = 'custom/modules/'.$module_dir.'/Ext/Vardefs/vardefs.ext.php'; |
|
499 | 499 | } else { |
500 | 500 | if ($key == 'User') { |
501 | 501 | // a very special case for the Employees module |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | // Users/vardefs.php |
504 | 504 | $filename = 'modules/Users/vardefs.php'; |
505 | 505 | } else { |
506 | - $filename = 'modules/' . $module_dir . '/vardefs.php'; |
|
506 | + $filename = 'modules/'.$module_dir.'/vardefs.php'; |
|
507 | 507 | } |
508 | 508 | } |
509 | 509 | |
@@ -514,14 +514,14 @@ discard block |
||
514 | 514 | $dictionary = $GLOBALS['dictionary']; |
515 | 515 | } |
516 | 516 | } else { |
517 | - $GLOBALS['log']->debug("createRelationshipMeta: no metadata file found" . $filename); |
|
517 | + $GLOBALS['log']->debug("createRelationshipMeta: no metadata file found".$filename); |
|
518 | 518 | return; |
519 | 519 | } |
520 | 520 | } |
521 | 521 | |
522 | 522 | if (!is_array($dictionary) or !array_key_exists($key, $dictionary)) { |
523 | - $GLOBALS['log']->fatal("createRelationshipMeta: Metadata for table " . $tablename . " does not exist"); |
|
524 | - display_notice("meta data absent for table " . $tablename . " keyed to $key "); |
|
523 | + $GLOBALS['log']->fatal("createRelationshipMeta: Metadata for table ".$tablename." does not exist"); |
|
524 | + display_notice("meta data absent for table ".$tablename." keyed to $key "); |
|
525 | 525 | } else { |
526 | 526 | if (isset($dictionary[$key]['relationships'])) { |
527 | 527 | $RelationshipDefs = $dictionary[$key]['relationships']; |
@@ -530,18 +530,18 @@ discard block |
||
530 | 530 | $beanList_ucase = array_change_key_case($beanList, CASE_UPPER); |
531 | 531 | foreach ($RelationshipDefs as $rel_name => $rel_def) { |
532 | 532 | if (isset($rel_def['lhs_module']) and !isset($beanList_ucase[strtoupper($rel_def['lhs_module'])])) { |
533 | - $GLOBALS['log']->debug('skipping orphaned relationship record ' . $rel_name . ' lhs module is missing ' . $rel_def['lhs_module']); |
|
533 | + $GLOBALS['log']->debug('skipping orphaned relationship record '.$rel_name.' lhs module is missing '.$rel_def['lhs_module']); |
|
534 | 534 | continue; |
535 | 535 | } |
536 | 536 | if (isset($rel_def['rhs_module']) and !isset($beanList_ucase[strtoupper($rel_def['rhs_module'])])) { |
537 | - $GLOBALS['log']->debug('skipping orphaned relationship record ' . $rel_name . ' rhs module is missing ' . $rel_def['rhs_module']); |
|
537 | + $GLOBALS['log']->debug('skipping orphaned relationship record '.$rel_name.' rhs module is missing '.$rel_def['rhs_module']); |
|
538 | 538 | continue; |
539 | 539 | } |
540 | 540 | |
541 | 541 | |
542 | 542 | //check whether relationship exists or not first. |
543 | 543 | if (Relationship::exists($rel_name, $db)) { |
544 | - $GLOBALS['log']->debug('Skipping, relationship already exists ' . $rel_name); |
|
544 | + $GLOBALS['log']->debug('Skipping, relationship already exists '.$rel_name); |
|
545 | 545 | } else { |
546 | 546 | $seed = BeanFactory::getBean("Relationships"); |
547 | 547 | $keys = array_keys($seed->field_defs); |
@@ -559,10 +559,10 @@ discard block |
||
559 | 559 | |
560 | 560 | |
561 | 561 | $column_list = implode(",", array_keys($toInsert)); |
562 | - $value_list = "'" . implode("','", array_values($toInsert)) . "'"; |
|
562 | + $value_list = "'".implode("','", array_values($toInsert))."'"; |
|
563 | 563 | |
564 | 564 | //create the record. todo add error check. |
565 | - $insert_string = "INSERT into relationships (" . $column_list . ") values (" . $value_list . ")"; |
|
565 | + $insert_string = "INSERT into relationships (".$column_list.") values (".$value_list.")"; |
|
566 | 566 | $db->query($insert_string, true); |
567 | 567 | } |
568 | 568 | } |
@@ -638,11 +638,11 @@ discard block |
||
638 | 638 | $tmp_final_query = $parentbean->$shortcut_function_name(); |
639 | 639 | } |
640 | 640 | if (!$first) { |
641 | - $final_query_rows .= ' UNION ALL ( ' . $parentbean->create_list_count_query($tmp_final_query, $parameters) . ' )'; |
|
642 | - $final_query .= ' UNION ALL ( ' . $tmp_final_query . ' )'; |
|
641 | + $final_query_rows .= ' UNION ALL ( '.$parentbean->create_list_count_query($tmp_final_query, $parameters).' )'; |
|
642 | + $final_query .= ' UNION ALL ( '.$tmp_final_query.' )'; |
|
643 | 643 | } else { |
644 | - $final_query_rows = '(' . $parentbean->create_list_count_query($tmp_final_query, $parameters) . ')'; |
|
645 | - $final_query = '(' . $tmp_final_query . ')'; |
|
644 | + $final_query_rows = '('.$parentbean->create_list_count_query($tmp_final_query, $parameters).')'; |
|
645 | + $final_query = '('.$tmp_final_query.')'; |
|
646 | 646 | $first = false; |
647 | 647 | } |
648 | 648 | } |
@@ -673,32 +673,32 @@ discard block |
||
673 | 673 | } |
674 | 674 | $subquery['select'] = substr($subquery['select'], 0, strlen($subquery['select']) - 1); |
675 | 675 | //Put the query into the final_query |
676 | - $query = $subquery['select'] . " " . $subquery['from'] . " " . $subquery['where']; |
|
676 | + $query = $subquery['select']." ".$subquery['from']." ".$subquery['where']; |
|
677 | 677 | if (!$first) { |
678 | - $query = ' UNION ALL ( ' . $query . ' )'; |
|
678 | + $query = ' UNION ALL ( '.$query.' )'; |
|
679 | 679 | $final_query_rows .= " UNION ALL "; |
680 | 680 | } else { |
681 | - $query = '(' . $query . ')'; |
|
681 | + $query = '('.$query.')'; |
|
682 | 682 | $first = false; |
683 | 683 | } |
684 | 684 | $query_array = $subquery['query_array']; |
685 | 685 | $select_position = strpos($query_array['select'], "SELECT"); |
686 | 686 | $distinct_position = strpos($query_array['select'], "DISTINCT"); |
687 | 687 | if (!empty($subquery['params']['distinct']) && !empty($subpanel_def->table_name)) { |
688 | - $query_rows = "( SELECT count(DISTINCT " . $subpanel_def->table_name . ".id)" . $subquery['from_min'] . $query_array['join'] . $subquery['where'] . ' )'; |
|
688 | + $query_rows = "( SELECT count(DISTINCT ".$subpanel_def->table_name.".id)".$subquery['from_min'].$query_array['join'].$subquery['where'].' )'; |
|
689 | 689 | } elseif ($select_position !== false && $distinct_position != false) { |
690 | - $query_rows = "( " . substr_replace($query_array['select'], "SELECT count(", $select_position, 6) . ")" . $subquery['from_min'] . $query_array['join'] . $subquery['where'] . ' )'; |
|
690 | + $query_rows = "( ".substr_replace($query_array['select'], "SELECT count(", $select_position, 6).")".$subquery['from_min'].$query_array['join'].$subquery['where'].' )'; |
|
691 | 691 | } else { |
692 | 692 | //resort to default behavior. |
693 | - $query_rows = "( SELECT count(*)" . $subquery['from_min'] . $query_array['join'] . $subquery['where'] . ' )'; |
|
693 | + $query_rows = "( SELECT count(*)".$subquery['from_min'].$query_array['join'].$subquery['where'].' )'; |
|
694 | 694 | } |
695 | 695 | if (!empty($subquery['secondary_select'])) { |
696 | - $subquerystring = $subquery['secondary_select'] . $subquery['secondary_from'] . $query_array['join'] . $subquery['where']; |
|
696 | + $subquerystring = $subquery['secondary_select'].$subquery['secondary_from'].$query_array['join'].$subquery['where']; |
|
697 | 697 | if (!empty($subquery['secondary_where'])) { |
698 | 698 | if (empty($subquery['where'])) { |
699 | - $subquerystring .= " WHERE " . $subquery['secondary_where']; |
|
699 | + $subquerystring .= " WHERE ".$subquery['secondary_where']; |
|
700 | 700 | } else { |
701 | - $subquerystring .= " AND " . $subquery['secondary_where']; |
|
701 | + $subquerystring .= " AND ".$subquery['secondary_where']; |
|
702 | 702 | } |
703 | 703 | } |
704 | 704 | $secondary_queries[] = $subquerystring; |
@@ -721,12 +721,12 @@ discard block |
||
721 | 721 | } |
722 | 722 | |
723 | 723 | if (!empty($sort_order)) { |
724 | - $order_by .= ' ' . $sort_order; |
|
724 | + $order_by .= ' '.$sort_order; |
|
725 | 725 | } |
726 | 726 | |
727 | 727 | $order_by = $parentbean->process_order_by($order_by, $submodule, $suppress_table_name); |
728 | 728 | if (!empty($order_by)) { |
729 | - $final_query .= ' ORDER BY ' . $order_by; |
|
729 | + $final_query .= ' ORDER BY '.$order_by; |
|
730 | 730 | } |
731 | 731 | } |
732 | 732 | |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | if (empty($where_definition)) { |
795 | 795 | $where_definition = $table_where; |
796 | 796 | } else { |
797 | - $where_definition .= ' AND ' . $table_where; |
|
797 | + $where_definition .= ' AND '.$table_where; |
|
798 | 798 | } |
799 | 799 | } |
800 | 800 | |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | |
816 | 816 | |
817 | 817 | if (!$subpanel_def->isCollection() && isset($list_fields[$order_by]) && isset($submodule->field_defs[$order_by]) && (!isset($submodule->field_defs[$order_by]['source']) || $submodule->field_defs[$order_by]['source'] == 'db')) { |
818 | - $order_by = $submodule->table_name . '.' . $order_by; |
|
818 | + $order_by = $submodule->table_name.'.'.$order_by; |
|
819 | 819 | } |
820 | 820 | $table_name = $this_subpanel->table_name; |
821 | 821 | $panel_name = $this_subpanel->name; |
@@ -831,8 +831,8 @@ discard block |
||
831 | 831 | |
832 | 832 | $subquery = $submodule->create_new_list_query('', $subwhere, $list_fields, $params, 0, '', true, $parentbean, $singleSelect); |
833 | 833 | |
834 | - $subquery['select'] = $subquery['select'] . " , '$panel_name' panel_name "; |
|
835 | - $subquery['from'] = $subquery['from'] . $query_array['join']; |
|
834 | + $subquery['select'] = $subquery['select']." , '$panel_name' panel_name "; |
|
835 | + $subquery['from'] = $subquery['from'].$query_array['join']; |
|
836 | 836 | $subquery['query_array'] = $query_array; |
837 | 837 | $subquery['params'] = $params; |
838 | 838 | |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $use_count_query = false; |
871 | 871 | $processing_collection = $subpanel_def->isCollection(); |
872 | 872 | |
873 | - $GLOBALS['log']->debug("process_union_list_query: " . $query); |
|
873 | + $GLOBALS['log']->debug("process_union_list_query: ".$query); |
|
874 | 874 | if ($max_per_page == -1) { |
875 | 875 | $max_per_page = $sugar_config['list_max_entries_per_subpanel']; |
876 | 876 | } |
@@ -947,9 +947,9 @@ discard block |
||
947 | 947 | if (isset($row[$field])) { |
948 | 948 | $current_bean->$field = $this->convertField($row[$field], $value); |
949 | 949 | unset($row[$field]); |
950 | - } elseif (isset($row[$this->table_name . '.' . $field])) { |
|
951 | - $current_bean->$field = $this->convertField($row[$this->table_name . '.' . $field], $value); |
|
952 | - unset($row[$this->table_name . '.' . $field]); |
|
950 | + } elseif (isset($row[$this->table_name.'.'.$field])) { |
|
951 | + $current_bean->$field = $this->convertField($row[$this->table_name.'.'.$field], $value); |
|
952 | + unset($row[$this->table_name.'.'.$field]); |
|
953 | 953 | } else { |
954 | 954 | $current_bean->$field = ""; |
955 | 955 | unset($row[$field]); |
@@ -1116,7 +1116,7 @@ discard block |
||
1116 | 1116 | $class = $beanList[$child_info['parent_type']]; |
1117 | 1117 | // Added to avoid error below; just silently fail and write message to log |
1118 | 1118 | if (empty($beanFiles[$class])) { |
1119 | - $GLOBALS['log']->error($this->object_name . '::retrieve_parent_fields() - cannot load class "' . $class . '", skip loading.'); |
|
1119 | + $GLOBALS['log']->error($this->object_name.'::retrieve_parent_fields() - cannot load class "'.$class.'", skip loading.'); |
|
1120 | 1120 | continue; |
1121 | 1121 | } |
1122 | 1122 | require_once($beanFiles[$class]); |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | $queries[$child_info['parent_type']] = "SELECT id "; |
1128 | 1128 | $field_def = $templates[$child_info['parent_type']]->field_defs['name']; |
1129 | 1129 | if (isset($field_def['db_concat_fields'])) { |
1130 | - $queries[$child_info['parent_type']] .= ' , ' . $this->db->concat($templates[$child_info['parent_type']]->table_name, $field_def['db_concat_fields']) . ' parent_name'; |
|
1130 | + $queries[$child_info['parent_type']] .= ' , '.$this->db->concat($templates[$child_info['parent_type']]->table_name, $field_def['db_concat_fields']).' parent_name'; |
|
1131 | 1131 | } else { |
1132 | 1132 | $queries[$child_info['parent_type']] .= ' , name parent_name'; |
1133 | 1133 | } |
@@ -1137,7 +1137,7 @@ discard block |
||
1137 | 1137 | } elseif (isset($templates[$child_info['parent_type']]->field_defs['created_by'])) { |
1138 | 1138 | $queries[$child_info['parent_type']] .= ", created_by parent_name_owner, '{$child_info['parent_type']}' parent_name_mod"; |
1139 | 1139 | } |
1140 | - $queries[$child_info['parent_type']] .= " FROM " . $templates[$child_info['parent_type']]->table_name . " WHERE id IN ('{$child_info['parent_id']}'"; |
|
1140 | + $queries[$child_info['parent_type']] .= " FROM ".$templates[$child_info['parent_type']]->table_name." WHERE id IN ('{$child_info['parent_id']}'"; |
|
1141 | 1141 | } else { |
1142 | 1142 | if (empty($parent_child_map[$child_info['parent_id']])) { |
1143 | 1143 | $queries[$child_info['parent_type']] .= " ,'{$child_info['parent_id']}'"; |
@@ -1149,7 +1149,7 @@ discard block |
||
1149 | 1149 | } |
1150 | 1150 | $results = array(); |
1151 | 1151 | foreach ($queries as $query) { |
1152 | - $result = $this->db->query($query . ')'); |
|
1152 | + $result = $this->db->query($query.')'); |
|
1153 | 1153 | while ($row = $this->db->fetchByAssoc($result)) { |
1154 | 1154 | $results[$row['id']] = $row; |
1155 | 1155 | } |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | */ |
1235 | 1235 | public function get_custom_table_name() |
1236 | 1236 | { |
1237 | - return $this->getTableName() . '_cstm'; |
|
1237 | + return $this->getTableName().'_cstm'; |
|
1238 | 1238 | } |
1239 | 1239 | |
1240 | 1240 | /** |
@@ -1474,7 +1474,7 @@ discard block |
||
1474 | 1474 | */ |
1475 | 1475 | public function load_relationship($rel_name) |
1476 | 1476 | { |
1477 | - $GLOBALS['log']->debug("SugarBean[{$this->object_name}].load_relationships, Loading relationship (" . $rel_name . ")."); |
|
1477 | + $GLOBALS['log']->debug("SugarBean[{$this->object_name}].load_relationships, Loading relationship (".$rel_name.")."); |
|
1478 | 1478 | |
1479 | 1479 | if (empty($rel_name)) { |
1480 | 1480 | $GLOBALS['log']->error("SugarBean.load_relationships, Null relationship name passed."); |
@@ -1509,7 +1509,7 @@ discard block |
||
1509 | 1509 | return true; |
1510 | 1510 | } |
1511 | 1511 | } |
1512 | - $GLOBALS['log']->debug("SugarBean.load_relationships, Error Loading relationship (" . $rel_name . ")"); |
|
1512 | + $GLOBALS['log']->debug("SugarBean.load_relationships, Error Loading relationship (".$rel_name.")"); |
|
1513 | 1513 | return false; |
1514 | 1514 | } |
1515 | 1515 | |
@@ -1616,7 +1616,7 @@ discard block |
||
1616 | 1616 | $idField = $value_array['id_name']; |
1617 | 1617 | if (isset($fieldDefs[$idField]) && isset($fieldDefs[$idField]['type']) && $fieldDefs[$idField]['type'] == 'link') { |
1618 | 1618 | $tmpFieldDefs = $fieldDefs[$idField]; |
1619 | - $tmpFieldDefs['vname'] = translate($value_array['vname'], $this->module_dir) . " " . $GLOBALS['app_strings']['LBL_ID']; |
|
1619 | + $tmpFieldDefs['vname'] = translate($value_array['vname'], $this->module_dir)." ".$GLOBALS['app_strings']['LBL_ID']; |
|
1620 | 1620 | $importableFields[$idField] = $tmpFieldDefs; |
1621 | 1621 | } |
1622 | 1622 | } |
@@ -1640,8 +1640,8 @@ discard block |
||
1640 | 1640 | |
1641 | 1641 | $key = $this->getObjectName(); |
1642 | 1642 | if (!array_key_exists($key, $dictionary)) { |
1643 | - $GLOBALS['log']->fatal("create_tables: Metadata for table " . $this->table_name . " does not exist"); |
|
1644 | - display_notice("meta data absent for table " . $this->table_name . " keyed to $key "); |
|
1643 | + $GLOBALS['log']->fatal("create_tables: Metadata for table ".$this->table_name." does not exist"); |
|
1644 | + display_notice("meta data absent for table ".$this->table_name." keyed to $key "); |
|
1645 | 1645 | } else { |
1646 | 1646 | if (!$this->db->tableExists($this->table_name)) { |
1647 | 1647 | $this->db->createTable($this); |
@@ -1702,7 +1702,7 @@ discard block |
||
1702 | 1702 | */ |
1703 | 1703 | public function get_audit_table_name() |
1704 | 1704 | { |
1705 | - return $this->getTableName() . '_audit'; |
|
1705 | + return $this->getTableName().'_audit'; |
|
1706 | 1706 | } |
1707 | 1707 | |
1708 | 1708 | /** |
@@ -1720,7 +1720,7 @@ discard block |
||
1720 | 1720 | require('metadata/audit_templateMetaData.php'); |
1721 | 1721 | |
1722 | 1722 | // Bug: 52583 Need ability to customize template for audit tables |
1723 | - $custom = 'custom/metadata/audit_templateMetaData_' . $this->getTableName() . '.php'; |
|
1723 | + $custom = 'custom/metadata/audit_templateMetaData_'.$this->getTableName().'.php'; |
|
1724 | 1724 | if (file_exists($custom)) { |
1725 | 1725 | require($custom); |
1726 | 1726 | } |
@@ -1730,7 +1730,7 @@ discard block |
||
1730 | 1730 | |
1731 | 1731 | // Renaming template indexes to fit the particular audit table (removed the brittle hard coding) |
1732 | 1732 | foreach ($indices as $nr => $properties) { |
1733 | - $indices[$nr]['name'] = 'idx_' . strtolower($this->getTableName()) . '_' . $properties['name']; |
|
1733 | + $indices[$nr]['name'] = 'idx_'.strtolower($this->getTableName()).'_'.$properties['name']; |
|
1734 | 1734 | } |
1735 | 1735 | |
1736 | 1736 | $engine = null; |
@@ -1754,8 +1754,8 @@ discard block |
||
1754 | 1754 | global $dictionary; |
1755 | 1755 | $key = $this->getObjectName(); |
1756 | 1756 | if (!array_key_exists($key, $dictionary)) { |
1757 | - $GLOBALS['log']->fatal("drop_tables: Metadata for table " . $this->table_name . " does not exist"); |
|
1758 | - echo "meta data absent for table " . $this->table_name . "<br>\n"; |
|
1757 | + $GLOBALS['log']->fatal("drop_tables: Metadata for table ".$this->table_name." does not exist"); |
|
1758 | + echo "meta data absent for table ".$this->table_name."<br>\n"; |
|
1759 | 1759 | } else { |
1760 | 1760 | if (empty($this->table_name)) { |
1761 | 1761 | return; |
@@ -1763,8 +1763,8 @@ discard block |
||
1763 | 1763 | if ($this->db->tableExists($this->table_name)) { |
1764 | 1764 | $this->db->dropTable($this); |
1765 | 1765 | } |
1766 | - if ($this->db->tableExists($this->table_name . '_cstm')) { |
|
1767 | - $this->db->dropTableName($this->table_name . '_cstm'); |
|
1766 | + if ($this->db->tableExists($this->table_name.'_cstm')) { |
|
1767 | + $this->db->dropTableName($this->table_name.'_cstm'); |
|
1768 | 1768 | DynamicField::deleteCache(); |
1769 | 1769 | } |
1770 | 1770 | if ($this->db->tableExists($this->get_audit_table_name())) { |
@@ -2059,7 +2059,7 @@ discard block |
||
2059 | 2059 | break; |
2060 | 2060 | } |
2061 | 2061 | if ($reformatted) { |
2062 | - $GLOBALS['log']->deprecated('Formatting correction: ' . $this->module_dir . '->' . $field . ' had formatting automatically corrected. This will be removed in the future, please upgrade your external code'); |
|
2062 | + $GLOBALS['log']->deprecated('Formatting correction: '.$this->module_dir.'->'.$field.' had formatting automatically corrected. This will be removed in the future, please upgrade your external code'); |
|
2063 | 2063 | } |
2064 | 2064 | } |
2065 | 2065 | } |
@@ -2101,7 +2101,7 @@ discard block |
||
2101 | 2101 | $_SESSION['o_lock_object'] = $this->toArray(); |
2102 | 2102 | $saveform = "<form name='save' id='save' method='POST'>"; |
2103 | 2103 | foreach ($_POST as $key => $arg) { |
2104 | - $saveform .= "<input type='hidden' name='" . addslashes($key) . "' value='" . addslashes($arg) . "'>"; |
|
2104 | + $saveform .= "<input type='hidden' name='".addslashes($key)."' value='".addslashes($arg)."'>"; |
|
2105 | 2105 | } |
2106 | 2106 | $saveform .= "</form><script>document.getElementById('save').submit();</script>"; |
2107 | 2107 | $_SESSION['o_lock_save'] = $saveform; |
@@ -2281,7 +2281,7 @@ discard block |
||
2281 | 2281 | if ($rel_name == $new_rel_link && $this->$id != $new_rel_id) { |
2282 | 2282 | $new_rel_id = ''; |
2283 | 2283 | } |
2284 | - $GLOBALS['log']->debug('save_relationship_changes(): From relationship_field array - adding a relationship record: ' . $rel_name . ' = ' . $this->$id); |
|
2284 | + $GLOBALS['log']->debug('save_relationship_changes(): From relationship_field array - adding a relationship record: '.$rel_name.' = '.$this->$id); |
|
2285 | 2285 | //already related the new relationship id so let's set it to false so we don't add it again using the _REQUEST['relate_i'] mechanism in a later block |
2286 | 2286 | $this->load_relationship($rel_name); |
2287 | 2287 | $rel_add = $this->$rel_name->add($this->$id); |
@@ -2292,7 +2292,7 @@ discard block |
||
2292 | 2292 | } else { |
2293 | 2293 | //if before value is not empty then attempt to delete relationship |
2294 | 2294 | if (!empty($this->rel_fields_before_value[$id])) { |
2295 | - $GLOBALS['log']->debug('save_relationship_changes(): From relationship_field array - attempting to remove the relationship record, using relationship attribute' . $rel_name); |
|
2295 | + $GLOBALS['log']->debug('save_relationship_changes(): From relationship_field array - attempting to remove the relationship record, using relationship attribute'.$rel_name); |
|
2296 | 2296 | $this->load_relationship($rel_name); |
2297 | 2297 | $this->$rel_name->delete($this->id, $this->rel_fields_before_value[$id]); |
2298 | 2298 | } |
@@ -2342,7 +2342,7 @@ discard block |
||
2342 | 2342 | } else { |
2343 | 2343 | $modified_relationships['remove']['failure'][] = $linkField; |
2344 | 2344 | } |
2345 | - $GLOBALS['log']->debug("save_relationship_changes(): From field_defs - attempting to remove the relationship record returned " . var_export($success, true)); |
|
2345 | + $GLOBALS['log']->debug("save_relationship_changes(): From field_defs - attempting to remove the relationship record returned ".var_export($success, true)); |
|
2346 | 2346 | } |
2347 | 2347 | |
2348 | 2348 | if (!empty($this->$idName) && is_string($this->$idName)) { |
@@ -2357,7 +2357,7 @@ discard block |
||
2357 | 2357 | $modified_relationships['add']['failure'][] = $linkField; |
2358 | 2358 | } |
2359 | 2359 | |
2360 | - $GLOBALS['log']->debug("save_relationship_changes(): From field_defs - add a relationship record returned " . var_export($success, true)); |
|
2360 | + $GLOBALS['log']->debug("save_relationship_changes(): From field_defs - add a relationship record returned ".var_export($success, true)); |
|
2361 | 2361 | } |
2362 | 2362 | } else { |
2363 | 2363 | $GLOBALS['log']->fatal("Failed to load relationship {$linkField} while saving {$this->module_dir}"); |
@@ -2741,10 +2741,10 @@ discard block |
||
2741 | 2741 | $template_name = "Default"; |
2742 | 2742 | } |
2743 | 2743 | if (!empty($_SESSION["special_notification"]) && $_SESSION["special_notification"]) { |
2744 | - $template_name = $beanList[$this->module_dir] . 'Special'; |
|
2744 | + $template_name = $beanList[$this->module_dir].'Special'; |
|
2745 | 2745 | } |
2746 | 2746 | if ($this->special_notification) { |
2747 | - $template_name = $beanList[$this->module_dir] . 'Special'; |
|
2747 | + $template_name = $beanList[$this->module_dir].'Special'; |
|
2748 | 2748 | } |
2749 | 2749 | $xtpl->assign("ASSIGNED_USER", $this->new_assigned_user_name); |
2750 | 2750 | $xtpl->assign("ASSIGNER", $current_user->name); |
@@ -2755,17 +2755,17 @@ discard block |
||
2755 | 2755 | $parsedSiteUrl['port'] = 80; |
2756 | 2756 | } |
2757 | 2757 | |
2758 | - $port = ($parsedSiteUrl['port'] != 80) ? ":" . $parsedSiteUrl['port'] : ''; |
|
2758 | + $port = ($parsedSiteUrl['port'] != 80) ? ":".$parsedSiteUrl['port'] : ''; |
|
2759 | 2759 | $path = !empty($parsedSiteUrl['path']) ? $parsedSiteUrl['path'] : ""; |
2760 | 2760 | $cleanUrl = "{$parsedSiteUrl['scheme']}://{$host}{$port}{$path}"; |
2761 | 2761 | |
2762 | - $xtpl->assign("URL", $cleanUrl . "/index.php?module={$this->module_dir}&action=DetailView&record={$this->id}"); |
|
2762 | + $xtpl->assign("URL", $cleanUrl."/index.php?module={$this->module_dir}&action=DetailView&record={$this->id}"); |
|
2763 | 2763 | $xtpl->assign("SUGAR", "Sugar v{$sugar_version}"); |
2764 | 2764 | $xtpl->parse($template_name); |
2765 | - $xtpl->parse($template_name . "_Subject"); |
|
2765 | + $xtpl->parse($template_name."_Subject"); |
|
2766 | 2766 | |
2767 | 2767 | $notify_mail->Body = from_html(trim($xtpl->text($template_name))); |
2768 | - $notify_mail->Subject = from_html($xtpl->text($template_name . "_Subject")); |
|
2768 | + $notify_mail->Subject = from_html($xtpl->text($template_name."_Subject")); |
|
2769 | 2769 | |
2770 | 2770 | // cn: bug 8568 encode notify email in User's outbound email encoding |
2771 | 2771 | $notify_mail->prepForOutbound(); |
@@ -2857,7 +2857,7 @@ discard block |
||
2857 | 2857 | if (empty($where)) { |
2858 | 2858 | $where = $owner_where; |
2859 | 2859 | } else { |
2860 | - $where .= ' AND ' . $owner_where; |
|
2860 | + $where .= ' AND '.$owner_where; |
|
2861 | 2861 | } |
2862 | 2862 | } |
2863 | 2863 | } |
@@ -2911,7 +2911,7 @@ discard block |
||
2911 | 2911 | if (empty($where)) { |
2912 | 2912 | $where = $owner_where; |
2913 | 2913 | } else { |
2914 | - $where .= ' AND ' . $owner_where; |
|
2914 | + $where .= ' AND '.$owner_where; |
|
2915 | 2915 | } |
2916 | 2916 | } |
2917 | 2917 | /* BEGIN - SECURITY GROUPS */ |
@@ -2925,9 +2925,9 @@ discard block |
||
2925 | 2925 | $group_where = SecurityGroup::getGroupUsersWhere($current_user->id); |
2926 | 2926 | //$group_where = "user_name = 'admin'"; |
2927 | 2927 | if (empty($where)) { |
2928 | - $where = " (" . $group_where . ") "; |
|
2928 | + $where = " (".$group_where.") "; |
|
2929 | 2929 | } else { |
2930 | - $where .= " AND (" . $group_where . ") "; |
|
2930 | + $where .= " AND (".$group_where.") "; |
|
2931 | 2931 | } |
2932 | 2932 | } elseif ($this->bean_implements('ACL') && ACLController::requireSecurityGroup($this->module_dir, 'list')) { |
2933 | 2933 | require_once('modules/SecurityGroups/SecurityGroup.php'); |
@@ -2936,12 +2936,12 @@ discard block |
||
2936 | 2936 | $group_where = SecurityGroup::getGroupWhere($this->table_name, $this->module_dir, $current_user->id); |
2937 | 2937 | if (!empty($owner_where)) { |
2938 | 2938 | if (empty($where)) { |
2939 | - $where = " (" . $owner_where . " or " . $group_where . ") "; |
|
2939 | + $where = " (".$owner_where." or ".$group_where.") "; |
|
2940 | 2940 | } else { |
2941 | - $where .= " AND (" . $owner_where . " or " . $group_where . ") "; |
|
2941 | + $where .= " AND (".$owner_where." or ".$group_where.") "; |
|
2942 | 2942 | } |
2943 | 2943 | } else { |
2944 | - $where .= ' AND ' . $group_where; |
|
2944 | + $where .= ' AND '.$group_where; |
|
2945 | 2945 | } |
2946 | 2946 | } |
2947 | 2947 | /* END - SECURITY GROUPS */ |
@@ -2960,7 +2960,7 @@ discard block |
||
2960 | 2960 | $ret_array['order_by'] = ''; |
2961 | 2961 | //secondary selects are selects that need to be run after the primary query to retrieve additional info on main |
2962 | 2962 | if ($singleSelect) { |
2963 | - $ret_array['secondary_select'] =& $ret_array['select']; |
|
2963 | + $ret_array['secondary_select'] = & $ret_array['select']; |
|
2964 | 2964 | $ret_array['secondary_from'] = &$ret_array['from']; |
2965 | 2965 | } else { |
2966 | 2966 | $ret_array['secondary_select'] = ''; |
@@ -3034,7 +3034,7 @@ discard block |
||
3034 | 3034 | //alias is used to alias field names |
3035 | 3035 | $alias = ''; |
3036 | 3036 | if (isset($value['alias'])) { |
3037 | - $alias = ' as ' . $value['alias'] . ' '; |
|
3037 | + $alias = ' as '.$value['alias'].' '; |
|
3038 | 3038 | } |
3039 | 3039 | |
3040 | 3040 | if (empty($this->field_defs[$field]) || !empty($value['force_blank'])) { |
@@ -3073,29 +3073,29 @@ discard block |
||
3073 | 3073 | $selectedFields["$this->table_name.$field"] = true; |
3074 | 3074 | } elseif ((!isset($data['source']) || $data['source'] == 'custom_fields') && (!empty($alias) || !empty($filter))) { |
3075 | 3075 | //add this column only if it has NOT already been added to select statement string |
3076 | - $colPos = strpos($ret_array['select'], "$this->table_name" . "_cstm" . ".$field"); |
|
3076 | + $colPos = strpos($ret_array['select'], "$this->table_name"."_cstm".".$field"); |
|
3077 | 3077 | if (!$colPos || $colPos < 0) { |
3078 | - $ret_array['select'] .= ", $this->table_name" . "_cstm" . ".$field $alias"; |
|
3078 | + $ret_array['select'] .= ", $this->table_name"."_cstm".".$field $alias"; |
|
3079 | 3079 | } |
3080 | 3080 | |
3081 | 3081 | $selectedFields["$this->table_name.$field"] = true; |
3082 | 3082 | } |
3083 | 3083 | |
3084 | 3084 | if ($data['type'] != 'relate' && isset($data['db_concat_fields'])) { |
3085 | - $ret_array['select'] .= ", " . $this->db->concat($this->table_name, $data['db_concat_fields']) . " as $field"; |
|
3085 | + $ret_array['select'] .= ", ".$this->db->concat($this->table_name, $data['db_concat_fields'])." as $field"; |
|
3086 | 3086 | $selectedFields[$this->db->concat($this->table_name, $data['db_concat_fields'])] = true; |
3087 | 3087 | } |
3088 | 3088 | //Custom relate field or relate fields built in module builder which have no link field associated. |
3089 | 3089 | if ($data['type'] == 'relate' && (isset($data['custom_module']) || isset($data['ext2']))) { |
3090 | - $joinTableAlias = 'jt' . $jtcount; |
|
3090 | + $joinTableAlias = 'jt'.$jtcount; |
|
3091 | 3091 | $relateJoinInfo = $this->custom_fields->getRelateJoin($data, $joinTableAlias, false); |
3092 | 3092 | $ret_array['select'] .= $relateJoinInfo['select']; |
3093 | 3093 | $ret_array['from'] .= $relateJoinInfo['from']; |
3094 | 3094 | //Replace any references to the relationship in the where clause with the new alias |
3095 | 3095 | //If the link isn't set, assume that search used the local table for the field |
3096 | 3096 | $searchTable = isset($data['link']) ? $relateJoinInfo['rel_table'] : $this->table_name; |
3097 | - $field_name = $relateJoinInfo['rel_table'] . '.' . !empty($data['name']) ? $data['name'] : 'name'; |
|
3098 | - $where = preg_replace('/(^|[\s(])' . $field_name . '/', '${1}' . $relateJoinInfo['name_field'], $where); |
|
3097 | + $field_name = $relateJoinInfo['rel_table'].'.'.!empty($data['name']) ? $data['name'] : 'name'; |
|
3098 | + $where = preg_replace('/(^|[\s(])'.$field_name.'/', '${1}'.$relateJoinInfo['name_field'], $where); |
|
3099 | 3099 | $jtcount++; |
3100 | 3100 | } |
3101 | 3101 | //Parent Field |
@@ -3103,7 +3103,7 @@ discard block |
||
3103 | 3103 | //See if we need to join anything by inspecting the where clause |
3104 | 3104 | $match = preg_match('/(^|[\s(])parent_([a-zA-Z]+_?[a-zA-Z]+)_([a-zA-Z]+_?[a-zA-Z]+)\.name/', $where, $matches); |
3105 | 3105 | if ($match) { |
3106 | - $joinTableAlias = 'jt' . $jtcount; |
|
3106 | + $joinTableAlias = 'jt'.$jtcount; |
|
3107 | 3107 | $joinModule = $matches[2]; |
3108 | 3108 | $joinTable = $matches[3]; |
3109 | 3109 | $localTable = $this->table_name; |
@@ -3124,7 +3124,7 @@ discard block |
||
3124 | 3124 | $ret_array['from'] .= " LEFT JOIN $joinTable $joinTableAlias |
3125 | 3125 | ON $localTable.{$data['id_name']} = $joinTableAlias.id"; |
3126 | 3126 | //Replace any references to the relationship in the where clause with the new alias |
3127 | - $where = preg_replace('/(^|[\s(])parent_' . $joinModule . '_' . $joinTable . '\.name/', '${1}' . $nameField, $where); |
|
3127 | + $where = preg_replace('/(^|[\s(])parent_'.$joinModule.'_'.$joinTable.'\.name/', '${1}'.$nameField, $where); |
|
3128 | 3128 | $jtcount++; |
3129 | 3129 | } |
3130 | 3130 | } |
@@ -3133,7 +3133,7 @@ discard block |
||
3133 | 3133 | { |
3134 | 3134 | $linkField = $data['link']; |
3135 | 3135 | $this->load_relationship($linkField); |
3136 | - if(!empty($this->$linkField)) |
|
3136 | + if (!empty($this->$linkField)) |
|
3137 | 3137 | { |
3138 | 3138 | $params = array(); |
3139 | 3139 | if (empty($join_type)) { |
@@ -3144,12 +3144,12 @@ discard block |
||
3144 | 3144 | if (isset($data['join_name'])) { |
3145 | 3145 | $params['join_table_alias'] = $data['join_name']; |
3146 | 3146 | } else { |
3147 | - $params['join_table_alias'] = 'jt' . $jtcount; |
|
3147 | + $params['join_table_alias'] = 'jt'.$jtcount; |
|
3148 | 3148 | } |
3149 | 3149 | if (isset($data['join_link_name'])) { |
3150 | 3150 | $params['join_table_link_alias'] = $data['join_link_name']; |
3151 | 3151 | } else { |
3152 | - $params['join_table_link_alias'] = 'jtl' . $jtcount; |
|
3152 | + $params['join_table_link_alias'] = 'jtl'.$jtcount; |
|
3153 | 3153 | } |
3154 | 3154 | $join_primary = !isset($data['join_primary']) || $data['join_primary']; |
3155 | 3155 | |
@@ -3182,20 +3182,20 @@ discard block |
||
3182 | 3182 | require_once($beanFiles[$beanList[$rel_module]]); |
3183 | 3183 | $rel_mod = new $beanList[$rel_module](); |
3184 | 3184 | if (isset($rel_mod->field_defs['assigned_user_id'])) { |
3185 | - $ret_array['secondary_select'] .= " , " . $params['join_table_alias'] . ".assigned_user_id {$field}_owner, '$rel_module' {$field}_mod"; |
|
3185 | + $ret_array['secondary_select'] .= " , ".$params['join_table_alias'].".assigned_user_id {$field}_owner, '$rel_module' {$field}_mod"; |
|
3186 | 3186 | } else { |
3187 | 3187 | if (isset($rel_mod->field_defs['created_by'])) { |
3188 | - $ret_array['secondary_select'] .= " , " . $params['join_table_alias'] . ".created_by {$field}_owner , '$rel_module' {$field}_mod"; |
|
3188 | + $ret_array['secondary_select'] .= " , ".$params['join_table_alias'].".created_by {$field}_owner , '$rel_module' {$field}_mod"; |
|
3189 | 3189 | } |
3190 | 3190 | } |
3191 | 3191 | } |
3192 | 3192 | } |
3193 | 3193 | |
3194 | 3194 | if (isset($data['db_concat_fields'])) { |
3195 | - $ret_array['secondary_select'] .= ' , ' . $this->db->concat($params['join_table_alias'], $data['db_concat_fields']) . ' ' . $field; |
|
3195 | + $ret_array['secondary_select'] .= ' , '.$this->db->concat($params['join_table_alias'], $data['db_concat_fields']).' '.$field; |
|
3196 | 3196 | } else { |
3197 | 3197 | if (!isset($data['relationship_fields'])) { |
3198 | - $ret_array['secondary_select'] .= ' , ' . $params['join_table_alias'] . '.' . $data['rname'] . ' ' . $field; |
|
3198 | + $ret_array['secondary_select'] .= ' , '.$params['join_table_alias'].'.'.$data['rname'].' '.$field; |
|
3199 | 3199 | } |
3200 | 3200 | } |
3201 | 3201 | if (!$singleSelect) { |
@@ -3211,54 +3211,54 @@ discard block |
||
3211 | 3211 | //27416, the $ret_array['secondary_select'] should always generate, regardless the dbtype |
3212 | 3212 | // add rel_key only if it was not already added |
3213 | 3213 | if (!$singleSelect) { |
3214 | - $ret_array['select'] .= ", ' ' " . $join['rel_key'] . ' '; |
|
3214 | + $ret_array['select'] .= ", ' ' ".$join['rel_key'].' '; |
|
3215 | 3215 | } |
3216 | - $ret_array['secondary_select'] .= ', ' . $params['join_table_link_alias'] . '.' . $join['rel_key'] . ' ' . $join['rel_key']; |
|
3216 | + $ret_array['secondary_select'] .= ', '.$params['join_table_link_alias'].'.'.$join['rel_key'].' '.$join['rel_key']; |
|
3217 | 3217 | } |
3218 | 3218 | if (isset($data['relationship_fields'])) { |
3219 | 3219 | foreach ($data['relationship_fields'] as $r_name => $alias_name) { |
3220 | 3220 | if (!empty($secondarySelectedFields[$alias_name])) { |
3221 | 3221 | continue; |
3222 | 3222 | } |
3223 | - $ret_array['secondary_select'] .= ', ' . $params['join_table_link_alias'] . '.' . $r_name . ' ' . $alias_name; |
|
3223 | + $ret_array['secondary_select'] .= ', '.$params['join_table_link_alias'].'.'.$r_name.' '.$alias_name; |
|
3224 | 3224 | $secondarySelectedFields[$alias_name] = true; |
3225 | 3225 | } |
3226 | 3226 | } |
3227 | 3227 | if (!$table_joined) { |
3228 | - $ret_array['secondary_from'] .= ' ' . $join['join'] . ' AND ' . $params['join_table_alias'] . '.deleted=0'; |
|
3228 | + $ret_array['secondary_from'] .= ' '.$join['join'].' AND '.$params['join_table_alias'].'.deleted=0'; |
|
3229 | 3229 | if (isset($data['link_type']) && $data['link_type'] == 'relationship_info' && ($parentbean instanceof SugarBean)) { |
3230 | - $ret_array['secondary_where'] = $params['join_table_link_alias'] . '.' . $join['rel_key'] . "='" . $parentbean->id . "'"; |
|
3230 | + $ret_array['secondary_where'] = $params['join_table_link_alias'].'.'.$join['rel_key']."='".$parentbean->id."'"; |
|
3231 | 3231 | } |
3232 | 3232 | } |
3233 | 3233 | } else { |
3234 | 3234 | if (isset($data['db_concat_fields'])) { |
3235 | - $ret_array['select'] .= ' , ' . $this->db->concat($params['join_table_alias'], $data['db_concat_fields']) . ' ' . $field; |
|
3235 | + $ret_array['select'] .= ' , '.$this->db->concat($params['join_table_alias'], $data['db_concat_fields']).' '.$field; |
|
3236 | 3236 | } else { |
3237 | - $ret_array['select'] .= ' , ' . $params['join_table_alias'] . '.' . $data['rname'] . ' ' . $field; |
|
3237 | + $ret_array['select'] .= ' , '.$params['join_table_alias'].'.'.$data['rname'].' '.$field; |
|
3238 | 3238 | } |
3239 | 3239 | if (isset($data['additionalFields'])) { |
3240 | 3240 | foreach ($data['additionalFields'] as $k => $v) { |
3241 | 3241 | if (!empty($data['id_name']) && $data['id_name'] == $v && !empty($fields[$data['id_name']])) { |
3242 | 3242 | continue; |
3243 | 3243 | } |
3244 | - $ret_array['select'] .= ' , ' . $params['join_table_alias'] . '.' . $k . ' ' . $v; |
|
3244 | + $ret_array['select'] .= ' , '.$params['join_table_alias'].'.'.$k.' '.$v; |
|
3245 | 3245 | } |
3246 | 3246 | } |
3247 | 3247 | if (!$table_joined) { |
3248 | - $ret_array['from'] .= ' ' . $join['join'] . ' AND ' . $params['join_table_alias'] . '.deleted=0'; |
|
3248 | + $ret_array['from'] .= ' '.$join['join'].' AND '.$params['join_table_alias'].'.deleted=0'; |
|
3249 | 3249 | if (!empty($beanList[$rel_module]) && !empty($beanFiles[$beanList[$rel_module]])) { |
3250 | 3250 | require_once($beanFiles[$beanList[$rel_module]]); |
3251 | 3251 | $rel_mod = new $beanList[$rel_module](); |
3252 | 3252 | if (isset($value['target_record_key']) && !empty($filter)) { |
3253 | - $selectedFields[$this->table_name . '.' . $value['target_record_key']] = true; |
|
3253 | + $selectedFields[$this->table_name.'.'.$value['target_record_key']] = true; |
|
3254 | 3254 | $ret_array['select'] .= " , $this->table_name.{$value['target_record_key']} "; |
3255 | 3255 | } |
3256 | 3256 | if (isset($rel_mod->field_defs['assigned_user_id'])) { |
3257 | - $ret_array['select'] .= ' , ' . $params['join_table_alias'] . '.assigned_user_id ' . $field . '_owner'; |
|
3257 | + $ret_array['select'] .= ' , '.$params['join_table_alias'].'.assigned_user_id '.$field.'_owner'; |
|
3258 | 3258 | } else { |
3259 | - $ret_array['select'] .= ' , ' . $params['join_table_alias'] . '.created_by ' . $field . '_owner'; |
|
3259 | + $ret_array['select'] .= ' , '.$params['join_table_alias'].'.created_by '.$field.'_owner'; |
|
3260 | 3260 | } |
3261 | - $ret_array['select'] .= " , '" . $rel_module . "' " . $field . '_mod'; |
|
3261 | + $ret_array['select'] .= " , '".$rel_module."' ".$field.'_mod'; |
|
3262 | 3262 | } |
3263 | 3263 | } |
3264 | 3264 | } |
@@ -3268,37 +3268,37 @@ discard block |
||
3268 | 3268 | if (isset($data['db_concat_fields'])) { |
3269 | 3269 | $buildWhere = false; |
3270 | 3270 | if (in_array('first_name', $data['db_concat_fields']) && in_array('last_name', $data['db_concat_fields'])) { |
3271 | - $exp = '/\(\s*?' . $data['name'] . '.*?\%\'\s*?\)/'; |
|
3271 | + $exp = '/\(\s*?'.$data['name'].'.*?\%\'\s*?\)/'; |
|
3272 | 3272 | if (preg_match($exp, $where, $matches)) { |
3273 | 3273 | $search_expression = $matches[0]; |
3274 | 3274 | //Create three search conditions - first + last, first, last |
3275 | - $first_name_search = str_replace($data['name'], $params['join_table_alias'] . '.first_name', $search_expression); |
|
3276 | - $last_name_search = str_replace($data['name'], $params['join_table_alias'] . '.last_name', $search_expression); |
|
3275 | + $first_name_search = str_replace($data['name'], $params['join_table_alias'].'.first_name', $search_expression); |
|
3276 | + $last_name_search = str_replace($data['name'], $params['join_table_alias'].'.last_name', $search_expression); |
|
3277 | 3277 | $full_name_search = str_replace($data['name'], $this->db->concat($params['join_table_alias'], $data['db_concat_fields']), $search_expression); |
3278 | 3278 | $buildWhere = true; |
3279 | - $where = str_replace($search_expression, '(' . $full_name_search . ' OR ' . $first_name_search . ' OR ' . $last_name_search . ')', $where); |
|
3279 | + $where = str_replace($search_expression, '('.$full_name_search.' OR '.$first_name_search.' OR '.$last_name_search.')', $where); |
|
3280 | 3280 | } |
3281 | 3281 | } |
3282 | 3282 | |
3283 | 3283 | if (!$buildWhere) { |
3284 | 3284 | $db_field = $this->db->concat($params['join_table_alias'], $data['db_concat_fields']); |
3285 | - $where = preg_replace('/' . $data['name'] . '/', $db_field, $where); |
|
3285 | + $where = preg_replace('/'.$data['name'].'/', $db_field, $where); |
|
3286 | 3286 | |
3287 | 3287 | // For relationship fields replace their alias by the corresponding link table and r_name |
3288 | 3288 | if (isset($data['relationship_fields'])) { |
3289 | 3289 | foreach ($data['relationship_fields'] as $r_name => $alias_name) { |
3290 | 3290 | $db_field = $this->db->concat($params['join_table_link_alias'], $r_name); |
3291 | - $where = preg_replace('/' . $alias_name . '/', $db_field, $where); |
|
3291 | + $where = preg_replace('/'.$alias_name.'/', $db_field, $where); |
|
3292 | 3292 | } |
3293 | 3293 | } |
3294 | 3294 | } |
3295 | 3295 | } else { |
3296 | - $where = preg_replace('/(^|[\s(])' . $data['name'] . '/', '${1}' . $params['join_table_alias'] . '.' . $data['rname'], $where); |
|
3296 | + $where = preg_replace('/(^|[\s(])'.$data['name'].'/', '${1}'.$params['join_table_alias'].'.'.$data['rname'], $where); |
|
3297 | 3297 | |
3298 | 3298 | // For relationship fields replace their alias by the corresponding link table and r_name |
3299 | 3299 | if (isset($data['relationship_fields'])) { |
3300 | 3300 | foreach ($data['relationship_fields'] as $r_name => $alias_name) { |
3301 | - $where = preg_replace('/(^|[\s(])' . $alias_name . '/', '${1}' . $params['join_table_link_alias'] . '.' . $r_name, $where); |
|
3301 | + $where = preg_replace('/(^|[\s(])'.$alias_name.'/', '${1}'.$params['join_table_link_alias'].'.'.$r_name, $where); |
|
3302 | 3302 | } |
3303 | 3303 | } |
3304 | 3304 | } |
@@ -3312,12 +3312,12 @@ discard block |
||
3312 | 3312 | } |
3313 | 3313 | } |
3314 | 3314 | if (!empty($filter)) { |
3315 | - if (isset($this->field_defs['assigned_user_id']) && empty($selectedFields[$this->table_name . '.assigned_user_id'])) { |
|
3315 | + if (isset($this->field_defs['assigned_user_id']) && empty($selectedFields[$this->table_name.'.assigned_user_id'])) { |
|
3316 | 3316 | $ret_array['select'] .= ", $this->table_name.assigned_user_id "; |
3317 | - } elseif (isset($this->field_defs['created_by']) && empty($selectedFields[$this->table_name . '.created_by'])) { |
|
3317 | + } elseif (isset($this->field_defs['created_by']) && empty($selectedFields[$this->table_name.'.created_by'])) { |
|
3318 | 3318 | $ret_array['select'] .= ", $this->table_name.created_by "; |
3319 | 3319 | } |
3320 | - if (isset($this->field_defs['system_id']) && empty($selectedFields[$this->table_name . '.system_id'])) { |
|
3320 | + if (isset($this->field_defs['system_id']) && empty($selectedFields[$this->table_name.'.system_id'])) { |
|
3321 | 3321 | $ret_array['select'] .= ", $this->table_name.system_id "; |
3322 | 3322 | } |
3323 | 3323 | } |
@@ -3344,7 +3344,7 @@ discard block |
||
3344 | 3344 | //make call to process the order by clause |
3345 | 3345 | $order_by = $this->process_order_by($order_by); |
3346 | 3346 | if (!empty($order_by)) { |
3347 | - $ret_array['order_by'] = " ORDER BY " . $order_by; |
|
3347 | + $ret_array['order_by'] = " ORDER BY ".$order_by; |
|
3348 | 3348 | } |
3349 | 3349 | if ($singleSelect) { |
3350 | 3350 | unset($ret_array['secondary_where']); |
@@ -3356,7 +3356,7 @@ discard block |
||
3356 | 3356 | return $ret_array; |
3357 | 3357 | } |
3358 | 3358 | |
3359 | - return $ret_array['select'] . $ret_array['from'] . $ret_array['where'] . $ret_array['order_by']; |
|
3359 | + return $ret_array['select'].$ret_array['from'].$ret_array['where'].$ret_array['order_by']; |
|
3360 | 3360 | } |
3361 | 3361 | |
3362 | 3362 | public function get_relationship_field($field) |
@@ -3431,9 +3431,9 @@ discard block |
||
3431 | 3431 | |
3432 | 3432 | if (empty($field_defs['table']) && !$suppress_table_name) { |
3433 | 3433 | if ($source == 'db') { |
3434 | - $list_column[0] = $bean_queried->table_name . '.' . $list_column[0]; |
|
3434 | + $list_column[0] = $bean_queried->table_name.'.'.$list_column[0]; |
|
3435 | 3435 | } elseif ($source == 'custom_fields') { |
3436 | - $list_column[0] = $bean_queried->table_name . '_cstm.' . $list_column[0]; |
|
3436 | + $list_column[0] = $bean_queried->table_name.'_cstm.'.$list_column[0]; |
|
3437 | 3437 | } |
3438 | 3438 | } |
3439 | 3439 | |
@@ -3489,7 +3489,7 @@ discard block |
||
3489 | 3489 | * if the row_offset is set to 'end' go to the end of the list |
3490 | 3490 | */ |
3491 | 3491 | $toEnd = strval($row_offset) == 'end'; |
3492 | - $GLOBALS['log']->debug("process_list_query: " . $query); |
|
3492 | + $GLOBALS['log']->debug("process_list_query: ".$query); |
|
3493 | 3493 | if ($max_per_page == -1) { |
3494 | 3494 | $max_per_page = $sugar_config['list_max_entries_per_page']; |
3495 | 3495 | } |
@@ -3548,14 +3548,14 @@ discard block |
||
3548 | 3548 | foreach ($this->field_defs as $field => $value) { |
3549 | 3549 | if (isset($row[$field])) { |
3550 | 3550 | $temp->$field = $row[$field]; |
3551 | - $owner_field = $field . '_owner'; |
|
3551 | + $owner_field = $field.'_owner'; |
|
3552 | 3552 | if (isset($row[$owner_field])) { |
3553 | 3553 | $temp->$owner_field = $row[$owner_field]; |
3554 | 3554 | } |
3555 | 3555 | |
3556 | - $GLOBALS['log']->debug("$temp->object_name({$row['id']}): " . $field . " = " . $temp->$field); |
|
3557 | - } elseif (isset($row[$this->table_name . '.' . $field])) { |
|
3558 | - $temp->$field = $row[$this->table_name . '.' . $field]; |
|
3556 | + $GLOBALS['log']->debug("$temp->object_name({$row['id']}): ".$field." = ".$temp->$field); |
|
3557 | + } elseif (isset($row[$this->table_name.'.'.$field])) { |
|
3558 | + $temp->$field = $row[$this->table_name.'.'.$field]; |
|
3559 | 3559 | } else { |
3560 | 3560 | $temp->$field = ""; |
3561 | 3561 | } |
@@ -3608,22 +3608,22 @@ discard block |
||
3608 | 3608 | public function create_list_count_query($query) |
3609 | 3609 | { |
3610 | 3610 | // remove the 'order by' clause which is expected to be at the end of the query |
3611 | - $pattern = '/\sORDER BY.*/is'; // ignores the case |
|
3611 | + $pattern = '/\sORDER BY.*/is'; // ignores the case |
|
3612 | 3612 | $replacement = ''; |
3613 | 3613 | $query = preg_replace($pattern, $replacement, $query); |
3614 | 3614 | //handle distinct clause |
3615 | 3615 | $star = '*'; |
3616 | 3616 | if (substr_count(strtolower($query), 'distinct')) { |
3617 | 3617 | if (!empty($this->seed) && !empty($this->seed->table_name)) { |
3618 | - $star = 'DISTINCT ' . $this->seed->table_name . '.id'; |
|
3618 | + $star = 'DISTINCT '.$this->seed->table_name.'.id'; |
|
3619 | 3619 | } else { |
3620 | - $star = 'DISTINCT ' . $this->table_name . '.id'; |
|
3620 | + $star = 'DISTINCT '.$this->table_name.'.id'; |
|
3621 | 3621 | } |
3622 | 3622 | } |
3623 | 3623 | |
3624 | 3624 | // change the select expression to 'count(*)' |
3625 | - $pattern = '/SELECT(.*?)(\s){1}FROM(\s){1}/is'; // ignores the case |
|
3626 | - $replacement = 'SELECT count(' . $star . ') c FROM '; |
|
3625 | + $pattern = '/SELECT(.*?)(\s){1}FROM(\s){1}/is'; // ignores the case |
|
3626 | + $replacement = 'SELECT count('.$star.') c FROM '; |
|
3627 | 3627 | |
3628 | 3628 | //if the passed query has union clause then replace all instances of the pattern. |
3629 | 3629 | //this is very rare. I have seen this happening only from projects module. |
@@ -3639,13 +3639,13 @@ discard block |
||
3639 | 3639 | if (!empty($matches)) { |
3640 | 3640 | if (stristr($matches[0], "distinct")) { |
3641 | 3641 | if (!empty($this->seed) && !empty($this->seed->table_name)) { |
3642 | - $star = 'DISTINCT ' . $this->seed->table_name . '.id'; |
|
3642 | + $star = 'DISTINCT '.$this->seed->table_name.'.id'; |
|
3643 | 3643 | } else { |
3644 | - $star = 'DISTINCT ' . $this->table_name . '.id'; |
|
3644 | + $star = 'DISTINCT '.$this->table_name.'.id'; |
|
3645 | 3645 | } |
3646 | 3646 | } |
3647 | 3647 | } // if |
3648 | - $replacement = 'SELECT count(' . $star . ') c FROM '; |
|
3648 | + $replacement = 'SELECT count('.$star.') c FROM '; |
|
3649 | 3649 | $union_qs[$key] = preg_replace($pattern, $replacement, $union_query, 1); |
3650 | 3650 | } |
3651 | 3651 | $modified_select_query = implode(" UNION ALL ", $union_qs); |
@@ -3711,7 +3711,7 @@ discard block |
||
3711 | 3711 | if (empty($where)) { |
3712 | 3712 | $where = $owner_where; |
3713 | 3713 | } else { |
3714 | - $where .= ' AND ' . $owner_where; |
|
3714 | + $where .= ' AND '.$owner_where; |
|
3715 | 3715 | } |
3716 | 3716 | } |
3717 | 3717 | |
@@ -3723,12 +3723,12 @@ discard block |
||
3723 | 3723 | $group_where = SecurityGroup::getGroupWhere($this->table_name, $this->module_dir, $current_user->id); |
3724 | 3724 | if (!empty($owner_where)) { |
3725 | 3725 | if (empty($where)) { |
3726 | - $where = " (" . $owner_where . " or " . $group_where . ") "; |
|
3726 | + $where = " (".$owner_where." or ".$group_where.") "; |
|
3727 | 3727 | } else { |
3728 | - $where .= " AND (" . $owner_where . " or " . $group_where . ") "; |
|
3728 | + $where .= " AND (".$owner_where." or ".$group_where.") "; |
|
3729 | 3729 | } |
3730 | 3730 | } else { |
3731 | - $where .= ' AND ' . $group_where; |
|
3731 | + $where .= ' AND '.$group_where; |
|
3732 | 3732 | } |
3733 | 3733 | } |
3734 | 3734 | /* END - SECURITY GROUPS */ |
@@ -3757,7 +3757,7 @@ discard block |
||
3757 | 3757 | public function process_detail_query($query, $row_offset, $limit = -1, $max_per_page = -1, $where = '', $offset = 0) |
3758 | 3758 | { |
3759 | 3759 | global $sugar_config; |
3760 | - $GLOBALS['log']->debug("process_detail_query: " . $query); |
|
3760 | + $GLOBALS['log']->debug("process_detail_query: ".$query); |
|
3761 | 3761 | if ($max_per_page == -1) { |
3762 | 3762 | $max_per_page = $sugar_config['list_max_entries_per_page']; |
3763 | 3763 | } |
@@ -3823,14 +3823,14 @@ discard block |
||
3823 | 3823 | } |
3824 | 3824 | $custom_join = $this->getCustomJoin(); |
3825 | 3825 | |
3826 | - $query = "SELECT $this->table_name.*" . $custom_join['select'] . " FROM $this->table_name "; |
|
3826 | + $query = "SELECT $this->table_name.*".$custom_join['select']." FROM $this->table_name "; |
|
3827 | 3827 | |
3828 | 3828 | $query .= $custom_join['join']; |
3829 | - $query .= " WHERE $this->table_name.id = " . $this->db->quoted($id); |
|
3829 | + $query .= " WHERE $this->table_name.id = ".$this->db->quoted($id); |
|
3830 | 3830 | if ($deleted) { |
3831 | 3831 | $query .= " AND $this->table_name.deleted=0"; |
3832 | 3832 | } |
3833 | - $GLOBALS['log']->debug("Retrieve $this->object_name : " . $query); |
|
3833 | + $GLOBALS['log']->debug("Retrieve $this->object_name : ".$query); |
|
3834 | 3834 | $result = $this->db->limitQuery($query, 0, 1, true, "Retrieving record by id $this->table_name:$id found "); |
3835 | 3835 | if (empty($result)) { |
3836 | 3836 | return null; |
@@ -3981,7 +3981,7 @@ discard block |
||
3981 | 3981 | } |
3982 | 3982 | if (isset($row[$field])) { |
3983 | 3983 | $this->$field = $row[$field]; |
3984 | - $owner = $field . '_owner'; |
|
3984 | + $owner = $field.'_owner'; |
|
3985 | 3985 | if (!empty($row[$owner])) { |
3986 | 3986 | $this->$owner = $row[$owner]; |
3987 | 3987 | } |
@@ -4178,12 +4178,12 @@ discard block |
||
4178 | 4178 | $query = 'SELECT id'; |
4179 | 4179 | foreach ($fields as $field => $alias) { |
4180 | 4180 | if (!empty($GLOBALS['dictionary'][$object]['fields'][$field]['db_concat_fields'])) { |
4181 | - $query .= ' ,' . $this->db->concat($table, $GLOBALS['dictionary'][$object]['fields'][$field]['db_concat_fields']) . ' as ' . $alias; |
|
4181 | + $query .= ' ,'.$this->db->concat($table, $GLOBALS['dictionary'][$object]['fields'][$field]['db_concat_fields']).' as '.$alias; |
|
4182 | 4182 | } elseif (!empty($GLOBALS['dictionary'][$object]['fields'][$field]) && |
4183 | 4183 | (empty($GLOBALS['dictionary'][$object]['fields'][$field]['source']) || |
4184 | 4184 | $GLOBALS['dictionary'][$object]['fields'][$field]['source'] != "non-db") |
4185 | 4185 | ) { |
4186 | - $query .= ' ,' . $table . '.' . $field . ' as ' . $alias; |
|
4186 | + $query .= ' ,'.$table.'.'.$field.' as '.$alias; |
|
4187 | 4187 | } |
4188 | 4188 | if (!$return_array) { |
4189 | 4189 | $this->$alias = ''; |
@@ -4195,12 +4195,12 @@ discard block |
||
4195 | 4195 | |
4196 | 4196 | |
4197 | 4197 | if (isset($GLOBALS['dictionary'][$object]['fields']['assigned_user_id'])) { |
4198 | - $query .= " , " . $table . ".assigned_user_id owner"; |
|
4198 | + $query .= " , ".$table.".assigned_user_id owner"; |
|
4199 | 4199 | } elseif (isset($GLOBALS['dictionary'][$object]['fields']['created_by'])) { |
4200 | - $query .= " , " . $table . ".created_by owner"; |
|
4200 | + $query .= " , ".$table.".created_by owner"; |
|
4201 | 4201 | } |
4202 | - $query .= ' FROM ' . $table . ' WHERE deleted=0 AND id='; |
|
4203 | - $result = $GLOBALS['db']->query($query . "'$id'"); |
|
4202 | + $query .= ' FROM '.$table.' WHERE deleted=0 AND id='; |
|
4203 | + $result = $GLOBALS['db']->query($query."'$id'"); |
|
4204 | 4204 | $row = $GLOBALS['db']->fetchByAssoc($result); |
4205 | 4205 | if ($return_array) { |
4206 | 4206 | return $row; |
@@ -4208,9 +4208,9 @@ discard block |
||
4208 | 4208 | $owner = (empty($row['owner'])) ? '' : $row['owner']; |
4209 | 4209 | foreach ($fields as $alias) { |
4210 | 4210 | $this->$alias = (!empty($row[$alias])) ? $row[$alias] : ''; |
4211 | - $alias = $alias . '_owner'; |
|
4211 | + $alias = $alias.'_owner'; |
|
4212 | 4212 | $this->$alias = $owner; |
4213 | - $a_mod = $alias . '_mod'; |
|
4213 | + $a_mod = $alias.'_mod'; |
|
4214 | 4214 | $this->$a_mod = $module; |
4215 | 4215 | } |
4216 | 4216 | } |
@@ -4370,15 +4370,15 @@ discard block |
||
4370 | 4370 | $entire_where = $query_array['where']; |
4371 | 4371 | if (!empty($where)) { |
4372 | 4372 | if (empty($entire_where)) { |
4373 | - $entire_where = ' WHERE ' . $where; |
|
4373 | + $entire_where = ' WHERE '.$where; |
|
4374 | 4374 | } else { |
4375 | - $entire_where .= ' AND ' . $where; |
|
4375 | + $entire_where .= ' AND '.$where; |
|
4376 | 4376 | } |
4377 | 4377 | } |
4378 | 4378 | |
4379 | - $query = 'SELECT ' . $child_seed->table_name . '.* ' . $query_array['from'] . ' ' . $entire_where; |
|
4379 | + $query = 'SELECT '.$child_seed->table_name.'.* '.$query_array['from'].' '.$entire_where; |
|
4380 | 4380 | if (!empty($order_by)) { |
4381 | - $query .= " ORDER BY " . $order_by; |
|
4381 | + $query .= " ORDER BY ".$order_by; |
|
4382 | 4382 | } |
4383 | 4383 | |
4384 | 4384 | return $child_seed->process_list_query($query, $row_offset, $limit, $max, $where); |
@@ -4414,9 +4414,9 @@ discard block |
||
4414 | 4414 | */ |
4415 | 4415 | public function process_full_list_query($query, $check_date = false) |
4416 | 4416 | { |
4417 | - $GLOBALS['log']->debug("process_full_list_query: query is " . $query); |
|
4417 | + $GLOBALS['log']->debug("process_full_list_query: query is ".$query); |
|
4418 | 4418 | $result = $this->db->query($query, false); |
4419 | - $GLOBALS['log']->debug("process_full_list_query: result is " . print_r($result, true)); |
|
4419 | + $GLOBALS['log']->debug("process_full_list_query: result is ".print_r($result, true)); |
|
4420 | 4420 | $class = get_class($this); |
4421 | 4421 | $isFirstTime = true; |
4422 | 4422 | $bean = new $class(); |
@@ -4432,7 +4432,7 @@ discard block |
||
4432 | 4432 | foreach ($bean->field_defs as $field => $value) { |
4433 | 4433 | if (isset($row[$field])) { |
4434 | 4434 | $bean->$field = $row[$field]; |
4435 | - $GLOBALS['log']->debug("process_full_list: $bean->object_name({$row['id']}): " . $field . " = " . $bean->$field); |
|
4435 | + $GLOBALS['log']->debug("process_full_list: $bean->object_name({$row['id']}): ".$field." = ".$bean->$field); |
|
4436 | 4436 | } else { |
4437 | 4437 | $bean->$field = ''; |
4438 | 4438 | } |
@@ -4524,7 +4524,7 @@ discard block |
||
4524 | 4524 | $this->call_custom_logic("before_restore", $custom_logic_arguments); |
4525 | 4525 | |
4526 | 4526 | $date_modified = $GLOBALS['timedate']->nowDb(); |
4527 | - $query = "UPDATE $this->table_name set deleted=0 , date_modified = '$date_modified' where id='" . $this->db->quote($id) . "'"; |
|
4527 | + $query = "UPDATE $this->table_name set deleted=0 , date_modified = '$date_modified' where id='".$this->db->quote($id)."'"; |
|
4528 | 4528 | $this->db->query($query, true, "Error marking record undeleted: "); |
4529 | 4529 | |
4530 | 4530 | $this->restoreFiles(); |
@@ -4554,9 +4554,9 @@ discard block |
||
4554 | 4554 | $directory = $this->deleteFileDirectory(); |
4555 | 4555 | |
4556 | 4556 | foreach ($files as $file) { |
4557 | - if (sugar_is_file('upload://deleted/' . $directory . '/' . $file)) { |
|
4558 | - if (!sugar_rename('upload://deleted/' . $directory . '/' . $file, 'upload://' . $file)) { |
|
4559 | - $GLOBALS['log']->error('Could not move file ' . $directory . '/' . $file . ' from deleted directory'); |
|
4557 | + if (sugar_is_file('upload://deleted/'.$directory.'/'.$file)) { |
|
4558 | + if (!sugar_rename('upload://deleted/'.$directory.'/'.$file, 'upload://'.$file)) { |
|
4559 | + $GLOBALS['log']->error('Could not move file '.$directory.'/'.$file.' from deleted directory'); |
|
4560 | 4560 | } |
4561 | 4561 | } |
4562 | 4562 | } |
@@ -4565,7 +4565,7 @@ discard block |
||
4565 | 4565 | * @var DBManager $db |
4566 | 4566 | */ |
4567 | 4567 | global $db; |
4568 | - $db->query('DELETE FROM cron_remove_documents WHERE bean_id=' . $db->quoted($this->id)); |
|
4568 | + $db->query('DELETE FROM cron_remove_documents WHERE bean_id='.$db->quoted($this->id)); |
|
4569 | 4569 | |
4570 | 4570 | return true; |
4571 | 4571 | } |
@@ -4713,19 +4713,19 @@ discard block |
||
4713 | 4713 | |
4714 | 4714 | $directory = $this->deleteFileDirectory(); |
4715 | 4715 | |
4716 | - $isCreated = sugar_is_dir('upload://deleted/' . $directory); |
|
4716 | + $isCreated = sugar_is_dir('upload://deleted/'.$directory); |
|
4717 | 4717 | if (!$isCreated) { |
4718 | - sugar_mkdir('upload://deleted/' . $directory, 0777, true); |
|
4719 | - $isCreated = sugar_is_dir('upload://deleted/' . $directory); |
|
4718 | + sugar_mkdir('upload://deleted/'.$directory, 0777, true); |
|
4719 | + $isCreated = sugar_is_dir('upload://deleted/'.$directory); |
|
4720 | 4720 | } |
4721 | 4721 | if (!$isCreated) { |
4722 | 4722 | return false; |
4723 | 4723 | } |
4724 | 4724 | |
4725 | 4725 | foreach ($files as $file) { |
4726 | - if (file_exists('upload://' . $file)) { |
|
4727 | - if (!sugar_rename('upload://' . $file, 'upload://deleted/' . $directory . '/' . $file)) { |
|
4728 | - $GLOBALS['log']->error('Could not move file ' . $file . ' to deleted directory'); |
|
4726 | + if (file_exists('upload://'.$file)) { |
|
4727 | + if (!sugar_rename('upload://'.$file, 'upload://deleted/'.$directory.'/'.$file)) { |
|
4728 | + $GLOBALS['log']->error('Could not move file '.$file.' to deleted directory'); |
|
4729 | 4729 | } |
4730 | 4730 | } |
4731 | 4731 | } |
@@ -4745,7 +4745,7 @@ discard block |
||
4745 | 4745 | } |
4746 | 4746 | if (empty($record['id'])) { |
4747 | 4747 | $record['id'] = $db->quoted(create_guid()); |
4748 | - $db->query('INSERT INTO cron_remove_documents (' . implode(', ', array_keys($record)) . ') VALUES(' . implode(', ', $record) . ')'); |
|
4748 | + $db->query('INSERT INTO cron_remove_documents ('.implode(', ', array_keys($record)).') VALUES('.implode(', ', $record).')'); |
|
4749 | 4749 | } else { |
4750 | 4750 | $db->query("UPDATE cron_remove_documents SET date_modified={$record['date_modified']} WHERE id={$record['id']}"); |
4751 | 4751 | } |
@@ -4766,7 +4766,7 @@ discard block |
||
4766 | 4766 | */ |
4767 | 4767 | public function build_related_list($query, &$template, $row_offset = 0, $limit = -1) |
4768 | 4768 | { |
4769 | - $GLOBALS['log']->debug("Finding linked records $this->object_name: " . $query); |
|
4769 | + $GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query); |
|
4770 | 4770 | $db = DBManagerFactory::getInstance('listviews'); |
4771 | 4771 | |
4772 | 4772 | if (!empty($row_offset) && $row_offset != 0 && !empty($limit) && $limit != -1) { |
@@ -4813,7 +4813,7 @@ discard block |
||
4813 | 4813 | { |
4814 | 4814 | $db = DBManagerFactory::getInstance('listviews'); |
4815 | 4815 | // No need to do an additional query |
4816 | - $GLOBALS['log']->debug("Finding linked records $this->object_name: " . $query); |
|
4816 | + $GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query); |
|
4817 | 4817 | if (empty($in) && !empty($query)) { |
4818 | 4818 | $idList = $this->build_related_in($query); |
4819 | 4819 | $in = $idList['in']; |
@@ -4879,9 +4879,9 @@ discard block |
||
4879 | 4879 | while ($row = $this->db->fetchByAssoc($result)) { |
4880 | 4880 | $idList[] = $row['id']; |
4881 | 4881 | if (empty($ids)) { |
4882 | - $ids = "('" . $row['id'] . "'"; |
|
4882 | + $ids = "('".$row['id']."'"; |
|
4883 | 4883 | } else { |
4884 | - $ids .= ",'" . $row['id'] . "'"; |
|
4884 | + $ids .= ",'".$row['id']."'"; |
|
4885 | 4885 | } |
4886 | 4886 | } |
4887 | 4887 | if (empty($ids)) { |
@@ -4905,7 +4905,7 @@ discard block |
||
4905 | 4905 | */ |
4906 | 4906 | public function build_related_list2($query, &$template, &$field_list) |
4907 | 4907 | { |
4908 | - $GLOBALS['log']->debug("Finding linked values $this->object_name: " . $query); |
|
4908 | + $GLOBALS['log']->debug("Finding linked values $this->object_name: ".$query); |
|
4909 | 4909 | |
4910 | 4910 | $result = $this->db->query($query, true); |
4911 | 4911 | |
@@ -5019,9 +5019,9 @@ discard block |
||
5019 | 5019 | { |
5020 | 5020 | $where_clause = $this->get_where($fields_array, $deleted); |
5021 | 5021 | $custom_join = $this->getCustomJoin(); |
5022 | - $query = "SELECT $this->table_name.*" . $custom_join['select'] . " FROM $this->table_name " . $custom_join['join']; |
|
5022 | + $query = "SELECT $this->table_name.*".$custom_join['select']." FROM $this->table_name ".$custom_join['join']; |
|
5023 | 5023 | $query .= " $where_clause"; |
5024 | - $GLOBALS['log']->debug("Retrieve $this->object_name: " . $query); |
|
5024 | + $GLOBALS['log']->debug("Retrieve $this->object_name: ".$query); |
|
5025 | 5025 | //requireSingleResult has been deprecated. |
5026 | 5026 | //$result = $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); |
5027 | 5027 | $result = $this->db->limitQuery($query, 0, 1, true, "Retrieving record $where_clause:"); |
@@ -5060,7 +5060,7 @@ discard block |
||
5060 | 5060 | } |
5061 | 5061 | $name = $this->db->getValidDBName($name); |
5062 | 5062 | |
5063 | - $where_clause .= "$name = " . $this->db->quoted($value); |
|
5063 | + $where_clause .= "$name = ".$this->db->quoted($value); |
|
5064 | 5064 | } |
5065 | 5065 | if (!empty($where_clause)) { |
5066 | 5066 | if ($deleted) { |
@@ -5158,7 +5158,7 @@ discard block |
||
5158 | 5158 | $where = ''; |
5159 | 5159 | |
5160 | 5160 | // make sure there is a date modified |
5161 | - $date_modified = $this->db->convert("'" . $GLOBALS['timedate']->nowDb() . "'", 'datetime'); |
|
5161 | + $date_modified = $this->db->convert("'".$GLOBALS['timedate']->nowDb()."'", 'datetime'); |
|
5162 | 5162 | |
5163 | 5163 | $row = null; |
5164 | 5164 | if ($check_duplicates) { |
@@ -5168,7 +5168,7 @@ discard block |
||
5168 | 5168 | $where .= " AND $name = '$value' "; |
5169 | 5169 | } |
5170 | 5170 | $query .= $where; |
5171 | - $result = $this->db->query($query, false, "Looking For Duplicate Relationship:" . $query); |
|
5171 | + $result = $this->db->query($query, false, "Looking For Duplicate Relationship:".$query); |
|
5172 | 5172 | $row = $this->db->fetchByAssoc($result); |
5173 | 5173 | } |
5174 | 5174 | |
@@ -5177,16 +5177,16 @@ discard block |
||
5177 | 5177 | if (isset($data_values)) { |
5178 | 5178 | $relate_values = array_merge($relate_values, $data_values); |
5179 | 5179 | } |
5180 | - $query = "INSERT INTO $table (id, " . implode(',', array_keys($relate_values)) . ", date_modified) VALUES ('" . create_guid() . "', " . "'" . implode("', '", $relate_values) . "', " . $date_modified . ")"; |
|
5180 | + $query = "INSERT INTO $table (id, ".implode(',', array_keys($relate_values)).", date_modified) VALUES ('".create_guid()."', "."'".implode("', '", $relate_values)."', ".$date_modified.")"; |
|
5181 | 5181 | |
5182 | - $this->db->query($query, false, "Creating Relationship:" . $query); |
|
5182 | + $this->db->query($query, false, "Creating Relationship:".$query); |
|
5183 | 5183 | } elseif ($do_update) { |
5184 | 5184 | $conds = array(); |
5185 | 5185 | foreach ($data_values as $key => $value) { |
5186 | - array_push($conds, $key . "='" . $this->db->quote($value) . "'"); |
|
5186 | + array_push($conds, $key."='".$this->db->quote($value)."'"); |
|
5187 | 5187 | } |
5188 | - $query = "UPDATE $table SET " . implode(',', $conds) . ",date_modified=" . $date_modified . " " . $where; |
|
5189 | - $this->db->query($query, false, "Updating Relationship:" . $query); |
|
5188 | + $query = "UPDATE $table SET ".implode(',', $conds).",date_modified=".$date_modified." ".$where; |
|
5189 | + $this->db->query($query, false, "Updating Relationship:".$query); |
|
5190 | 5190 | } |
5191 | 5191 | } |
5192 | 5192 | |
@@ -5197,7 +5197,7 @@ discard block |
||
5197 | 5197 | $query .= " AND $name = '$value' "; |
5198 | 5198 | } |
5199 | 5199 | $query .= " ORDER BY $select_id "; |
5200 | - $result = $this->db->query($query, false, "Retrieving Relationship:" . $query); |
|
5200 | + $result = $this->db->query($query, false, "Retrieving Relationship:".$query); |
|
5201 | 5201 | $ids = array(); |
5202 | 5202 | while ($row = $this->db->fetchByAssoc($result)) { |
5203 | 5203 | $ids[] = $row; |
@@ -5208,13 +5208,13 @@ discard block |
||
5208 | 5208 | public function loadLayoutDefs() |
5209 | 5209 | { |
5210 | 5210 | global $layout_defs; |
5211 | - if (empty($this->layout_def) && file_exists('modules/' . $this->module_dir . '/layout_defs.php')) { |
|
5212 | - include_once('modules/' . $this->module_dir . '/layout_defs.php'); |
|
5213 | - if (file_exists('custom/modules/' . $this->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php')) { |
|
5214 | - include_once('custom/modules/' . $this->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php'); |
|
5211 | + if (empty($this->layout_def) && file_exists('modules/'.$this->module_dir.'/layout_defs.php')) { |
|
5212 | + include_once('modules/'.$this->module_dir.'/layout_defs.php'); |
|
5213 | + if (file_exists('custom/modules/'.$this->module_dir.'/Ext/Layoutdefs/layoutdefs.ext.php')) { |
|
5214 | + include_once('custom/modules/'.$this->module_dir.'/Ext/Layoutdefs/layoutdefs.ext.php'); |
|
5215 | 5215 | } |
5216 | 5216 | if (empty($layout_defs[get_class($this)])) { |
5217 | - echo "\$layout_defs[" . get_class($this) . "]; does not exist"; |
|
5217 | + echo "\$layout_defs[".get_class($this)."]; does not exist"; |
|
5218 | 5218 | } |
5219 | 5219 | |
5220 | 5220 | $this->layout_def = $layout_defs[get_class($this)]; |
@@ -5440,8 +5440,8 @@ discard block |
||
5440 | 5440 | $tmp = explode(",", $order_by); |
5441 | 5441 | $comma = ' '; |
5442 | 5442 | foreach ($tmp as $stmp) { |
5443 | - $stmp = (substr_count($stmp, ".") > 0 ? trim($stmp) : "$qualify." . trim($stmp)); |
|
5444 | - $order_by_clause .= $comma . $stmp; |
|
5443 | + $stmp = (substr_count($stmp, ".") > 0 ? trim($stmp) : "$qualify.".trim($stmp)); |
|
5444 | + $order_by_clause .= $comma.$stmp; |
|
5445 | 5445 | $comma = ", "; |
5446 | 5446 | } |
5447 | 5447 | return $order_by_clause; |
@@ -5457,19 +5457,19 @@ discard block |
||
5457 | 5457 | $street_field |
5458 | 5458 | ) { |
5459 | 5459 | if (isset($this->$street_field)) { |
5460 | - $street_field_2 = $street_field . '_2'; |
|
5461 | - $street_field_3 = $street_field . '_3'; |
|
5462 | - $street_field_4 = $street_field . '_4'; |
|
5460 | + $street_field_2 = $street_field.'_2'; |
|
5461 | + $street_field_3 = $street_field.'_3'; |
|
5462 | + $street_field_4 = $street_field.'_4'; |
|
5463 | 5463 | if (isset($this->$street_field_2)) { |
5464 | - $this->$street_field .= "\n" . $this->$street_field_2; |
|
5464 | + $this->$street_field .= "\n".$this->$street_field_2; |
|
5465 | 5465 | unset($this->$street_field_2); |
5466 | 5466 | } |
5467 | 5467 | if (isset($this->$street_field_3)) { |
5468 | - $this->$street_field .= "\n" . $this->$street_field_3; |
|
5468 | + $this->$street_field .= "\n".$this->$street_field_3; |
|
5469 | 5469 | unset($this->$street_field_3); |
5470 | 5470 | } |
5471 | 5471 | if (isset($this->$street_field_4)) { |
5472 | - $this->$street_field .= "\n" . $this->$street_field_4; |
|
5472 | + $this->$street_field .= "\n".$this->$street_field_4; |
|
5473 | 5473 | unset($this->$street_field_4); |
5474 | 5474 | } |
5475 | 5475 | $this->$street_field = trim($this->$street_field, "\n"); |
@@ -43,40 +43,40 @@ discard block |
||
43 | 43 | * *******************************************************************************/ |
44 | 44 | |
45 | 45 | $mod_strings = array( |
46 | - 'LBL_BASIC_SEARCH' => 'Basic Search', |
|
47 | - 'LBL_ADVANCED_SEARCH' => 'Advanced Search', |
|
48 | - 'LBL_BASIC_TYPE' => 'Basic Type', |
|
49 | - 'LBL_ADVANCED_TYPE' => 'Advanced Type', |
|
50 | - 'LBL_SYSOPTS_1' => 'Select from the following system configuration options below.', |
|
46 | + 'LBL_BASIC_SEARCH' => 'Basic Search', |
|
47 | + 'LBL_ADVANCED_SEARCH' => 'Advanced Search', |
|
48 | + 'LBL_BASIC_TYPE' => 'Basic Type', |
|
49 | + 'LBL_ADVANCED_TYPE' => 'Advanced Type', |
|
50 | + 'LBL_SYSOPTS_1' => 'Select from the following system configuration options below.', |
|
51 | 51 | 'LBL_SYSOPTS_2' => 'What type of database will be used for the SuiteCRM instance you are about to install?', |
52 | - 'LBL_SYSOPTS_CONFIG' => 'System Configuration', |
|
53 | - 'LBL_SYSOPTS_DB_TYPE' => '', |
|
54 | - 'LBL_SYSOPTS_DB' => 'Specify Database Type', |
|
52 | + 'LBL_SYSOPTS_CONFIG' => 'System Configuration', |
|
53 | + 'LBL_SYSOPTS_DB_TYPE' => '', |
|
54 | + 'LBL_SYSOPTS_DB' => 'Specify Database Type', |
|
55 | 55 | 'LBL_SYSOPTS_DB_TITLE' => 'Database Type', |
56 | - 'LBL_SYSOPTS_ERRS_TITLE' => 'Please fix the following errors before proceeding:', |
|
57 | - 'LBL_MAKE_DIRECTORY_WRITABLE' => 'Please make the following directory writable:', |
|
56 | + 'LBL_SYSOPTS_ERRS_TITLE' => 'Please fix the following errors before proceeding:', |
|
57 | + 'LBL_MAKE_DIRECTORY_WRITABLE' => 'Please make the following directory writable:', |
|
58 | 58 | 'ERR_DB_VERSION_FAILURE' => 'Unable to check database version.', |
59 | - 'DEFAULT_CHARSET' => 'UTF-8', |
|
59 | + 'DEFAULT_CHARSET' => 'UTF-8', |
|
60 | 60 | 'ERR_ADMIN_USER_NAME_BLANK' => 'Provide the user name for the SuiteCRM admin user. ', |
61 | - 'ERR_ADMIN_PASS_BLANK' => 'Provide the password for the SuiteCRM admin user. ', |
|
61 | + 'ERR_ADMIN_PASS_BLANK' => 'Provide the password for the SuiteCRM admin user. ', |
|
62 | 62 | |
63 | 63 | //'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is Off (please enable in php.ini)', |
64 | 64 | 'ERR_CHECKSYS' => 'Errors have been detected during compatibility check. In order for your SuiteCRM Installation to function properly, please take the proper steps to address the issues listed below and either press the recheck button, or try installing again.', |
65 | 65 | 'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is On (this should be set to Off in php.ini)', |
66 | - 'ERR_CHECKSYS_CURL' => 'Not found: SuiteCRM Scheduler will run with limited functionality.', |
|
66 | + 'ERR_CHECKSYS_CURL' => 'Not found: SuiteCRM Scheduler will run with limited functionality.', |
|
67 | 67 | 'ERR_CHECKSYS_IMAP' => 'Not found: InboundEmail and Campaigns (Email) require the IMAP libraries. Neither will be functional.', |
68 | - 'ERR_CHECKSYS_MSSQL_MQGPC' => 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.', |
|
69 | - 'ERR_CHECKSYS_MEM_LIMIT_0' => 'Warning: ', |
|
70 | - 'ERR_CHECKSYS_MEM_LIMIT_1' => ' (Set this to ', |
|
71 | - 'ERR_CHECKSYS_MEM_LIMIT_2' => 'M or larger in your php.ini file)', |
|
72 | - 'ERR_CHECKSYS_MYSQL_VERSION' => 'Minimum Version 4.1.2 - Found: ', |
|
73 | - 'ERR_CHECKSYS_NO_SESSIONS' => 'Failed to write and read session variables. Unable to proceed with the installation.', |
|
74 | - 'ERR_CHECKSYS_NOT_VALID_DIR' => 'Not A Valid Directory', |
|
75 | - 'ERR_CHECKSYS_NOT_WRITABLE' => 'Warning: Not Writable', |
|
76 | - 'ERR_CHECKSYS_PHP_INVALID_VER' => 'Your version of PHP is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ', |
|
77 | - 'ERR_CHECKSYS_IIS_INVALID_VER' => 'Your version of IIS is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ', |
|
78 | - 'ERR_CHECKSYS_FASTCGI' => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ', |
|
79 | - 'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', |
|
68 | + 'ERR_CHECKSYS_MSSQL_MQGPC' => 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.', |
|
69 | + 'ERR_CHECKSYS_MEM_LIMIT_0' => 'Warning: ', |
|
70 | + 'ERR_CHECKSYS_MEM_LIMIT_1' => ' (Set this to ', |
|
71 | + 'ERR_CHECKSYS_MEM_LIMIT_2' => 'M or larger in your php.ini file)', |
|
72 | + 'ERR_CHECKSYS_MYSQL_VERSION' => 'Minimum Version 4.1.2 - Found: ', |
|
73 | + 'ERR_CHECKSYS_NO_SESSIONS' => 'Failed to write and read session variables. Unable to proceed with the installation.', |
|
74 | + 'ERR_CHECKSYS_NOT_VALID_DIR' => 'Not A Valid Directory', |
|
75 | + 'ERR_CHECKSYS_NOT_WRITABLE' => 'Warning: Not Writable', |
|
76 | + 'ERR_CHECKSYS_PHP_INVALID_VER' => 'Your version of PHP is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ', |
|
77 | + 'ERR_CHECKSYS_IIS_INVALID_VER' => 'Your version of IIS is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ', |
|
78 | + 'ERR_CHECKSYS_FASTCGI' => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ', |
|
79 | + 'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', |
|
80 | 80 | 'ERR_CHECKSYS_PHP_UNSUPPORTED' => 'Unsupported PHP Version Installed: ( ver', |
81 | 81 | 'LBL_DB_UNAVAILABLE' => 'Database unavailable', |
82 | 82 | 'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found. Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL or MS SQLServer. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information on how to enable Database Support.', |
@@ -89,184 +89,184 @@ discard block |
||
89 | 89 | 'ERR_CHECKSYS_CUSTOM_NOT_WRITABLE' => 'The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System. Please take the needed steps to make the file writeable.', |
90 | 90 | 'ERR_CHECKSYS_FILES_NOT_WRITABLE' => "The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the 'read only' option and apply it to all subfolders.", |
91 | 91 | 'LBL_CHECKSYS_OVERRIDE_CONFIG' => 'Config override', |
92 | - //'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)', |
|
93 | - 'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)', |
|
92 | + //'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)', |
|
93 | + 'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)', |
|
94 | 94 | 'ERR_CHECKSYS_ZLIB' => 'ZLib support not found: SuiteCRM reaps enormous performance benefits with zlib compression.', |
95 | 95 | 'ERR_CHECKSYS_ZIP' => 'ZIP support not found: SuiteCRM needs ZIP support in order to process compressed files.', |
96 | 96 | 'ERR_CHECKSYS_PCRE' => 'PCRE library not found: SuiteCRM needs PCRE library in order to process Perl style of regular expression pattern matching.', |
97 | 97 | 'ERR_CHECKSYS_PCRE_VER' => 'PCRE library version: SuiteCRM needs PCRE library 7.0 or above to process Perl style of regular expression pattern matching.', |
98 | - 'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ', |
|
98 | + 'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ', |
|
99 | 99 | 'ERR_DB_ADMIN_MSSQL' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password.', |
100 | - 'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.', |
|
101 | - 'ERR_DB_EXISTS_WITH_CONFIG' => 'Database already exists with config data. To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?" To upgrade, use the Upgrade Wizard in the Admin Console. Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.', |
|
102 | - 'ERR_DB_EXISTS' => 'The provided Database Name already exists -- cannot create another one with the same name.', |
|
100 | + 'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.', |
|
101 | + 'ERR_DB_EXISTS_WITH_CONFIG' => 'Database already exists with config data. To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?" To upgrade, use the Upgrade Wizard in the Admin Console. Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.', |
|
102 | + 'ERR_DB_EXISTS' => 'The provided Database Name already exists -- cannot create another one with the same name.', |
|
103 | 103 | 'ERR_DB_EXISTS_PROCEED' => 'The provided Database Name already exists. You can<br>1. hit the back button and choose a new database name <br>2. click next and continue but all existing tables on this database will be dropped. <strong>This means your tables and data will be blown away.</strong>', |
104 | - 'ERR_DB_HOSTNAME' => 'Host name cannot be blank.', |
|
105 | - 'ERR_DB_INVALID' => 'Invalid database type selected.', |
|
106 | - 'ERR_DB_LOGIN_FAILURE' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
107 | - 'ERR_DB_LOGIN_FAILURE_MYSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
108 | - 'ERR_DB_LOGIN_FAILURE_MSSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
109 | - 'ERR_DB_MYSQL_VERSION' => 'Your MySQL version (%s) is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.', |
|
110 | - 'ERR_DB_NAME' => 'Database name cannot be blank.', |
|
111 | - 'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'", |
|
104 | + 'ERR_DB_HOSTNAME' => 'Host name cannot be blank.', |
|
105 | + 'ERR_DB_INVALID' => 'Invalid database type selected.', |
|
106 | + 'ERR_DB_LOGIN_FAILURE' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
107 | + 'ERR_DB_LOGIN_FAILURE_MYSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
108 | + 'ERR_DB_LOGIN_FAILURE_MSSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
109 | + 'ERR_DB_MYSQL_VERSION' => 'Your MySQL version (%s) is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.', |
|
110 | + 'ERR_DB_NAME' => 'Database name cannot be blank.', |
|
111 | + 'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'", |
|
112 | 112 | 'ERR_DB_MYSQL_DB_NAME_INVALID' => "Database name cannot contain a '\\', '/', or '.'", |
113 | 113 | 'ERR_DB_MSSQL_DB_NAME_INVALID' => "Database name cannot begin with a number, '#', or '@' and cannot contain a space, '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', '&', '!', or '-'", |
114 | 114 | 'ERR_DB_OCI8_DB_NAME_INVALID' => "Database name can only consist of alphanumeric characters and the symbols '#', '_' or '$'", |
115 | - 'ERR_DB_PASSWORD' => 'The passwords provided for the SuiteCRM database administrator do not match. Please re-enter the same passwords in the password fields.', |
|
116 | - 'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.', |
|
117 | - 'ERR_DB_USER_EXISTS' => 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.', |
|
118 | - 'ERR_DB_USER' => 'Enter a user name for the SuiteCRM database administrator.', |
|
119 | - 'ERR_DBCONF_VALIDATION' => 'Please fix the following errors before proceeding:', |
|
115 | + 'ERR_DB_PASSWORD' => 'The passwords provided for the SuiteCRM database administrator do not match. Please re-enter the same passwords in the password fields.', |
|
116 | + 'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.', |
|
117 | + 'ERR_DB_USER_EXISTS' => 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.', |
|
118 | + 'ERR_DB_USER' => 'Enter a user name for the SuiteCRM database administrator.', |
|
119 | + 'ERR_DBCONF_VALIDATION' => 'Please fix the following errors before proceeding:', |
|
120 | 120 | 'ERR_DBCONF_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM database user do not match. Please re-enter the same passwords in the password fields.', |
121 | - 'ERR_ERROR_GENERAL' => 'The following errors were encountered:', |
|
122 | - 'ERR_LANG_CANNOT_DELETE_FILE' => 'Cannot delete file: ', |
|
123 | - 'ERR_LANG_MISSING_FILE' => 'Cannot find file: ', |
|
124 | - 'ERR_LANG_NO_LANG_FILE' => 'No language pack file found at include/language inside: ', |
|
125 | - 'ERR_LANG_UPLOAD_1' => 'There was a problem with your upload. Please try again.', |
|
126 | - 'ERR_LANG_UPLOAD_2' => 'Language Packs must be ZIP archives.', |
|
127 | - 'ERR_LANG_UPLOAD_3' => 'PHP could not move the temp file to the upgrade directory.', |
|
128 | - 'ERR_LICENSE_MISSING' => 'Missing Required Fields', |
|
129 | - 'ERR_LICENSE_NOT_FOUND' => 'License file not found!', |
|
130 | - 'ERR_LOG_DIRECTORY_NOT_EXISTS' => 'Log directory provided is not a valid directory.', |
|
131 | - 'ERR_LOG_DIRECTORY_NOT_WRITABLE' => 'Log directory provided is not a writable directory.', |
|
132 | - 'ERR_LOG_DIRECTORY_REQUIRED' => 'Log directory is required if you wish to specify your own.', |
|
133 | - 'ERR_NO_DIRECT_SCRIPT' => 'Unable to process script directly.', |
|
134 | - 'ERR_NO_SINGLE_QUOTE' => 'Cannot use the single quotation mark for ', |
|
135 | - 'ERR_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM admin user do not match. Please re-enter the same passwords in the password fields.', |
|
136 | - 'ERR_PERFORM_CONFIG_PHP_1' => 'Cannot write to the <span class=stop>config.php</span> file.', |
|
137 | - 'ERR_PERFORM_CONFIG_PHP_2' => 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file. However, you <strong>must </strong>create the config.php file before you continue to the next step.', |
|
138 | - 'ERR_PERFORM_CONFIG_PHP_3' => 'Did you remember to create the config.php file?', |
|
139 | - 'ERR_PERFORM_CONFIG_PHP_4' => 'Warning: Could not write to config.php file. Please ensure it exists.', |
|
140 | - 'ERR_PERFORM_HTACCESS_1' => 'Cannot write to the ', |
|
141 | - 'ERR_PERFORM_HTACCESS_2' => ' file.', |
|
142 | - 'ERR_PERFORM_HTACCESS_3' => 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:', |
|
143 | - 'ERR_PERFORM_NO_TCPIP' => '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.', |
|
144 | - 'ERR_SESSION_DIRECTORY_NOT_EXISTS' => 'Session directory provided is not a valid directory.', |
|
145 | - 'ERR_SESSION_DIRECTORY' => 'Session directory provided is not a writable directory.', |
|
146 | - 'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.', |
|
147 | - 'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php', |
|
148 | - 'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.', |
|
121 | + 'ERR_ERROR_GENERAL' => 'The following errors were encountered:', |
|
122 | + 'ERR_LANG_CANNOT_DELETE_FILE' => 'Cannot delete file: ', |
|
123 | + 'ERR_LANG_MISSING_FILE' => 'Cannot find file: ', |
|
124 | + 'ERR_LANG_NO_LANG_FILE' => 'No language pack file found at include/language inside: ', |
|
125 | + 'ERR_LANG_UPLOAD_1' => 'There was a problem with your upload. Please try again.', |
|
126 | + 'ERR_LANG_UPLOAD_2' => 'Language Packs must be ZIP archives.', |
|
127 | + 'ERR_LANG_UPLOAD_3' => 'PHP could not move the temp file to the upgrade directory.', |
|
128 | + 'ERR_LICENSE_MISSING' => 'Missing Required Fields', |
|
129 | + 'ERR_LICENSE_NOT_FOUND' => 'License file not found!', |
|
130 | + 'ERR_LOG_DIRECTORY_NOT_EXISTS' => 'Log directory provided is not a valid directory.', |
|
131 | + 'ERR_LOG_DIRECTORY_NOT_WRITABLE' => 'Log directory provided is not a writable directory.', |
|
132 | + 'ERR_LOG_DIRECTORY_REQUIRED' => 'Log directory is required if you wish to specify your own.', |
|
133 | + 'ERR_NO_DIRECT_SCRIPT' => 'Unable to process script directly.', |
|
134 | + 'ERR_NO_SINGLE_QUOTE' => 'Cannot use the single quotation mark for ', |
|
135 | + 'ERR_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM admin user do not match. Please re-enter the same passwords in the password fields.', |
|
136 | + 'ERR_PERFORM_CONFIG_PHP_1' => 'Cannot write to the <span class=stop>config.php</span> file.', |
|
137 | + 'ERR_PERFORM_CONFIG_PHP_2' => 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file. However, you <strong>must </strong>create the config.php file before you continue to the next step.', |
|
138 | + 'ERR_PERFORM_CONFIG_PHP_3' => 'Did you remember to create the config.php file?', |
|
139 | + 'ERR_PERFORM_CONFIG_PHP_4' => 'Warning: Could not write to config.php file. Please ensure it exists.', |
|
140 | + 'ERR_PERFORM_HTACCESS_1' => 'Cannot write to the ', |
|
141 | + 'ERR_PERFORM_HTACCESS_2' => ' file.', |
|
142 | + 'ERR_PERFORM_HTACCESS_3' => 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:', |
|
143 | + 'ERR_PERFORM_NO_TCPIP' => '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.', |
|
144 | + 'ERR_SESSION_DIRECTORY_NOT_EXISTS' => 'Session directory provided is not a valid directory.', |
|
145 | + 'ERR_SESSION_DIRECTORY' => 'Session directory provided is not a writable directory.', |
|
146 | + 'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.', |
|
147 | + 'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php', |
|
148 | + 'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.', |
|
149 | 149 | 'ERROR_SPRITE_SUPPORT' => "Currently we are not able to locate the GD library, as a result you will not be able to use the CSS Sprite functionality.", |
150 | - 'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.', |
|
150 | + 'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.', |
|
151 | 151 | 'LBL_UPLOAD_MAX_FILESIZE_TITLE' => 'Upload File Size', |
152 | - 'ERR_URL_BLANK' => 'Provide the base URL for the SuiteCRM instance.', |
|
153 | - 'ERR_UW_NO_UPDATE_RECORD' => 'Could not locate installation record of', |
|
154 | - 'ERROR_FLAVOR_INCOMPATIBLE' => 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ', |
|
155 | - 'ERROR_LICENSE_EXPIRED' => "Error: Your license expired ", |
|
156 | - 'ERROR_LICENSE_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new license key. If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.", |
|
157 | - 'ERROR_MANIFEST_TYPE' => 'Manifest file must specify the package type.', |
|
158 | - 'ERROR_PACKAGE_TYPE' => 'Manifest file specifies an unrecognized package type', |
|
159 | - 'ERROR_VALIDATION_EXPIRED' => "Error: Your validation key expired ", |
|
160 | - 'ERROR_VALIDATION_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key. If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.", |
|
161 | - 'ERROR_VERSION_INCOMPATIBLE' => 'The uploaded file is not compatible with this version of SuiteCRM: ', |
|
162 | - |
|
163 | - 'LBL_BACK' => 'Back', |
|
152 | + 'ERR_URL_BLANK' => 'Provide the base URL for the SuiteCRM instance.', |
|
153 | + 'ERR_UW_NO_UPDATE_RECORD' => 'Could not locate installation record of', |
|
154 | + 'ERROR_FLAVOR_INCOMPATIBLE' => 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ', |
|
155 | + 'ERROR_LICENSE_EXPIRED' => "Error: Your license expired ", |
|
156 | + 'ERROR_LICENSE_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new license key. If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.", |
|
157 | + 'ERROR_MANIFEST_TYPE' => 'Manifest file must specify the package type.', |
|
158 | + 'ERROR_PACKAGE_TYPE' => 'Manifest file specifies an unrecognized package type', |
|
159 | + 'ERROR_VALIDATION_EXPIRED' => "Error: Your validation key expired ", |
|
160 | + 'ERROR_VALIDATION_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key. If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.", |
|
161 | + 'ERROR_VERSION_INCOMPATIBLE' => 'The uploaded file is not compatible with this version of SuiteCRM: ', |
|
162 | + |
|
163 | + 'LBL_BACK' => 'Back', |
|
164 | 164 | 'LBL_CANCEL' => 'Cancel', |
165 | 165 | 'LBL_ACCEPT' => 'I Accept', |
166 | - 'LBL_CHECKSYS_1' => 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.', |
|
167 | - 'LBL_CHECKSYS_CACHE' => 'Writable Cache Sub-Directories', |
|
166 | + 'LBL_CHECKSYS_1' => 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.', |
|
167 | + 'LBL_CHECKSYS_CACHE' => 'Writable Cache Sub-Directories', |
|
168 | 168 | 'LBL_DROP_DB_CONFIRM' => 'The provided Database Name already exists.<br>You can either:<br>1. Click on the Cancel button and choose a new database name, or <br>2. Click the Accept button and continue. All existing tables in the database will be dropped. <strong>This means that all of the tables and pre-existing data will be blown away.</strong>', |
169 | - 'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned Off', |
|
169 | + 'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned Off', |
|
170 | 170 | 'LBL_CHECKSYS_COMPONENT' => 'Component', |
171 | - 'LBL_CHECKSYS_COMPONENT_OPTIONAL' => 'Optional Components', |
|
172 | - 'LBL_CHECKSYS_CONFIG' => 'Writable SuiteCRM Configuration File (config.php)', |
|
173 | - 'LBL_CHECKSYS_CONFIG_OVERRIDE' => 'Writable SuiteCRM Configuration File (config_override.php)', |
|
174 | - 'LBL_CHECKSYS_CURL' => 'cURL Module', |
|
171 | + 'LBL_CHECKSYS_COMPONENT_OPTIONAL' => 'Optional Components', |
|
172 | + 'LBL_CHECKSYS_CONFIG' => 'Writable SuiteCRM Configuration File (config.php)', |
|
173 | + 'LBL_CHECKSYS_CONFIG_OVERRIDE' => 'Writable SuiteCRM Configuration File (config_override.php)', |
|
174 | + 'LBL_CHECKSYS_CURL' => 'cURL Module', |
|
175 | 175 | 'LBL_CHECKSYS_SESSION_SAVE_PATH' => 'Session Save Path Setting', |
176 | - 'LBL_CHECKSYS_CUSTOM' => 'Writeable Custom Directory', |
|
177 | - 'LBL_CHECKSYS_DATA' => 'Writable Data Sub-Directories', |
|
178 | - 'LBL_CHECKSYS_IMAP' => 'IMAP Module', |
|
179 | - 'LBL_CHECKSYS_FASTCGI' => 'FastCGI', |
|
180 | - 'LBL_CHECKSYS_MQGPC' => 'Magic Quotes GPC', |
|
181 | - 'LBL_CHECKSYS_MBSTRING' => 'MB Strings Module', |
|
182 | - 'LBL_CHECKSYS_MEM_OK' => 'OK (No Limit)', |
|
183 | - 'LBL_CHECKSYS_MEM_UNLIMITED' => 'OK (Unlimited)', |
|
184 | - 'LBL_CHECKSYS_MEM' => 'PHP Memory Limit', |
|
185 | - 'LBL_CHECKSYS_MODULE' => 'Writable Modules Sub-Directories and Files', |
|
186 | - 'LBL_CHECKSYS_MYSQL_VERSION' => 'MySQL Version', |
|
187 | - 'LBL_CHECKSYS_NOT_AVAILABLE' => 'Not Available', |
|
188 | - 'LBL_CHECKSYS_OK' => 'OK', |
|
189 | - 'LBL_CHECKSYS_PHP_INI' => 'Location of your PHP configuration file (php.ini):', |
|
190 | - 'LBL_CHECKSYS_PHP_OK' => 'OK (ver ', |
|
191 | - 'LBL_CHECKSYS_PHPVER' => 'PHP Version', |
|
176 | + 'LBL_CHECKSYS_CUSTOM' => 'Writeable Custom Directory', |
|
177 | + 'LBL_CHECKSYS_DATA' => 'Writable Data Sub-Directories', |
|
178 | + 'LBL_CHECKSYS_IMAP' => 'IMAP Module', |
|
179 | + 'LBL_CHECKSYS_FASTCGI' => 'FastCGI', |
|
180 | + 'LBL_CHECKSYS_MQGPC' => 'Magic Quotes GPC', |
|
181 | + 'LBL_CHECKSYS_MBSTRING' => 'MB Strings Module', |
|
182 | + 'LBL_CHECKSYS_MEM_OK' => 'OK (No Limit)', |
|
183 | + 'LBL_CHECKSYS_MEM_UNLIMITED' => 'OK (Unlimited)', |
|
184 | + 'LBL_CHECKSYS_MEM' => 'PHP Memory Limit', |
|
185 | + 'LBL_CHECKSYS_MODULE' => 'Writable Modules Sub-Directories and Files', |
|
186 | + 'LBL_CHECKSYS_MYSQL_VERSION' => 'MySQL Version', |
|
187 | + 'LBL_CHECKSYS_NOT_AVAILABLE' => 'Not Available', |
|
188 | + 'LBL_CHECKSYS_OK' => 'OK', |
|
189 | + 'LBL_CHECKSYS_PHP_INI' => 'Location of your PHP configuration file (php.ini):', |
|
190 | + 'LBL_CHECKSYS_PHP_OK' => 'OK (ver ', |
|
191 | + 'LBL_CHECKSYS_PHPVER' => 'PHP Version', |
|
192 | 192 | 'LBL_CHECKSYS_IISVER' => 'IIS Version', |
193 | - 'LBL_CHECKSYS_RECHECK' => 'Re-check', |
|
194 | - 'LBL_CHECKSYS_SAFE_MODE' => 'PHP Safe Mode Turned Off', |
|
195 | - 'LBL_CHECKSYS_SESSION' => 'Writable Session Save Path (', |
|
196 | - 'LBL_CHECKSYS_STATUS' => 'Status', |
|
197 | - 'LBL_CHECKSYS_TITLE' => 'System Check Acceptance', |
|
198 | - 'LBL_CHECKSYS_VER' => 'Found: ( ver ', |
|
199 | - 'LBL_CHECKSYS_XML' => 'XML Parsing', |
|
200 | - 'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module', |
|
201 | - 'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module', |
|
202 | - 'LBL_CHECKSYS_PCRE' => 'PCRE Library', |
|
203 | - 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', |
|
193 | + 'LBL_CHECKSYS_RECHECK' => 'Re-check', |
|
194 | + 'LBL_CHECKSYS_SAFE_MODE' => 'PHP Safe Mode Turned Off', |
|
195 | + 'LBL_CHECKSYS_SESSION' => 'Writable Session Save Path (', |
|
196 | + 'LBL_CHECKSYS_STATUS' => 'Status', |
|
197 | + 'LBL_CHECKSYS_TITLE' => 'System Check Acceptance', |
|
198 | + 'LBL_CHECKSYS_VER' => 'Found: ( ver ', |
|
199 | + 'LBL_CHECKSYS_XML' => 'XML Parsing', |
|
200 | + 'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module', |
|
201 | + 'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module', |
|
202 | + 'LBL_CHECKSYS_PCRE' => 'PCRE Library', |
|
203 | + 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', |
|
204 | 204 | 'LBL_CHECKSYS_FIX_MODULE_FILES' => 'Please fix the following module directories and the files under them before proceeding:', |
205 | 205 | 'LBL_CHECKSYS_UPLOAD' => 'Writable Upload Directory', |
206 | 206 | 'LBL_CLOSE' => 'Close', |
207 | 207 | 'LBL_THREE' => '3', |
208 | - 'LBL_CONFIRM_BE_CREATED' => 'be created', |
|
209 | - 'LBL_CONFIRM_DB_TYPE' => 'Database Type', |
|
210 | - 'LBL_CONFIRM_DIRECTIONS' => 'Please confirm the settings below. If you would like to change any of the values, click "Back" to edit. Otherwise, click "Next" to start the installation.', |
|
211 | - 'LBL_CONFIRM_LICENSE_TITLE' => 'License Information', |
|
212 | - 'LBL_CONFIRM_NOT' => 'not', |
|
213 | - 'LBL_CONFIRM_TITLE' => 'Confirm Settings', |
|
214 | - 'LBL_CONFIRM_WILL' => 'will', |
|
215 | - 'LBL_DBCONF_CREATE_DB' => 'Create Database', |
|
216 | - 'LBL_DBCONF_CREATE_USER' => 'Create User', |
|
217 | - 'LBL_DBCONF_DB_DROP_CREATE_WARN' => 'Caution: All SuiteCRM data will be erased<br>if this box is checked.', |
|
218 | - 'LBL_DBCONF_DB_DROP_CREATE' => 'Drop and Recreate Existing SuiteCRM tables?', |
|
208 | + 'LBL_CONFIRM_BE_CREATED' => 'be created', |
|
209 | + 'LBL_CONFIRM_DB_TYPE' => 'Database Type', |
|
210 | + 'LBL_CONFIRM_DIRECTIONS' => 'Please confirm the settings below. If you would like to change any of the values, click "Back" to edit. Otherwise, click "Next" to start the installation.', |
|
211 | + 'LBL_CONFIRM_LICENSE_TITLE' => 'License Information', |
|
212 | + 'LBL_CONFIRM_NOT' => 'not', |
|
213 | + 'LBL_CONFIRM_TITLE' => 'Confirm Settings', |
|
214 | + 'LBL_CONFIRM_WILL' => 'will', |
|
215 | + 'LBL_DBCONF_CREATE_DB' => 'Create Database', |
|
216 | + 'LBL_DBCONF_CREATE_USER' => 'Create User', |
|
217 | + 'LBL_DBCONF_DB_DROP_CREATE_WARN' => 'Caution: All SuiteCRM data will be erased<br>if this box is checked.', |
|
218 | + 'LBL_DBCONF_DB_DROP_CREATE' => 'Drop and Recreate Existing SuiteCRM tables?', |
|
219 | 219 | 'LBL_DBCONF_DB_DROP' => 'Drop Tables', |
220 | 220 | 'LBL_DBCONF_DB_NAME' => 'Database Name', |
221 | - 'LBL_DBCONF_DB_PASSWORD' => 'SuiteCRM Database User Password', |
|
222 | - 'LBL_DBCONF_DB_PASSWORD2' => 'Re-enter SuiteCRM Database User Password', |
|
223 | - 'LBL_DBCONF_DB_USER' => 'SuiteCRM Database User', |
|
221 | + 'LBL_DBCONF_DB_PASSWORD' => 'SuiteCRM Database User Password', |
|
222 | + 'LBL_DBCONF_DB_PASSWORD2' => 'Re-enter SuiteCRM Database User Password', |
|
223 | + 'LBL_DBCONF_DB_USER' => 'SuiteCRM Database User', |
|
224 | 224 | 'LBL_DBCONF_SUGAR_DB_USER' => 'SuiteCRM Database User', |
225 | 225 | 'LBL_DBCONF_DB_ADMIN_USER' => 'Database Administrator Username', |
226 | 226 | 'LBL_DBCONF_DB_ADMIN_PASSWORD' => 'Database Admin Password', |
227 | - 'LBL_DBCONF_DEMO_DATA' => 'Populate Database with Demo Data?', |
|
227 | + 'LBL_DBCONF_DEMO_DATA' => 'Populate Database with Demo Data?', |
|
228 | 228 | 'LBL_DBCONF_DEMO_DATA_TITLE' => 'Choose Demo Data', |
229 | - 'LBL_DBCONF_HOST_NAME' => 'Host Name', |
|
230 | - 'LBL_DBCONF_HOST_INSTANCE' => 'Host Instance', |
|
231 | - 'LBL_DBCONF_HOST_PORT' => 'Port', |
|
232 | - 'LBL_DBCONF_INSTRUCTIONS' => 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.', |
|
233 | - 'LBL_DBCONF_MB_DEMO_DATA' => 'Use multi-byte text in demo data?', |
|
229 | + 'LBL_DBCONF_HOST_NAME' => 'Host Name', |
|
230 | + 'LBL_DBCONF_HOST_INSTANCE' => 'Host Instance', |
|
231 | + 'LBL_DBCONF_HOST_PORT' => 'Port', |
|
232 | + 'LBL_DBCONF_INSTRUCTIONS' => 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.', |
|
233 | + 'LBL_DBCONF_MB_DEMO_DATA' => 'Use multi-byte text in demo data?', |
|
234 | 234 | 'LBL_DBCONFIG_MSG2' => 'Name of web server or machine (host) on which the database is located ( such as localhost or www.mydomain.com ):', |
235 | - 'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name', |
|
235 | + 'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name', |
|
236 | 236 | 'LBL_DBCONFIG_MSG3' => 'Name of the database that will contain the data for the SuiteCRM instance you are about to install:', |
237 | - 'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name', |
|
237 | + 'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name', |
|
238 | 238 | 'LBL_DBCONFIG_B_MSG1' => 'The username and password of a database administrator who can create database tables and users and who can write to the database is necessary in order to set up the SuiteCRM database.', |
239 | - 'LBL_DBCONFIG_B_MSG1_LABEL' => '', |
|
239 | + 'LBL_DBCONFIG_B_MSG1_LABEL' => '', |
|
240 | 240 | 'LBL_DBCONFIG_SECURITY' => 'For security purposes, you can specify an exclusive database user to connect to the SuiteCRM database. This user must be able to write, update and retrieve data on the SuiteCRM database that will be created for this instance. This user can be the database administrator specified above, or you can provide new or existing database user information.', |
241 | 241 | 'LBL_DBCONFIG_AUTO_DD' => 'Do it for me', |
242 | 242 | 'LBL_DBCONFIG_PROVIDE_DD' => 'Provide existing user', |
243 | 243 | 'LBL_DBCONFIG_CREATE_DD' => 'Define user to create', |
244 | 244 | 'LBL_DBCONFIG_SAME_DD' => 'Same as Admin User', |
245 | - //'LBL_DBCONF_I18NFIX' => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?', |
|
245 | + //'LBL_DBCONF_I18NFIX' => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?', |
|
246 | 246 | 'LBL_FTS' => 'Full Text Search', |
247 | 247 | 'LBL_FTS_INSTALLED' => 'Installed', |
248 | 248 | 'LBL_FTS_INSTALLED_ERR1' => 'Full Text Search capability is not installed.', |
249 | 249 | 'LBL_FTS_INSTALLED_ERR2' => 'You can still install but will not be able to use Full Text Search functionality. Please refer to your database server install guide on how to do this, or contact your Administrator.', |
250 | - 'LBL_DBCONF_PRIV_PASS' => 'Privileged Database User Password', |
|
251 | - 'LBL_DBCONF_PRIV_USER_2' => 'Database Account Above Is a Privileged User?', |
|
252 | - 'LBL_DBCONF_PRIV_USER_DIRECTIONS' => 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user. This privileged database user will only be used to perform these tasks as needed during the installation process. You may also use the same database user as above if that user has sufficient privileges.', |
|
253 | - 'LBL_DBCONF_PRIV_USER' => 'Privileged Database User Name', |
|
254 | - 'LBL_DBCONF_TITLE' => 'Database Configuration', |
|
250 | + 'LBL_DBCONF_PRIV_PASS' => 'Privileged Database User Password', |
|
251 | + 'LBL_DBCONF_PRIV_USER_2' => 'Database Account Above Is a Privileged User?', |
|
252 | + 'LBL_DBCONF_PRIV_USER_DIRECTIONS' => 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user. This privileged database user will only be used to perform these tasks as needed during the installation process. You may also use the same database user as above if that user has sufficient privileges.', |
|
253 | + 'LBL_DBCONF_PRIV_USER' => 'Privileged Database User Name', |
|
254 | + 'LBL_DBCONF_TITLE' => 'Database Configuration', |
|
255 | 255 | 'LBL_DBCONF_TITLE_NAME' => 'Provide Database Name', |
256 | 256 | 'LBL_DBCONF_TITLE_USER_INFO' => 'Provide Database User Information', |
257 | - 'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User', |
|
258 | - 'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password', |
|
259 | - 'LBL_DISABLED_DESCRIPTION_2' => 'After this change has been made, you may click the "Start" button below to begin your installation. <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>', |
|
260 | - 'LBL_DISABLED_DESCRIPTION' => 'The installer has already been run once. As a safety measure, it has been disabled from running a second time. If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'. The line should look like this:', |
|
261 | - 'LBL_DISABLED_HELP_1' => 'For installation help, please visit the SuiteCRM', |
|
257 | + 'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User', |
|
258 | + 'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password', |
|
259 | + 'LBL_DISABLED_DESCRIPTION_2' => 'After this change has been made, you may click the "Start" button below to begin your installation. <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>', |
|
260 | + 'LBL_DISABLED_DESCRIPTION' => 'The installer has already been run once. As a safety measure, it has been disabled from running a second time. If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'. The line should look like this:', |
|
261 | + 'LBL_DISABLED_HELP_1' => 'For installation help, please visit the SuiteCRM', |
|
262 | 262 | 'LBL_DISABLED_HELP_LNK' => 'http://www.suitecrm.com/forum/index', |
263 | - 'LBL_DISABLED_HELP_2' => 'support forums', |
|
264 | - 'LBL_DISABLED_TITLE_2' => 'SuiteCRM Installation has been Disabled', |
|
265 | - 'LBL_DISABLED_TITLE' => 'SuiteCRM Installation Disabled', |
|
266 | - 'LBL_EMAIL_CHARSET_DESC' => 'Character Set most commonly used in your locale', |
|
267 | - 'LBL_EMAIL_CHARSET_TITLE' => 'Outbound Email Settings', |
|
263 | + 'LBL_DISABLED_HELP_2' => 'support forums', |
|
264 | + 'LBL_DISABLED_TITLE_2' => 'SuiteCRM Installation has been Disabled', |
|
265 | + 'LBL_DISABLED_TITLE' => 'SuiteCRM Installation Disabled', |
|
266 | + 'LBL_EMAIL_CHARSET_DESC' => 'Character Set most commonly used in your locale', |
|
267 | + 'LBL_EMAIL_CHARSET_TITLE' => 'Outbound Email Settings', |
|
268 | 268 | 'LBL_EMAIL_CHARSET_CONF' => 'Character Set for Outbound Email ', |
269 | - 'LBL_HELP' => 'Help', |
|
269 | + 'LBL_HELP' => 'Help', |
|
270 | 270 | 'LBL_INSTALL' => 'Install', |
271 | 271 | 'LBL_INSTALL_TYPE_TITLE' => 'Installation Options', |
272 | 272 | 'LBL_INSTALL_TYPE_SUBTITLE' => 'Choose Install Type', |
@@ -275,157 +275,157 @@ discard block |
||
275 | 275 | 'LBL_INSTALL_TYPE_MSG1' => 'The key is required for general application functionality, but it is not required for installation. You do not need to enter the key at this time, but you will need to provide the key after you have installed the application.', |
276 | 276 | 'LBL_INSTALL_TYPE_MSG2' => 'Requires minimum information for the installation. Recommended for new users.', |
277 | 277 | 'LBL_INSTALL_TYPE_MSG3' => 'Provides additional options to set during the installation. Most of these options are also available after installation in the admin screens. Recommended for advanced users.', |
278 | - 'LBL_LANG_1' => 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well. If you would like to skip this step, click Next.', |
|
279 | - 'LBL_LANG_BUTTON_COMMIT' => 'Install', |
|
280 | - 'LBL_LANG_BUTTON_REMOVE' => 'Remove', |
|
281 | - 'LBL_LANG_BUTTON_UNINSTALL' => 'Uninstall', |
|
282 | - 'LBL_LANG_BUTTON_UPLOAD' => 'Upload', |
|
283 | - 'LBL_LANG_NO_PACKS' => 'none', |
|
284 | - 'LBL_LANG_PACK_INSTALLED' => 'The following language packs have been installed: ', |
|
285 | - 'LBL_LANG_PACK_READY' => 'The following language packs are ready to be installed: ', |
|
286 | - 'LBL_LANG_SUCCESS' => 'The language pack was successfully uploaded.', |
|
287 | - 'LBL_LANG_TITLE' => 'Language Pack', |
|
278 | + 'LBL_LANG_1' => 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well. If you would like to skip this step, click Next.', |
|
279 | + 'LBL_LANG_BUTTON_COMMIT' => 'Install', |
|
280 | + 'LBL_LANG_BUTTON_REMOVE' => 'Remove', |
|
281 | + 'LBL_LANG_BUTTON_UNINSTALL' => 'Uninstall', |
|
282 | + 'LBL_LANG_BUTTON_UPLOAD' => 'Upload', |
|
283 | + 'LBL_LANG_NO_PACKS' => 'none', |
|
284 | + 'LBL_LANG_PACK_INSTALLED' => 'The following language packs have been installed: ', |
|
285 | + 'LBL_LANG_PACK_READY' => 'The following language packs are ready to be installed: ', |
|
286 | + 'LBL_LANG_SUCCESS' => 'The language pack was successfully uploaded.', |
|
287 | + 'LBL_LANG_TITLE' => 'Language Pack', |
|
288 | 288 | 'LBL_LAUNCHING_SILENT_INSTALL' => 'Installing SuiteCRM now. This may take up to a few minutes.', |
289 | - 'LBL_LANG_UPLOAD' => 'Upload a Language Pack', |
|
290 | - 'LBL_LICENSE_ACCEPTANCE' => 'License Acceptance', |
|
289 | + 'LBL_LANG_UPLOAD' => 'Upload a Language Pack', |
|
290 | + 'LBL_LICENSE_ACCEPTANCE' => 'License Acceptance', |
|
291 | 291 | 'LBL_LICENSE_CHECKING' => 'Checking system for compatibility.', |
292 | 292 | 'LBL_LICENSE_CHKENV_HEADER' => 'Checking Environment', |
293 | 293 | 'LBL_LICENSE_CHKDB_HEADER' => 'Verifying DB Credentials.', |
294 | 294 | 'LBL_LICENSE_CHECK_PASSED' => 'System passed check for compatibility.', |
295 | - 'LBL_CREATE_CACHE' => 'Preparing to Install...', |
|
295 | + 'LBL_CREATE_CACHE' => 'Preparing to Install...', |
|
296 | 296 | 'LBL_LICENSE_REDIRECT' => 'Redirecting in ', |
297 | - 'LBL_LICENSE_DIRECTIONS' => 'If you have your license information, please enter it in the fields below.', |
|
298 | - 'LBL_LICENSE_DOWNLOAD_KEY' => 'Enter Download Key', |
|
299 | - 'LBL_LICENSE_EXPIRY' => 'Expiration Date', |
|
300 | - 'LBL_LICENSE_I_ACCEPT' => 'I Accept', |
|
301 | - 'LBL_LICENSE_NUM_USERS' => 'Number of Users', |
|
302 | - 'LBL_LICENSE_OC_DIRECTIONS' => 'Please enter the number of purchased offline clients.', |
|
303 | - 'LBL_LICENSE_OC_NUM' => 'Number of Offline Client Licenses', |
|
304 | - 'LBL_LICENSE_OC' => 'Offline Client Licenses', |
|
305 | - 'LBL_LICENSE_PRINTABLE' => ' Printable View ', |
|
297 | + 'LBL_LICENSE_DIRECTIONS' => 'If you have your license information, please enter it in the fields below.', |
|
298 | + 'LBL_LICENSE_DOWNLOAD_KEY' => 'Enter Download Key', |
|
299 | + 'LBL_LICENSE_EXPIRY' => 'Expiration Date', |
|
300 | + 'LBL_LICENSE_I_ACCEPT' => 'I Accept', |
|
301 | + 'LBL_LICENSE_NUM_USERS' => 'Number of Users', |
|
302 | + 'LBL_LICENSE_OC_DIRECTIONS' => 'Please enter the number of purchased offline clients.', |
|
303 | + 'LBL_LICENSE_OC_NUM' => 'Number of Offline Client Licenses', |
|
304 | + 'LBL_LICENSE_OC' => 'Offline Client Licenses', |
|
305 | + 'LBL_LICENSE_PRINTABLE' => ' Printable View ', |
|
306 | 306 | 'LBL_PRINT_SUMM' => 'Print Summary', |
307 | - 'LBL_LICENSE_TITLE_2' => 'SuiteCRM License', |
|
308 | - 'LBL_LICENSE_TITLE' => 'License Information', |
|
309 | - 'LBL_LICENSE_USERS' => 'Licensed Users', |
|
310 | - |
|
311 | - 'LBL_LOCALE_CURRENCY' => 'Currency Settings', |
|
312 | - 'LBL_LOCALE_CURR_DEFAULT' => 'Default Currency', |
|
313 | - 'LBL_LOCALE_CURR_SYMBOL' => 'Currency Symbol', |
|
314 | - 'LBL_LOCALE_CURR_ISO' => 'Currency Code (ISO 4217)', |
|
315 | - 'LBL_LOCALE_CURR_1000S' => '1000s Separator', |
|
316 | - 'LBL_LOCALE_CURR_DECIMAL' => 'Decimal Separator', |
|
317 | - 'LBL_LOCALE_CURR_EXAMPLE' => 'Example', |
|
318 | - 'LBL_LOCALE_CURR_SIG_DIGITS' => 'Significant Digits', |
|
319 | - 'LBL_LOCALE_DATEF' => 'Default Date Format', |
|
320 | - 'LBL_LOCALE_DESC' => 'The specified locale settings will be reflected globally within the SuiteCRM instance.', |
|
321 | - 'LBL_LOCALE_EXPORT' => 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>', |
|
322 | - 'LBL_LOCALE_EXPORT_DELIMITER' => 'Export (.csv) Delimiter', |
|
323 | - 'LBL_LOCALE_EXPORT_TITLE' => 'Import/Export Settings', |
|
324 | - 'LBL_LOCALE_LANG' => 'Default Language', |
|
325 | - 'LBL_LOCALE_NAMEF' => 'Default Name Format', |
|
326 | - 'LBL_LOCALE_NAMEF_DESC' => 's = salutation<br />f = first name<br />l = last name', |
|
327 | - 'LBL_LOCALE_NAME_FIRST' => 'David', |
|
328 | - 'LBL_LOCALE_NAME_LAST' => 'Livingstone', |
|
329 | - 'LBL_LOCALE_NAME_SALUTATION' => 'Dr.', |
|
330 | - 'LBL_LOCALE_TIMEF' => 'Default Time Format', |
|
307 | + 'LBL_LICENSE_TITLE_2' => 'SuiteCRM License', |
|
308 | + 'LBL_LICENSE_TITLE' => 'License Information', |
|
309 | + 'LBL_LICENSE_USERS' => 'Licensed Users', |
|
310 | + |
|
311 | + 'LBL_LOCALE_CURRENCY' => 'Currency Settings', |
|
312 | + 'LBL_LOCALE_CURR_DEFAULT' => 'Default Currency', |
|
313 | + 'LBL_LOCALE_CURR_SYMBOL' => 'Currency Symbol', |
|
314 | + 'LBL_LOCALE_CURR_ISO' => 'Currency Code (ISO 4217)', |
|
315 | + 'LBL_LOCALE_CURR_1000S' => '1000s Separator', |
|
316 | + 'LBL_LOCALE_CURR_DECIMAL' => 'Decimal Separator', |
|
317 | + 'LBL_LOCALE_CURR_EXAMPLE' => 'Example', |
|
318 | + 'LBL_LOCALE_CURR_SIG_DIGITS' => 'Significant Digits', |
|
319 | + 'LBL_LOCALE_DATEF' => 'Default Date Format', |
|
320 | + 'LBL_LOCALE_DESC' => 'The specified locale settings will be reflected globally within the SuiteCRM instance.', |
|
321 | + 'LBL_LOCALE_EXPORT' => 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>', |
|
322 | + 'LBL_LOCALE_EXPORT_DELIMITER' => 'Export (.csv) Delimiter', |
|
323 | + 'LBL_LOCALE_EXPORT_TITLE' => 'Import/Export Settings', |
|
324 | + 'LBL_LOCALE_LANG' => 'Default Language', |
|
325 | + 'LBL_LOCALE_NAMEF' => 'Default Name Format', |
|
326 | + 'LBL_LOCALE_NAMEF_DESC' => 's = salutation<br />f = first name<br />l = last name', |
|
327 | + 'LBL_LOCALE_NAME_FIRST' => 'David', |
|
328 | + 'LBL_LOCALE_NAME_LAST' => 'Livingstone', |
|
329 | + 'LBL_LOCALE_NAME_SALUTATION' => 'Dr.', |
|
330 | + 'LBL_LOCALE_TIMEF' => 'Default Time Format', |
|
331 | 331 | 'LBL_CUSTOMIZE_LOCALE' => 'Customize Locale Settings', |
332 | - 'LBL_LOCALE_UI' => 'User Interface', |
|
333 | - |
|
334 | - 'LBL_ML_ACTION' => 'Action', |
|
335 | - 'LBL_ML_DESCRIPTION' => 'Description', |
|
336 | - 'LBL_ML_INSTALLED' => 'Date Installed', |
|
337 | - 'LBL_ML_NAME' => 'Name', |
|
338 | - 'LBL_ML_PUBLISHED' => 'Date Published', |
|
339 | - 'LBL_ML_TYPE' => 'Type', |
|
340 | - 'LBL_ML_UNINSTALLABLE' => 'Uninstallable', |
|
341 | - 'LBL_ML_VERSION' => 'Version', |
|
342 | - 'LBL_MSSQL' => 'SQL Server', |
|
343 | - 'LBL_MSSQL2' => 'SQL Server (FreeTDS)', |
|
344 | - 'LBL_MSSQL_SQLSRV' => 'SQL Server (Microsoft SQL Server Driver for PHP)', |
|
345 | - 'LBL_MYSQL' => 'MySQL', |
|
332 | + 'LBL_LOCALE_UI' => 'User Interface', |
|
333 | + |
|
334 | + 'LBL_ML_ACTION' => 'Action', |
|
335 | + 'LBL_ML_DESCRIPTION' => 'Description', |
|
336 | + 'LBL_ML_INSTALLED' => 'Date Installed', |
|
337 | + 'LBL_ML_NAME' => 'Name', |
|
338 | + 'LBL_ML_PUBLISHED' => 'Date Published', |
|
339 | + 'LBL_ML_TYPE' => 'Type', |
|
340 | + 'LBL_ML_UNINSTALLABLE' => 'Uninstallable', |
|
341 | + 'LBL_ML_VERSION' => 'Version', |
|
342 | + 'LBL_MSSQL' => 'SQL Server', |
|
343 | + 'LBL_MSSQL2' => 'SQL Server (FreeTDS)', |
|
344 | + 'LBL_MSSQL_SQLSRV' => 'SQL Server (Microsoft SQL Server Driver for PHP)', |
|
345 | + 'LBL_MYSQL' => 'MySQL', |
|
346 | 346 | 'LBL_MYSQLI' => 'MySQL (mysqli extension)', |
347 | - 'LBL_IBM_DB2' => 'IBM DB2', |
|
348 | - 'LBL_NEXT' => 'Next', |
|
349 | - 'LBL_NO' => 'No', |
|
347 | + 'LBL_IBM_DB2' => 'IBM DB2', |
|
348 | + 'LBL_NEXT' => 'Next', |
|
349 | + 'LBL_NO' => 'No', |
|
350 | 350 | 'LBL_ORACLE' => 'Oracle', |
351 | - 'LBL_PERFORM_ADMIN_PASSWORD' => 'Setting site admin password', |
|
352 | - 'LBL_PERFORM_AUDIT_TABLE' => 'audit table / ', |
|
353 | - 'LBL_PERFORM_CONFIG_PHP' => 'Creating SuiteCRM configuration file', |
|
354 | - 'LBL_PERFORM_CREATE_DB_1' => '<b>Creating the database</b> ', |
|
355 | - 'LBL_PERFORM_CREATE_DB_2' => ' <b>on</b> ', |
|
356 | - 'LBL_PERFORM_CREATE_DB_USER' => 'Creating the Database username and password...', |
|
357 | - 'LBL_PERFORM_CREATE_DEFAULT' => 'Creating default SuiteCRM data', |
|
358 | - 'LBL_PERFORM_CREATE_LOCALHOST' => 'Creating the Database username and password for localhost...', |
|
359 | - 'LBL_PERFORM_CREATE_RELATIONSHIPS' => 'Creating SuiteCRM relationship tables', |
|
360 | - 'LBL_PERFORM_CREATING' => 'creating / ', |
|
361 | - 'LBL_PERFORM_DEFAULT_REPORTS' => 'Creating default reports', |
|
362 | - 'LBL_PERFORM_DEFAULT_SCHEDULER' => 'Creating default scheduler jobs', |
|
363 | - 'LBL_PERFORM_DEFAULT_SETTINGS' => 'Inserting default settings', |
|
364 | - 'LBL_PERFORM_DEFAULT_USERS' => 'Creating default users', |
|
365 | - 'LBL_PERFORM_DEMO_DATA' => 'Populating the database tables with demo data (this may take a little while)', |
|
366 | - 'LBL_PERFORM_DONE' => 'done<br>', |
|
367 | - 'LBL_PERFORM_DROPPING' => 'dropping / ', |
|
368 | - 'LBL_PERFORM_FINISH' => 'Finish', |
|
369 | - 'LBL_PERFORM_LICENSE_SETTINGS' => 'Updating license information', |
|
370 | - 'LBL_PERFORM_OUTRO_1' => 'The setup of SuiteCRM ', |
|
371 | - 'LBL_PERFORM_OUTRO_2' => ' is now complete!', |
|
372 | - 'LBL_PERFORM_OUTRO_3' => 'Total time: ', |
|
373 | - 'LBL_PERFORM_OUTRO_4' => ' seconds.', |
|
374 | - 'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ', |
|
375 | - 'LBL_PERFORM_OUTRO_6' => ' bytes.', |
|
376 | - 'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.', |
|
377 | - 'LBL_PERFORM_REL_META' => 'relationship meta ... ', |
|
378 | - 'LBL_PERFORM_SUCCESS' => 'Success!', |
|
379 | - 'LBL_PERFORM_TABLES' => 'Creating SuiteCRM application tables, audit tables and relationship metadata', |
|
380 | - 'LBL_PERFORM_TITLE' => 'Perform Setup', |
|
381 | - 'LBL_PRINT' => 'Print', |
|
382 | - 'LBL_REG_CONF_1' => 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.', |
|
383 | - 'LBL_REG_CONF_2' => 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.', |
|
384 | - 'LBL_REG_CONF_3' => 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.', |
|
385 | - 'LBL_REG_TITLE' => 'Registration', |
|
351 | + 'LBL_PERFORM_ADMIN_PASSWORD' => 'Setting site admin password', |
|
352 | + 'LBL_PERFORM_AUDIT_TABLE' => 'audit table / ', |
|
353 | + 'LBL_PERFORM_CONFIG_PHP' => 'Creating SuiteCRM configuration file', |
|
354 | + 'LBL_PERFORM_CREATE_DB_1' => '<b>Creating the database</b> ', |
|
355 | + 'LBL_PERFORM_CREATE_DB_2' => ' <b>on</b> ', |
|
356 | + 'LBL_PERFORM_CREATE_DB_USER' => 'Creating the Database username and password...', |
|
357 | + 'LBL_PERFORM_CREATE_DEFAULT' => 'Creating default SuiteCRM data', |
|
358 | + 'LBL_PERFORM_CREATE_LOCALHOST' => 'Creating the Database username and password for localhost...', |
|
359 | + 'LBL_PERFORM_CREATE_RELATIONSHIPS' => 'Creating SuiteCRM relationship tables', |
|
360 | + 'LBL_PERFORM_CREATING' => 'creating / ', |
|
361 | + 'LBL_PERFORM_DEFAULT_REPORTS' => 'Creating default reports', |
|
362 | + 'LBL_PERFORM_DEFAULT_SCHEDULER' => 'Creating default scheduler jobs', |
|
363 | + 'LBL_PERFORM_DEFAULT_SETTINGS' => 'Inserting default settings', |
|
364 | + 'LBL_PERFORM_DEFAULT_USERS' => 'Creating default users', |
|
365 | + 'LBL_PERFORM_DEMO_DATA' => 'Populating the database tables with demo data (this may take a little while)', |
|
366 | + 'LBL_PERFORM_DONE' => 'done<br>', |
|
367 | + 'LBL_PERFORM_DROPPING' => 'dropping / ', |
|
368 | + 'LBL_PERFORM_FINISH' => 'Finish', |
|
369 | + 'LBL_PERFORM_LICENSE_SETTINGS' => 'Updating license information', |
|
370 | + 'LBL_PERFORM_OUTRO_1' => 'The setup of SuiteCRM ', |
|
371 | + 'LBL_PERFORM_OUTRO_2' => ' is now complete!', |
|
372 | + 'LBL_PERFORM_OUTRO_3' => 'Total time: ', |
|
373 | + 'LBL_PERFORM_OUTRO_4' => ' seconds.', |
|
374 | + 'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ', |
|
375 | + 'LBL_PERFORM_OUTRO_6' => ' bytes.', |
|
376 | + 'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.', |
|
377 | + 'LBL_PERFORM_REL_META' => 'relationship meta ... ', |
|
378 | + 'LBL_PERFORM_SUCCESS' => 'Success!', |
|
379 | + 'LBL_PERFORM_TABLES' => 'Creating SuiteCRM application tables, audit tables and relationship metadata', |
|
380 | + 'LBL_PERFORM_TITLE' => 'Perform Setup', |
|
381 | + 'LBL_PRINT' => 'Print', |
|
382 | + 'LBL_REG_CONF_1' => 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.', |
|
383 | + 'LBL_REG_CONF_2' => 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.', |
|
384 | + 'LBL_REG_CONF_3' => 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.', |
|
385 | + 'LBL_REG_TITLE' => 'Registration', |
|
386 | 386 | 'LBL_REG_NO_THANKS' => 'No Thanks', |
387 | 387 | 'LBL_REG_SKIP_THIS_STEP' => 'Skip this Step', |
388 | - 'LBL_REQUIRED' => '* Required field', |
|
388 | + 'LBL_REQUIRED' => '* Required field', |
|
389 | 389 | |
390 | 390 | 'LBL_SITECFG_ADMIN_Name' => 'SuiteCRM Application Admin Name', |
391 | - 'LBL_SITECFG_ADMIN_PASS_2' => 'Re-enter SuiteCRM Admin User Password', |
|
392 | - 'LBL_SITECFG_ADMIN_PASS_WARN' => 'Caution: This will override the admin password of any previous installation.', |
|
393 | - 'LBL_SITECFG_ADMIN_PASS' => 'SuiteCRM Admin User Password', |
|
394 | - 'LBL_SITECFG_APP_ID' => 'Application ID', |
|
395 | - 'LBL_SITECFG_CUSTOM_ID_DIRECTIONS' => 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances. If you have a cluster of SuiteCRM installations, they all must share the same application ID.', |
|
396 | - 'LBL_SITECFG_CUSTOM_ID' => 'Provide Your Own Application ID', |
|
397 | - 'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS' => 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.', |
|
398 | - 'LBL_SITECFG_CUSTOM_LOG' => 'Use a Custom Log Directory', |
|
399 | - 'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS' => 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.', |
|
400 | - 'LBL_SITECFG_CUSTOM_SESSION' => 'Use a Custom Session Directory for SuiteCRM', |
|
401 | - 'LBL_SITECFG_DIRECTIONS' => 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.', |
|
402 | - 'LBL_SITECFG_FIX_ERRORS' => '<b>Please fix the following errors before proceeding:</b>', |
|
403 | - 'LBL_SITECFG_LOG_DIR' => 'Log Directory', |
|
404 | - 'LBL_SITECFG_SESSION_PATH' => 'Path to Session Directory<br>(must be writable)', |
|
405 | - 'LBL_SITECFG_SITE_SECURITY' => 'Select Security Options', |
|
406 | - 'LBL_SITECFG_SUGAR_UP_DIRECTIONS' => 'If selected, the system will periodically check for updated versions of the application.', |
|
407 | - 'LBL_SITECFG_SUGAR_UP' => 'Automatically Check For Updates?', |
|
408 | - 'LBL_SITECFG_SUGAR_UPDATES' => 'SuiteCRM Updates Config', |
|
409 | - 'LBL_SITECFG_TITLE' => 'Site Configuration', |
|
391 | + 'LBL_SITECFG_ADMIN_PASS_2' => 'Re-enter SuiteCRM Admin User Password', |
|
392 | + 'LBL_SITECFG_ADMIN_PASS_WARN' => 'Caution: This will override the admin password of any previous installation.', |
|
393 | + 'LBL_SITECFG_ADMIN_PASS' => 'SuiteCRM Admin User Password', |
|
394 | + 'LBL_SITECFG_APP_ID' => 'Application ID', |
|
395 | + 'LBL_SITECFG_CUSTOM_ID_DIRECTIONS' => 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances. If you have a cluster of SuiteCRM installations, they all must share the same application ID.', |
|
396 | + 'LBL_SITECFG_CUSTOM_ID' => 'Provide Your Own Application ID', |
|
397 | + 'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS' => 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.', |
|
398 | + 'LBL_SITECFG_CUSTOM_LOG' => 'Use a Custom Log Directory', |
|
399 | + 'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS' => 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.', |
|
400 | + 'LBL_SITECFG_CUSTOM_SESSION' => 'Use a Custom Session Directory for SuiteCRM', |
|
401 | + 'LBL_SITECFG_DIRECTIONS' => 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.', |
|
402 | + 'LBL_SITECFG_FIX_ERRORS' => '<b>Please fix the following errors before proceeding:</b>', |
|
403 | + 'LBL_SITECFG_LOG_DIR' => 'Log Directory', |
|
404 | + 'LBL_SITECFG_SESSION_PATH' => 'Path to Session Directory<br>(must be writable)', |
|
405 | + 'LBL_SITECFG_SITE_SECURITY' => 'Select Security Options', |
|
406 | + 'LBL_SITECFG_SUGAR_UP_DIRECTIONS' => 'If selected, the system will periodically check for updated versions of the application.', |
|
407 | + 'LBL_SITECFG_SUGAR_UP' => 'Automatically Check For Updates?', |
|
408 | + 'LBL_SITECFG_SUGAR_UPDATES' => 'SuiteCRM Updates Config', |
|
409 | + 'LBL_SITECFG_TITLE' => 'Site Configuration', |
|
410 | 410 | 'LBL_SITECFG_TITLE2' => 'Identify Administration User', |
411 | 411 | 'LBL_SITECFG_SECURITY_TITLE' => 'Site Security', |
412 | - 'LBL_SITECFG_URL' => 'URL of SuiteCRM Instance', |
|
413 | - 'LBL_SITECFG_USE_DEFAULTS' => 'Use Defaults?', |
|
414 | - 'LBL_SITECFG_ANONSTATS' => 'Send Anonymous Usage Statistics?', |
|
415 | - 'LBL_SITECFG_ANONSTATS_DIRECTIONS' => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.', |
|
412 | + 'LBL_SITECFG_URL' => 'URL of SuiteCRM Instance', |
|
413 | + 'LBL_SITECFG_USE_DEFAULTS' => 'Use Defaults?', |
|
414 | + 'LBL_SITECFG_ANONSTATS' => 'Send Anonymous Usage Statistics?', |
|
415 | + 'LBL_SITECFG_ANONSTATS_DIRECTIONS' => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.', |
|
416 | 416 | 'LBL_SITECFG_URL_MSG' => 'Enter the URL that will be used to access the SuiteCRM instance after installation. The URL will also be used as a base for the URLs in the SuiteCRM application pages. The URL should include the web server or machine name or IP address.', |
417 | 417 | 'LBL_SITECFG_SYS_NAME_MSG' => 'Enter a name for your system. This name will be displayed in the browser title bar when users visit the SuiteCRM application.', |
418 | 418 | 'LBL_SITECFG_PASSWORD_MSG' => 'After installation, you will need to use the SuiteCRM admin user (default username = admin) to log in to the SuiteCRM instance. Enter a password for this administrator user. This password can be changed after the initial login. You may also enter another admin username to use besides the default value provided.', |
419 | 419 | 'LBL_SITECFG_COLLATION_MSG' => 'Select collation (sorting) settings for your system. This settings will create the tables with the specific language you use. In case your language doesn\'t require special settings please use default value.', |
420 | 420 | 'LBL_SPRITE_SUPPORT' => 'Sprite Support', |
421 | - 'LBL_SYSTEM_CREDS' => 'System Credentials', |
|
421 | + 'LBL_SYSTEM_CREDS' => 'System Credentials', |
|
422 | 422 | 'LBL_SYSTEM_ENV' => 'System Environment', |
423 | - 'LBL_START' => 'Start', |
|
423 | + 'LBL_START' => 'Start', |
|
424 | 424 | 'LBL_SHOW_PASS' => 'Show Passwords', |
425 | 425 | 'LBL_HIDE_PASS' => 'Hide Passwords', |
426 | 426 | 'LBL_HIDDEN' => '<i>(hidden)</i>', |
427 | - 'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements', |
|
428 | - 'LBL_STEP2' => 'Step 2 of 2 - Configuration', |
|
427 | + 'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements', |
|
428 | + 'LBL_STEP2' => 'Step 2 of 2 - Configuration', |
|
429 | 429 | // 'LBL_STEP1' => 'Step 1 of 8 - Pre-Installation requirements', |
430 | 430 | // 'LBL_STEP2' => 'Step 2 of 8 - License Agreement', |
431 | 431 | // 'LBL_STEP3' => 'Step 3 of 8 - Installation Type', |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | // 'LBL_STEP7' => 'Step 7 of 8 - Confirm Settings', |
436 | 436 | // 'LBL_STEP8' => 'Step 8 of 8 - Installation Successful', |
437 | 437 | // 'LBL_NO_THANKS' => 'Continue to installer', |
438 | - 'LBL_CHOOSE_LANG' => '<b>Choose your language</b>', |
|
439 | - 'LBL_STEP' => 'Step', |
|
440 | - 'LBL_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
441 | - 'LBL_WELCOME_1' => 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.', |
|
442 | - 'LBL_WELCOME_2' => 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>. <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.', |
|
438 | + 'LBL_CHOOSE_LANG' => '<b>Choose your language</b>', |
|
439 | + 'LBL_STEP' => 'Step', |
|
440 | + 'LBL_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
441 | + 'LBL_WELCOME_1' => 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.', |
|
442 | + 'LBL_WELCOME_2' => 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>. <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.', |
|
443 | 443 | //welcome page variables |
444 | 444 | 'LBL_TITLE_ARE_YOU_READY' => 'Are you ready to install?', |
445 | 445 | 'REQUIRED_SYS_COMP' => 'Required System Components', |
@@ -522,20 +522,20 @@ discard block |
||
522 | 522 | ', |
523 | 523 | 'LBL_WELCOME_PLEASE_READ_BELOW' => 'Please read the following important information before proceeding with the installation. The information will help you determine whether or not you are ready to install the application at this time.', |
524 | 524 | |
525 | - 'LBL_WELCOME_CHOOSE_LANGUAGE' => '<b>Choose your language</b>', |
|
526 | - 'LBL_WELCOME_SETUP_WIZARD' => 'Setup Wizard', |
|
527 | - 'LBL_WELCOME_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
528 | - 'LBL_WELCOME_TITLE' => 'SuiteCRM Setup Wizard', |
|
529 | - 'LBL_WIZARD_TITLE' => 'SuiteCRM Setup Wizard: ', |
|
530 | - 'LBL_YES' => 'Yes', |
|
525 | + 'LBL_WELCOME_CHOOSE_LANGUAGE' => '<b>Choose your language</b>', |
|
526 | + 'LBL_WELCOME_SETUP_WIZARD' => 'Setup Wizard', |
|
527 | + 'LBL_WELCOME_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
528 | + 'LBL_WELCOME_TITLE' => 'SuiteCRM Setup Wizard', |
|
529 | + 'LBL_WIZARD_TITLE' => 'SuiteCRM Setup Wizard: ', |
|
530 | + 'LBL_YES' => 'Yes', |
|
531 | 531 | 'LBL_YES_MULTI' => 'Yes - Multibyte', |
532 | - // OOTB Scheduler Job Names: |
|
533 | - 'LBL_OOTB_WORKFLOW' => 'Process Workflow Tasks', |
|
534 | - 'LBL_OOTB_REPORTS' => 'Run Report Generation Scheduled Tasks', |
|
535 | - 'LBL_OOTB_IE' => 'Check Inbound Mailboxes', |
|
536 | - 'LBL_OOTB_BOUNCE' => 'Run Nightly Process Bounced Campaign Emails', |
|
532 | + // OOTB Scheduler Job Names: |
|
533 | + 'LBL_OOTB_WORKFLOW' => 'Process Workflow Tasks', |
|
534 | + 'LBL_OOTB_REPORTS' => 'Run Report Generation Scheduled Tasks', |
|
535 | + 'LBL_OOTB_IE' => 'Check Inbound Mailboxes', |
|
536 | + 'LBL_OOTB_BOUNCE' => 'Run Nightly Process Bounced Campaign Emails', |
|
537 | 537 | 'LBL_OOTB_CAMPAIGN' => 'Run Nightly Mass Email Campaigns', |
538 | - 'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month', |
|
538 | + 'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month', |
|
539 | 539 | 'LBL_OOTB_TRACKER' => 'Prune tracker tables', |
540 | 540 | 'LBL_OOTB_SUGARFEEDS' => 'Prune SuiteCRM Feed Tables', |
541 | 541 | 'LBL_OOTB_SEND_EMAIL_REMINDERS' => 'Run Email Reminder Notifications', |
@@ -549,19 +549,19 @@ discard block |
||
549 | 549 | 'LBL_PATCH_1' => 'If you would like to skip this step, click Next.', |
550 | 550 | 'LBL_PATCH_TITLE' => 'System Patch', |
551 | 551 | 'LBL_PATCH_READY' => 'The following patch(es) are ready to be installed:', |
552 | - 'LBL_SESSION_ERR_DESCRIPTION' => "SuiteCRM relies upon PHP sessions to store important information while connected to this web server. Your PHP installation does not have the Session information correctly configured. |
|
552 | + 'LBL_SESSION_ERR_DESCRIPTION' => "SuiteCRM relies upon PHP sessions to store important information while connected to this web server. Your PHP installation does not have the Session information correctly configured. |
|
553 | 553 | <br><br>A common misconfiguration is that the <b>'session.save_path'</b> directive is not pointing to a valid directory. <br> |
554 | 554 | <br> Please correct your <a target=_new href='http://us2.php.net/manual/en/ref.session.php'>PHP configuration</a> in the php.ini file located here below.", |
555 | - 'LBL_SESSION_ERR_TITLE' => 'PHP Sessions Configuration Error', |
|
556 | - 'LBL_SYSTEM_NAME'=>'System Name', |
|
555 | + 'LBL_SESSION_ERR_TITLE' => 'PHP Sessions Configuration Error', |
|
556 | + 'LBL_SYSTEM_NAME'=>'System Name', |
|
557 | 557 | 'LBL_COLLATION' => 'Collation Settings', |
558 | - 'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.', |
|
559 | - 'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer', |
|
560 | - 'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.', |
|
561 | - 'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.', |
|
562 | - 'LBL_YOUR_PHP_VERSION' => '(Your current php version is ', |
|
563 | - 'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)', |
|
564 | - 'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further', |
|
558 | + 'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.', |
|
559 | + 'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer', |
|
560 | + 'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.', |
|
561 | + 'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.', |
|
562 | + 'LBL_YOUR_PHP_VERSION' => '(Your current php version is ', |
|
563 | + 'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)', |
|
564 | + 'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further', |
|
565 | 565 | 'LBL_STREAM' => 'PHP allows to use stream', |
566 | 566 | |
567 | 567 | 'advanced_password_new_account_email' => array( |
@@ -593,92 +593,92 @@ discard block |
||
593 | 593 | 'name' => 'Forgot Password email', |
594 | 594 | ), |
595 | 595 | |
596 | - // SMTP settings |
|
597 | - |
|
598 | - 'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.', |
|
599 | - 'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:', |
|
600 | - |
|
601 | - 'LBL_SMTPTYPE_GMAIL' => 'Gmail', |
|
602 | - 'LBL_SMTPTYPE_YAHOO' => 'Yahoo! Mail', |
|
603 | - 'LBL_SMTPTYPE_EXCHANGE' => 'Microsoft Exchange', |
|
604 | - 'LBL_SMTPTYPE_OTHER' => 'Other', |
|
605 | - 'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification', |
|
606 | - 'LBL_MAIL_SMTPSERVER' => 'SMTP Server:', |
|
607 | - 'LBL_MAIL_SMTPPORT' => 'SMTP Port:', |
|
608 | - 'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?', |
|
609 | - 'LBL_EMAIL_SMTP_SSL_OR_TLS' => 'Enable SMTP over SSL or TLS?', |
|
610 | - 'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:', |
|
611 | - 'LBL_GMAIL_SMTPPASS' => 'Gmail Password:', |
|
612 | - 'LBL_ALLOW_DEFAULT_SELECTION' => 'Allow users to use this account for outgoing email:', |
|
613 | - 'LBL_ALLOW_DEFAULT_SELECTION_HELP' => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts. If the option is not selected, users can still use the outgoing mail server after providing their own account information.', |
|
614 | - |
|
615 | - 'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:', |
|
616 | - 'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:', |
|
617 | - |
|
618 | - 'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:', |
|
619 | - 'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:', |
|
620 | - 'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:', |
|
621 | - 'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:', |
|
622 | - |
|
623 | - |
|
624 | - 'LBL_MAIL_SMTPUSER' => 'SMTP Username:', |
|
625 | - 'LBL_MAIL_SMTPPASS' => 'SMTP Password:', |
|
626 | - |
|
627 | - // Branding |
|
628 | - |
|
629 | - 'LBL_WIZARD_SYSTEM_TITLE' => 'Branding', |
|
630 | - 'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.', |
|
631 | - 'SYSTEM_NAME_WIZARD'=>'Name:', |
|
632 | - 'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.', |
|
633 | - 'NEW_LOGO'=>'Select Logo:', |
|
634 | - 'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.', |
|
635 | - 'COMPANY_LOGO_UPLOAD_BTN' => 'Upload', |
|
636 | - 'CURRENT_LOGO'=>'Current Logo:', |
|
596 | + // SMTP settings |
|
597 | + |
|
598 | + 'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.', |
|
599 | + 'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:', |
|
600 | + |
|
601 | + 'LBL_SMTPTYPE_GMAIL' => 'Gmail', |
|
602 | + 'LBL_SMTPTYPE_YAHOO' => 'Yahoo! Mail', |
|
603 | + 'LBL_SMTPTYPE_EXCHANGE' => 'Microsoft Exchange', |
|
604 | + 'LBL_SMTPTYPE_OTHER' => 'Other', |
|
605 | + 'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification', |
|
606 | + 'LBL_MAIL_SMTPSERVER' => 'SMTP Server:', |
|
607 | + 'LBL_MAIL_SMTPPORT' => 'SMTP Port:', |
|
608 | + 'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?', |
|
609 | + 'LBL_EMAIL_SMTP_SSL_OR_TLS' => 'Enable SMTP over SSL or TLS?', |
|
610 | + 'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:', |
|
611 | + 'LBL_GMAIL_SMTPPASS' => 'Gmail Password:', |
|
612 | + 'LBL_ALLOW_DEFAULT_SELECTION' => 'Allow users to use this account for outgoing email:', |
|
613 | + 'LBL_ALLOW_DEFAULT_SELECTION_HELP' => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts. If the option is not selected, users can still use the outgoing mail server after providing their own account information.', |
|
614 | + |
|
615 | + 'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:', |
|
616 | + 'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:', |
|
617 | + |
|
618 | + 'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:', |
|
619 | + 'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:', |
|
620 | + 'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:', |
|
621 | + 'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:', |
|
622 | + |
|
623 | + |
|
624 | + 'LBL_MAIL_SMTPUSER' => 'SMTP Username:', |
|
625 | + 'LBL_MAIL_SMTPPASS' => 'SMTP Password:', |
|
626 | + |
|
627 | + // Branding |
|
628 | + |
|
629 | + 'LBL_WIZARD_SYSTEM_TITLE' => 'Branding', |
|
630 | + 'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.', |
|
631 | + 'SYSTEM_NAME_WIZARD'=>'Name:', |
|
632 | + 'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.', |
|
633 | + 'NEW_LOGO'=>'Select Logo:', |
|
634 | + 'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.', |
|
635 | + 'COMPANY_LOGO_UPLOAD_BTN' => 'Upload', |
|
636 | + 'CURRENT_LOGO'=>'Current Logo:', |
|
637 | 637 | 'CURRENT_LOGO_HELP'=>'This logo is displayed in the left-hand corner of the footer of the SuiteCRM application.', |
638 | 638 | |
639 | - // System Local Settings |
|
640 | - |
|
641 | - |
|
642 | - 'LBL_LOCALE_TITLE' => 'System Locale Settings', |
|
643 | - 'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.', |
|
644 | - 'LBL_DATE_FORMAT' => 'Date Format:', |
|
645 | - 'LBL_TIME_FORMAT' => 'Time Format:', |
|
646 | - 'LBL_TIMEZONE' => 'Time Zone:', |
|
647 | - 'LBL_LANGUAGE'=>'Language:', |
|
648 | - 'LBL_CURRENCY'=>'Currency:', |
|
649 | - 'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:', |
|
650 | - 'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:', |
|
651 | - 'LBL_NUMBER_GROUPING_SEP' => '1000s separator:', |
|
652 | - 'LBL_DECIMAL_SEP' => 'Decimal symbol:', |
|
653 | - 'LBL_NAME_FORMAT' => 'Name Format:', |
|
654 | - 'UPLOAD_LOGO' => 'Please wait, logo uploading..', |
|
655 | - 'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.', |
|
656 | - 'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.', |
|
657 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', |
|
658 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', |
|
659 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.', |
|
660 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.', |
|
661 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.', |
|
662 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.', |
|
663 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.', |
|
664 | - |
|
665 | - 'LBL_INSTALL_PROCESS' => 'Install...', |
|
666 | - |
|
667 | - 'LBL_EMAIL_ADDRESS' => 'Email Address:', |
|
668 | - 'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.', |
|
669 | - 'ERR_SITE_URL' => 'Site URL is required.', |
|
670 | - |
|
671 | - 'STAT_CONFIGURATION' => 'Configuration relationships...', |
|
672 | - 'STAT_CREATE_DB' => 'Create database...', |
|
673 | - //'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)', |
|
674 | - 'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...', |
|
675 | - 'STAT_INSTALL_FINISH' => 'Install finish...', |
|
676 | - 'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>', |
|
677 | - 'LBL_LICENCE_TOOLTIP' => 'Please accept license first', |
|
678 | - |
|
679 | - 'LBL_MORE_OPTIONS_TITLE' => 'More options', |
|
680 | - 'LBL_START' => '', |
|
681 | - 'LBL_DB_CONN_ERR' => 'Database error' |
|
639 | + // System Local Settings |
|
640 | + |
|
641 | + |
|
642 | + 'LBL_LOCALE_TITLE' => 'System Locale Settings', |
|
643 | + 'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.', |
|
644 | + 'LBL_DATE_FORMAT' => 'Date Format:', |
|
645 | + 'LBL_TIME_FORMAT' => 'Time Format:', |
|
646 | + 'LBL_TIMEZONE' => 'Time Zone:', |
|
647 | + 'LBL_LANGUAGE'=>'Language:', |
|
648 | + 'LBL_CURRENCY'=>'Currency:', |
|
649 | + 'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:', |
|
650 | + 'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:', |
|
651 | + 'LBL_NUMBER_GROUPING_SEP' => '1000s separator:', |
|
652 | + 'LBL_DECIMAL_SEP' => 'Decimal symbol:', |
|
653 | + 'LBL_NAME_FORMAT' => 'Name Format:', |
|
654 | + 'UPLOAD_LOGO' => 'Please wait, logo uploading..', |
|
655 | + 'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.', |
|
656 | + 'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.', |
|
657 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', |
|
658 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', |
|
659 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.', |
|
660 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.', |
|
661 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.', |
|
662 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.', |
|
663 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.', |
|
664 | + |
|
665 | + 'LBL_INSTALL_PROCESS' => 'Install...', |
|
666 | + |
|
667 | + 'LBL_EMAIL_ADDRESS' => 'Email Address:', |
|
668 | + 'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.', |
|
669 | + 'ERR_SITE_URL' => 'Site URL is required.', |
|
670 | + |
|
671 | + 'STAT_CONFIGURATION' => 'Configuration relationships...', |
|
672 | + 'STAT_CREATE_DB' => 'Create database...', |
|
673 | + //'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)', |
|
674 | + 'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...', |
|
675 | + 'STAT_INSTALL_FINISH' => 'Install finish...', |
|
676 | + 'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>', |
|
677 | + 'LBL_LICENCE_TOOLTIP' => 'Please accept license first', |
|
678 | + |
|
679 | + 'LBL_MORE_OPTIONS_TITLE' => 'More options', |
|
680 | + 'LBL_START' => '', |
|
681 | + 'LBL_DB_CONN_ERR' => 'Database error' |
|
682 | 682 | |
683 | 683 | |
684 | 684 | ); |
@@ -40,42 +40,42 @@ |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Tasks"; |
42 | 42 | $searchFields['Tasks'] = |
43 | - array ( |
|
44 | - 'name' => array( 'query_type'=>'default'), |
|
43 | + array ( |
|
44 | + 'name' => array( 'query_type'=>'default'), |
|
45 | 45 | 'contact_name' => array('query_type' => 'default', 'db_field' => array('contacts.first_name', 'contacts.last_name'), 'force_unifiedsearch' => true), |
46 | 46 | 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
47 | 47 | 'assigned_user_id'=> array('query_type'=>'default'), |
48 | 48 | 'status'=> array('query_type'=>'default', 'options' => 'task_status_dom', 'template_var' => 'STATUS_FILTER'), |
49 | 49 | |
50 | - 'open_only' => array( |
|
51 | - 'query_type'=>'default', |
|
52 | - 'db_field'=>array('status'), |
|
53 | - 'operator'=>'not in', |
|
54 | - 'closed_values' => array('Completed', 'Deferred'), |
|
55 | - 'type'=>'bool', |
|
56 | - ), |
|
50 | + 'open_only' => array( |
|
51 | + 'query_type'=>'default', |
|
52 | + 'db_field'=>array('status'), |
|
53 | + 'operator'=>'not in', |
|
54 | + 'closed_values' => array('Completed', 'Deferred'), |
|
55 | + 'type'=>'bool', |
|
56 | + ), |
|
57 | 57 | 'favorites_only' => array( |
58 | 58 | 'query_type'=>'format', |
59 | 59 | 'operator' => 'subquery', |
60 | - 'subquery' => "SELECT favorites.parent_id FROM favorites |
|
60 | + 'subquery' => "SELECT favorites.parent_id FROM favorites |
|
61 | 61 | WHERE favorites.deleted = 0 |
62 | 62 | and favorites.parent_type = '".$module_name."' |
63 | 63 | and favorites.assigned_user_id = '" .$current_user->id . "') OR NOT ({0}", |
64 | 64 | 'db_field'=>array('id')), |
65 | - //Range Search Support |
|
66 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
69 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
70 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
71 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
65 | + //Range Search Support |
|
66 | + 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | + 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | + 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
69 | + 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
70 | + 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
71 | + 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
72 | 72 | |
73 | - 'range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | - 'start_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | - 'end_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | - 'range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
77 | - 'start_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | - 'end_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | - //Range Search Support |
|
80 | - ); |
|
73 | + 'range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | + 'start_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | + 'end_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | + 'range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
77 | + 'start_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | + 'end_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | + //Range Search Support |
|
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. |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Tasks"; |
42 | 42 | $searchFields['Tasks'] = |
43 | - array ( |
|
44 | - 'name' => array( 'query_type'=>'default'), |
|
43 | + array( |
|
44 | + 'name' => array('query_type'=>'default'), |
|
45 | 45 | 'contact_name' => array('query_type' => 'default', 'db_field' => array('contacts.first_name', 'contacts.last_name'), 'force_unifiedsearch' => true), |
46 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
46 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
47 | 47 | 'assigned_user_id'=> array('query_type'=>'default'), |
48 | 48 | 'status'=> array('query_type'=>'default', 'options' => 'task_status_dom', 'template_var' => 'STATUS_FILTER'), |
49 | 49 | |
@@ -60,22 +60,22 @@ discard block |
||
60 | 60 | 'subquery' => "SELECT favorites.parent_id FROM favorites |
61 | 61 | WHERE favorites.deleted = 0 |
62 | 62 | and favorites.parent_type = '".$module_name."' |
63 | - and favorites.assigned_user_id = '" .$current_user->id . "') OR NOT ({0}", |
|
63 | + and favorites.assigned_user_id = '" .$current_user->id."') OR NOT ({0}", |
|
64 | 64 | 'db_field'=>array('id')), |
65 | 65 | //Range Search Support |
66 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
69 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
70 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
71 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
66 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
67 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
68 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
69 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
70 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
71 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
72 | 72 | |
73 | - 'range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | - 'start_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | - 'end_range_date_start' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | - 'range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
77 | - 'start_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | - 'end_range_date_due' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
73 | + 'range_date_start' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
74 | + 'start_range_date_start' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
75 | + 'end_range_date_start' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
76 | + 'range_date_due' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
77 | + 'start_range_date_due' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
78 | + 'end_range_date_due' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
79 | 79 | //Range Search Support |
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. |
@@ -39,33 +39,33 @@ discard block |
||
39 | 39 | ********************************************************************************/ |
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Calls"; |
42 | -$searchFields['Calls'] = array ( |
|
42 | +$searchFields['Calls'] = array( |
|
43 | 43 | 'name' => |
44 | - array ( |
|
44 | + array( |
|
45 | 45 | 'query_type' => 'default', |
46 | 46 | ), |
47 | 47 | 'contact_name' => |
48 | - array ( |
|
48 | + array( |
|
49 | 49 | 'query_type' => 'default', |
50 | 50 | 'db_field' => |
51 | - array ( |
|
51 | + array( |
|
52 | 52 | 0 => 'contacts.first_name', |
53 | 53 | 1 => 'contacts.last_name', |
54 | 54 | ), |
55 | 55 | ), |
56 | 56 | 'date_start' => |
57 | - array ( |
|
57 | + array( |
|
58 | 58 | 'query_type' => 'default', |
59 | 59 | ), |
60 | 60 | 'location' => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 'query_type' => 'default', |
63 | 63 | ), |
64 | 64 | 'current_user_only' => |
65 | - array ( |
|
65 | + array( |
|
66 | 66 | 'query_type' => 'default', |
67 | 67 | 'db_field' => |
68 | - array ( |
|
68 | + array( |
|
69 | 69 | 0 => 'assigned_user_id', |
70 | 70 | ), |
71 | 71 | 'my_items' => true, |
@@ -73,98 +73,98 @@ discard block |
||
73 | 73 | 'type' => 'bool', |
74 | 74 | ), |
75 | 75 | 'assigned_user_id' => |
76 | - array ( |
|
76 | + array( |
|
77 | 77 | 'query_type' => 'default', |
78 | 78 | ), |
79 | 79 | 'status' => |
80 | - array ( |
|
80 | + array( |
|
81 | 81 | 'query_type' => 'default', |
82 | 82 | 'options' => 'call_status_dom', |
83 | 83 | 'template_var' => 'STATUS_FILTER', |
84 | 84 | ), |
85 | 85 | 'open_only' => |
86 | - array ( |
|
86 | + array( |
|
87 | 87 | 'query_type' => 'default', |
88 | 88 | 'db_field' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 0 => 'status', |
91 | 91 | ), |
92 | 92 | 'operator' => 'not in', |
93 | 93 | 'closed_values' => |
94 | - array ( |
|
94 | + array( |
|
95 | 95 | 0 => 'Held', |
96 | 96 | 1 => 'Not Held', |
97 | 97 | ), |
98 | 98 | 'type' => 'bool', |
99 | 99 | ), |
100 | 100 | 'range_date_entered' => |
101 | - array ( |
|
101 | + array( |
|
102 | 102 | 'query_type' => 'default', |
103 | 103 | 'enable_range_search' => true, |
104 | 104 | 'is_date_field' => true, |
105 | 105 | ), |
106 | 106 | 'start_range_date_entered' => |
107 | - array ( |
|
107 | + array( |
|
108 | 108 | 'query_type' => 'default', |
109 | 109 | 'enable_range_search' => true, |
110 | 110 | 'is_date_field' => true, |
111 | 111 | ), |
112 | 112 | 'end_range_date_entered' => |
113 | - array ( |
|
113 | + array( |
|
114 | 114 | 'query_type' => 'default', |
115 | 115 | 'enable_range_search' => true, |
116 | 116 | 'is_date_field' => true, |
117 | 117 | ), |
118 | 118 | 'range_date_modified' => |
119 | - array ( |
|
119 | + array( |
|
120 | 120 | 'query_type' => 'default', |
121 | 121 | 'enable_range_search' => true, |
122 | 122 | 'is_date_field' => true, |
123 | 123 | ), |
124 | 124 | 'start_range_date_modified' => |
125 | - array ( |
|
125 | + array( |
|
126 | 126 | 'query_type' => 'default', |
127 | 127 | 'enable_range_search' => true, |
128 | 128 | 'is_date_field' => true, |
129 | 129 | ), |
130 | 130 | 'end_range_date_modified' => |
131 | - array ( |
|
131 | + array( |
|
132 | 132 | 'query_type' => 'default', |
133 | 133 | 'enable_range_search' => true, |
134 | 134 | 'is_date_field' => true, |
135 | 135 | ), |
136 | 136 | 'range_date_start' => |
137 | - array ( |
|
137 | + array( |
|
138 | 138 | 'query_type' => 'default', |
139 | 139 | 'enable_range_search' => true, |
140 | 140 | 'is_date_field' => true, |
141 | 141 | ), |
142 | 142 | 'start_range_date_start' => |
143 | - array ( |
|
143 | + array( |
|
144 | 144 | 'query_type' => 'default', |
145 | 145 | 'enable_range_search' => true, |
146 | 146 | 'is_date_field' => true, |
147 | 147 | ), |
148 | 148 | 'end_range_date_start' => |
149 | - array ( |
|
149 | + array( |
|
150 | 150 | 'query_type' => 'default', |
151 | 151 | 'enable_range_search' => true, |
152 | 152 | 'is_date_field' => true, |
153 | 153 | ), |
154 | 154 | 'range_date_end' => |
155 | - array ( |
|
155 | + array( |
|
156 | 156 | 'query_type' => 'default', |
157 | 157 | 'enable_range_search' => true, |
158 | 158 | 'is_date_field' => true, |
159 | 159 | ), |
160 | 160 | 'start_range_date_end' => |
161 | - array ( |
|
161 | + array( |
|
162 | 162 | 'query_type' => 'default', |
163 | 163 | 'enable_range_search' => true, |
164 | 164 | 'is_date_field' => true, |
165 | 165 | ), |
166 | 166 | 'end_range_date_end' => |
167 | - array ( |
|
167 | + array( |
|
168 | 168 | 'query_type' => 'default', |
169 | 169 | 'enable_range_search' => true, |
170 | 170 | 'is_date_field' => true, |
@@ -175,6 +175,6 @@ discard block |
||
175 | 175 | 'subquery' => "SELECT favorites.parent_id FROM favorites |
176 | 176 | WHERE favorites.deleted = 0 |
177 | 177 | and favorites.parent_type = '".$module_name."' |
178 | - and favorites.assigned_user_id = '" .$current_user->id . "') OR NOT ({0}", |
|
178 | + and favorites.assigned_user_id = '" .$current_user->id."') OR NOT ({0}", |
|
179 | 179 | 'db_field'=>array('id')), |
180 | 180 | ); |
181 | 181 | \ No newline at end of file |
@@ -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. |
@@ -39,42 +39,42 @@ discard block |
||
39 | 39 | ********************************************************************************/ |
40 | 40 | global $current_user; |
41 | 41 | $module_name = "Cases"; |
42 | -$searchFields['Cases'] = array ( |
|
42 | +$searchFields['Cases'] = array( |
|
43 | 43 | 'name' => |
44 | - array ( |
|
44 | + array( |
|
45 | 45 | 'query_type' => 'default', |
46 | 46 | ), |
47 | 47 | 'account_name' => |
48 | - array ( |
|
48 | + array( |
|
49 | 49 | 'query_type' => 'default', |
50 | 50 | 'db_field' => |
51 | - array ( |
|
51 | + array( |
|
52 | 52 | 0 => 'accounts.name', |
53 | 53 | ), |
54 | 54 | ), |
55 | 55 | 'status' => |
56 | - array ( |
|
56 | + array( |
|
57 | 57 | 'query_type' => 'default', |
58 | 58 | 'options' => 'case_status_dom', |
59 | 59 | 'template_var' => 'STATUS_OPTIONS', |
60 | 60 | ), |
61 | 61 | 'priority' => |
62 | - array ( |
|
62 | + array( |
|
63 | 63 | 'query_type' => 'default', |
64 | 64 | 'options' => 'case_priority_dom', |
65 | 65 | 'template_var' => 'PRIORITY_OPTIONS', |
66 | 66 | 'options_add_blank' => true, |
67 | 67 | ), |
68 | 68 | 'case_number' => |
69 | - array ( |
|
69 | + array( |
|
70 | 70 | 'query_type' => 'default', |
71 | 71 | 'operator' => 'in', |
72 | 72 | ), |
73 | 73 | 'current_user_only' => |
74 | - array ( |
|
74 | + array( |
|
75 | 75 | 'query_type' => 'default', |
76 | 76 | 'db_field' => |
77 | - array ( |
|
77 | + array( |
|
78 | 78 | 0 => 'assigned_user_id', |
79 | 79 | ), |
80 | 80 | 'my_items' => true, |
@@ -82,19 +82,19 @@ discard block |
||
82 | 82 | 'type' => 'bool', |
83 | 83 | ), |
84 | 84 | 'assigned_user_id' => |
85 | - array ( |
|
85 | + array( |
|
86 | 86 | 'query_type' => 'default', |
87 | 87 | ), |
88 | 88 | 'open_only' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 'query_type' => 'default', |
91 | 91 | 'db_field' => |
92 | - array ( |
|
92 | + array( |
|
93 | 93 | 0 => 'status', |
94 | 94 | ), |
95 | 95 | 'operator' => 'not in', |
96 | 96 | 'closed_values' => |
97 | - array ( |
|
97 | + array( |
|
98 | 98 | 0 => 'Closed', |
99 | 99 | 1 => 'Rejected', |
100 | 100 | 2 => 'Duplicate', |
@@ -105,43 +105,43 @@ discard block |
||
105 | 105 | 'type' => 'bool', |
106 | 106 | ), |
107 | 107 | 'range_date_entered' => |
108 | - array ( |
|
108 | + array( |
|
109 | 109 | 'query_type' => 'default', |
110 | 110 | 'enable_range_search' => true, |
111 | 111 | 'is_date_field' => true, |
112 | 112 | ), |
113 | 113 | 'start_range_date_entered' => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 'query_type' => 'default', |
116 | 116 | 'enable_range_search' => true, |
117 | 117 | 'is_date_field' => true, |
118 | 118 | ), |
119 | 119 | 'end_range_date_entered' => |
120 | - array ( |
|
120 | + array( |
|
121 | 121 | 'query_type' => 'default', |
122 | 122 | 'enable_range_search' => true, |
123 | 123 | 'is_date_field' => true, |
124 | 124 | ), |
125 | 125 | 'range_date_modified' => |
126 | - array ( |
|
126 | + array( |
|
127 | 127 | 'query_type' => 'default', |
128 | 128 | 'enable_range_search' => true, |
129 | 129 | 'is_date_field' => true, |
130 | 130 | ), |
131 | 131 | 'start_range_date_modified' => |
132 | - array ( |
|
132 | + array( |
|
133 | 133 | 'query_type' => 'default', |
134 | 134 | 'enable_range_search' => true, |
135 | 135 | 'is_date_field' => true, |
136 | 136 | ), |
137 | 137 | 'end_range_date_modified' => |
138 | - array ( |
|
138 | + array( |
|
139 | 139 | 'query_type' => 'default', |
140 | 140 | 'enable_range_search' => true, |
141 | 141 | 'is_date_field' => true, |
142 | 142 | ), |
143 | 143 | 'state' => |
144 | - array ( |
|
144 | + array( |
|
145 | 145 | 'query_type' => 'default', |
146 | 146 | ), |
147 | 147 | 'favorites_only' => array( |
@@ -150,6 +150,6 @@ discard block |
||
150 | 150 | 'subquery' => "SELECT favorites.parent_id FROM favorites |
151 | 151 | WHERE favorites.deleted = 0 |
152 | 152 | and favorites.parent_type = '".$module_name."' |
153 | - and favorites.assigned_user_id = '" .$current_user->id . "') OR NOT ({0}", |
|
153 | + and favorites.assigned_user_id = '" .$current_user->id."') OR NOT ({0}", |
|
154 | 154 | 'db_field'=>array('id')), |
155 | 155 | ); |
156 | 156 | \ No newline at end of file |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | /** |
122 | 122 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
123 | 123 | */ |
124 | - public function EmailTemplate(){ |
|
124 | + public function EmailTemplate() { |
|
125 | 125 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
126 | - if(isset($GLOBALS['log'])) { |
|
126 | + if (isset($GLOBALS['log'])) { |
|
127 | 127 | $GLOBALS['log']->deprecated($deprecatedMessage); |
128 | 128 | } |
129 | 129 | else { |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | } |
369 | 369 | if (!empty($tracker_url) && !empty($template_text) && !empty($matches[0][$i][0]) && !empty($tracked_urls[$matches[0][$i][0]])) { |
370 | 370 | $template_text = substr_replace($template_text, $tracker_url, $matches[0][$i][1], strlen($matches[0][$i][0])); |
371 | - $template_text = str_replace($sugar_config['site_url'] . '/' . $sugar_config['site_url'], $sugar_config['site_url'], $template_text); |
|
371 | + $template_text = str_replace($sugar_config['site_url'].'/'.$sugar_config['site_url'], $sugar_config['site_url'], $template_text); |
|
372 | 372 | } |
373 | 373 | } |
374 | 374 | } |
@@ -420,10 +420,10 @@ discard block |
||
420 | 420 | if ($beanList[$focus_name] == 'User') { |
421 | 421 | $pattern_prefix = '$contact_user_'; |
422 | 422 | } else { |
423 | - $pattern_prefix = '$' . strtolower($beanList[$focus_name]) . '_'; |
|
423 | + $pattern_prefix = '$'.strtolower($beanList[$focus_name]).'_'; |
|
424 | 424 | } |
425 | 425 | $pattern_prefix_length = strlen($pattern_prefix); |
426 | - $pattern = '/\\' . $pattern_prefix . '[A-Za-z_0-9]*/'; |
|
426 | + $pattern = '/\\'.$pattern_prefix.'[A-Za-z_0-9]*/'; |
|
427 | 427 | |
428 | 428 | $return_array = array(); |
429 | 429 | foreach ($template_text_array as $key => $template_text) { |
@@ -521,16 +521,16 @@ discard block |
||
521 | 521 | $translated = translate($field_def['options'], 'Users', $user->$fieldName); |
522 | 522 | |
523 | 523 | if (isset($translated) && !is_array($translated)) { |
524 | - $repl_arr["contact_user_" . $fieldName] = $translated; |
|
524 | + $repl_arr["contact_user_".$fieldName] = $translated; |
|
525 | 525 | } else { // unset enum field, make sure we have a match string to replace with "" |
526 | - $repl_arr["contact_user_" . $fieldName] = ''; |
|
526 | + $repl_arr["contact_user_".$fieldName] = ''; |
|
527 | 527 | } |
528 | 528 | } else { |
529 | 529 | if (isset($user->$fieldName)) { |
530 | 530 | // bug 47647 - allow for fields to translate before adding to template |
531 | - $repl_arr["contact_user_" . $fieldName] = self::_convertToType($field_def['type'], $user->$fieldName); |
|
531 | + $repl_arr["contact_user_".$fieldName] = self::_convertToType($field_def['type'], $user->$fieldName); |
|
532 | 532 | } else { |
533 | - $repl_arr["contact_user_" . $fieldName] = ""; |
|
533 | + $repl_arr["contact_user_".$fieldName] = ""; |
|
534 | 534 | } |
535 | 535 | } |
536 | 536 | } |
@@ -556,8 +556,8 @@ discard block |
||
556 | 556 | continue; |
557 | 557 | } |
558 | 558 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
559 | - 'contact_' . $field_def['name'] => '', |
|
560 | - 'contact_account_' . $field_def['name'] => '', |
|
559 | + 'contact_'.$field_def['name'] => '', |
|
560 | + 'contact_account_'.$field_def['name'] => '', |
|
561 | 561 | )); |
562 | 562 | } |
563 | 563 | foreach ($prospect->field_defs as $field_def) { |
@@ -565,8 +565,8 @@ discard block |
||
565 | 565 | continue; |
566 | 566 | } |
567 | 567 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
568 | - 'contact_' . $field_def['name'] => '', |
|
569 | - 'contact_account_' . $field_def['name'] => '', |
|
568 | + 'contact_'.$field_def['name'] => '', |
|
569 | + 'contact_account_'.$field_def['name'] => '', |
|
570 | 570 | )); |
571 | 571 | } |
572 | 572 | foreach ($contact->field_defs as $field_def) { |
@@ -574,8 +574,8 @@ discard block |
||
574 | 574 | continue; |
575 | 575 | } |
576 | 576 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
577 | - 'contact_' . $field_def['name'] => '', |
|
578 | - 'contact_account_' . $field_def['name'] => '', |
|
577 | + 'contact_'.$field_def['name'] => '', |
|
578 | + 'contact_account_'.$field_def['name'] => '', |
|
579 | 579 | )); |
580 | 580 | } |
581 | 581 | foreach ($acct->field_defs as $field_def) { |
@@ -583,8 +583,8 @@ discard block |
||
583 | 583 | continue; |
584 | 584 | } |
585 | 585 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
586 | - 'account_' . $field_def['name'] => '', |
|
587 | - 'account_contact_' . $field_def['name'] => '', |
|
586 | + 'account_'.$field_def['name'] => '', |
|
587 | + 'account_contact_'.$field_def['name'] => '', |
|
588 | 588 | )); |
589 | 589 | } |
590 | 590 | // cn: end bug 9277 fix |
@@ -609,21 +609,21 @@ discard block |
||
609 | 609 | |
610 | 610 | if (isset($translated) && !is_array($translated)) { |
611 | 611 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
612 | - 'account_' . $fieldName => $translated, |
|
613 | - 'contact_account_' . $fieldName => $translated, |
|
612 | + 'account_'.$fieldName => $translated, |
|
613 | + 'contact_account_'.$fieldName => $translated, |
|
614 | 614 | )); |
615 | 615 | } else { // unset enum field, make sure we have a match string to replace with "" |
616 | 616 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
617 | - 'account_' . $fieldName => '', |
|
618 | - 'contact_account_' . $fieldName => '', |
|
617 | + 'account_'.$fieldName => '', |
|
618 | + 'contact_account_'.$fieldName => '', |
|
619 | 619 | )); |
620 | 620 | } |
621 | 621 | } else { |
622 | 622 | // bug 47647 - allow for fields to translate before adding to template |
623 | 623 | $translated = self::_convertToType($field_def['type'], $acct->$fieldName); |
624 | 624 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
625 | - 'account_' . $fieldName => $translated, |
|
626 | - 'contact_account_' . $fieldName => $translated, |
|
625 | + 'account_'.$fieldName => $translated, |
|
626 | + 'contact_account_'.$fieldName => $translated, |
|
627 | 627 | )); |
628 | 628 | } |
629 | 629 | } |
@@ -654,13 +654,13 @@ discard block |
||
654 | 654 | |
655 | 655 | if (isset($translated) && !is_array($translated)) { |
656 | 656 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
657 | - 'contact_' . $fieldName => $translated, |
|
658 | - 'contact_account_' . $fieldName => $translated, |
|
657 | + 'contact_'.$fieldName => $translated, |
|
658 | + 'contact_account_'.$fieldName => $translated, |
|
659 | 659 | )); |
660 | 660 | } else { // unset enum field, make sure we have a match string to replace with "" |
661 | 661 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
662 | - 'contact_' . $fieldName => '', |
|
663 | - 'contact_account_' . $fieldName => '', |
|
662 | + 'contact_'.$fieldName => '', |
|
663 | + 'contact_account_'.$fieldName => '', |
|
664 | 664 | )); |
665 | 665 | } |
666 | 666 | } else { |
@@ -668,8 +668,8 @@ discard block |
||
668 | 668 | // bug 47647 - allow for fields to translate before adding to template |
669 | 669 | $translated = self::_convertToType($field_def['type'], $contact->$fieldName); |
670 | 670 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
671 | - 'contact_' . $fieldName => $translated, |
|
672 | - 'contact_account_' . $fieldName => $translated, |
|
671 | + 'contact_'.$fieldName => $translated, |
|
672 | + 'contact_account_'.$fieldName => $translated, |
|
673 | 673 | )); |
674 | 674 | } // if |
675 | 675 | } |
@@ -690,27 +690,27 @@ discard block |
||
690 | 690 | |
691 | 691 | if (isset($translated) && !is_array($translated)) { |
692 | 692 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
693 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => $translated, |
|
693 | + strtolower($beanList[$bean_name])."_".$fieldName => $translated, |
|
694 | 694 | )); |
695 | 695 | } else { // unset enum field, make sure we have a match string to replace with "" |
696 | 696 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
697 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => '', |
|
697 | + strtolower($beanList[$bean_name])."_".$fieldName => '', |
|
698 | 698 | )); |
699 | 699 | } |
700 | 700 | } else { |
701 | 701 | // bug 47647 - translate currencies to appropriate values |
702 | 702 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
703 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => self::_convertToType($field_def['type'], $focus->$fieldName), |
|
703 | + strtolower($beanList[$bean_name])."_".$fieldName => self::_convertToType($field_def['type'], $focus->$fieldName), |
|
704 | 704 | )); |
705 | 705 | } |
706 | 706 | } else { |
707 | 707 | if ($fieldName == 'full_name') { |
708 | 708 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
709 | - strtolower($beanList[$bean_name]) . '_full_name' => $focus->get_summary_text(), |
|
709 | + strtolower($beanList[$bean_name]).'_full_name' => $focus->get_summary_text(), |
|
710 | 710 | )); |
711 | 711 | } else { |
712 | 712 | $repl_arr = EmailTemplate::add_replacement($repl_arr, $field_def, array( |
713 | - strtolower($beanList[$bean_name]) . "_" . $fieldName => '', |
|
713 | + strtolower($beanList[$bean_name])."_".$fieldName => '', |
|
714 | 714 | )); |
715 | 715 | } |
716 | 716 | } |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | { |
762 | 762 | foreach ($bean_arr as $bean_name => $bean_id) { |
763 | 763 | |
764 | - $focus = BeanFactory::getBean($bean_name,$bean_id); |
|
764 | + $focus = BeanFactory::getBean($bean_name, $bean_id); |
|
765 | 765 | |
766 | 766 | if ($bean_name == 'Leads' || $bean_name == 'Prospects') { |
767 | 767 | $bean_name = 'Contacts'; |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | $this->repairMozaikClears(); |
844 | 844 | $this->imageLinkReplaced = false; |
845 | 845 | $this->repairEntryPointImages(); |
846 | - if($this->imageLinkReplaced) { |
|
846 | + if ($this->imageLinkReplaced) { |
|
847 | 847 | $this->save(); |
848 | 848 | } |
849 | 849 | return $ret; |
@@ -862,13 +862,13 @@ discard block |
||
862 | 862 | // repair the images url at entry points, change to a public direct link for remote email clients.. |
863 | 863 | |
864 | 864 | $siteUrlQuoted = str_replace(array(':', '/'), array('\:', '\/'), $sugar_config['site_url']); |
865 | - $regex = '/<img src="(' . $siteUrlQuoted . '\/index\.php\?entryPoint=download&type=Notes&id=([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})&filename=[^&]+)"/'; |
|
865 | + $regex = '/<img src="('.$siteUrlQuoted.'\/index\.php\?entryPoint=download&type=Notes&id=([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})&filename=[^&]+)"/'; |
|
866 | 866 | |
867 | - if(preg_match($regex, $this->body_html, $match)) { |
|
867 | + if (preg_match($regex, $this->body_html, $match)) { |
|
868 | 868 | $splits = explode('.', $match[1]); |
869 | 869 | $fileExtension = end($splits); |
870 | 870 | $this->makePublicImage($match[2]); |
871 | - $directLink = '<img src="' . $sugar_config['site_url'] . '/public/' . $match[2] . '.' . $fileExtension . '"'; |
|
871 | + $directLink = '<img src="'.$sugar_config['site_url'].'/public/'.$match[2].'.'.$fileExtension.'"'; |
|
872 | 872 | $this->body_html = str_replace($match[0], $directLink, $this->body_html); |
873 | 873 | $this->imageLinkReplaced = true; |
874 | 874 | $this->repairEntryPointImages(); |
@@ -877,25 +877,25 @@ discard block |
||
877 | 877 | } |
878 | 878 | |
879 | 879 | private function makePublicImage($id) { |
880 | - $toFile = 'public/' . $id . '.jpg'; |
|
881 | - if(file_exists($toFile)) { |
|
880 | + $toFile = 'public/'.$id.'.jpg'; |
|
881 | + if (file_exists($toFile)) { |
|
882 | 882 | return; |
883 | 883 | } |
884 | - $fromFile = 'upload://' . $id; |
|
885 | - if(!file_exists($fromFile)) { |
|
884 | + $fromFile = 'upload://'.$id; |
|
885 | + if (!file_exists($fromFile)) { |
|
886 | 886 | throw new Exceptin('file not found'); |
887 | 887 | } |
888 | - if(!file_exists('public')) { |
|
888 | + if (!file_exists('public')) { |
|
889 | 889 | sugar_mkdir('public', 777); |
890 | 890 | } |
891 | 891 | $fdata = file_get_contents($fromFile); |
892 | - if(!file_put_contents($toFile, $fdata)) { |
|
892 | + if (!file_put_contents($toFile, $fdata)) { |
|
893 | 893 | throw new Exception('file write error'); |
894 | 894 | } |
895 | 895 | } |
896 | 896 | |
897 | 897 | public function getAttachments() { |
898 | - return BeanFactory::getBean('Notes')->get_full_list('', "parent_id = '" . $this->id . "'"); |
|
898 | + return BeanFactory::getBean('Notes')->get_full_list('', "parent_id = '".$this->id."'"); |
|
899 | 899 | } |
900 | 900 | |
901 | 901 | } |