@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,8 +57,9 @@ discard block |
||
55 | 57 | $contents = ""; |
56 | 58 | $query = "SELECT description FROM notes WHERE file_mime_type = 'messsage/rfc822' AND parent_type='Emails' AND parent_id = '".$email->id."' AND deleted=0"; |
57 | 59 | $rs = $GLOBALS['db']->query($query); |
58 | - while ($row = $GLOBALS['db']->fetchByAssoc($rs)) |
|
59 | - $contents .= $row['description']; |
|
60 | + while ($row = $GLOBALS['db']->fetchByAssoc($rs)) { |
|
61 | + $contents .= $row['description']; |
|
62 | + } |
|
60 | 63 | |
61 | 64 | return $contents; |
62 | 65 | } |
@@ -89,9 +92,9 @@ discard block |
||
89 | 92 | { |
90 | 93 | $bounce->activity_type='invalid email'; |
91 | 94 | markEmailAddressInvalid($email); |
95 | + } else { |
|
96 | + $bounce->activity_type='send error'; |
|
92 | 97 | } |
93 | - else |
|
94 | - $bounce->activity_type='send error'; |
|
95 | 98 | |
96 | 99 | $return_id=$bounce->save(); |
97 | 100 | return $return_id; |
@@ -104,8 +107,9 @@ discard block |
||
104 | 107 | */ |
105 | 108 | function markEmailAddressInvalid($email_address) |
106 | 109 | { |
107 | - if(empty($email_address)) |
|
108 | - return; |
|
110 | + if(empty($email_address)) { |
|
111 | + return; |
|
112 | + } |
|
109 | 113 | $sea = new SugarEmailAddress(); |
110 | 114 | $rs = $sea->retrieve_by_string_fields( array('email_address_caps' => trim(strtoupper($email_address))) ); |
111 | 115 | if($rs != null) |
@@ -149,8 +153,7 @@ discard block |
||
149 | 153 | $identifiers = preg_split('/X-CampTrackID: /',$matches[0],-1,PREG_SPLIT_NO_EMPTY); |
150 | 154 | $found = TRUE; |
151 | 155 | $GLOBALS['log']->debug("Found campaign identifier in header of email"); |
152 | - } |
|
153 | - else if( preg_match('/index.php\?entryPoint=removeme&identifier=[a-z0-9\-]*/',$email_description, $matches) ) |
|
156 | + } else if( preg_match('/index.php\?entryPoint=removeme&identifier=[a-z0-9\-]*/',$email_description, $matches) ) |
|
154 | 157 | { |
155 | 158 | $identifiers = preg_split('/index.php\?entryPoint=removeme&identifier=/',$matches[0],-1,PREG_SPLIT_NO_EMPTY); |
156 | 159 | $found = TRUE; |
@@ -207,32 +210,27 @@ discard block |
||
207 | 210 | { |
208 | 211 | $return_id = createBouncedCampaignLogEntry($row, $email, $email_description); |
209 | 212 | return TRUE; |
210 | - } |
|
211 | - else |
|
213 | + } else |
|
212 | 214 | { |
213 | 215 | $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier"); |
214 | 216 | return FALSE; |
215 | 217 | } |
216 | - } |
|
217 | - else |
|
218 | + } else |
|
218 | 219 | { |
219 | 220 | $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier); |
220 | 221 | return FALSE; |
221 | 222 | } |
222 | - } |
|
223 | - else |
|
223 | + } else |
|
224 | 224 | { |
225 | 225 | $GLOBALS['log']->info("Warning: Empty identifier for campaign log."); |
226 | 226 | return FALSE; |
227 | 227 | } |
228 | - } |
|
229 | - else |
|
228 | + } else |
|
230 | 229 | { |
231 | 230 | $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link."); |
232 | 231 | return FALSE; |
233 | 232 | } |
234 | - } |
|
235 | - else |
|
233 | + } else |
|
236 | 234 | { |
237 | 235 | $GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON."); |
238 | 236 | 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. |
@@ -76,14 +78,20 @@ discard block |
||
76 | 78 | { |
77 | 79 | |
78 | 80 | } |
79 | -}else{ |
|
81 | +} else{ |
|
80 | 82 | //use html if not inline |
81 | 83 | $ss = new Sugar_Smarty(); |
82 | 84 | $ss->assign("MOD", $mod_strings); |
83 | 85 | $ss->assign("APP", $app_strings); |
84 | - if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
85 | - if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
86 | - if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
86 | + if (isset($_REQUEST['return_module'])) { |
|
87 | + $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
88 | + } |
|
89 | + if (isset($_REQUEST['return_action'])) { |
|
90 | + $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
91 | + } |
|
92 | + if (isset($_REQUEST['return_id'])) { |
|
93 | + $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
94 | + } |
|
87 | 95 | // handle Create $module then Cancel |
88 | 96 | if (empty($_REQUEST['return_id'])) { |
89 | 97 | $ss->assign("RETURN_ACTION", 'index'); |
@@ -123,7 +131,7 @@ discard block |
||
123 | 131 | $mboxTable .= "<td>".$details['status']."</td></tr>"; |
124 | 132 | } |
125 | 133 | |
126 | -}else{ |
|
134 | +} else{ |
|
127 | 135 | //if array is empty, then set "bad" message and increment health counter |
128 | 136 | $mboxTable .= "<tr><td colspan='5'><b class='error'>". $mod_strings['LBL_MAILBOX_CHECK1_BAD']."</b></td></tr>"; |
129 | 137 | $email_health =$email_health +1; |
@@ -141,7 +149,7 @@ discard block |
||
141 | 149 | //if from address is the default, then set "bad" message and increment health counter |
142 | 150 | $conf_msg .= "<tr><td colspan = '5'><b class='error'> ".$mod_strings['LBL_MAILBOX_CHECK2_BAD']." </b></td></td>"; |
143 | 151 | $email_health =$email_health +1; |
144 | -}else{ |
|
152 | +} else{ |
|
145 | 153 | $conf_msg .= "<tr><td colspan = '5'><b> ".$mod_strings['LBL_MAILBOX_CHECK2_GOOD']."</b></td></tr>"; |
146 | 154 | $conf_msg .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_NAME']."</b></th>" |
147 | 155 | . " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>" |
@@ -150,7 +158,7 @@ discard block |
||
150 | 158 | $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>" |
151 | 159 | . " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>"; |
152 | 160 | |
153 | - }else{$conf_msg .= "</tr>";} |
|
161 | + } else{$conf_msg .= "</tr>";} |
|
154 | 162 | |
155 | 163 | |
156 | 164 | |
@@ -161,7 +169,7 @@ discard block |
||
161 | 169 | $conf_msg .= "<td>".$focus->settings['mail_smtpserver']."</td>"; |
162 | 170 | $conf_msg .= "<td>".$focus->settings['mail_smtpuser']."</td></tr>"; |
163 | 171 | |
164 | - }else{$conf_msg .= "</tr>";} |
|
172 | + } else{$conf_msg .= "</tr>";} |
|
165 | 173 | |
166 | 174 | } |
167 | 175 | |
@@ -171,7 +179,7 @@ discard block |
||
171 | 179 | if ($email_health>0){ |
172 | 180 | if (is_admin($current_user)){ |
173 | 181 | $email_setup_wiz_link="<a href='index.php?module=Campaigns&action=WizardEmailSetup'>".$mod_strings['LBL_EMAIL_SETUP_WIZ']."</a>"; |
174 | - }else{ |
|
182 | + } else{ |
|
175 | 183 | $email_setup_wiz_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG']; |
176 | 184 | } |
177 | 185 | } |
@@ -204,7 +212,7 @@ discard block |
||
204 | 212 | $sched_mes_body .= "<td style='text-align: left;'>".$funct['status']."</td></tr>"; |
205 | 213 | if($funct['job']==$check_sched1){ |
206 | 214 | $check_sched1 ="found"; |
207 | - }else{ |
|
215 | + } else{ |
|
208 | 216 | $check_sched2 ="found"; |
209 | 217 | } |
210 | 218 | |
@@ -218,7 +226,7 @@ discard block |
||
218 | 226 | $sched_mes .= "<tr><th scope='col' width='40%'><b>".$mod_strings['LBL_SCHEDULER_NAME']."</b></tH>" |
219 | 227 | . " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>"; |
220 | 228 | |
221 | -}else{ |
|
229 | +} else{ |
|
222 | 230 | $sched_mes = "<table class='other view' cellspacing='1'>"; |
223 | 231 | $sched_mes .= "<tr><td colspan ='3'><font color='red'><b> ".$mod_strings['LBL_SCHEDULER_CHECK_BAD']."</b></font></td></tr>"; |
224 | 232 | $show_admin_link = true; |
@@ -237,7 +245,7 @@ discard block |
||
237 | 245 | if ($sched_health>0){ |
238 | 246 | if (is_admin($current_user)){ |
239 | 247 | $admin_sched_link="<a href='index.php?module=Schedulers&action=index'>".$mod_strings['LBL_SCHEDULER_LINK']."</a>"; |
240 | - }else{ |
|
248 | + } else{ |
|
241 | 249 | $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG']; |
242 | 250 | } |
243 | 251 | } |
@@ -269,13 +277,13 @@ discard block |
||
269 | 277 | return SugarThemeRegistry::current()->getImage('red_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_INVALID']); |
270 | 278 | |
271 | 279 | |
272 | - }elseif($num == 0){ |
|
280 | + } elseif($num == 0){ |
|
273 | 281 | //if health number is zero, then all checks passed, set green image |
274 | 282 | //green |
275 | 283 | return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']); |
276 | 284 | |
277 | 285 | |
278 | - }else{ |
|
286 | + } else{ |
|
279 | 287 | //if health number is between total and num params, then some checks failed but not all, set yellow image |
280 | 288 | //yellow |
281 | 289 | return SugarThemeRegistry::current()->getImage('yellow_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_ALERT']); |
@@ -70,8 +70,7 @@ |
||
70 | 70 | $html .= "</script>"; |
71 | 71 | } |
72 | 72 | |
73 | - } |
|
74 | - else if($view == 'DetailView'){ |
|
73 | + } else if($view == 'DetailView'){ |
|
75 | 74 | $html .= '<script src="modules/AOR_Conditions/conditionLines.js"></script>'; |
76 | 75 | $html .= "<table border='0' cellspacing='0' width='100%' id='conditionLines'></table>"; |
77 | 76 |
@@ -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. |
@@ -94,8 +96,11 @@ discard block |
||
94 | 96 | $form->assign('MODULE_NAME', $currentModule); |
95 | 97 | $form->assign('NAME', $name); |
96 | 98 | $form->assign('DOCUMENT_NAME', $document_name); |
97 | -if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
98 | -else $form->assign('DOCUMENT_TARGET', ''); |
|
99 | +if(isset($_REQUEST['target'])) { |
|
100 | + $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
101 | +} else { |
|
102 | + $form->assign('DOCUMENT_TARGET', ''); |
|
103 | +} |
|
99 | 104 | |
100 | 105 | $form->assign('DOCUMENT_REVISION_ID', $document_revision_id); |
101 | 106 |
@@ -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. |
@@ -47,8 +49,9 @@ discard block |
||
47 | 49 | require_once('include/JSON.php'); |
48 | 50 | require_once('include/upload_file.php'); |
49 | 51 | |
50 | -if (!is_dir($cachedir = sugar_cached('images/'))) |
|
52 | +if (!is_dir($cachedir = sugar_cached('images/'))) { |
|
51 | 53 | mkdir_recursive($cachedir); |
54 | +} |
|
52 | 55 | |
53 | 56 | // cn: bug 11012 - fixed some MIME types not getting picked up. Also changed array iterator. |
54 | 57 | $imgType = array('image/gif', 'image/png', 'image/x-png', 'image/bmp', 'image/jpeg', 'image/jpg', 'image/pjpeg'); |
@@ -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 | require_once('modules/Campaigns/utils.php'); |
5 | 7 | |
@@ -26,7 +28,9 @@ discard block |
||
26 | 28 | |
27 | 29 | |
28 | 30 | //setting default flag value so due date and time not required |
29 | -if (!isset($focus->id)) $focus->date_due_flag = 1; |
|
31 | +if (!isset($focus->id)) { |
|
32 | + $focus->date_due_flag = 1; |
|
33 | +} |
|
30 | 34 | |
31 | 35 | //needed when creating a new case with default values passed in |
32 | 36 | if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { |
@@ -85,12 +89,16 @@ discard block |
||
85 | 89 | $xtpl->parse("main.variable_option"); |
86 | 90 | |
87 | 91 | $returnAction = 'index'; |
88 | -if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
92 | +if (isset($_REQUEST['return_module'])) { |
|
93 | + $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
94 | +} |
|
89 | 95 | if (isset($_REQUEST['return_action'])) { |
90 | 96 | $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); |
91 | 97 | $returnAction = $_REQUEST['return_action']; |
92 | 98 | } |
93 | -if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
99 | +if (isset($_REQUEST['return_id'])) { |
|
100 | + $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
101 | +} |
|
94 | 102 | // handle Create $module then Cancel |
95 | 103 | if (empty($_REQUEST['return_id'])) { |
96 | 104 | $xtpl->assign("RETURN_ACTION", 'index'); |
@@ -119,8 +127,9 @@ discard block |
||
119 | 127 | ); |
120 | 128 | $json = getJSONobj(); |
121 | 129 | $xtpl->assign('encoded_assigned_users_popup_request_data', $json->encode($popup_request_data)); |
122 | -if (!empty($focus->assigned_user_name)) |
|
130 | +if (!empty($focus->assigned_user_name)) { |
|
123 | 131 | $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); |
132 | +} |
|
124 | 133 | |
125 | 134 | $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id-ff-select', '', null, null, '.png', $mod_strings['LBL_SELECT'])); |
126 | 135 | $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear', '', null, null, '.gif', $mod_strings['LBL_ID_FF_CLEAR'])); |
@@ -142,24 +151,39 @@ discard block |
||
142 | 151 | $xtpl->assign("JSLANG", $jsLang); |
143 | 152 | |
144 | 153 | $xtpl->assign("ID", $focus->id); |
145 | -if (isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", ""); |
|
154 | +if (isset($focus->name)) { |
|
155 | + $xtpl->assign("NAME", $focus->name); |
|
156 | +} else { |
|
157 | + $xtpl->assign("NAME", ""); |
|
158 | +} |
|
146 | 159 | |
147 | 160 | //Bug45632 |
148 | 161 | /* BEGIN - SECURITY GROUPS */ |
149 | 162 | /** |
150 | 163 | * if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", ""); |
151 | 164 | */ |
152 | -if (isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
153 | -else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
165 | +if (isset($focus->assigned_user_id)) { |
|
166 | + $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
167 | +} else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
154 | 168 | global $current_user; |
155 | 169 | $xtpl->assign("ASSIGNED_USER_ID", $current_user->id); |
156 | 170 | $xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id)); |
157 | -} else $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
171 | +} else { |
|
172 | + $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
173 | +} |
|
158 | 174 | /* END - SECURITY GROUPS */ |
159 | 175 | //Bug45632 |
160 | 176 | |
161 | -if (isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", ""); |
|
162 | -if (isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", ""); |
|
177 | +if (isset($focus->description)) { |
|
178 | + $xtpl->assign("DESCRIPTION", $focus->description); |
|
179 | +} else { |
|
180 | + $xtpl->assign("DESCRIPTION", ""); |
|
181 | +} |
|
182 | +if (isset($focus->subject)) { |
|
183 | + $xtpl->assign("SUBJECT", $focus->subject); |
|
184 | +} else { |
|
185 | + $xtpl->assign("SUBJECT", ""); |
|
186 | +} |
|
163 | 187 | if ($focus->published == 'on') { |
164 | 188 | $xtpl->assign("PUBLISHED", "CHECKED"); |
165 | 189 | } |
@@ -201,8 +225,16 @@ discard block |
||
201 | 225 | $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['record_type_display'], $focus->parent_type)); |
202 | 226 | //$xtpl->assign("DEFAULT_MODULE","Accounts"); |
203 | 227 | |
204 | -if (isset($focus->body)) $xtpl->assign("BODY", $focus->body); else $xtpl->assign("BODY", ""); |
|
205 | -if (isset($focus->body_html)) $xtpl->assign("BODY_HTML", $focus->body_html); else $xtpl->assign("BODY_HTML", ""); |
|
228 | +if (isset($focus->body)) { |
|
229 | + $xtpl->assign("BODY", $focus->body); |
|
230 | +} else { |
|
231 | + $xtpl->assign("BODY", ""); |
|
232 | +} |
|
233 | +if (isset($focus->body_html)) { |
|
234 | + $xtpl->assign("BODY_HTML", $focus->body_html); |
|
235 | +} else { |
|
236 | + $xtpl->assign("BODY_HTML", ""); |
|
237 | +} |
|
206 | 238 | |
207 | 239 | |
208 | 240 | if (true) { |
@@ -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. |
@@ -50,8 +52,9 @@ discard block |
||
50 | 52 | |
51 | 53 | $focus = new EmailTemplate(); |
52 | 54 | if($_REQUEST['from'] == 'DetailView') { |
53 | - if(!isset($_REQUEST['record'])) |
|
54 | - sugar_die("A record number must be specified to delete the template."); |
|
55 | + if(!isset($_REQUEST['record'])) { |
|
56 | + sugar_die("A record number must be specified to delete the template."); |
|
57 | + } |
|
55 | 58 | $focus->retrieve($_REQUEST['record']); |
56 | 59 | if(check_email_template_in_use($focus)) { |
57 | 60 | echo 'true'; |
@@ -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 | |
5 | 7 | function generateFieldDefsJS2() |
@@ -47,7 +49,9 @@ discard block |
||
47 | 49 | $focus = new $beanList[$key]; |
48 | 50 | $loopControl[$key][$key] = $focus; |
49 | 51 | $prefixes[$key] = strtolower($focus->object_name) . '_'; |
50 | - if ($focus->object_name == 'Case') $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
52 | + if ($focus->object_name == 'Case') { |
|
53 | + $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
54 | + } |
|
51 | 55 | } |
52 | 56 | } |
53 | 57 | |
@@ -94,8 +98,9 @@ discard block |
||
94 | 98 | break; |
95 | 99 | } |
96 | 100 | } |
97 | - if ($dup) |
|
98 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
101 | + if ($dup) { |
|
102 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
103 | + } |
|
99 | 104 | } |
100 | 105 | } |
101 | 106 | } |
@@ -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 | global $db; |
5 | 7 | |
@@ -29,16 +31,13 @@ discard block |
||
29 | 31 | |
30 | 32 | $url = $event->accept_redirect; |
31 | 33 | header('Location: ' . $url); |
32 | - } |
|
33 | - else{ |
|
34 | + } else{ |
|
34 | 35 | echo 'Thank you for accepting'; |
35 | 36 | } |
36 | - } |
|
37 | - else { |
|
37 | + } else { |
|
38 | 38 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
39 | 39 | } |
40 | - } |
|
41 | - else if($response == 'decline'){ |
|
40 | + } else if($response == 'decline'){ |
|
42 | 41 | //check to see if they have already responded to the email |
43 | 42 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
44 | 43 | $check = $db->getOne($check_q); |
@@ -52,12 +51,10 @@ discard block |
||
52 | 51 | $url = $event->decline_redirect; |
53 | 52 | header('Location: ' . $url); |
54 | 53 | |
55 | - } |
|
56 | - else{ |
|
54 | + } else{ |
|
57 | 55 | echo 'Thank you for declining'; |
58 | 56 | } |
59 | - } |
|
60 | - else { |
|
57 | + } else { |
|
61 | 58 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
62 | 59 | } |
63 | 60 | } |
@@ -79,16 +76,13 @@ discard block |
||
79 | 76 | |
80 | 77 | $url = $event->accept_redirect; |
81 | 78 | header('Location: ' . $url); |
82 | - } |
|
83 | - else{ |
|
79 | + } else{ |
|
84 | 80 | echo 'Thank you for accepting'; |
85 | 81 | } |
86 | - } |
|
87 | - else { |
|
82 | + } else { |
|
88 | 83 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
89 | 84 | } |
90 | - } |
|
91 | - else if($response == 'decline'){ |
|
85 | + } else if($response == 'decline'){ |
|
92 | 86 | //check to see if they have already responded to the email |
93 | 87 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
94 | 88 | $check = $db->getOne($check_q); |
@@ -101,12 +95,10 @@ discard block |
||
101 | 95 | $url = $event->decline_redirect; |
102 | 96 | header('Location: ' . $url); |
103 | 97 | |
104 | - } |
|
105 | - else{ |
|
98 | + } else{ |
|
106 | 99 | echo 'Thank you for declining'; |
107 | 100 | } |
108 | - } |
|
109 | - else { |
|
101 | + } else { |
|
110 | 102 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
111 | 103 | } |
112 | 104 | } |
@@ -127,16 +119,13 @@ discard block |
||
127 | 119 | |
128 | 120 | $url = $event->accept_redirect; |
129 | 121 | header('Location: ' . $url); |
130 | - } |
|
131 | - else{ |
|
122 | + } else{ |
|
132 | 123 | echo 'Thank you for accepting'; |
133 | 124 | } |
134 | - } |
|
135 | - else { |
|
125 | + } else { |
|
136 | 126 | echo 'There was a problem with the link please contact the sender of the invite'; |
137 | 127 | } |
138 | - } |
|
139 | - else if($response == 'decline'){ |
|
128 | + } else if($response == 'decline'){ |
|
140 | 129 | //check to see if they have already responded to the email |
141 | 130 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
142 | 131 | $check = $db->getOne($check_q); |
@@ -150,12 +139,10 @@ discard block |
||
150 | 139 | $url = $event->decline_redirect; |
151 | 140 | header('Location: ' . $url); |
152 | 141 | |
153 | - } |
|
154 | - else{ |
|
142 | + } else{ |
|
155 | 143 | echo 'Thank you for declining'; |
156 | 144 | } |
157 | - } |
|
158 | - else { |
|
145 | + } else { |
|
159 | 146 | echo 'There was a problem with the link please contact the sender of the invite'; |
160 | 147 | } |
161 | 148 | } |