/[drupal]/contributions/modules/import_html/import_html_process.inc
ViewVC logotype

Diff of /contributions/modules/import_html/import_html_process.inc

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

revision 1.5.4.14, Sun May 17 15:12:46 2009 UTC revision 1.5.4.15, Wed Jul 1 02:40:56 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: import_html_process.inc,v 1.5.4.13 2009/05/09 14:16:30 dman Exp $  // $Id: import_html_process.inc,v 1.5.4.14 2009/05/17 15:12:46 dman Exp $
3  /**  /**
4   * @file Actual routines for importing files.   * @file Actual routines for importing files.
5   *   *
# Line 124  function import_html_import_file($rel_pa Line 124  function import_html_import_file($rel_pa
124      'dest' => $dest_path,      'dest' => $dest_path,
125      'rel_path' => $rel_path,      'rel_path' => $rel_path,
126    );    );
   
127    // Handle files that are resources.    // Handle files that are resources.
128    // Copy them into the files folder and return    // Copy them into the files folder and return
129    $checkfile = is_local($source_path) ? $source_path : $dest_path;    $checkfile = is_local($source_path) ? $source_path : $dest_path;
# Line 1012  function _import_html_calc_path($rel_pat Line 1011  function _import_html_calc_path($rel_pat
1011        // No change, Chop suffix instead.        // No change, Chop suffix instead.
1012        // Take care - don't break a path like        // Take care - don't break a path like
1013        // /path/site-mirror/drupal.org/about        // /path/site-mirror/drupal.org/about
1014        // incorrectly        // incorrectly. So make sure that we split off the basename, chop its suffix, then glue it back onto the dirname
1015        $path = dirname($path) .'/'. preg_replace('|\.[^\.]+$|', "", basename($path));        // $path = (! empty($path) ? dirname($path) .'/' : '') . preg_replace('|\.[^\.]+$|', "", basename($path));
1016          // Alternatively - avoid matching bacl up the tree
1017          $path = preg_replace('|([^/]*)\.[^\.]+$|', '$1', $path);
1018      }      }
1019    }    }
1020    
1021    return $path;    return $path;
1022  }  }
1023    

Legend:
Removed from v.1.5.4.14  
changed lines
  Added in v.1.5.4.15

  ViewVC Help
Powered by ViewVC 1.1.2