Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
6b7eb9df | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
6b7eb9df TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
389bcebf | 11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
389bcebf | 16 | */ |
6a488035 TO |
17 | function run() { |
18 | session_start(); | |
19 | ||
20 | require_once '../../civicrm.config.php'; | |
21 | require_once 'CRM/Core/Config.php'; | |
22 | ||
23 | $config = CRM_Core_Config::singleton(); | |
24 | ||
25 | // this does not return on failure | |
26 | CRM_Utils_System::authenticateScript(TRUE); | |
17baf858 TO |
27 | if (!CRM_Core_Permission::check('administer CiviCRM')) { |
28 | CRM_Utils_System::authenticateAbort("User does not have required permission (administer CiviCRM).\n", TRUE); | |
29 | } | |
6a488035 TO |
30 | |
31 | require_once 'CRM/Core/BAO/ConfigSetting.php'; | |
32 | $moveStatus = CRM_Core_BAO_ConfigSetting::doSiteMove(); | |
33 | ||
34 | echo $moveStatus . '<br />'; | |
35 | echo ts("If no errors are displayed above, the site move steps have completed successfully. Please visit <a href=\"{$config->userFrameworkBaseURL}\">your moved site</a> and test the move."); | |
36 | } | |
37 | ||
38 | run(); |