mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added path check to config attachment store
This commit is contained in:
parent
f3f44ebbdd
commit
bec8085ca5
@ -200,8 +200,20 @@ function config_update_config()
|
|||||||
$error_update[] = __('Use cert.');
|
$error_update[] = __('Use cert.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config_update_value('attachment_store', (string) get_parameter('attachment_store'))) {
|
$attachment_store = (string) get_parameter('attachment_store');
|
||||||
|
if (file_exists($attachment_store) === false
|
||||||
|
|| is_writable($attachment_store) === false
|
||||||
|
) {
|
||||||
$error_update[] = __('Attachment store');
|
$error_update[] = __('Attachment store');
|
||||||
|
$error_update[] .= __(
|
||||||
|
"Path doesn't exists or is not writable"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (config_update_value('attachment_store', $attachment_store) === false) {
|
||||||
|
$error_update[] = __(
|
||||||
|
'Attachment store.'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config_update_value('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'))) {
|
if (!config_update_value('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user