Merge branch 'ma2sim-develop-patch-81134' into 'develop'
Change return value of function agents_get_agent_id_by_alias when alias is '' See merge request artica/pandorafms!5498
This commit is contained in:
commit
f5f86c9fa2
|
@ -165,9 +165,9 @@ function agents_locate_agent(string $field)
|
|||
function agents_get_agent_id_by_alias($alias, $is_metaconsole=false)
|
||||
{
|
||||
if ($is_metaconsole === true) {
|
||||
return db_get_all_rows_sql("SELECT id_tagente FROM tmetaconsole_agent WHERE upper(alias) LIKE upper('%$alias%')");
|
||||
return db_get_all_rows_sql("SELECT id_tagente FROM tmetaconsole_agent WHERE '$alias' != '' and upper(alias) LIKE upper('%$alias%')");
|
||||
} else {
|
||||
return db_get_all_rows_sql("SELECT id_agente FROM tagente WHERE upper(alias) LIKE upper('%$alias%')");
|
||||
return db_get_all_rows_sql("SELECT id_agente FROM tagente WHERE '$alias' != '' and upper(alias) LIKE upper('%$alias%')");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue