mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-11692-15882-no-se-puede-detener-paradas-planificadas' into 'develop'
Ent 11692 15882 no se puede detener paradas planificadas See merge request artica/pandorafms!6211
This commit is contained in:
commit
7ec2d5046e
@ -835,7 +835,7 @@ if ($downtimes === false && $filter_performed === false) {
|
|||||||
// If user have writting permissions.
|
// If user have writting permissions.
|
||||||
if (in_array($downtime['id_group'], $groupsAD) === true) {
|
if (in_array($downtime['id_group'], $groupsAD) === true) {
|
||||||
// Stop button.
|
// Stop button.
|
||||||
if ($downtime['type_execution'] === 'once'
|
if (($downtime['type_execution'] === 'once' || $downtime['type_execution'] === 'periodically')
|
||||||
&& (int) $downtime['executed'] === 1
|
&& (int) $downtime['executed'] === 1
|
||||||
) {
|
) {
|
||||||
if ((bool) check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW') === true
|
if ((bool) check_acl_restricted_all($config['id_user'], $downtime['id_group'], 'AW') === true
|
||||||
|
@ -566,7 +566,17 @@ function planned_downtimes_stop($downtime)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'periodically':
|
case 'periodically':
|
||||||
return false;
|
$values = [
|
||||||
|
'executed' => 0,
|
||||||
|
'date_to' => time(),
|
||||||
|
];
|
||||||
|
|
||||||
|
$result = db_process_sql_update(
|
||||||
|
'tplanned_downtime',
|
||||||
|
$values,
|
||||||
|
['id' => $id_downtime]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user