mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +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
@ -201,9 +201,13 @@ if (isset($_GET["create"])) {
|
|||||||
'parent_recursion' => $parent_recursion,
|
'parent_recursion' => $parent_recursion,
|
||||||
'macros' => $macros
|
'macros' => $macros
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$name = io_safe_output($name);
|
||||||
|
$name = trim($name, ' ');
|
||||||
|
$name = io_safe_input($name);
|
||||||
|
|
||||||
$reason = "";
|
$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))
|
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);
|
$result = db_process_sql_insert('trecon_task', $values);
|
||||||
@ -222,7 +226,12 @@ if (isset($_GET["create"])) {
|
|||||||
else {
|
else {
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db_get_value_filter ('name', 'trecon_task', array ('name' => $name))){
|
||||||
|
$reason = __('Recon-task name already exists');
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
ui_print_success_message(__('Successfully created recon task'));
|
ui_print_success_message(__('Successfully created recon task'));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user