Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #11534: Incorrect path/short_path detection
Rather than attempting to try and decipher the path and short_path by comparing the file's location on the filesytem with the document_root, MantisBT should be looking at the PHP_SELF server var provided by PHP. This variable is based on the current URL used to access the file, and is not confused by symlinks or the document_root pointing directly to the installation. It is also much simpler than the old method. Tested on Linux and Windows with the following setups: - installed as subdomain, eg http://mantis.host/foo.php - installed in subdirectory, eg http://host/mantisbt/foo.php - accessed by symlink (Linux), eg http://host/mantis/foo.php where /var/www/mantis -> /usr/share/mantisbt
- Loading branch information