diff --git a/module/action/lang/de.php b/module/action/lang/de.php index d5f35b9bdb..7d8d8eaca2 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -12,7 +12,7 @@ $lang->action->common = 'Log'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Object Type'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Objekt Name'; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index a1a1e823dc..a74203313e 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -15,7 +15,7 @@ $lang->action->common = 'Log'; $lang->action->id = 'ID'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Object Type'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Object Name'; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 8cfb507284..0754fd1130 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -11,8 +11,8 @@ */ $lang->action->common = 'Log'; $lang->action->product = $lang->productCommon; -$lang->action->project = $lang->executionCommon; -$lang->action->execution = $lang->executionCommon; +$lang->action->project = 'Project'; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = "Type d'objet"; $lang->action->objectID = 'ID'; $lang->action->objectName = "Nom de l'object"; diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index 4f3a7ffef2..67a7ae7567 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -12,7 +12,7 @@ $lang->action->common = 'Nhật ký'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Loại đối tượng'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Tên đối tượng'; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index eada01b40c..2f1e82893b 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -15,7 +15,7 @@ $lang->action->common = '系统日志'; $lang->action->id = '编号'; $lang->action->product = $lang->productCommon; $lang->action->project = '项目'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = '对象类型'; $lang->action->objectID = '对象ID'; $lang->action->objectName = '对象名称'; diff --git a/module/action/model.php b/module/action/model.php index 7b99908cdf..61cf3e0d9b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -864,8 +864,8 @@ class actionModel extends model } if($this->session->actionQuery == false) $this->session->set('actionQuery', ' 1 = 1'); - $allProducts = "`product` = 'all'"; - $allProjects = "`project` = 'all'"; + $allProducts = "`product` = 'all'"; + $allProjects = "`project` = 'all'"; $allExecutions = "`execution` = 'all'"; $actionQuery = $this->session->actionQuery; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 020ad9641b..916ae5454e 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ /* Fields. */ -$lang->execution->allExecutions = 'All ' . $lang->executionCommon . 's'; +$lang->execution->allExecutions = 'All ' . $lang->execution->common . 's'; $lang->execution->allExecutionAB = 'Execution List'; $lang->execution->id = $lang->executionCommon . ' ID'; $lang->execution->type = $lang->executionCommon . 'Type'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index a610f60e2e..bb698b546b 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -10,7 +10,7 @@ * @link https://www.zentao.pm */ /* Fields. */ -$lang->execution->allExecutions = 'Tous les ' . $lang->executionCommon . 's'; +$lang->execution->allExecutions = 'Tous les ' . $lang->execution->common . 's'; $lang->execution->allExecutionAB = 'Execution List'; $lang->execution->id = $lang->executionCommon . ' ID'; $lang->execution->type = $lang->executionCommon . 'Type'; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 6459ca8a02..c6bfcd7051 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ /* Fields. */ -$lang->execution->allExecutions = 'Tất cả ' . $lang->executionCommon; +$lang->execution->allExecutions = 'Tất cả ' . $lang->execution->common; $lang->execution->allExecutionAB = 'Execution List'; $lang->execution->id = 'ID '.$lang->executionCommon; $lang->execution->type = 'Loại'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index dd084192c6..ce76413e38 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -10,7 +10,7 @@ * @link http://www.zentao.net */ /* 字段列表。*/ -$lang->execution->allExecutions = '所有' . $lang->executionCommon; +$lang->execution->allExecutions = '所有' . $lang->execution->common; $lang->execution->allExecutionAB = "{$lang->execution->common}列表"; $lang->execution->id = $lang->executionCommon . '编号'; $lang->execution->type = $lang->executionCommon . '类型'; diff --git a/module/install/js/step4.js b/module/install/js/step4.js index 864d84cd63..8ce4d661c9 100644 --- a/module/install/js/step4.js +++ b/module/install/js/step4.js @@ -8,3 +8,16 @@ function showVideo() { $('video').removeClass('hidden'); } + +$(function() +{ + $('#modeclassic').click(function() + { + $('#selectedModeTips').show(); + }); + + $('#modenew').click(function() + { + $('#selectedModeTips').hide(); + }); +}) diff --git a/module/personnel/model.php b/module/personnel/model.php index 1959bcb97b..ae4372e890 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -677,17 +677,26 @@ class personnelModel extends model */ public function deleteProductWhitelist($productID, $account = '') { - $product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch('whitelist'); + $product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch(); if(empty($product)) return false; $newWhitelist = str_replace(',' . $account, '', $product->whitelist); $this->dao->update(TABLE_PRODUCT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($productID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($productID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('product') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewProducts = $this->dao->select('products')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('products'); + $newViewProducts = trim(str_replace(",$productID,", '', ",$viewProducts,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('products')->eq($newViewProducts)->where('account')->eq($account)->exec(); + } + } /** @@ -711,12 +720,20 @@ class personnelModel extends model { $newWhitelist = str_replace(',' . $account, '', $program->whitelist); $this->dao->update(TABLE_PROGRAM)->set('whitelist')->eq($newWhitelist)->where('id')->eq($programID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($programID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('program') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewPrograms = $this->dao->select('programs')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('programs'); + $newViewPrograms = trim(str_replace(",$programID,", '', ",$viewPrograms,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('programs')->eq($newViewPrograms)->where('account')->eq($account)->exec(); + } } $this->loadModel('user')->updateUserView($programID, 'program', array($account)); } @@ -734,7 +751,7 @@ class personnelModel extends model $project = $this->dao->select('id,project,whitelist')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch(); if(empty($project)) return false; - $projectID = $project->project; + $projectID = $project->project ? $project->project : $objectID; $sprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('deleted')->eq('0')->fetchPairs('id'); $whitelist = $this->dao->select('*')->from(TABLE_ACL)->where('objectID')->in($sprints)->andWhere('account')->eq($account)->andWhere('objectType')->eq('sprint')->fetch(); @@ -743,12 +760,20 @@ class personnelModel extends model { $newWhitelist = str_replace(',' . $account, '', $project->whitelist); $this->dao->update(TABLE_PROJECT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($projectID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($projectID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('project') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewProjects = $this->dao->select('projects')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('projects'); + $newViewProjects = trim(str_replace(",$projectID,", '', ",$viewProjects,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('projects')->eq($newViewProjects)->where('account')->eq($account)->exec(); + } } $this->loadModel('user')->updateUserView($projectID, 'project', array($account)); } diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index f728b63cc5..179d5646a2 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -29,7 +29,7 @@