mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
get data in file count from module
This commit is contained in:
parent
cdb3308e7a
commit
3d63544939
@ -27,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use PandoraFMS\Tools\Files;
|
use PandoraFMS\Tools\Files;
|
||||||
|
use PandoraFMS\Agent;
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -1162,11 +1163,20 @@ class ConsoleSupervisor
|
|||||||
$this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT');
|
$this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT');
|
||||||
}
|
}
|
||||||
|
|
||||||
$filecount = $this->countFiles(
|
$agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals');
|
||||||
$config['attachment_store'],
|
if ($agentId !== false) {
|
||||||
'',
|
$agent = new Agent($agentId);
|
||||||
$config['num_files_attachment']
|
|
||||||
);
|
$moduleId = $agent->searchModules(
|
||||||
|
['nombre' => 'Data_in_files'],
|
||||||
|
1
|
||||||
|
)->toArray()['id_agente_modulo'];
|
||||||
|
|
||||||
|
if ($moduleId > 0) {
|
||||||
|
$filecount = (int) modules_get_last_value($moduleId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($filecount > $config['num_files_attachment']) {
|
if ($filecount > $config['num_files_attachment']) {
|
||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user