From 3692c286b8470f0f15d7bb1f4ff11bf6952f2694 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 13 Jun 2012 16:59:36 +0000 Subject: [PATCH] 2012-06-13 Miguel de Dios * include/functions_config.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/ver_agente.php: cleaned source code from merge some cosmetic changes in the trunk and this branch. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6541 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 ++ pandora_console/include/functions_config.php | 91 +++++++++---------- .../agentes/estado_ultimopaquete.php | 8 +- .../operation/agentes/ver_agente.php | 4 +- 4 files changed, 59 insertions(+), 51 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 093308585b..0fc8e05f0e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-06-13 Miguel de Dios + + * include/functions_config.php, + operation/agentes/estado_ultimopaquete.php, + operation/agentes/ver_agente.php: cleaned source code from merge + some cosmetic changes in the trunk and this branch. + 2012-06-13 Vanessa Gil * godmode/agentes/module_manage_editor_common.php: Disable button diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index d174edcf8e..f83b847413 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -256,13 +256,13 @@ function config_process_config () { /* Compatibility fix */ foreach ($configs as $c) { - $config[$c['token']] = $c['value']; + $config[$c['token']] = $c['value']; } if (!isset ($config['language'])) { config_update_value ('language', 'en'); } - + if (isset ($config['homeurl']) && $config['homeurl'][0] != '/') { $config['homeurl'] = '/'.$config['homeurl']; } @@ -404,55 +404,55 @@ function config_process_config () { if (!isset ($config['fontpath'])) { config_update_value ( 'fontpath', $config['homedir'].'/include/fonts/smallfont.ttf'); } - + if (!isset ($config['style'])) { config_update_value ( 'style', 'pandora'); } - + if (!isset ($config['flash_charts'])) { config_update_value ( 'flash_charts', true); } - + if (!isset ($config["custom_logo"])){ config_update_value ('custom_logo', 'none.png'); } - + if (!isset ($config['history_db_enabled'])) { config_update_value ( 'history_db_enabled', false); } - + if (!isset ($config['history_db_host'])) { config_update_value ( 'history_db_host', ''); } - + if (!isset ($config['history_db_port'])) { config_update_value ( 'history_db_port', 3306); } - + if (!isset ($config['history_db_name'])) { config_update_value ( 'history_db_name', 'pandora'); } - + if (!isset ($config['history_db_user'])) { config_update_value ( 'history_db_user', 'pandora'); } - + if (!isset ($config['history_db_pass'])) { config_update_value ( 'history_db_pass', ''); } - + if (!isset ($config['history_db_days'])) { config_update_value ( 'history_db_days', 0); } - + if (!isset ($config['history_db_step'])) { config_update_value ( 'history_db_step', 0); } - + if (!isset ($config['history_db_delay'])) { config_update_value ( 'history_db_delay', 0); } - + if (!isset ($config['activate_gis'])) { config_update_value ( 'activate_gis', 0); } @@ -476,119 +476,119 @@ function config_process_config () { if (!isset ($config['auth'])) { config_update_value ( 'auth', 'mysql'); } - + if (!isset ($config['autocreate_remote_users'])) { config_update_value ('autocreate_remote_users', 0); } - + if (!isset ($config['autocreate_blacklist'])) { config_update_value ('autocreate_blacklist', ''); } - + if (!isset ($config['default_remote_profile'])) { config_update_value ('default_remote_profile', 0); } - + if (!isset ($config['default_remote_group'])) { config_update_value ('default_remote_group', 0); } - + if (!isset ($config['ldap_server'])) { config_update_value ( 'ldap_server', 'localhost'); } - + if (!isset ($config['ldap_port'])) { config_update_value ( 'ldap_port', 389); } - + if (!isset ($config['ldap_version'])) { config_update_value ( 'ldap_version', '3'); } - + if (!isset ($config['ldap_start_tls'])) { config_update_value ( 'ldap_start_tls', 0); } - + if (!isset ($config['ldap_base_dn'])) { config_update_value ( 'ldap_base_dn', 'ou=People,dc=edu,dc=example,dc=org'); } - + if (!isset ($config['ldap_login_attr'])) { config_update_value ( 'ldap_login_attr', 'uid'); } - + if (!isset ($config['ad_server'])) { config_update_value ( 'ad_server', 'localhost'); } - + if (!isset ($config['ad_port'])) { config_update_value ( 'ad_port', 389); } - + if (!isset ($config['ad_start_tls'])) { config_update_value ( 'ad_start_tls', 0); } - + if (!isset ($config['ad_domain'])) { config_update_value ( 'ad_domain', ''); } - + if (!isset ($config['rpandora_server'])) { config_update_value ( 'rpandora_server', 'localhost'); } - + if (!isset ($config['rpandora_port'])) { config_update_value ( 'rpandora_port', 3306); } - + if (!isset ($config['rpandora_dbname'])) { config_update_value ( 'rpandora_dbname', 'pandora'); } - + if (!isset ($config['rpandora_user'])) { config_update_value ( 'rpandora_user', 'pandora'); } - + if (!isset ($config['rpandora_pass'])) { config_update_value ( 'rpandora_pass', ''); } - + if (!isset ($config['rbabel_server'])) { config_update_value ( 'rbabel_server', 'localhost'); } - + if (!isset ($config['rbabel_port'])) { config_update_value ( 'rbabel_port', 3306); } - + if (!isset ($config['rbabel_dbname'])) { config_update_value ( 'rbabel_dbname', 'babel'); } - + if (!isset ($config['rbabel_user'])) { config_update_value ( 'rbabel_user', 'babel'); } - + if (!isset ($config['rbabel_pass'])) { config_update_value ( 'rbabel_pass', ''); } - + if (!isset ($config['rintegria_server'])) { config_update_value ( 'rintegria_server', 'localhost'); } - + if (!isset ($config['rintegria_port'])) { config_update_value ( 'rintegria_port', 3306); } - + if (!isset ($config['rintegria_dbname'])) { config_update_value ( 'rintegria_dbname', 'integria'); } - + if (!isset ($config['rintegria_user'])) { config_update_value ( 'rintegria_user', 'integria'); } - + if (!isset ($config['rintegria_pass'])) { config_update_value ( 'rintegria_pass', ''); } @@ -618,7 +618,6 @@ function config_process_config () { } if (!isset ($config['relative_path']) && (isset ($_POST['nick']) || isset ($config['id_user'])) && isset($config['enterprise_installed'])) { - $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { if(isset($config['id_user'])) @@ -645,7 +644,7 @@ function config_process_config () { config_update_config(); } -function config_check (){ +function config_check () { global $config; // At this first version I'm passing errors using session variables, because the error management diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index 579a9a48b4..3e0b1cecc4 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -184,7 +184,8 @@ if($extra_sql == ENTERPRISE_NOT_HOOK) { else if ($extra_sql != '') { $extra_sql .= ' OR '; } - + + // Build the order sql if(!empty($order)) { $order_sql = ' ORDER BY '; @@ -246,6 +247,7 @@ switch ($config["dbtype"]) { $sql = sprintf("SELECT %s FROM tagente_modulo, tagente_estado WHERE %s (%s %s) %s %s", $params, $basic_where, $extra_sql, $where, $order_sql, $limit_sql); + $modules = db_get_all_rows_sql($sql); break; case "oracle": @@ -418,7 +420,7 @@ foreach ($modules as $module) { AND ($module["id_tipo_modulo"] != 17) AND ($module["id_tipo_modulo"] != 23)) { echo ""; - echo mb_strimwidth(io_safe_output($module["descripcion"]), 0, 35, "...", "UTF-8"); + echo ui_print_truncate_text(io_safe_output($module["descripcion"]), 35, false); echo ""; } else{ @@ -456,7 +458,7 @@ foreach ($modules as $module) { else $colspan= 1; echo ""; - echo mb_strimwidth(io_safe_output($module["datos"]), 0, 45, "...", "UTF-8"); + io_safe_output(io_safe_output($module["datos"]), 45, false); } echo ""; diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 8714203168..933b7788ab 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -389,7 +389,7 @@ if (is_ajax ()) { $module = db_get_row ('tagente_modulo', 'id_agente_modulo', $id_module); echo '

'; echo html_print_image("images/brick.png", true) . ' '; - echo ui_print_truncate_text($module['nombre'],25,false,true,false).'

'; + echo ui_print_truncate_text($module['nombre'], 25, false, true, false).''; echo ''.__('Type').': '; $agentmoduletype = modules_get_agentmodule_type ($module['id_agente_modulo']); echo modules_get_moduletype_name ($agentmoduletype).' '; @@ -403,7 +403,7 @@ if (is_ajax ()) { echo $modulegroup.'
'; } echo ''.__('Agent').': '; - echo ui_print_truncate_text(modules_get_agentmodule_agent_name ($module['id_agente_modulo']),25,false,true,false).'
'; + echo ui_print_truncate_text(modules_get_agentmodule_agent_name($module['id_agente_modulo']), 25, false, true, false).'
'; if($module['id_tipo_modulo'] == 18) { echo ''.__('Address').': ';