detect relative path for ZM_PATH_EVENTS and use ZM_PATH_WEB to make a full path

This commit is contained in:
Isaac Connor
2016-09-19 16:44:43 -04:00
parent d4645cd94a
commit e228de6ebe

View File

@@ -96,7 +96,7 @@ sub Path {
$_[0]{Path} = $_[1];
}
if ( ! ( $_[0]{Id} or $_[0]{Path} ) ) {
$_[0]{Path} = $Config{ZM_DIR_EVENTS};
$_[0]{Path} = ($Config{ZM_DIR_EVENTS}=~/^\//) ? $Config{ZM_DIR_EVENTS} : ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS})
}
return $_[0]{Path};
} # end sub Path