diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-14 12:29:00 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-14 12:29:00 +0400 |
| commit | dd0faa97a3c890e90d9307cde57e797146a97d3c (patch) | |
| tree | be408eb83fbc33ad9e15adb886c902d5ca722b1f | |
| parent | f5e8ace1dd7694cb6f426dc1b3666c11f4e71e78 (diff) | |
upd: use REQUEST_URI for file id fetching
| -rw-r--r-- | public/index.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/public/index.php b/public/index.php index 393940d..9e6ccf1 100644 --- a/public/index.php +++ b/public/index.php @@ -16,9 +16,10 @@ if (FILE_CATALOG_RANDOM && isset($_GET['random'])) { $file = null; $file_id = null; +$url = parse_url($_SERVER['REQUEST_URI']); -if (strlen(substr($_SERVER['PHP_SELF'], strlen('/index.php'))) > 0) { - $file_id = basename($_SERVER['PHP_SELF']); +if (strlen($url['path']) > 1) { + $file_id = basename($url['path']); } if (FILE_CATALOG_FANCY_VIEW && $file_id) { |
