|
1 | 1 | <?php
|
2 |
| -/* |
3 |
| -error_reporting(E_ALL & ~E_NOTICE); |
| 2 | +define('MGR', MODX_BASE_PATH . MGR_DIR); |
4 | 3 |
|
5 |
| -define('MODX_BASE_PATH',realpath('../../../../').'/'); |
6 |
| -include_once(MODX_BASE_PATH."assets/cache/siteManager.php");*/ |
7 |
| -define('MGR',MODX_BASE_PATH.MGR_DIR); |
8 |
| -/*define('MODX_API_MODE', true); |
9 |
| -define('IN_MANAGER_MODE', true); |
10 |
| -include_once (MODX_BASE_PATH . '/index.php');*/ |
11 |
| -$modx = EvolutionCMS(); |
12 |
| -$modx->invokeEvent('OnManagerPageInit'); |
13 |
| -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true || ! $modx->hasPermission('exec_module')) { |
| 4 | +evo()->invokeEvent('OnManagerPageInit'); |
| 5 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true || !evo()->hasPermission('exec_module')) { |
14 | 6 | die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.');
|
15 | 7 | }
|
16 | 8 |
|
17 |
| -$moduleurl = MODX_SITE_URL.'assets/modules/store/installer/index.php'; |
18 |
| -$modulePath = MODX_BASE_PATH.'assets/modules/store/installer/'; |
19 |
| -$self = $modulePath.'/index.php'; |
20 |
| -require_once($modulePath."/functions.php"); |
| 9 | +$moduleurl = MODX_SITE_URL . 'assets/modules/store/installer/index.php'; |
| 10 | +$modulePath = MODX_BASE_PATH . 'assets/modules/store/installer/'; |
| 11 | +$self = $modulePath . '/index.php'; |
| 12 | +require_once($modulePath . "/functions.php"); |
21 | 13 |
|
22 | 14 | $_lang = array();
|
23 | 15 | $_params = array();
|
24 |
| -$lang = $modx->config['manager_language']; |
25 |
| -if (file_exists($modulePath.'/lang/'.$lang.'.inc.php')){ |
26 |
| - include_once($modulePath.'/lang/'.$lang.'.inc.php'); |
27 |
| - |
| 16 | +$lang = evo()->config['manager_language']; |
| 17 | +if (file_exists($modulePath . '/lang/' . $lang . '.inc.php')){ |
| 18 | + include_once($modulePath . '/lang/' . $lang . '.inc.php'); |
28 | 19 | } else {
|
29 |
| - include_once($modulePath.'/lang/en.inc.php'); |
| 20 | + include_once($modulePath . '/lang/en.inc.php'); |
30 | 21 | }
|
31 |
| -include_once(MODX_BASE_PATH."assets/cache/siteManager.php"); |
32 |
| -require_once(MGR.'/includes/version.inc.php'); |
| 22 | +include_once(MODX_BASE_PATH . "assets/cache/siteManager.php"); |
| 23 | +require_once(MGR . '/includes/version.inc.php'); |
33 | 24 |
|
34 | 25 | $_SESSION['test'] = 1;
|
35 | 26 | install_sessionCheck();
|
36 | 27 |
|
37 |
| -$moduleName = "MODX"; |
38 |
| -$moduleVersion = $modx_branch.' '.$modx_version; |
39 |
| -$moduleRelease = $modx_release_date; |
| 28 | +$moduleName = "Evolution CMS"; |
| 29 | +$moduleVersion = $evo_branch . ' ' . $evo_version; |
| 30 | +$moduleRelease = $evo_release_date; |
40 | 31 | $moduleSQLBaseFile = "setup.sql";
|
41 | 32 | $moduleSQLDataFile = "setup.data.sql";
|
42 | 33 |
|
|
52 | 43 |
|
53 | 44 | // get post back status
|
54 | 45 | $isPostBack = (count($_POST));
|
55 |
| -$action= isset ($_GET['action']) ? trim(strip_tags($_GET['action'])) : 'load'; |
| 46 | +$action = isset($_GET['action']) ? trim(strip_tags($_GET['action'])) : 'load'; |
56 | 47 |
|
57 | 48 | ob_start();
|
58 | 49 | echo '<!DOCTYPE html>
|
59 | 50 | <html><head><title>Install</title>
|
60 | 51 | <meta http-equiv="Content-Type" content="text/html; charset="utf-8" />
|
61 |
| -<link rel="stylesheet" href="'.MODX_SITE_URL.'assets/modules/store/installer/style.css" type="text/css" media="screen" /></head> |
| 52 | +<link rel="stylesheet" href="' . MODX_SITE_URL . 'assets/modules/store/installer/style.css" type="text/css" media="screen" /></head> |
62 | 53 | <body><div id="contentarea"><div class="container_12"><br>';
|
63 | 54 |
|
64 |
| - |
65 |
| -if (!@include ($modulePath.'/action.' . $action . '.php')) { |
| 55 | +if (!@include($modulePath.'/action.' . $action . '.php')) { |
66 | 56 | die ('Invalid install action attempted. [action=' . $action . ']');
|
67 | 57 | }
|
68 | 58 |
|
69 | 59 | echo "</div><!-- // content --></div><!-- // contentarea --><br /></body></html>";
|
70 | 60 | ob_end_flush();
|
71 |
| - |
72 | 61 | ?>
|
0 commit comments