Commit 313b99df authored by Chenu Denis's avatar Chenu Denis

[fix] Better way for none selected

parent 98483e71
......@@ -5,7 +5,7 @@
* @author Denis Chenu <[email protected]>
* @copyright 2020 Denis Chenu <http://www.sondages.pro>
* @license AGPL v3
* @version 1.4.2
* @version 1.4.3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
......@@ -66,8 +66,10 @@ class filteredExport
public $token = '';
/* var boolean */
public $completed = true;
/* var null|integer[] */
/* var integer[] */
public $responseIds = null;
/* var boolean */
public $none = false;
/**
* var array[] extra options, current are
......@@ -275,8 +277,9 @@ class filteredExport
}
if(!empty($this->responseIds)) {
$oCriteria->addInCondition("id",$this->responseIds);
} elseif(!is_null($this->responseIds)) {
$oCriteria->addCondition("0 = 1");
}
if($this->none) {
$oCriteria->addCondition("id IS NULL");
}
$ResponseModel = \Response::model($this->surveyId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment