2012-12-06 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_agents.php, include/functions_html.php,
	include/functions_netflow.php: cleaned source code style.
	
	* include/db/mysql.php: fixed into the function
	"mysql_db_process_sql" a big bug that runs fine the select querys in
	a metaconsole enviorement with several DBs but the insert querys
	make in the previous connection.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7235 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-12-06 18:12:28 +00:00
parent c422f1a9b5
commit dcd02553b1
5 changed files with 28 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2012-12-06 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php, include/functions_html.php,
include/functions_netflow.php: cleaned source code style.
* include/db/mysql.php: fixed into the function
"mysql_db_process_sql" a big bug that runs fine the select querys in
a metaconsole enviorement with several DBs but the insert querys
make in the previous connection.
2012-12-06 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php,

View File

@ -275,12 +275,13 @@ function mysql_db_process_sql($sql, $rettype = "affected_rows", $dbconnection =
}
else {
$start = microtime (true);
if ($dbconnection == '') {
$result = mysql_query ($sql);
$dbconnection = $config['dbconnection'];
}
else {
$result = mysql_query ($sql, $dbconnection);
}
$time = microtime (true) - $start;
if ($result === false) {
$backtrace = debug_backtrace ();

View File

@ -1314,7 +1314,9 @@ function agents_get_agent_id ($agent_name, $io_safe_input = false) {
* @return string Name of the given agent.
*/
function agents_get_name ($id_agent, $case = "none") {
$agent = (string) db_get_value ('nombre', 'tagente', 'id_agente', (int) $id_agent);
$agent = (string) db_get_value ('nombre',
'tagente', 'id_agente', (int) $id_agent);
// Version 3.0 has enforced case sensitive agent names
// so we always should show real case names.
switch ($case) {