mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Update recon-task changed. Ticket #2179
This commit is contained in:
parent
4629d46408
commit
49b0ef565b
@ -155,10 +155,20 @@ if (isset($_GET["update"])) {
|
|||||||
|
|
||||||
$reason = '';
|
$reason = '';
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
if ((empty($id_recon_script)) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
if ((db_get_value_filter ('name', 'trecon_task', array ('name' => $name))) && (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))){
|
||||||
|
$reason = __('Recon-task name already exists and incorrect format in Subnet field');
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
else if(db_get_value_filter ('name', 'trecon_task', array ('name' => $name))){
|
||||||
|
$reason = __('Recon-task name already exists');
|
||||||
|
$result = false;
|
||||||
|
}
|
||||||
|
else if ((empty($id_recon_script)) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network)){
|
||||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||||
elseif (!empty($id_recon_script))
|
}
|
||||||
|
elseif (!empty($id_recon_script)){
|
||||||
$result = db_process_sql_update('trecon_task', $values, $where);
|
$result = db_process_sql_update('trecon_task', $values, $where);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
if (!preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network))
|
||||||
$reason = __('Incorrect format in Subnet field');
|
$reason = __('Incorrect format in Subnet field');
|
||||||
|
@ -80,11 +80,11 @@ if (is_ajax ()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Edit mode
|
// Edit mode
|
||||||
if (isset($_GET["update"]) || (isset($_GET["crt"]))) {
|
if (isset($_GET["update"]) || (isset($_GET["upd"]))) {
|
||||||
|
|
||||||
$update_recon = true;
|
$update_recon = true;
|
||||||
if (isset($_GET["crt"])) {
|
if (isset($_GET["upd"])) {
|
||||||
if ($_GET["crt"] != "update") {
|
if ($_GET["upd"] != "update") {
|
||||||
$update_recon = false;
|
$update_recon = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user