@@ -1,5 +1,7 @@ |
||
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/SecurityGroups/SecurityGroupUserRelationship.php'); |
5 | 7 |
@@ -1,5 +1,7 @@ |
||
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('XTemplate/xtpl.php'); |
5 | 7 | require_once('modules/SecurityGroups/SecurityGroupUserRelationship.php'); |
@@ -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 | class AssignGroups { |
@@ -14,7 +16,9 @@ discard block |
||
14 | 16 | && empty($bean->fetched_row['id']) && $bean->module_dir != "Users" && $bean->module_dir != "SugarFeed") { |
15 | 17 | //Upload an attachment to an Email Template and save. If user with multi groups - popup select option |
16 | 18 | //it will redirect to notes instead of EmailTemplate and relationship will fail...check below to avoid |
17 | - if(!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) return; |
|
19 | + if(!empty($_REQUEST['module']) && $_REQUEST['module'] != $bean->module_dir) { |
|
20 | + return; |
|
21 | + } |
|
18 | 22 | |
19 | 23 | if(!empty($_REQUEST['securitygroup_list'])) { |
20 | 24 | require_once('modules/SecurityGroups/SecurityGroup.php'); |
@@ -38,9 +42,7 @@ discard block |
||
38 | 42 | unset($_SESSION['securitysuite_error']); //to be safe |
39 | 43 | $_SESSION['securitysuite_error'] = $ss_mod_strings['LBL_ERROR_DUPLICATE']; |
40 | 44 | } |
41 | - } |
|
42 | - |
|
43 | - else if(isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true |
|
45 | + } else if(isset($sugar_config['securitysuite_user_popup']) && $sugar_config['securitysuite_user_popup'] == true |
|
44 | 46 | && empty($bean->fetched_row['id']) && $bean->module_dir == "Users" |
45 | 47 | && isset($_REQUEST['action']) && $_REQUEST['action'] != 'SaveSignature' ) { //Bug: 589 |
46 | 48 | |
@@ -63,7 +65,9 @@ discard block |
||
63 | 65 | |
64 | 66 | function popup_onload($event, $arguments) |
65 | 67 | { |
66 | - if(!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) return; |
|
68 | + if(!empty($_REQUEST['to_pdf']) || !empty($_REQUEST['sugar_body_only'])) { |
|
69 | + return; |
|
70 | + } |
|
67 | 71 | |
68 | 72 | /** //test user popup |
69 | 73 | //always have this loaded |
@@ -74,7 +78,9 @@ discard block |
||
74 | 78 | $module = $_REQUEST['module']; |
75 | 79 | $action = $_REQUEST['action']; |
76 | 80 | |
77 | - if(isset($action) && ($action == "Save" || $action == "SetTimezone")) return; |
|
81 | + if(isset($action) && ($action == "Save" || $action == "SetTimezone")) { |
|
82 | + return; |
|
83 | + } |
|
78 | 84 | |
79 | 85 | if( ( |
80 | 86 | //(isset($sugar_config['securitysuite_popup_select']) && $sugar_config['securitysuite_popup_select'] == true) |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @author Salesagility Ltd <[email protected]> |
23 | 23 | */ |
24 | -if(!defined('sugarEntry'))define('sugarEntry', true); |
|
24 | +if(!defined('sugarEntry')) { |
|
25 | + define('sugarEntry', true); |
|
26 | +} |
|
25 | 27 | require_once 'modules/AOP_Case_Updates/util.php'; |
26 | 28 | if(!isAOPEnabled()){ |
27 | 29 | return; |
@@ -40,12 +42,12 @@ discard block |
||
40 | 42 | if(!$res->success){ |
41 | 43 | $msg = $res->error ? $res->error : $mod_strings['LBL_DISABLE_PORTAL_USER_FAILED']; |
42 | 44 | SugarApplication::appendErrorMessage($msg); |
43 | - }else{ |
|
45 | + } else{ |
|
44 | 46 | $bean->portal_account_disabled = 1; |
45 | 47 | $bean->save(false); |
46 | 48 | SugarApplication::appendErrorMessage($mod_strings['LBL_DISABLE_PORTAL_USER_SUCCESS']); |
47 | 49 | } |
48 | -}else{ |
|
50 | +} else{ |
|
49 | 51 | SugarApplication::appendErrorMessage($mod_strings['LBL_NO_JOOMLA_URL']); |
50 | 52 | } |
51 | 53 |
@@ -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,26 +58,52 @@ discard block |
||
56 | 58 | |
57 | 59 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
58 | 60 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
59 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
60 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>'; |
|
63 | - if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>'; |
|
64 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
65 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
66 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
67 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
68 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
69 | - $overlib_string .= '<br>'; |
|
70 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
71 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
72 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
61 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
62 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
63 | + } |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) { |
|
65 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
66 | + } |
|
67 | + if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) { |
|
68 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>'; |
|
69 | + } |
|
70 | + if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) { |
|
71 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>'; |
|
72 | + } |
|
73 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) { |
|
74 | + $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
75 | + } |
|
76 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) { |
|
77 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
78 | + } |
|
79 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) { |
|
80 | + $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
81 | + } |
|
82 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
83 | + $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
84 | + } |
|
85 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) { |
|
86 | + $overlib_string .= '<br>'; |
|
87 | + } |
|
88 | + if(!empty($fields['PHONE_MOBILE'])) { |
|
89 | + $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
90 | + } |
|
91 | + if(!empty($fields['PHONE_HOME'])) { |
|
92 | + $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
93 | + } |
|
94 | + if(!empty($fields['PHONE_OTHER'])) { |
|
95 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
96 | + } |
|
73 | 97 | |
74 | - if(!empty($fields['DATE_MODIFIED'])) $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>'; |
|
98 | + if(!empty($fields['DATE_MODIFIED'])) { |
|
99 | + $overlib_string .= '<b>'. $mod_strings['LBL_DATE_MODIFIED'] . '</b> ' . $fields['DATE_MODIFIED'] . '<br>'; |
|
100 | + } |
|
75 | 101 | |
76 | 102 | if(!empty($fields['DESCRIPTION'])) { |
77 | 103 | $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
78 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
104 | + if(strlen($fields['DESCRIPTION']) > 300) { |
|
105 | + $overlib_string .= '...'; |
|
106 | + } |
|
79 | 107 | } |
80 | 108 | |
81 | 109 | return array('fieldToAddTo' => 'NAME', |
@@ -1,6 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | //FILE SUGARCRM flav=pro || flav=sales |
3 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
4 | + die('Not A Valid Entry Point'); |
|
5 | +} |
|
4 | 6 | /********************************************************************************* |
5 | 7 | * SugarCRM Community Edition is a customer relationship management program developed by |
6 | 8 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -51,12 +53,24 @@ discard block |
||
51 | 53 | //XXX TODO 20110329 Frank Steegmans: Hack to make quick create fields populate when used through the DC menu |
52 | 54 | // NOTE HOWEVER that sqs_objects form fields are not properly populated because of some other hacks |
53 | 55 | // resulting in none of the fields properly populating when selecting an account |
54 | - if(!empty($this->bean->phone_office))$_REQUEST['phone_work'] = $this->bean->phone_office; |
|
55 | - if(!empty($this->bean->billing_address_street))$_REQUEST['primary_address_street'] = $this->bean->billing_address_street; |
|
56 | - if(!empty($this->bean->billing_address_city))$_REQUEST['primary_address_city'] = $this->bean->billing_address_city; |
|
57 | - if(!empty($this->bean->billing_address_state))$_REQUEST['primary_address_state'] = $this->bean->billing_address_state; |
|
58 | - if(!empty($this->bean->billing_address_country))$_REQUEST['primary_address_country'] = $this->bean->billing_address_country; |
|
59 | - if(!empty($this->bean->billing_address_postalcode))$_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode; |
|
56 | + if(!empty($this->bean->phone_office)) { |
|
57 | + $_REQUEST['phone_work'] = $this->bean->phone_office; |
|
58 | + } |
|
59 | + if(!empty($this->bean->billing_address_street)) { |
|
60 | + $_REQUEST['primary_address_street'] = $this->bean->billing_address_street; |
|
61 | + } |
|
62 | + if(!empty($this->bean->billing_address_city)) { |
|
63 | + $_REQUEST['primary_address_city'] = $this->bean->billing_address_city; |
|
64 | + } |
|
65 | + if(!empty($this->bean->billing_address_state)) { |
|
66 | + $_REQUEST['primary_address_state'] = $this->bean->billing_address_state; |
|
67 | + } |
|
68 | + if(!empty($this->bean->billing_address_country)) { |
|
69 | + $_REQUEST['primary_address_country'] = $this->bean->billing_address_country; |
|
70 | + } |
|
71 | + if(!empty($this->bean->billing_address_postalcode)) { |
|
72 | + $_REQUEST['primary_address_postalcode'] = $this->bean->billing_address_postalcode; |
|
73 | + } |
|
60 | 74 | } |
61 | 75 | } |
62 | 76 | } |
63 | 77 | \ No newline at end of file |
@@ -47,7 +47,9 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | function display() { |
50 | - if(isset($_REQUEST['close_window'])) echo "<script>window.close();</script>"; |
|
50 | + if(isset($_REQUEST['close_window'])) { |
|
51 | + echo "<script>window.close();</script>"; |
|
52 | + } |
|
51 | 53 | parent::display(); |
52 | 54 | } |
53 | 55 | } |
@@ -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. |
@@ -71,11 +73,12 @@ discard block |
||
71 | 73 | $portalUsername = $this->bean->db->quote($_REQUEST['portal_name']); |
72 | 74 | $result = $this->bean->db->query("Select count(id) as total from contacts where portal_name = '$portalUsername' and deleted='0'"); |
73 | 75 | $total = 0; |
74 | - while($row = $this->bean->db->fetchByAssoc($result)) |
|
75 | - $total = $row['total']; |
|
76 | + while($row = $this->bean->db->fetchByAssoc($result)) { |
|
77 | + $total = $row['total']; |
|
78 | + } |
|
76 | 79 | echo $total; |
80 | + } else { |
|
81 | + echo '0'; |
|
77 | 82 | } |
78 | - else |
|
79 | - echo '0'; |
|
80 | 83 | } |
81 | 84 | } |
82 | 85 | \ No newline at end of file |
@@ -1,5 +1,7 @@ |
||
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-2011 SugarCRM Inc. |