From 1f801d5a3a83cc2b7653866ddb6a6e307f7d3d51 Mon Sep 17 00:00:00 2001
From: alejandro-campos <alejandro.campos@artica.es>
Date: Fri, 21 Sep 2018 10:14:21 +0200
Subject: [PATCH] fixed bug: bad link in meta tree view's agent data, go to
 agent edition button using relative path

---
 pandora_console/include/functions_treeview.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php
index 81701e02e2..e9b64c15f5 100755
--- a/pandora_console/include/functions_treeview.php
+++ b/pandora_console/include/functions_treeview.php
@@ -522,7 +522,7 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
 		$hashdata = $user.$pwd_deserialiced['auth_token'];
 		
 		$hashdata = md5($hashdata);
-		$url = "//" . $server_data["server_url"] . "index.php?" .
+		$url = "//" . $server_data["server_url"] . "/index.php?" .
 				"sec=estado&" .
 				"sec2=operation/agentes/ver_agente&" .
 				"id_agente=" . $agent["id_agente"] . "&" .
@@ -608,7 +608,7 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
 		$go_to_agent = '<div style="text-align: right;">';
 		
 		if($agent["id_os"] != 100){
-			$go_to_agent .= '<a target=_blank href="' . $console_url . 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$url_hash.'">';
+			$go_to_agent .= '<a target=_blank href="' . "//" . $console_url . 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$url_hash.'">';
 			$go_to_agent .= html_print_submit_button (__('Go to agent edition'), 'upd_button', false, 'class="sub config"', true);
 		}
 		else{