Closed (fixed)
Project:
Path redirect import
Version:
7.x-1.0-rc3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2012 at 17:44 UTC
Updated:
11 Feb 2013 at 12:10 UTC
Hello,
Would it be possible for this module to deal with redirects to files? In order to do what I want, it's a half line fix:
path_redirect_import.module, line 234:
- if (drupal_lookup_path('source', $parts['url']) || drupal_valid_path($parts['url'])) {
+ if (drupal_lookup_path('source', $parts['url']) || drupal_valid_path($parts['url']) || is_file($parts['url'])) {
This works, providing the path of the file is given in the CSV, relative to the webroot. It might be a better idea to request people use public:// in the CSV, instead of spelling out the path to the files folder.
How does that sound?
Thanks for a great module!
Comments
Comment #1
plopescFeature added!
Thanks for the catch. Given that all the paths entered are relatives to the site root, I think is more robust follow this approach. Then if you or any other user have problems with this, we could add support for file streams.
Regards