2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es>

* operatoin/tree.php: Fixed a bug related to html tag id
                with strange characters.

        MERGED FROM 4.0.2



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6492 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-06-11 15:48:49 +00:00
parent 9cd92ddfed
commit 76f33356e3
2 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es>
* operatoin/tree.php: Fixed a bug related to html tag id
with strange characters.
MERGED FROM 4.0.2
2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es> 2012-06-11 Dario Rodriguez <dario.rodriguez@artica.es>
* include/functions_modules.php, * include/functions_modules.php,

View File

@ -55,7 +55,7 @@ if (is_ajax ())
} }
echo '<div id="id_div3" width="450px">'; echo '<div id="id_div3" width="450px">';
echo '<table cellspacing="4" cellpadding="4" border="0" class="databox" style="width:15%">'; echo '<table cellspacing="4" cellpadding="4" border="0" class="databox" style="width:70%">';
//Agent name //Agent name
echo '<tr><td class="datos"><b>'.__('Agent name').'</b></td>'; echo '<tr><td class="datos"><b>'.__('Agent name').'</b></td>';
if ($agent['disabled']) { if ($agent['disabled']) {
@ -300,6 +300,7 @@ if (is_ajax ())
WHERE nombre = \'%s\' WHERE nombre = \'%s\'
) )
AND (%s id_grupo IN (%s))', $name, $extra_sql, $groups_sql); AND (%s id_grupo IN (%s))', $name, $extra_sql, $groups_sql);
break; break;
} }
@ -508,20 +509,20 @@ if (is_ajax ())
WHERE t1.id_agente = ' . $id . $whereQuery; WHERE t1.id_agente = ' . $id . $whereQuery;
break; break;
case 'module': case 'module':
$name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_'),array(' ','#'),$id_father); $name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_','_articapandora_'.ord('/').'_pandoraartica_'),array(' ','#','/'),$id_father);
switch ($config["dbtype"]) { switch ($config["dbtype"]) {
case "mysql": case "mysql":
$sql = 'SELECT * $sql = 'SELECT *
FROM tagente_modulo AS t1 FROM tagente_modulo AS t1
INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo
WHERE t1.id_agente = ' . $id . ' AND nombre COLLATE utf8_general_ci LIKE \'' . io_safe_input($name) . '\''; WHERE t1.id_agente = ' . $id . ' AND nombre = \'' . io_safe_input($name) . '\'';
break; break;
case "postgresql": case "postgresql":
case "oracle": case "oracle":
$sql = 'SELECT * $sql = 'SELECT *
FROM tagente_modulo AS t1 FROM tagente_modulo AS t1
INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo
WHERE t1.id_agente = ' . $id . ' AND nombre COLLATE utf8_general_ci LIKE \'' . io_safe_input($name) . '\''; WHERE t1.id_agente = ' . $id . ' AND nombre = \'' . io_safe_input($name) . '\'';
break; break;
} }
break; break;