2014-05-27 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/module_manager.php,
	operation/agentes/estado_monitores.php, general/main_menu.php: fixed
	the PHP warnings.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10014 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-05-27 08:57:20 +00:00
parent 56aad9d4cf
commit 1d13407435
4 changed files with 42 additions and 23 deletions

View File

@ -1,3 +1,9 @@
2014-05-27 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/module_manager.php,
operation/agentes/estado_monitores.php, general/main_menu.php: fixed
the PHP warnings.
2014-05-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_networkmap.php: added the generate networkmap

View File

@ -26,6 +26,7 @@ if (isset ($config["autohidden_menu"]) && $config["autohidden_menu"]) {
$autohidden_menu = 1;
}
$menu_container_id = '';
if ($autohidden_menu) {
$menu_container_id = 'menu_container';
}

View File

@ -425,19 +425,25 @@ $basic_where = sprintf("(nombre LIKE '%%%s%%' OR nombre LIKE '%%%s%%' OR descrip
$where_tags = tags_get_acl_tags($config['id_user'], 0, 'AR', 'module_condition', 'AND', 'tagente_modulo');
$paginate_module = false;
if (isset($config['paginate_module']))
$paginate_module = $config['paginate_module'];
switch ($config["dbtype"]) {
case "postgresql":
if ($config['paginate_module']) {
if ($paginate_module) {
$limit_sql = " LIMIT $limit OFFSET $offset ";
} else {
}
else {
$limit_sql = '';
}
case "mysql":
if ($config['paginate_module']) {
if(!isset($limit_sql)) {
if ($paginate_module) {
if (!isset($limit_sql)) {
$limit_sql = " LIMIT $offset, $limit ";
}
} else {
}
else {
$limit_sql = '';
}
$sql = sprintf("SELECT %s
@ -449,7 +455,7 @@ switch ($config["dbtype"]) {
break;
case "oracle":
$set = array();
if ($config['paginate_module']) {
if ($paginate_module) {
$set['limit'] = $limit;
$set['offset'] = $offset;
}
@ -484,7 +490,7 @@ $url = "?" .
"&sort=" . $sort . "&" .
"search_string=" . urlencode($search_string);
if ($config['paginate_module']) {
if ($paginate_module) {
ui_pagination($total_modules, $url);
}

View File

@ -69,7 +69,8 @@ if (is_ajax ()) {
foreach ($relations as $relation) {
if ($relation['module_a'] == $id_agente_modulo) {
$id_module = $relation['module_b'];
} else {
}
else {
$id_module = $relation['module_a'];
}
$id_agent = modules_get_agentmodule_agent($id_module);
@ -317,9 +318,14 @@ if ($monitors_change_filter) {
else {
$limit = " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0);
}
if ($config['paginate_module']) {
$paginate_module = false;
if (isset($config['paginate_module']))
$paginate_module = $config['paginate_module'];
if ($paginate_module) {
$modules = db_get_all_rows_sql ($sql . $limit);
} else {
}
else {
$modules = db_get_all_rows_sql ($sql);
}
if (empty ($modules)) {
@ -683,13 +689,13 @@ else {
"status_filter_monitor=" . $status_filter_monitor . "&" .
"status_text_monitor=" . $status_text_monitor;
if ($config['paginate_module']) {
if ($paginate_module) {
ui_pagination ($count_modules, $url);
}
html_print_table ($table);
if ($config['paginate_module']) {
if ($paginate_module) {
ui_pagination ($count_modules, $url);
}
}