Merge branch 'ent-6634-Bug-borrado-net-scan-scripts' into 'develop'

fixed wrong error message: recon task is not necessarily linked to script

See merge request artica/pandorafms!3601
This commit is contained in:
Daniel Rodriguez 2021-01-25 09:52:47 +01:00
commit 7a9d928a98

View File

@ -350,18 +350,12 @@ class ManageNetScanScripts extends Wizard
['id_recon_script' => $id_script] ['id_recon_script' => $id_script]
); );
if (!$result_dlt) {
$result = [
'error' => 1,
'msg' => __('Problem deleting Net scan Scripts'),
];
} else {
$result_dlt2 = db_process_sql_delete( $result_dlt2 = db_process_sql_delete(
'trecon_task', 'trecon_task',
['id_recon_script' => $id_script] ['id_recon_script' => $id_script]
); );
if (!$result_dlt2) { if (!$result_dlt) {
$result = [ $result = [
'error' => 1, 'error' => 1,
'msg' => __('Problem deleting Net scan Scripts'), 'msg' => __('Problem deleting Net scan Scripts'),
@ -372,7 +366,6 @@ class ManageNetScanScripts extends Wizard
'msg' => __('Deleted successfully'), 'msg' => __('Deleted successfully'),
]; ];
} }
}
return $result; return $result;