/[drupal]/contributions/modules/pdfview/pdfview.module
ViewVC logotype

Diff of /contributions/modules/pdfview/pdfview.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.42, Sun Feb 4 13:09:49 2007 UTC revision 1.43, Mon Feb 5 15:19:50 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: pdfview.module,v 1.41 2007/01/27 09:07:58 egonbianchet Exp $  // $Id: pdfview.module,v 1.42 2007/02/04 13:09:49 egonbianchet Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 247  function pdfview_check_images($string) { Line 247  function pdfview_check_images($string) {
247    
248  function _pdfview_rewrite_image_url($matches = array()) {  function _pdfview_rewrite_image_url($matches = array()) {
249    $path = $matches[0];    $path = $matches[0];
250    $path = str_replace($GLOBALS['base_url'].'/', '', $path);    $path = str_replace($GLOBALS['base_url'].'/', '', $path); // removes 'http://www.example.com/'
251    if (base_path() == '/' && $path[0] == '/') {    if (base_path() == '/') { // checks if base_path = '/'
252      $path = substr($path, 1);      if ($path[0] == '/') {  // run the following function only if the first sign is '/' and remove it
253          $path = substr($path, 1);
254        }
255    }    }
256    else {    else {
257      $path = str_replace(base_path(), '', $path);      $path = str_replace(base_path(), '', $path);  // if base_path != '/' we can savely remove base_path
258    }    }
259    if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) {    if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) {
260      $q = variable_get('clean_url', 0) ? '' : '?q=';      $q = variable_get('clean_url', 0) ? '' : '?q=';

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.2