--- pathfilter.module +++ (clipboard) @@ -113,7 +113,7 @@ break; case 'files': - return _pathfilter_process_files($matches); + return _pathfilter_process_files($format, $matches); } } @@ -145,8 +145,11 @@ return $matches[1] . $link . $matches[1]; } -function _pathfilter_process_files($matches) { - return $matches[1] . file_create_url($matches[3]) . $matches[1]; +function _pathfilter_process_files($format, $matches) { + $absolute = variable_get('pathfilter_link_absolute_'. $format, 1) ? TRUE : FALSE; + $link = file_create_url($matches[3]); + $link = $absolute ? $link : substr($link, strlen($GLOBALS['base_url'])); + return $matches[1] . $link . $matches[1]; } /**