|
4 | 4 | * php cli-install.php --database_server=localhost --database=db --database_user=dbuser --database_password=dbpass --table_prefix=evo_ --cmsadmin=admin --cmsadminemail=dmi3yy@gmail.com --cmspassword=123456 --language=ru --mode=new --installData=n --removeInstall=y |
5 | 5 | */ |
6 | 6 |
|
| 7 | +$self = 'install/cli-install.php'; |
7 | 8 | $path = dirname(__FILE__) . '/'; |
8 | | - |
9 | | -/* |
10 | | -$autoloader = realpath(__DIR__.'/../vendor/autoload.php'); |
11 | | -if (file_exists($autoloader) && is_readable($autoloader)) { |
12 | | - include_once($autoloader); |
13 | | -}*/ |
14 | | - |
15 | | -$self = 'install/index.php'; |
16 | 9 | $base_path = str_replace($self,'',str_replace('\\','/', __FILE__)); |
17 | 10 | define('MODX_API_MODE', true); |
18 | 11 | define('MODX_BASE_PATH', $base_path); |
|
23 | 16 | // set error reporting |
24 | 17 | error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); |
25 | 18 |
|
26 | | -if (is_file($path."../assets/cache/siteManager.php")) { |
27 | | - include_once($path."../assets/cache/siteManager.php"); |
| 19 | +if (is_file($base_path."assets/cache/siteManager.php")) { |
| 20 | + include_once($base_path."assets/cache/siteManager.php"); |
28 | 21 | } |
29 | | -if(!defined('MGR_DIR') && is_dir($path."../manager")) { |
| 22 | +if(!defined('MGR_DIR') && is_dir($base_path."manager")) { |
30 | 23 | define('MGR_DIR', 'manager'); |
31 | 24 | } |
32 | 25 |
|
33 | 26 | require_once($path."lang.php"); |
34 | | -require_once($path.'../'.MGR_DIR.'/includes/version.inc.php'); |
| 27 | +require_once($base_path.MGR_DIR.'/includes/version.inc.php'); |
35 | 28 |
|
36 | 29 | $moduleName = "EVO"; |
37 | 30 | $moduleVersion = $modx_branch.' '.$modx_version; |
@@ -962,10 +955,10 @@ function parse_docblock($element_dir, $filename) { |
962 | 955 | $confph['lastInstallTime'] = time(); |
963 | 956 | $confph['site_sessionname'] = $site_sessionname; |
964 | 957 |
|
965 | | -$configString = file_get_contents('config.inc.tpl'); |
| 958 | +$configString = file_get_contents($path.'config.inc.tpl'); |
966 | 959 | $configString = parse($configString, $confph); |
967 | 960 |
|
968 | | -$filename = $path.'../'.MGR_DIR.'/includes/config.inc.php'; |
| 961 | +$filename = $base_path.MGR_DIR.'/includes/config.inc.php'; |
969 | 962 | $configFileFailed = false; |
970 | 963 | if (@ !$handle = fopen($filename, 'w')) { |
971 | 964 | $configFileFailed = true; |
|
0 commit comments