33 * EVO Cli Installer
44 * 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
55 */
6- echo ' Install Evolution CMS? ' . PHP_EOL ;
6+
77$ path = dirname (__FILE__ ) . '/ ' ;
88
99/*
1818define ('MODX_BASE_PATH ' , $ base_path );
1919define ('MODX_SITE_URL ' , '/ ' );
2020
21- require_once ("functions.php " );
21+ require_once ($ path . "functions.php " );
2222
2323// set error reporting
2424error_reporting (E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED );
2525
26- if (is_file ("../assets/cache/siteManager.php " )) {
27- include_once ("../assets/cache/siteManager.php " );
26+ if (is_file ($ path . "../assets/cache/siteManager.php " )) {
27+ include_once ($ path . "../assets/cache/siteManager.php " );
2828}
29- if (!defined ('MGR_DIR ' ) && is_dir ("../manager " )) {
29+ if (!defined ('MGR_DIR ' ) && is_dir ($ path . "../manager " )) {
3030 define ('MGR_DIR ' , 'manager ' );
3131}
3232
5858$ args = array_slice ($ argv , 1 );
5959
6060if ( empty ($ args ) ){
61+ echo 'Install Evolution CMS? ' .PHP_EOL ;
6162 $ installYes = readline ("Type 'y' to continue: " );
6263 if ($ installYes != 'y ' ) return ;
6364
@@ -166,7 +167,7 @@ function f_owc($path, $data, $mode = null){
166167// check directories
167168// cache exists?
168169echo strip_tags ($ _lang ['checking_if_cache_exist ' ]);
169- if (!file_exists ("../assets/cache " ) || !file_exists ("../assets/cache/rss " )) {
170+ if (!file_exists ($ path . "../assets/cache " ) || !file_exists ($ path . "../assets/cache/rss " )) {
170171 echo $ _lang ['failed ' ] . PHP_EOL ;
171172 $ errors ++;
172173} else {
@@ -176,7 +177,7 @@ function f_owc($path, $data, $mode = null){
176177
177178// cache writable?
178179echo strip_tags ($ _lang ['checking_if_cache_writable ' ]);
179- if (!is_writable ("../assets/cache " )) {
180+ if (!is_writable ($ path . "../assets/cache " )) {
180181 $ errors ++;
181182 echo $ _lang ['failed ' ] . PHP_EOL ;
182183} else {
@@ -186,7 +187,7 @@ function f_owc($path, $data, $mode = null){
186187
187188// cache files writable?
188189echo strip_tags ($ _lang ['checking_if_cache_file_writable ' ]);
189- $ tmp = "../assets/cache/siteCache.idx.php " ;
190+ $ tmp = $ path . "../assets/cache/siteCache.idx.php " ;
190191if ( ! file_exists ($ tmp )) {
191192 f_owc ($ tmp , "<?php //EVO site cache file ?> " );
192193}
@@ -199,7 +200,7 @@ function f_owc($path, $data, $mode = null){
199200
200201
201202echo strip_tags ($ _lang ['checking_if_cache_file2_writable ' ]);
202- if ( ! is_writable ("../assets/cache/sitePublishing.idx.php " )) {
203+ if ( ! is_writable ($ path . "../assets/cache/sitePublishing.idx.php " )) {
203204 $ errors ++;
204205 echo $ _lang ['failed ' ] . PHP_EOL ;
205206} else {
0 commit comments