Merge branch 'master' of git@github.com:easysoft/zentaopms

This commit is contained in:
azhi
2013-08-12 09:09:03 +08:00
29 changed files with 161 additions and 63 deletions
+4 -2
View File
@@ -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();