diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6061b3fbff..ebcfbd9a37 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-09-08 Miguel de Dios + + * include/functions_api.php: fixed in function "otherParameter2Filter" the + simbol of timestamp comparation and separate the AND operator. And added + 2 more filters, the "limit" and the "offset". + 2011-09-08 Juan Manuel Ramon * godmode/setup/performance.php diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index eaaae39142..ded437bc33 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -871,11 +871,19 @@ function otherParameter2Filter($other) { } if (($other['data'][6] != null) && ($other['data'][6] != -1)) { - $filterString .= ' AND utimestamp => ' . $other['data'][6]; + $filterString .= ' AND utimestamp >= ' . $other['data'][6]; } if (($other['data'][7] != null) && ($other['data'][7] != -1)) { - $filterString .= 'AND utimestamp <= ' . $other['data'][7]; + $filterString .= ' AND utimestamp <= ' . $other['data'][7]; + } + + if ($other['data'][8] != null) { + $filterString .= ' LIMIT ' . $other['data'][8]; + } + + if ($other['data'][9] != null) { + $filterString .= ' OFFSET ' . $other['data'][9]; } return $filterString;