Wouldn't it be better to call file_directory_path() rather than variable_get('file_directory_path', ...)? The file_directory_path() itself calls variable_get('file_directory_path', conf_path() . "/files"), so why the additional need to call variable_get again? Do you have any references to support what you're suggesting?
Gosh, I've gone to sleep a couple of times in the last month. I'm sure there was a reason why I did this. I may have actually changed the variable name before posting. I think I save the path, so had to do something like this.
However, in general, no, there is not a good reason to do it this way. "File_directory_path()" should be sufficient.
Comments
Comment #1
stella commentedWouldn't it be better to call
file_directory_path()rather thanvariable_get('file_directory_path', ...)? Thefile_directory_path()itself callsvariable_get('file_directory_path', conf_path() . "/files"), so why the additional need to call variable_get again? Do you have any references to support what you're suggesting?Cheers,
Stella
Comment #2
nancydruGosh, I've gone to sleep a couple of times in the last month. I'm sure there was a reason why I did this. I may have actually changed the variable name before posting. I think I save the path, so had to do something like this.
However, in general, no, there is not a good reason to do it this way. "File_directory_path()" should be sufficient.