Now is not possible create two recon task with the same name. Ticket #2179
This commit is contained in:
parent
2aafc7a53e
commit
681139e2d3
|
@ -201,9 +201,13 @@ if (isset($_GET["create"])) {
|
|||
'parent_recursion' => $parent_recursion,
|
||||
'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 (($id_recon_script == 'NULL') && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||
{
|
||||
$result = db_process_sql_insert('trecon_task', $values);
|
||||
|
@ -222,6 +226,11 @@ if (isset($_GET["create"])) {
|
|||
else {
|
||||
$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…
Reference in New Issue