* Replace leftjoin to leftJoin.
This commit is contained in:
@@ -986,7 +986,7 @@ class apiModel extends model
|
||||
|
||||
$libs = $this->loadModel('doc')->getApiLibs();
|
||||
$products = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.product=t1.id')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on('t2.product=t1.id')
|
||||
->where('t2.id')->gt(0)
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
@@ -1007,7 +1007,7 @@ class apiModel extends model
|
||||
}
|
||||
|
||||
$projects = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
|
||||
->where('t2.id')->gt(0)
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
|
||||
@@ -2138,7 +2138,7 @@ class blockZen extends block
|
||||
$meetingCount = isset($params->meetingCount) ? isset($params->meetingCount) : 0;
|
||||
|
||||
$meetings = $this->dao->select('*')->from(TABLE_MEETING)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->andWhere('(t1.date')->gt($today)
|
||||
|
||||
@@ -493,7 +493,7 @@ class redmine11ConvertModel extends redmineConvertModel
|
||||
$docs = $this->dao->dbh($this->sourceDBH)
|
||||
->select("t1.id, t1.execution_id AS product, t2.id AS lib, t1.title, t1.description AS content, t1.created_on AS addedDate")
|
||||
->from(REDMINE_TABLE_DOCUMENTS)->alias('t1')
|
||||
->leftjoin(REDMINE_TABLE_ENUMERATIONS)->alias('t2')->on('t1.category_id = t2.id')
|
||||
->leftJoin(REDMINE_TABLE_ENUMERATIONS)->alias('t2')->on('t1.category_id = t2.id')
|
||||
->fetchAll('id');
|
||||
|
||||
/* Insert into zentao */
|
||||
|
||||
@@ -1721,7 +1721,7 @@ class docModel extends model
|
||||
if($this->app->tab == 'doc')
|
||||
{
|
||||
$myObjects = $this->dao->select('t1.id, t1.name')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
|
||||
->leftJoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
|
||||
->where("CONCAT(',', t2.users, ',')")->like("%,{$this->app->user->account},%")
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
|
||||
@@ -55,8 +55,8 @@ class executionTao extends executionModel
|
||||
protected function getProductList(int $projectID): array
|
||||
{
|
||||
$executions = $this->dao->select('t1.id,t2.product,t3.name')->from(TABLE_EXECUTION)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project')
|
||||
->leftjoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id')
|
||||
->where('t1.project')->eq($projectID)
|
||||
->andWhere('t1.type')->in('kanban,sprint,stage')
|
||||
->fetchAll();
|
||||
|
||||
@@ -3682,7 +3682,7 @@ class kanbanModel extends model
|
||||
public function getColumnByID($columnID)
|
||||
{
|
||||
$column = $this->dao->select('t1.*, t2.type as laneType')->from(TABLE_KANBANCOLUMN)->alias('t1')
|
||||
->leftjoin(TABLE_KANBANCELL)->alias('t2')->on('t1.id=t2.column')
|
||||
->leftJoin(TABLE_KANBANCELL)->alias('t2')->on('t1.id=t2.column')
|
||||
->where('t1.id')->eq($columnID)
|
||||
->fetch();
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ class personnelModel extends model
|
||||
public function getWhitelist($objectID = 0, $objectType = '', $orderBy = 'id_desc', $pager = '')
|
||||
{
|
||||
return $this->dao->select('t1.id,t1.account,t2.realname,t2.dept,t2.role,t2.phone,t2.qq,t2.weixin,t2.email')->from(TABLE_ACL)->alias('t1')
|
||||
->leftjoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.objectID')->eq($objectID)
|
||||
->andWhere('t1.type')->eq('whitelist')
|
||||
->andWhere('t1.objectType')->eq($objectType)
|
||||
|
||||
@@ -1507,7 +1507,7 @@ class taskModel extends model
|
||||
{
|
||||
$tasks = $this->dao->select('t1.id, t1.name, t2.name as executionName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
->where('t1.assignedTo')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
|
||||
@@ -1122,7 +1122,7 @@ class testtaskModel extends model
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
|
||||
->from(TABLE_TESTTASK)->alias('t1')
|
||||
->leftjoin(TABLE_EXTENSION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_EXTENSION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t1.owner')->eq($account)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
|
||||
@@ -7294,7 +7294,7 @@ class upgradeModel extends model
|
||||
if(empty($linkStoryCases)) return true;
|
||||
|
||||
$projectList = $this->dao->select('t1.project, t1.story, t1.product')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t2.status')->ne('closed')
|
||||
->fetchGroup('story', 'project');
|
||||
|
||||
|
||||
+10
-10
@@ -2847,22 +2847,22 @@ class userModel extends model
|
||||
|
||||
$personalData = array();
|
||||
$personalData['createdTodos'] = $this->dao->select($count)->from(TABLE_TODO)->where('account')->eq($account)->andWhere('deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdRequirements'] = $this->dao->select($t1Count)->from(TABLE_STORY)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->andWhere('t1.type')->eq('requirement')->fetch('count');
|
||||
$personalData['createdStories'] = $this->dao->select($t1Count)->from(TABLE_STORY)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->andWhere('t1.type')->eq('story')->fetch('count');
|
||||
$personalData['createdBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftjoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdRequirements'] = $this->dao->select($t1Count)->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->andWhere('t1.type')->eq('requirement')->fetch('count');
|
||||
$personalData['createdStories'] = $this->dao->select($t1Count)->from(TABLE_STORY)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->andWhere('t1.type')->eq('story')->fetch('count');
|
||||
$personalData['createdBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.openedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedBugs'] = $this->dao->select($t1Count)->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdCases'] = $this->dao->select($count)->from(TABLE_CASE)->where('openedBy')->eq($account)->andWhere('deleted')->eq('0')->fetch('count');
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$personalData['createdRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.createdBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdIssues'] = $this->dao->select($t1Count)->from(TABLE_ISSUE)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.createdBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedIssues'] = $this->dao->select($t1Count)->from(TABLE_ISSUE)->alias('t1')->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.createdBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedRisks'] = $this->dao->select($t1Count)->from(TABLE_RISK)->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['createdIssues'] = $this->dao->select($t1Count)->from(TABLE_ISSUE)->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.createdBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
$personalData['resolvedIssues'] = $this->dao->select($t1Count)->from(TABLE_ISSUE)->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')->where('t1.resolvedBy')->eq($account)->andWhere('t1.deleted')->eq('0')->andWhere('t2.deleted')->eq('0')->fetch('count');
|
||||
}
|
||||
$personalData['createdDocs'] = $this->dao->select($count)->from(TABLE_DOC)->where('addedBy')->eq($account)->andWhere('lib')->ne('')->andWhere('deleted')->eq('0')->andWhere('vision')->eq($this->config->vision)->fetch('count');
|
||||
$personalData['finishedTasks'] = $this->dao->select($t1Count)->from(TABLE_TASK)->alias('t1')
|
||||
->leftjoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftjoin(TABLE_TASKTEAM)->alias('t3')->on("t1.id = t3.task and t3.account = '{$account}'")
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_TASKTEAM)->alias('t3')->on("t1.id = t3.task and t3.account = '{$account}'")
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->andWhere('t1.finishedBy', true)->eq($account)
|
||||
|
||||
Reference in New Issue
Block a user