1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Reduce the total of cache files

This commit is contained in:
Daniel 2021-10-27 14:28:53 -03:00
parent 7204165858
commit 04235ca85b

View file

@ -533,14 +533,14 @@ abstract class ObjectYPT implements ObjectInterface {
$tmpDir .= $filename . DIRECTORY_SEPARATOR; $tmpDir .= $filename . DIRECTORY_SEPARATOR;
$domain = getDomain(); $domain = getDomain();
$tmpDir .= $domain . DIRECTORY_SEPARATOR;
// make sure you separete http and https cache // make sure you separete http and https cache
$protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http'; $protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http';
$tmpDir .= $protocol . DIRECTORY_SEPARATOR;
$tmpDir .= "{$protocol}_{$domain}" . DIRECTORY_SEPARATOR;
if (class_exists("User_Location")) { if (class_exists("User_Location")) {
$loc = User_Location::getThisUserLocation(); $loc = User_Location::getThisUserLocation();
if (!empty($loc) && !empty($loc['country_code'])) { if (!empty($loc) && !empty($loc['country_code']) && $loc['country_code']!='-') {
$tmpDir .= $loc['country_code'] . DIRECTORY_SEPARATOR; $tmpDir .= $loc['country_code'] . DIRECTORY_SEPARATOR;
} }
} }