Merge branch 'master' of git@github.com:easysoft/zentaopms
This commit is contained in:
@@ -126,6 +126,7 @@ class commonModel extends model
|
||||
*/
|
||||
public function loadCustomFromDB()
|
||||
{
|
||||
if(defined('IN_UPGRADE')) return;
|
||||
if(!$this->config->db->name) return;
|
||||
$records = $this->loadModel('custom')->getAll();
|
||||
if(!$records) return;
|
||||
@@ -611,13 +612,14 @@ class commonModel extends model
|
||||
if(empty($queryCondition) or $this->session->$typeOnlyCondition)
|
||||
{
|
||||
$objects = $this->dao->select('*')->from($table)
|
||||
->beginIF($queryCondition != false)->where($queryCondition)->fi()
|
||||
->where('id')->eq($objectID)
|
||||
->beginIF($queryCondition != false)->orWhere($queryCondition)->fi()
|
||||
->beginIF($orderBy != false)->orderBy($orderBy)->fi()
|
||||
->fetchAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
$objects = $this->dbh->query($queryCondition . " ORDER BY $orderBy")->fetchAll();
|
||||
$objects = $this->dbh->query($queryCondition . "OR id=$objectID ORDER BY $orderBy")->fetchAll();
|
||||
}
|
||||
|
||||
$tmpObjectIDs = array();
|
||||
|
||||
Reference in New Issue
Block a user