summaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php5
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) {