Merge branch 'sprint/168_zenggang_15773' into 'sprint/168'
* Fix bug#15773 See merge request easycorp/zentaopms!198
This commit is contained in:
+18
-2
@@ -132,11 +132,27 @@ class searchModel extends model
|
||||
$condition = '';
|
||||
if($operator == "include")
|
||||
{
|
||||
$condition = ' LIKE ' . $this->dbh->quote("%$value%");
|
||||
if($this->post->$fieldName == 'module')
|
||||
{
|
||||
$allModules = $this->loadModel('tree')->getAllChildId($value);
|
||||
if($allModules) $condition = helper::dbIN($allModules);
|
||||
}
|
||||
else
|
||||
{
|
||||
$condition = ' LIKE ' . $this->dbh->quote("%$value%");
|
||||
}
|
||||
}
|
||||
elseif($operator == "notinclude")
|
||||
{
|
||||
$condition = ' NOT LIKE ' . $this->dbh->quote("%$value%");
|
||||
if($this->post->$fieldName == 'module')
|
||||
{
|
||||
$allModules = $this->loadModel('tree')->getAllChildId($value);
|
||||
if($allModules) $condition = " NOT " . helper::dbIN($allModules);
|
||||
}
|
||||
else
|
||||
{
|
||||
$condition = ' NOT LIKE ' . $this->dbh->quote("%$value%");
|
||||
}
|
||||
}
|
||||
elseif($operator == 'belong')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user