Index: pdfview.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/pdfview/pdfview.module,v retrieving revision 1.28.2.6 diff -u -r1.28.2.6 pdfview.module --- pdfview.module 31 Oct 2006 08:07:04 -0000 1.28.2.6 +++ pdfview.module 3 Nov 2006 09:20:21 -0000 @@ -253,21 +253,11 @@ function _pdfview_rewrite_image_url($matches = array()) { $path = $matches[0]; - if (strstr($path, 'http://')) { - return $path; - } - else { - if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE && strstr($path, 'system/files/')) { - if (variable_get('clean_url', 0)) { - $path = str_replace('/system/files/', '', $path); - } - else { - $path = str_replace('?q=system/files/', '', $path); - } - } - elseif ($path[0] == '/') { - $path = str_replace(base_path(), '', $path); - } - return file_create_url($path); + $path = str_replace($GLOBALS['base_url'].'/', '', $path); + $path = str_replace(base_path(), '', $path); + if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) { + $q = variable_get('clean_url', 0) ? '' : '?q='; + $path = str_replace($q.'system/', '', $path); } + return $path; }