diff --git a/module/api/model.php b/module/api/model.php index 8561569cb1..4b17fb67c6 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -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) diff --git a/module/block/zen.php b/module/block/zen.php index 6a12d4ef7a..6d002465cc 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -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) diff --git a/module/convert/converter/redmine1.1.php b/module/convert/converter/redmine1.1.php index 5abe6a3acd..59bedaa97b 100644 --- a/module/convert/converter/redmine1.1.php +++ b/module/convert/converter/redmine1.1.php @@ -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 */ diff --git a/module/doc/model.php b/module/doc/model.php index b7a36f8b6e..4a7094536f 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -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) diff --git a/module/execution/tao.php b/module/execution/tao.php index 42f75c43f4..0bfa0ecd3b 100644 --- a/module/execution/tao.php +++ b/module/execution/tao.php @@ -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(); diff --git a/module/kanban/model.php b/module/kanban/model.php index ae65d379f6..bb9fcd4103 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -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(); diff --git a/module/personnel/model.php b/module/personnel/model.php index ebd06f9cda..ff91056ddd 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -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) diff --git a/module/task/model.php b/module/task/model.php index 845e7bb534..ff9ac4102a 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -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) diff --git a/module/testtask/model.php b/module/testtask/model.php index dec07b5b5d..e6ae758d61 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -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) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 3cf8ed4af0..b89fa89f4e 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -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'); diff --git a/module/user/model.php b/module/user/model.php index 6bf4ea09f7..3af87bfae5 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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)