mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Kill pink unicorns
This commit is contained in:
parent
ba423c93d8
commit
e5ec0cb35a
@ -196,7 +196,6 @@ if ($create_agent) {
|
|||||||
if($alias_as_name){
|
if($alias_as_name){
|
||||||
$sql = 'SELECT nombre FROM tagente WHERE nombre = "' . $alias . '"';
|
$sql = 'SELECT nombre FROM tagente WHERE nombre = "' . $alias . '"';
|
||||||
$exists_alias = db_get_row_sql($sql);
|
$exists_alias = db_get_row_sql($sql);
|
||||||
html_debug_print($exists_alias, true);
|
|
||||||
$nombre_agente = $alias;
|
$nombre_agente = $alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2524,7 +2524,9 @@ function agents_get_agent_custom_field ($agent_id, $custom_field_name) {
|
|||||||
return db_get_value_sql($sql);
|
return db_get_value_sql($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_modules_for_agent_group($id_group, $id_agents, $selection, $return=true){
|
function select_modules_for_agent_group($id_group, $id_agents,
|
||||||
|
$selection, $return = true) {
|
||||||
|
|
||||||
$agents = implode(",", $id_agents);
|
$agents = implode(",", $id_agents);
|
||||||
|
|
||||||
$filter_group = "";
|
$filter_group = "";
|
||||||
|
@ -490,10 +490,7 @@ if (is_ajax ()) {
|
|||||||
asort($result);
|
asort($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if(implode(',', $idAgents) < 0) {
|
if(implode(',', $idAgents) < 0) {
|
||||||
|
|
||||||
|
|
||||||
$sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo
|
$sql = 'SELECT DISTINCT(nombre) FROM tagente_modulo
|
||||||
WHERE nombre IN (
|
WHERE nombre IN (
|
||||||
SELECT nombre
|
SELECT nombre
|
||||||
@ -515,7 +512,8 @@ HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))';
|
|||||||
WHERE t2.delete_pending = 0
|
WHERE t2.delete_pending = 0
|
||||||
AND t1.nombre = t2.nombre
|
AND t1.nombre = t2.nombre
|
||||||
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
|
AND t2.id_agente IN (' . implode(',', $idAgents) . ')) = (' . count($idAgents) . ')';
|
||||||
}elseif ($selection_mode == 'unknown'){
|
}
|
||||||
|
elseif ($selection_mode == 'unknown') {
|
||||||
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
|
$sql .= 'AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = 3 OR estado = 4)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user