Closed (fixed)
Project:
Drupal Code Generation
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Dec 2009 at 23:35 UTC
Updated:
4 Dec 2009 at 07:53 UTC
problem:
>> new files will be created with access rights "600" and can not be read easily via FTP
solution:
>> modification:
function _code_gen_copy_templates($template_path, $src_file_name, $dst_file_path, $dst_file_name, $substitutions = array()) {
$template = file_get_contents($template_path."/".$src_file_name);
$template_file = tempnam(file_directory_temp(), 'tmp_');
if ($dst = fopen($template_file, "w")) {
fwrite($dst, strtr($template, $substitutions));
fclose($dst);
}
+ chmod ( $template_file , 0755 );
rename($template_file, $dst_file_path."/".$dst_file_name);
}
Comments
Comment #1
madsph commentedI am developing on a windows system, so I can't test if this solves a problem on other OS. But since it doesn't break the module on my windows, I think it is safe to add you patch.
Patch committed - Thank you very much for your feed back.
Comment #2
madsph commented