minor fix

This commit is contained in:
alejandro.campos@artica.es 2024-02-01 17:36:21 +01:00
parent 44e546af39
commit 05af441f19

View File

@ -1145,7 +1145,7 @@ class ConsoleSupervisor
public function checkAttachment() public function checkAttachment()
{ {
global $config; global $config;
hd("dadsada", true);
if (is_writable($config['attachment_store']) !== true) { if (is_writable($config['attachment_store']) !== true) {
$this->notify( $this->notify(
[ [
@ -1163,6 +1163,12 @@ hd("dadsada", true);
$this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT'); $this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT');
} }
$filecount = $this->countFiles(
$config['attachment_store'],
'',
$config['num_files_attachment']
);
if ($filecount > $config['num_files_attachment']) { if ($filecount > $config['num_files_attachment']) {
$this->notify( $this->notify(
[ [
@ -1291,7 +1297,7 @@ hd("dadsada", true);
$filecount = (int) modules_get_last_value($moduleId); $filecount = (int) modules_get_last_value($moduleId);
} }
} }
hd($filecount, true);
// If cannot open directory, count is '-1', skip. // If cannot open directory, count is '-1', skip.
if ($filecount > $MAX_FILES_DATA_IN) { if ($filecount > $MAX_FILES_DATA_IN) {
$this->notify( $this->notify(