Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2006 at 18:03 UTC
Updated:
26 Dec 2006 at 09:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedpatch attached- makes this a warning, reports on status of public vs. private downloads
Comment #2
ChrisKennedy commentedGreat idea, this will help a lot of people out with the initial install. The patch appears to work correctly, although there is a typo in the error message: "You may need to change to set the correct directory"...
What do you think about providing better feedback by more thorough testing? It wouldn't be a difficult to also check for file_exists() and/or is_dir() to provide more specific error messages.
Comment #3
pwolanin commentedLooks like is_dir() is the better bet.
Comment #4
pwolanin commentedOk, improved the descriptions, fixed typ0. Grabbed the same t() strings used in file.inc for the directory being not writable/not existing.
Comment #5
pwolanin commentedShould have looked more closely at file.inc. Try this patch instead- just to be extra sure there should be separate checks for is_writable and is_dir. Otherwise a writable file will pass in place of a directory.
Comment #6
ChrisKennedy commentedThis patch tweaks the code formatting and message strings. Otherwise it looks good.
Comment #7
moshe weitzman commentednice work all. i just changed 'file system' to 'files directory' because i don't like drupal telling me that the 'file system' is writable. thats a bit broad.
Comment #8
pwolanin commented@moshe- seems like the wrong patch file...
Comment #9
moshe weitzman commentedoops. here it is
Comment #10
dries commentedMaybe we should change all instance of 'file system' to 'files' or 'files directory' then? (Not sure we should but figured we might ponder about it some more.)
Comment #11
ChrisKennedy commentedFrom Drupal's perspective, "file system" consists of three dimensions (see admin/settings/file-system):
1. The "files" system path.
2. The temporary directory path.
3. The download method (public/private).
This patch currently checks items #1 and #3, so naming it "file system" is probably more accurate than "files directory" if we want to stick to the current terminology. If we want to globally change "file system" to something else that will be a lot more work. We could also address moshe's concern by clarifying that "writable" is referring to the files directory and not the server's filesystem, which is what I do in the attached patch.
Comment #12
pwolanin commentedYes, that seems more specific and clear.
Comment #13
ChrisKennedy commentedUpdated link text based on Dries' comment on http://drupal.org/node/102534
Comment #14
Steven commentedI think this needs to be an error, not a warning. That way, it shows up on /admin. If the files dir is broken, lots of things will be broken.
Comment #15
ChrisKennedy commentedSounds good.
Comment #16
pwolanin commentedI think it's RTBC again- code works, patch applies cleanly.
Comment #17
Steven commentedThe usage of t() in this patch is bad. Instead of doing
t("Visit the %page", array("%page" => l(t('page')...))), you should dot("Visit the page", ...). That way, you keep the whole phrase together in one string.I edited it, and also simplified the values. When nothing is wrong, we should be concise and informative. Only when something's bad, we should tell the user what to do in phrases.
Committed to HEAD. Thanks.
Comment #18
(not verified) commented