mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2008-07-29 Evi Vanoost <vanooste@rcbi.rochester.edu>
* functions_db.php: Quick fix. Used wrong function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@982 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
12efa658cf
commit
c0c84eb2c5
@ -1136,7 +1136,7 @@ function agent_add_address ($id_agent, $ip_address) {
|
|||||||
$sql = sprintf ("SELECT COUNT(`ip`) FROM taddress_agent, taddress
|
$sql = sprintf ("SELECT COUNT(`ip`) FROM taddress_agent, taddress
|
||||||
WHERE taddress_agent.id_a = taddress.id_a
|
WHERE taddress_agent.id_a = taddress.id_a
|
||||||
AND ip = '%s' AND id_agent = %d",$ip_address,$id_agent);
|
AND ip = '%s' AND id_agent = %d",$ip_address,$id_agent);
|
||||||
$current_address = get_db_row_sql ($sql);
|
$current_address = get_db_sql ($sql);
|
||||||
if ($current_address > 0)
|
if ($current_address > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1175,8 +1175,7 @@ function agent_delete_address ($id_agent, $ip_address) {
|
|||||||
if (give_agent_address ($id_agent) == $ip_address) {
|
if (give_agent_address ($id_agent) == $ip_address) {
|
||||||
$new_ip = give_agent_address_from_list ($id_agent);
|
$new_ip = give_agent_address_from_list ($id_agent);
|
||||||
// Change main address in agent to whis one
|
// Change main address in agent to whis one
|
||||||
$query = sprintf ("UPDATE tagente (direccion) VALUES
|
$query = sprintf ("UPDATE tagente SET `direccion` = '%s' WHERE id_agente = %d",$new_ip,$id_agent);
|
||||||
('%s') WHERE id_agente = %d ",$new_ip,$id_agent);
|
|
||||||
process_sql ($query);
|
process_sql ($query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user