From db5f13c59bca507de2d222ac7998edc230b81919 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 8 Sep 2011 16:37:58 +0000 Subject: [PATCH] 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". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4931 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_api.php | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) 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;