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

CommentFileSizeAuthor
#3 filemanager.filemanager_url.patch584 bytessunfish62

Comments

drewish’s picture

Please see http://drupal.org/patch for information on how to submit a proper patch.

sunfish62’s picture

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.

sunfish62’s picture

Status: Active » Needs review
StatusFileSize
new584 bytes

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

pomliane’s picture

Status: Needs review » Closed (won't fix)

This version of Filemanager is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.