diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/MY_url.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery/helpers/MY_url.php b/modules/gallery/helpers/MY_url.php index 38f0a683..c8645c4d 100644 --- a/modules/gallery/helpers/MY_url.php +++ b/modules/gallery/helpers/MY_url.php @@ -38,6 +38,14 @@ class url extends url_Core { return; } + // Work around problems with the CGI sapi by enforcing our default path + if ($_SERVER["SCRIPT_NAME"] && "/" . Router::$current_uri == $_SERVER["SCRIPT_NAME"]) { + Router::$controller_path = MODPATH . "gallery/controllers/albums.php"; + Router::$controller = "albums"; + Router::$method = 1; + return; + } + $current_uri = html_entity_decode(Router::$current_uri, ENT_QUOTES); $item = ORM::factory("item")->where("relative_path_cache", $current_uri)->find(); if (!$item->loaded) { |