fixed errors in function alias in metaconsole
This commit is contained in:
parent
30889074af
commit
ef9d31adfd
|
@ -1330,12 +1330,13 @@ function agents_get_name ($id_agent, $case = "none") {
|
||||||
* @return string Alias of the given agent.
|
* @return string Alias of the given agent.
|
||||||
*/
|
*/
|
||||||
function agents_get_alias ($id_agent, $case = 'none') {
|
function agents_get_alias ($id_agent, $case = 'none') {
|
||||||
if(is_metaconsole()){
|
global $config;
|
||||||
|
if($config['dbconnection_cache'] == null && is_metaconsole()){
|
||||||
$alias = (string) db_get_value ('alias', 'tmetaconsole_agent', 'id_tagente', (int) $id_agent);
|
$alias = (string) db_get_value ('alias', 'tmetaconsole_agent', 'id_tagente', (int) $id_agent);
|
||||||
} else {
|
} else {
|
||||||
$alias = (string) db_get_value ('alias', 'tagente', 'id_agente', (int) $id_agent);
|
$alias = (string) db_get_value ('alias', 'tagente', 'id_agente', (int) $id_agent);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($case) {
|
switch ($case) {
|
||||||
case 'upper':
|
case 'upper':
|
||||||
return mb_strtoupper($alias, 'UTF-8');
|
return mb_strtoupper($alias, 'UTF-8');
|
||||||
|
|
Loading…
Reference in New Issue