2014-05-23 Vanessa Gil <vanessa.gil@artica.es>

* godmode/agentes/module_manager.php: Added optional
	module pagination.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9993 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2014-05-23 07:29:47 +00:00
parent 565ac40d16
commit 667d73f8a5
2 changed files with 24 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2014-05-23 Vanessa Gil <vanessa.gil@artica.es>
* godmode/agentes/module_manager.php: Added optional
module pagination.
2014-05-23 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_forecast.php: Fixed division by zero.

View File

@ -427,10 +427,18 @@ $where_tags = tags_get_acl_tags($config['id_user'], 0, 'AR', 'module_condition',
switch ($config["dbtype"]) {
case "postgresql":
$limit_sql = " LIMIT $limit OFFSET $offset ";
if ($config['paginate_module']) {
$limit_sql = " LIMIT $limit OFFSET $offset ";
} else {
$limit_sql = '';
}
case "mysql":
if(!isset($limit_sql)) {
$limit_sql = " LIMIT $offset, $limit ";
if ($config['paginate_module']) {
if(!isset($limit_sql)) {
$limit_sql = " LIMIT $offset, $limit ";
}
} else {
$limit_sql = '';
}
$sql = sprintf("SELECT %s
FROM tagente_modulo
@ -441,8 +449,10 @@ switch ($config["dbtype"]) {
break;
case "oracle":
$set = array();
$set['limit'] = $limit;
$set['offset'] = $offset;
if ($config['paginate_module']) {
$set['limit'] = $limit;
$set['offset'] = $offset;
}
$sql = sprintf("SELECT %s
FROM tagente_modulo
WHERE %s %s %s %s",
@ -473,7 +483,10 @@ $url = "?" .
"sort_field=" . $sortField ."&" .
"&sort=" . $sort . "&" .
"search_string=" . urlencode($search_string);
ui_pagination($total_modules, $url);
if ($config['paginate_module']) {
ui_pagination($total_modules, $url);
}
$table->width = '98%';
$table->head = array ();