|
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
6 | 6 | * |
7 | 7 | * SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd. |
8 | | - * Copyright (C) 2011 - 2018 SalesAgility Ltd. |
| 8 | + * Copyright (C) 2011 - 2020 SalesAgility Ltd. |
9 | 9 | * |
10 | 10 | * This program is free software; you can redistribute it and/or modify it under |
11 | 11 | * the terms of the GNU Affero General Public License version 3 as published by the |
|
37 | 37 | * reasonably feasible for technical reasons, the Appropriate Legal Notices must |
38 | 38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
39 | 39 | */ |
40 | | - if (!defined('sugarEntry')) { |
41 | | - define('sugarEntry', true); |
42 | | - } |
| 40 | + |
| 41 | +if (!defined('sugarEntry')) { |
| 42 | + define('sugarEntry', true); |
| 43 | +} |
43 | 44 |
|
44 | 45 | require_once 'include/utils.php'; |
45 | 46 | @session_start(); |
@@ -180,6 +181,39 @@ function getSupportedInstallLanguages() |
180 | 181 | //get the url for the helper link |
181 | 182 | $help_url = get_help_button_url(); |
182 | 183 |
|
| 184 | +if (isset($sugar_config['installer_locked']) && $sugar_config['installer_locked'] == true) { |
| 185 | + if (!empty($_POST['current_step']) && $_POST['current_step'] === '3' && !empty($_POST['goto']) && $_POST['goto'] === $mod_strings['LBL_NEXT']) { |
| 186 | + session_unset(); |
| 187 | + $the_file = 'complete_install.php'; |
| 188 | + } else { |
| 189 | + $the_file = 'installDisabled.php'; |
| 190 | + $disabled_title = $mod_strings['LBL_DISABLED_DESCRIPTION']; |
| 191 | + $disabled_title_2 = $mod_strings['LBL_DISABLED_TITLE_2']; |
| 192 | + $disabled_text = <<<EOQ |
| 193 | + <p>{$mod_strings['LBL_DISABLED_DESCRIPTION']}</p> |
| 194 | + <pre> |
| 195 | + 'installer_locked' => false, |
| 196 | + </pre> |
| 197 | + <p>{$mod_strings['LBL_DISABLED_DESCRIPTION_2']}</p> |
| 198 | + |
| 199 | + <p>{$mod_strings['LBL_DISABLED_HELP_1']} <a href="{$mod_strings['LBL_DISABLED_HELP_LNK']}" target="_blank">{$mod_strings['LBL_DISABLED_HELP_2']}</a>.</p> |
| 200 | +EOQ; |
| 201 | + |
| 202 | + } |
| 203 | + $the_file = 'install/' . clean_string($the_file, 'FILE'); |
| 204 | + |
| 205 | + if (is_file($the_file)) { |
| 206 | + installerHook('pre_installFileRequire', ['the_file' => $the_file]); |
| 207 | + require($the_file); |
| 208 | + die(); |
| 209 | + } |
| 210 | + LoggerManager::getLogger()->fatal('Install file not found: ' . $the_file); |
| 211 | + die('SuiteCRM Installation has been Disabled'); |
| 212 | +} |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
183 | 217 | //if this license print, then redirect and exit, |
184 | 218 | if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'licensePrint') { |
185 | 219 | include('install/licensePrint.php'); |
@@ -720,7 +754,7 @@ function getSupportedInstallLanguages() |
720 | 754 | $sugar_config['unique_key'] = md5(create_guid()); |
721 | 755 | } |
722 | 756 |
|
723 | | - $validation_errors = validate_dbConfig('a'); |
| 757 | + $validation_errors = validate_dbConfig(); |
724 | 758 | if (count($validation_errors) > 0) { |
725 | 759 | $the_file = 'dbConfig_a.php'; |
726 | 760 | $si_errors = true; |
|
0 commit comments