@@ -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. |
@@ -38,7 +40,9 @@ discard block |
||
38 | 40 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
39 | 41 | ********************************************************************************/ |
40 | 42 | |
41 | -if(!is_admin($current_user)) sugar_die("Unauthorized access to administration."); |
|
43 | +if(!is_admin($current_user)) { |
|
44 | + sugar_die("Unauthorized access to administration."); |
|
45 | +} |
|
42 | 46 | |
43 | 47 | global $timedate; |
44 | 48 |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if (!defined('sugarEntry') || !sugarEntry) |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
3 | 3 | die('Not A Valid Entry Point'); |
4 | +} |
|
4 | 5 | /********************************************************************************* |
5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
1 | +<?php if(!defined('sugarEntry') || !sugarEntry) { |
|
2 | + die('Not A Valid Entry Point'); |
|
3 | +} |
|
2 | 4 | /********************************************************************************* |
3 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
4 | 6 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -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. |
@@ -43,14 +45,17 @@ discard block |
||
43 | 45 | //// LOCAL UTILITY |
44 | 46 | function compare($table_name, $db_indexes, $var_indexes) { |
45 | 47 | global $add_index, $drop_index, $change_index; |
46 | - if(empty($change_index))$change_index = array(); |
|
48 | + if(empty($change_index)) { |
|
49 | + $change_index = array(); |
|
50 | + } |
|
47 | 51 | foreach ($var_indexes as $var_i_name=>$var_i_def) { |
48 | 52 | //find corresponding db index with same name |
49 | 53 | //else by columns in the index. |
50 | 54 | $sel_db_index = null; |
51 | 55 | $var_fields_string =''; |
52 | - if(count($var_i_def['fields'])>0) |
|
53 | - $var_fields_string = implode('',$var_i_def['fields']); |
|
56 | + if(count($var_i_def['fields'])>0) { |
|
57 | + $var_fields_string = implode('',$var_i_def['fields']); |
|
58 | + } |
|
54 | 59 | $field_list_match = false; |
55 | 60 | if(isset($db_indexes[$var_i_name])) { |
56 | 61 | $sel_db_index = $db_indexes[$var_i_name]; |
@@ -101,12 +106,16 @@ discard block |
||
101 | 106 | |
102 | 107 | /////////////////////////////////////////////////////////////////////////////// |
103 | 108 | //// PROCESS |
104 | -if(!is_admin($current_user)) sugar_die("Unauthorized access to administration."); |
|
109 | +if(!is_admin($current_user)) { |
|
110 | + sugar_die("Unauthorized access to administration."); |
|
111 | +} |
|
105 | 112 | set_time_limit(3600); |
106 | 113 | /** |
107 | 114 | * Note: $_REQUEST['silent'] is set from ModuleInstaller::repair_indices(); |
108 | 115 | */ |
109 | -if(!isset($_REQUEST['silent'])) $_REQUEST['silent'] = false; |
|
116 | +if(!isset($_REQUEST['silent'])) { |
|
117 | + $_REQUEST['silent'] = false; |
|
118 | +} |
|
110 | 119 | |
111 | 120 | $add_index=array(); |
112 | 121 | $drop_index=array(); |
@@ -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. |
@@ -95,9 +97,9 @@ discard block |
||
95 | 97 | if (isset($_REQUEST['system_ldap_enabled']) && $_REQUEST['system_ldap_enabled'] == 'on') { |
96 | 98 | $_POST['system_ldap_enabled'] = 1; |
97 | 99 | clearPasswordSettings(); |
98 | - } |
|
99 | - else |
|
100 | - $_POST['system_ldap_enabled'] = 0; |
|
100 | + } else { |
|
101 | + $_POST['system_ldap_enabled'] = 0; |
|
102 | + } |
|
101 | 103 | |
102 | 104 | |
103 | 105 | if(isset($_REQUEST['authenticationClass'])) |
@@ -114,18 +116,21 @@ discard block |
||
114 | 116 | $_POST['ldap_group_attr_req_dn'] = 0; |
115 | 117 | } |
116 | 118 | |
117 | - if (isset($_REQUEST['ldap_group_checkbox']) && $_REQUEST['ldap_group_checkbox'] == 'on') |
|
118 | - $_POST['ldap_group'] = 1; |
|
119 | - else |
|
120 | - $_POST['ldap_group'] = 0; |
|
119 | + if (isset($_REQUEST['ldap_group_checkbox']) && $_REQUEST['ldap_group_checkbox'] == 'on') { |
|
120 | + $_POST['ldap_group'] = 1; |
|
121 | + } else { |
|
122 | + $_POST['ldap_group'] = 0; |
|
123 | + } |
|
121 | 124 | |
122 | - if (isset($_REQUEST['ldap_authentication_checkbox']) && $_REQUEST['ldap_authentication_checkbox'] == 'on') |
|
123 | - $_POST['ldap_authentication'] = 1; |
|
124 | - else |
|
125 | - $_POST['ldap_authentication'] = 0; |
|
125 | + if (isset($_REQUEST['ldap_authentication_checkbox']) && $_REQUEST['ldap_authentication_checkbox'] == 'on') { |
|
126 | + $_POST['ldap_authentication'] = 1; |
|
127 | + } else { |
|
128 | + $_POST['ldap_authentication'] = 0; |
|
129 | + } |
|
126 | 130 | |
127 | - if( isset($_REQUEST['passwordsetting_lockoutexpirationtime']) && is_numeric($_REQUEST['passwordsetting_lockoutexpirationtime']) ) |
|
128 | - $_POST['passwordsetting_lockoutexpiration'] = 2; |
|
131 | + if( isset($_REQUEST['passwordsetting_lockoutexpirationtime']) && is_numeric($_REQUEST['passwordsetting_lockoutexpirationtime']) ) { |
|
132 | + $_POST['passwordsetting_lockoutexpiration'] = 2; |
|
133 | + } |
|
129 | 134 | |
130 | 135 | $configurator->saveConfig(); |
131 | 136 | |
@@ -142,7 +147,9 @@ discard block |
||
142 | 147 | $sugar_smarty = new Sugar_Smarty(); |
143 | 148 | |
144 | 149 | // if no IMAP libraries available, disable Save/Test Settings |
145 | -if(!function_exists('imap_open')) $sugar_smarty->assign('IE_DISABLED', 'DISABLED'); |
|
150 | +if(!function_exists('imap_open')) { |
|
151 | + $sugar_smarty->assign('IE_DISABLED', 'DISABLED'); |
|
152 | +} |
|
146 | 153 | |
147 | 154 | $config_strings=return_module_language($GLOBALS['current_language'],'Configurator'); |
148 | 155 | $sugar_smarty->assign('CONF', $config_strings); |
@@ -167,7 +174,7 @@ discard block |
||
167 | 174 | if(!function_exists('mcrypt_cbc')){ |
168 | 175 | $sugar_smarty->assign("LDAP_ENC_KEY_READONLY", 'readonly'); |
169 | 176 | $sugar_smarty->assign("LDAP_ENC_KEY_DESC", $config_strings['LDAP_ENC_KEY_NO_FUNC_DESC']); |
170 | -}else{ |
|
177 | +} else{ |
|
171 | 178 | $sugar_smarty->assign("LDAP_ENC_KEY_DESC", $config_strings['LBL_LDAP_ENC_KEY_DESC']); |
172 | 179 | } |
173 | 180 | $sugar_smarty->assign("settings", $focus->settings); |
@@ -175,10 +182,10 @@ discard block |
||
175 | 182 | if ($valid_public_key){ |
176 | 183 | if(!empty($focus->settings['captcha_on'])){ |
177 | 184 | $sugar_smarty->assign("CAPTCHA_CONFIG_DISPLAY", 'inline'); |
178 | - }else{ |
|
185 | + } else{ |
|
179 | 186 | $sugar_smarty->assign("CAPTCHA_CONFIG_DISPLAY", 'none'); |
180 | 187 | } |
181 | -}else{ |
|
188 | +} else{ |
|
182 | 189 | $sugar_smarty->assign("CAPTCHA_CONFIG_DISPLAY", 'inline'); |
183 | 190 | } |
184 | 191 | |
@@ -194,9 +201,9 @@ discard block |
||
194 | 201 | $mail->setMailerForSystem(); |
195 | 202 | if($mail->Mailer == 'smtp' && $mail->Host ==''){ |
196 | 203 | $sugar_smarty->assign("SMTP_SERVER_NOT_SET", '1'); |
197 | - } |
|
198 | -else |
|
204 | + } else { |
|
199 | 205 | $sugar_smarty->assign("SMTP_SERVER_NOT_SET", '0'); |
206 | +} |
|
200 | 207 | |
201 | 208 | $focus = new InboundEmail(); |
202 | 209 | $focus->checkImap(); |
@@ -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,8 +58,7 @@ discard block |
||
56 | 58 | $config_check = $mod_strings['MSG_CONFIG_FILE_READY_FOR_REBUILD']; |
57 | 59 | $disable_config_rebuild = ''; |
58 | 60 | $config_file_ready = true; |
59 | -} |
|
60 | -else { |
|
61 | +} else { |
|
61 | 62 | $config_check = $mod_strings['MSG_MAKE_CONFIG_FILE_WRITABLE']; |
62 | 63 | } |
63 | 64 | |
@@ -70,8 +71,7 @@ discard block |
||
70 | 71 | if ( rebuildConfigFile($clean_config, $sugar_version) ) { |
71 | 72 | $config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_SUCCESS']; |
72 | 73 | $disable_config_rebuild = 'disabled="disabled"'; |
73 | - } |
|
74 | - else { |
|
74 | + } else { |
|
75 | 75 | $config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_FAILED']; |
76 | 76 | } |
77 | 77 |
@@ -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. |
@@ -66,8 +68,7 @@ discard block |
||
66 | 68 | $uploaddLabel = $mod_strings['LBL_UW_UPLOAD_MODULE']; |
67 | 69 | $descItemsQueued = $mod_strings['LBL_UW_DESC_MODULES_QUEUED']; |
68 | 70 | $descItemsInstalled = $mod_strings['LBL_UW_DESC_MODULES_INSTALLED']; |
69 | -} |
|
70 | -else { |
|
71 | +} else { |
|
71 | 72 | |
72 | 73 | $uploaddLabel = $mod_strings['LBL_UPLOAD_UPGRADE']; |
73 | 74 | $descItemsQueued = $mod_strings['DESC_FILES_QUEUED']; |
@@ -209,8 +210,7 @@ discard block |
||
209 | 210 | |
210 | 211 | if( $view == "module") { |
211 | 212 | print( getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_LOADER_TITLE']), false) ); |
212 | -} |
|
213 | -else { |
|
213 | +} else { |
|
214 | 214 | print( getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_MODULE_NAME'],$mod_strings['LBL_UPGRADE_WIZARD_TITLE']), false) ); |
215 | 215 | } |
216 | 216 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $form .= '</table></form>'; |
232 | 232 | //rrs |
233 | 233 | |
234 | -}else{ |
|
234 | +} else{ |
|
235 | 235 | $form =<<<eoq |
236 | 236 | <form name="the_form" enctype="multipart/form-data" action="{$form_action}" method="post" > |
237 | 237 | <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view"> |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('sugarEntry') || !sugarEntry) |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
3 | 3 | die('Not A Valid Entry Point'); |
4 | +} |
|
4 | 5 | /********************************************************************************* |
5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -70,8 +71,7 @@ discard block |
||
70 | 71 | $sql = str_replace(''',"'", $_POST['sql']); |
71 | 72 | //echo html_entity_decode($_POST['sql']); |
72 | 73 | echo $sql; |
73 | - } |
|
74 | - elseif (isset ($_POST['raction']) && strtolower($_POST['raction']) == "execute") { |
|
74 | + } elseif (isset ($_POST['raction']) && strtolower($_POST['raction']) == "execute") { |
|
75 | 75 | $sql = str_replace( |
76 | 76 | array( |
77 | 77 | "\n", |
@@ -96,8 +96,9 @@ discard block |
||
96 | 96 | } else { |
97 | 97 | |
98 | 98 | if (!$export && empty ($_REQUEST['repair_silent'])) { |
99 | - if ( empty($hideModuleMenu) ) |
|
100 | - echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), true); |
|
99 | + if ( empty($hideModuleMenu) ) { |
|
100 | + echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), true); |
|
101 | + } |
|
101 | 102 | echo "<h1 id=\"rdloading\">{$mod_strings['LBL_REPAIR_DATABASE_PROCESSING']}</h1>"; |
102 | 103 | ob_flush(); |
103 | 104 | } |
@@ -137,8 +138,9 @@ discard block |
||
137 | 138 | |
138 | 139 | foreach ($dictionary as $meta) { |
139 | 140 | |
140 | - if ( !isset($meta['table']) || isset($repairedTables[$meta['table']])) |
|
141 | - continue; |
|
141 | + if ( !isset($meta['table']) || isset($repairedTables[$meta['table']])) { |
|
142 | + continue; |
|
143 | + } |
|
142 | 144 | |
143 | 145 | $tablename = $meta['table']; |
144 | 146 | $fielddefs = $meta['fields']; |
@@ -1,6 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | 3 | die('Not A Valid Entry Point'); |
4 | +} |
|
4 | 5 | /********************************************************************************* |
5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -120,8 +121,9 @@ discard block |
||
120 | 121 | echo sizeof($fields)." field(s) missing from $mod->table_name"."_cstm<br>"; |
121 | 122 | foreach ($fields as $field) { |
122 | 123 | echo "Adding Column $field to $mod->table_name"."_cstm<br>"; |
123 | - if (!$simulate) |
|
124 | - $mod->custom_fields->add_existing_custom_field($field); |
|
124 | + if (!$simulate) { |
|
125 | + $mod->custom_fields->add_existing_custom_field($field); |
|
126 | + } |
|
125 | 127 | } |
126 | 128 | |
127 | 129 | } |