fix cache buster usage of DOCUMENT_ROOT when installed in a subfolder

This commit is contained in:
2026-03-02 17:45:36 -07:00
parent ed343deeb3
commit 06cc674f09

View File

@@ -42,7 +42,8 @@ class Paths
'/assets/json/datatables_languages/en-US.json',
];
$fullpath = $_SERVER['DOCUMENT_ROOT'] . $filepath;
$CI = & get_instance();
$fullpath = empty($CI->config->item('directory')) ? $_SERVER['DOCUMENT_ROOT'] . $filepath : $_SERVER['DOCUMENT_ROOT'] . '/' . $CI->config->item('directory') . $filepath;
// We comment out this line because latest teste at LA8AJA's XAMPP setup showed that it works even without it
// So we will keep it simple and just use the $filepath as is, since it seems to work fine on both Linux and Windows setups