diff --git a/buildzip.php b/buildzip.php index 7e41af4..ac13a40 100755 --- a/buildzip.php +++ b/buildzip.php @@ -63,10 +63,10 @@ replaceVer('./init.php', $ver); unlink('./tmp/sessions/empty'); # save only 2 languages -$dh = opendir('./includes/lang/') or die("Cant opendir lang\n"); +$dh = opendir('./content/lang/') or die("Cant opendir lang\n"); while (false !== ($f = readdir($dh))) { if (!in_array($f, ['.', '..', '.htaccess', 'en.json', 'ru.json'])) { - unlink('./includes/lang/'. $f); + unlink('./content/lang/'. $f); } } closedir($dh); diff --git a/src/content/index.php b/src/content/index.php new file mode 100644 index 0000000..a710241 --- /dev/null +++ b/src/content/index.php @@ -0,0 +1,2 @@ +prefix = Config::get('prefix'); //User can override language setting by cookies -if(isset($_COOKIE['lang']) && preg_match("/^[a-z-]+$/i", $_COOKIE['lang']) && file_exists(MTTPATH. 'lang/'. $_COOKIE['lang']. '.php')) { +if(isset($_COOKIE['lang']) && preg_match("/^[a-z-]+$/i", $_COOKIE['lang']) && file_exists(MTTLANG. $_COOKIE['lang']. '.php')) { Config::set('lang', $_COOKIE['lang']); } diff --git a/src/settings.php b/src/settings.php index 6f1fc68..c83f02c 100644 --- a/src/settings.php +++ b/src/settings.php @@ -195,7 +195,7 @@ header('Content-type:text/html; charset=utf-8');

- Notice! You can use old language files after downloading in the new format and copying to the /includes/lang/ folder.
+ Notice! You can use old language files after downloading in the new format and copying to the /content/lang/ folder.
Download json file