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:
parent
091db5c2ef
commit
aa106a2df7
|
@ -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>
|
2014-05-23 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* include/functions_forecast.php: Fixed division by zero.
|
* include/functions_forecast.php: Fixed division by zero.
|
||||||
|
|
|
@ -427,10 +427,18 @@ $where_tags = tags_get_acl_tags($config['id_user'], 0, 'AR', 'module_condition',
|
||||||
|
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$limit_sql = " LIMIT $limit OFFSET $offset ";
|
if ($config['paginate_module']) {
|
||||||
|
$limit_sql = " LIMIT $limit OFFSET $offset ";
|
||||||
|
} else {
|
||||||
|
$limit_sql = '';
|
||||||
|
}
|
||||||
case "mysql":
|
case "mysql":
|
||||||
if(!isset($limit_sql)) {
|
if ($config['paginate_module']) {
|
||||||
$limit_sql = " LIMIT $offset, $limit ";
|
if(!isset($limit_sql)) {
|
||||||
|
$limit_sql = " LIMIT $offset, $limit ";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$limit_sql = '';
|
||||||
}
|
}
|
||||||
$sql = sprintf("SELECT %s
|
$sql = sprintf("SELECT %s
|
||||||
FROM tagente_modulo
|
FROM tagente_modulo
|
||||||
|
@ -441,8 +449,10 @@ switch ($config["dbtype"]) {
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$set = array();
|
$set = array();
|
||||||
$set['limit'] = $limit;
|
if ($config['paginate_module']) {
|
||||||
$set['offset'] = $offset;
|
$set['limit'] = $limit;
|
||||||
|
$set['offset'] = $offset;
|
||||||
|
}
|
||||||
$sql = sprintf("SELECT %s
|
$sql = sprintf("SELECT %s
|
||||||
FROM tagente_modulo
|
FROM tagente_modulo
|
||||||
WHERE %s %s %s %s",
|
WHERE %s %s %s %s",
|
||||||
|
@ -473,7 +483,10 @@ $url = "?" .
|
||||||
"sort_field=" . $sortField ."&" .
|
"sort_field=" . $sortField ."&" .
|
||||||
"&sort=" . $sort . "&" .
|
"&sort=" . $sort . "&" .
|
||||||
"search_string=" . urlencode($search_string);
|
"search_string=" . urlencode($search_string);
|
||||||
ui_pagination($total_modules, $url);
|
|
||||||
|
if ($config['paginate_module']) {
|
||||||
|
ui_pagination($total_modules, $url);
|
||||||
|
}
|
||||||
|
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
|
|
Loading…
Reference in New Issue