Skip to content

Commit

Permalink
Fix #04189 Array Flexible Numbers and Date question type filters wher…
Browse files Browse the repository at this point in the history
…e broken. Small change.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8756 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed May 27, 2010
1 parent 84a5c8b commit e1e6ce1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/statistics_function.php
Expand Up @@ -401,23 +401,23 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
}

//D - Date
elseif ($firstletter == "D")
elseif ($firstletter == "D" && $_POST[$pv] != "")
{
//Date equals
if (substr($pv, -1, 1) == "=" && $_POST[$pv] != "")
if (substr($pv, -1, 1) == "=")
{
$selects[]=db_quote_id(substr($pv, 1, strlen($pv)-2))." = '".$_POST[$pv]."'";
}
else
{
//date less than
if (substr($pv, -1, 1) == "<" && $_POST[$pv] != "")
if (substr($pv, -1, 1) == "<")
{
$selects[]= db_quote_id(substr($pv, 1, strlen($pv)-2)) . " >= '".$_POST[$pv]."'";
}

//date greater than
if (substr($pv, -1, 1) == ">" && $_POST[$pv] != "")
if (substr($pv, -1, 1) == ">")
{
$selects[]= db_quote_id(substr($pv, 1, strlen($pv)-2)) . " <= '".$_POST[$pv]."'";
}
Expand Down

0 comments on commit e1e6ce1

Please sign in to comment.