cap the path_prefix to 3 depth directories max

This commit is contained in:
johnnyq 2025-08-06 18:03:51 -04:00
parent 8407cd3ea5
commit c78f50ab8c
1 changed files with 1 additions and 1 deletions

View File

@ -4,5 +4,5 @@
// Currently unused, but the idea is to dynamically prepend ../../ to asset paths (like includes, libraries, etc.)
// based on the current directory depth. This allows us to support deeply nested folder structures.
$depth = substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/');
$depth = min(substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/'), 3);
$path_prefix = str_repeat('../', $depth);