On first installation (with the no_dba.patch, which I assume is pretty independant of this issue) I visited
/admin/settings/demo
and got
The directory sites/api.monster/files/demo/api.monster does not exist.
That is to say {files_dir}/demo/{site_instance}
I appreciate the advice to shift the backups into a safe place, but the first impression of an error is annoying.
demo_get_fileconfig()
// Check if directory exists.
file_check_directory($fileconfig['path'], FILE_CREATE_DIRECTORY, 'path');
if (!file_check_directory($fileconfig['dumppath'], FILE_CREATE_DIRECTORY, 'path')) {
return false;
}
... creates the dir on the fly. You woldn't have noticed it lacking during development, I'm guessing :)
While I'm there, taking a leaf from file.inc on security, I'll deny access to these files
// Protect this directory.
$htaccess = $fileconfig['path'] ."/.htaccess";
if (!is_file($fileconfig['path'] )) {
$htaccess_lines = "#demo.module snapshots\n#Do not let the webserver serve anything under here!\n#\nDeny from all\n";
if (($fp = fopen($htaccess, 'w')) && fputs($fp, $htaccess_lines)) {
fclose($fp);
chmod($htaccess, 0664);
}
}
... other than that, the install was pretty intuative.
I won't attach a patch until the no_db patch is committed.
Comments
Comment #1
sunThanks! I think, that is what you meant?
Needs testing.
Comment #2
dman commentedLooks like what I meant, yeah.
I'll try to test it .. if I ever finish rebuilding my dev machine (ug, 6 hours and counting)
Comment #3
sunTested and committed. Thanks!
Comment #4
(not verified) commented