From 01a825f68606c8e2e61734765909faee56002e2a Mon Sep 17 00:00:00 2001 From: SL-Gundam Date: Mon, 28 May 2018 18:29:17 +0200 Subject: [PATCH] Fixed issue with URL fix incase of symlinked paths --- EmailReporting.php | 4 ++-- doc/CHANGELOG.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EmailReporting.php b/EmailReporting.php index 30a80e8..1f4f004 100644 --- a/EmailReporting.php +++ b/EmailReporting.php @@ -649,8 +649,8 @@ function ERP_check_mantisbt_url( ) { $t_path = config_get_global( 'path' ); $t_mail_mantisbt_url_fix = plugin_config_get( 'mail_mantisbt_url_fix', '' ); - $t_absolute_path = config_get_global( 'absolute_path' ); - $t_dir_script_filename = str_replace( array( '\\', '/'), DIRECTORY_SEPARATOR, dirname( $_SERVER['SCRIPT_FILENAME'] ) . DIRECTORY_SEPARATOR ); + $t_absolute_path = realpath( config_get_global( 'absolute_path' ) ); + $t_dir_script_filename = realpath( str_replace( array( '\\', '/'), DIRECTORY_SEPARATOR, dirname( $_SERVER['SCRIPT_FILENAME'] ) . DIRECTORY_SEPARATOR ) ); if ( strncasecmp( $t_path, 'http', 4 ) === 0 && $t_path !== $t_mail_mantisbt_url_fix && diff --git a/doc/CHANGELOG.txt b/doc/CHANGELOG.txt index 99101e2..6b7bca8 100644 --- a/doc/CHANGELOG.txt +++ b/doc/CHANGELOG.txt @@ -12,6 +12,7 @@ Okt 2017 - EmailReporting-0.10.1 - Use mbstring functions where applicable - Correct help link for MantisBT doku wiki EmailReporting page - Removed realname validation (MantisBT 2.12 retired needed functions) + - Fixed issue with URL fix incase of symlinked paths Sep 2017 - EmailReporting-0.10.0 - Officially compatible with MantisBT 2.x.x