mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Now is not possible create two recon task with the same name. Ticket #2179
This commit is contained in:
parent
34a17df3b7
commit
ad6c95413b
@ -202,8 +202,12 @@ if (isset($_GET["create"])) {
|
||||
'macros' => $macros
|
||||
);
|
||||
|
||||
$name = io_safe_output($name);
|
||||
$name = trim($name, ' ');
|
||||
$name = io_safe_input($name);
|
||||
|
||||
$reason = "";
|
||||
if ($name != "") {
|
||||
if (($name != "") && (! db_get_value_filter ('name', 'trecon_task', array ('name' => $name)))) {
|
||||
if (empty($id_recon_script) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
{
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
@ -223,6 +227,11 @@ if (isset($_GET["create"])) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if (db_get_value_filter ('name', 'trecon_task', array ('name' => $name))){
|
||||
$reason = __('Recon-task name already exists');
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ($result !== false) {
|
||||
ui_print_success_message(__('Successfully created recon task'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user