diff --git a/module/common/model.php b/module/common/model.php index 65277ee6a9..81f0c957dd 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -512,7 +512,7 @@ class commonModel extends model $orderBy = $this->session->$orderBy; $orderBy = str_replace('`left`', 'left', $orderBy); // process the `left` to left. - if(empty($_SESSION[$queryCondition]) or $this->session->$typeOnlyCondition) + if(empty($queryCondition) or $this->session->$typeOnlyCondition) { $objects = $this->dao->select('*')->from($table) ->beginIF($queryCondition != false)->where($queryCondition)->fi()