@@ -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 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -179,8 +181,9 @@ discard block |
||
| 179 | 181 | break; |
| 180 | 182 | } |
| 181 | 183 | } |
| 182 | - if ($dup) |
|
| 183 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 184 | + if ($dup) { |
|
| 185 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 186 | + } |
|
| 184 | 187 | } |
| 185 | 188 | } |
| 186 | 189 | } |
@@ -253,8 +256,9 @@ discard block |
||
| 253 | 256 | break; |
| 254 | 257 | } |
| 255 | 258 | } |
| 256 | - if ($dup) |
|
| 257 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 259 | + if ($dup) { |
|
| 260 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
| 261 | + } |
|
| 258 | 262 | } |
| 259 | 263 | } |
| 260 | 264 | } |
@@ -314,8 +318,9 @@ discard block |
||
| 314 | 318 | function parse_tracker_urls($template_text_array, $url_template, $tracked_urls, $removeme_url_template) |
| 315 | 319 | { |
| 316 | 320 | global $beanFiles, $beanList, $app_list_strings, $sugar_config; |
| 317 | - if (!isset($this->parsed_urls)) |
|
| 318 | - $this->parsed_urls = array(); |
|
| 321 | + if (!isset($this->parsed_urls)) { |
|
| 322 | + $this->parsed_urls = array(); |
|
| 323 | + } |
|
| 319 | 324 | |
| 320 | 325 | $return_array = $template_text_array; |
| 321 | 326 | if (count($tracked_urls) > 0) { |
@@ -398,8 +403,9 @@ discard block |
||
| 398 | 403 | $user->retrieve($focus->assigned_user_id); |
| 399 | 404 | } |
| 400 | 405 | |
| 401 | - if (!isset($this->parsed_entities)) |
|
| 402 | - $this->parsed_entities = array(); |
|
| 406 | + if (!isset($this->parsed_entities)) { |
|
| 407 | + $this->parsed_entities = array(); |
|
| 408 | + } |
|
| 403 | 409 | |
| 404 | 410 | //parse the template and find all the dynamic strings that need replacement. |
| 405 | 411 | // Bug #48111 It's strange why prefix for User module is contact_user (see self::generateFieldDefsJS method) |
@@ -775,8 +781,9 @@ discard block |
||
| 775 | 781 | $template = new EmailTemplate(); |
| 776 | 782 | $optionKey = $template->field_defs['type']['options']; |
| 777 | 783 | $options = $GLOBALS['app_list_strings'][$optionKey]; |
| 778 | - if (!is_admin($GLOBALS['current_user']) && isset($options['workflow'])) |
|
| 779 | - unset($options['workflow']); |
|
| 784 | + if (!is_admin($GLOBALS['current_user']) && isset($options['workflow'])) { |
|
| 785 | + unset($options['workflow']); |
|
| 786 | + } |
|
| 780 | 787 | |
| 781 | 788 | return $options; |
| 782 | 789 | } |
@@ -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 | } |
@@ -1,5 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,7 +58,7 @@ discard block |
||
| 56 | 58 | if ( $_REQUEST['host_meeting'] == '1' ) { |
| 57 | 59 | if($meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
| 58 | 60 | SugarApplication::redirect($meetingBean->host_url); |
| 59 | - }else{ |
|
| 61 | + } else{ |
|
| 60 | 62 | //since they are now the owner of the meeting nor an Admin they cannot start the meeting. |
| 61 | 63 | $tplFile = 'modules/Meetings/tpls/extMeetingNoStart.tpl'; |
| 62 | 64 | if ( file_exists('custom/'.$tplFile) ) { |
@@ -68,10 +70,10 @@ discard block |
||
| 68 | 70 | $ss->assign('bean',$meetingBean->toArray()); |
| 69 | 71 | $ss->display($tplFile); |
| 70 | 72 | } |
| 71 | -}else{ |
|
| 73 | +} else{ |
|
| 72 | 74 | if(isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
| 73 | 75 | SugarApplication::redirect($meetingBean->join_url); |
| 74 | - }else{ |
|
| 76 | + } else{ |
|
| 75 | 77 | //if the user is not invited or the owner of the meeting or an admin then they cannot join the meeting. |
| 76 | 78 | $tplFile = 'modules/Meetings/tpls/extMeetingNotInvited.tpl'; |
| 77 | 79 | if ( file_exists('custom/'.$tplFile) ) { |