| @@ -922,11 +922,11 @@ class page_action extends tform_actions { | |||||
| 'SELECT ip_type, ip_address FROM server_ip | 'SELECT ip_type, ip_address FROM server_ip | ||||
| WHERE client_id = "0" AND server_id = "'.$this->dns_serv.'" AND ip_type="IPv6"'); | WHERE client_id = "0" AND server_id = "'.$this->dns_serv.'" AND ip_type="IPv6"'); | ||||
| if(!$this->ip6_servidor_dns){ | |||||
| /*if(!$this->ip6_servidor_dns){ | |||||
| $this->ip6_servidor_dns = $app->db->queryOneRecord( | $this->ip6_servidor_dns = $app->db->queryOneRecord( | ||||
| 'SELECT ip_type, ip_address FROM server_ip | 'SELECT ip_type, ip_address FROM server_ip | ||||
| WHERE client_id = "1" AND server_id = "'.$this->dns_serv.'" AND ip_type="IPv6"'); | WHERE client_id = "1" AND server_id = "'.$this->dns_serv.'" AND ip_type="IPv6"'); | ||||
| } | |||||
| }*/ | |||||
| } | } | ||||
| $this->ip6_ultima = $this->ip6_servidor_dns['ip_address']; | $this->ip6_ultima = $this->ip6_servidor_dns['ip_address']; | ||||
| } | } | ||||
| @@ -1019,7 +1019,7 @@ class page_action extends tform_actions { | |||||
| 'SELECT ip_type, ip_address | 'SELECT ip_type, ip_address | ||||
| FROM server_ip | FROM server_ip | ||||
| WHERE client_id = "'.$this->cli_id.'" AND server_id = "'.$this->bbdd_serv.'"AND ip_type="IPv6"'); | WHERE client_id = "'.$this->cli_id.'" AND server_id = "'.$this->bbdd_serv.'"AND ip_type="IPv6"'); | ||||
| //echo(' (1) la ip4 bbdd ' . print_r($this->ip4_servidor_bbdd)); | |||||
| //si no tiene asignado le damos el de admin. | //si no tiene asignado le damos el de admin. | ||||
| if(!$this->ip4_servidor_bbdd){ | if(!$this->ip4_servidor_bbdd){ | ||||
| //Compruebo si hay datos para el client_id 0 y si no existe pruebo con el 1. Es admin ya que este cliente no tiene ip4 ni ip6 asignadas | //Compruebo si hay datos para el client_id 0 y si no existe pruebo con el 1. Es admin ya que este cliente no tiene ip4 ni ip6 asignadas | ||||
| @@ -1028,7 +1028,7 @@ class page_action extends tform_actions { | |||||
| $this->ip4_servidor_bbdd = $app->db->queryOneRecord( | $this->ip4_servidor_bbdd = $app->db->queryOneRecord( | ||||
| 'SELECT ip_type, ip_address FROM server_ip | 'SELECT ip_type, ip_address FROM server_ip | ||||
| WHERE client_id = "0" AND server_id = "'.$this->bbdd_serv.'" AND ip_type="IPv4"'); | WHERE client_id = "0" AND server_id = "'.$this->bbdd_serv.'" AND ip_type="IPv4"'); | ||||
| //echo(' (2) la ip4 bbdd ' . print_r($this->ip4_servidor_bbdd)); | |||||
| /*if(!$this->ip4_servidor_bbdd){ | /*if(!$this->ip4_servidor_bbdd){ | ||||
| $this->ip4_servidor_bbdd = $app->db->queryOneRecord( | $this->ip4_servidor_bbdd = $app->db->queryOneRecord( | ||||
| 'SELECT ip_type, ip_address FROM server_ip | 'SELECT ip_type, ip_address FROM server_ip | ||||
| @@ -1097,6 +1097,7 @@ class page_action extends tform_actions { | |||||
| } | } | ||||
| if(!$this->ip4_servidor_web['ip_address']){ | if(!$this->ip4_servidor_web['ip_address']){ | ||||
| //Si no hay ip4 en la lista de ips, tomamos esta de la configuración principal. | |||||
| $global_web_config = $app->getconf->get_server_config($this->web_serv, 'server'); | $global_web_config = $app->getconf->get_server_config($this->web_serv, 'server'); | ||||
| $this->ip4_servidor_web = $global_web_config; | $this->ip4_servidor_web = $global_web_config; | ||||
| @@ -1131,8 +1132,9 @@ class page_action extends tform_actions { | |||||
| $global_bbdd_config = $app->getconf->get_server_config($this->bbdd_serv, 'server'); | $global_bbdd_config = $app->getconf->get_server_config($this->bbdd_serv, 'server'); | ||||
| $this->ip4_servidor_bbdd = $global_bbdd_config; | $this->ip4_servidor_bbdd = $global_bbdd_config; | ||||
| if(!$this->ip4_servidor_bbdd['ip_address']){ | |||||
| //echo(' (3) la ip4 bbdd ' . print_r($this->ip4_servidor_bbdd)); | |||||
| //Como la ip4 para las bbdd es la ip4 para el sitio web, no es necesario esta comprobación | |||||
| /* if(!$this->ip4_servidor_bbdd['ip_address']){ | |||||
| $servicio_db = $app->db->queryOneRecord( | $servicio_db = $app->db->queryOneRecord( | ||||
| 'SELECT server_id, db_server, server_name FROM server | 'SELECT server_id, db_server, server_name FROM server | ||||
| WHERE server_id = "'.$this->bbdd_serv.'"'); | WHERE server_id = "'.$this->bbdd_serv.'"'); | ||||
| @@ -1142,11 +1144,11 @@ class page_action extends tform_actions { | |||||
| $app->tform->errorMessage = $app->tform->wordbook['error_no_ip']. 'la IP4 para el servidor ' . $nom_serv_db; | $app->tform->errorMessage = $app->tform->wordbook['error_no_ip']. 'la IP4 para el servidor ' . $nom_serv_db; | ||||
| $this->onError(); | $this->onError(); | ||||
| return true; | return true; | ||||
| } | |||||
| }*/ | |||||
| } | } | ||||
| if(!$this->ip6_servidor_bbdd['ip_address']){ | |||||
| /* if(!$this->ip6_servidor_bbdd['ip_address']){ | |||||
| $servicio_db = $app->db->queryOneRecord( | |||||
| /* $servicio_db = $app->db->queryOneRecord( | |||||
| 'SELECT server_id, db_server, server_name FROM server | 'SELECT server_id, db_server, server_name FROM server | ||||
| WHERE server_id = "'.$this->bbdd_serv.'"'); | WHERE server_id = "'.$this->bbdd_serv.'"'); | ||||
| @@ -1155,7 +1157,7 @@ class page_action extends tform_actions { | |||||
| $app->tform->errorMessage = $app->tform->wordbook['error_no_ip']. 'la IP6 para el servidor ' . $nom_serv_db; | $app->tform->errorMessage = $app->tform->wordbook['error_no_ip']. 'la IP6 para el servidor ' . $nom_serv_db; | ||||
| $this->onError(); | $this->onError(); | ||||
| return true; | return true; | ||||
| } | |||||
| }*/ | |||||
| return false; | return false; | ||||
| } | } | ||||