1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Daniel Neto 2023-03-09 14:15:23 -03:00
parent 3ede48cd0f
commit 71d2d170ec
3 changed files with 4 additions and 13 deletions

View file

@ -9,7 +9,6 @@ if (!empty($_GET['lang'])) {
$_GET['lang'] = str_replace(["'", '"', """, "'"], ['', '', '', ''], xss_esc($_GET['lang']));
}
setSiteLang();
@include_once "{$global['systemRootPath']}locale/{$_SESSION['language']}.php";
function __($str, $allowHTML = false)
@ -137,7 +136,7 @@ function setSiteLang()
setLanguage($config->getLanguage());
}
if (empty($_SESSION['language'])) {
return setLanguage('en_US');
setLanguage('en_US');
}
}

View file

@ -177,12 +177,14 @@ $_SESSION['savedQuerys'] = 0;
require_once $global['systemRootPath'] . 'objects/Object.php';
require_once $global['systemRootPath'] . 'locale/function.php';
require_once $global['systemRootPath'] . 'objects/plugin.php';
setSiteLang();
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
adminSecurityCheck();
setSiteLang();
fixSystemPath();
ObjectYPT::checkSessionCacheBasedOnLastDeleteALLCacheTime();
getDeviceID();

View file

@ -86,15 +86,6 @@ class User_Location extends PluginAbstract {
return str_replace('-', '_', $parts[0]);
}
static function setLanguageFromBrowser() {
return setLanguage(self::getLanguageFromBrowser());
}
static function setLanguageFromIP() {
$User_Location = self::getThisUserLocation();
return setLanguage($User_Location['country_code']);
}
static function changeLang($force=false) {
global $global;
if(!empty($force) || empty($_SESSION['language'])){
@ -108,7 +99,6 @@ class User_Location extends PluginAbstract {
}
}
static function getLanguage() {
global $global;
$global['User_Location_lang'] = false;