Problems with filemanager_url function
sunfish62 - December 18, 2006 - 19:08
| Project: | Filemanager |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I was setting up Filemanager (so as to work with AcidFree), and found that I needed to modify the function filemanager_url so that it embeds the folder designated in filemanager_public_path variable stored in the variable table. I had to add one line and modify a second at lines 44-45 of the code as follows:
$dirpath = variable_get('filemanager_public_path', 'files');
return variable_get('filemanager_public_url', 'files') . "$dirpath/$subdir/{$file->directory}/{$file->filename}";When I added this code, it seems to have fixed the problem I outlined in http://drupal.org/node/103896. However, not knowing the code well, I wondered whether this was an appropriate fix to the problem?
I am working with:
// $Id: filemanager.module,v 1.18.2.2 2006/11/19 02:35:21 drewish Exp $
TIA,
David

#1
Please see http://drupal.org/patch for information on how to submit a proper patch.
#2
Thanks for the reply; can you tell me whether this change is appropriate, or is that what the patch would do? You see, I'm not much of a programmer.
#3
Well, here's the code as a patch. I wonder whether that second line was really meant to use filemanager_public_path instead of filemanager_public_url
David