* don't log actions if no changes.
This commit is contained in:
@@ -51,6 +51,7 @@ $lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。';
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。';
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。';
|
||||
$lang->action->desc->deleted = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->erased = '$date, 由 <strong>$actor</strong> 删除。';
|
||||
$lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原。';
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 发表评论。';
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。';
|
||||
@@ -65,6 +66,7 @@ $lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->deleted = '删除了';
|
||||
$lang->action->label->erased = '删除了';
|
||||
$lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
@@ -76,6 +78,7 @@ $lang->action->label->linked2plan = '关联计划';
|
||||
$lang->action->label->unlinkedfromplan = '移除计划';
|
||||
$lang->action->label->linked2project = '关联项目';
|
||||
$lang->action->label->unlinkedfromproject = '移除项目';
|
||||
$lang->action->label->marked = '编辑了';
|
||||
$lang->action->label->login = '登录系统';
|
||||
$lang->action->label->logout = "退出登录";
|
||||
|
||||
|
||||
@@ -51,8 +51,11 @@ class build extends control
|
||||
{
|
||||
$changes = $this->build->update($buildID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('build', $buildID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('build', $buildID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "buildID=$buildID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -133,8 +133,11 @@ class product extends control
|
||||
{
|
||||
$changes = $this->product->update($productID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('product', $productID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('product', $productID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "product=$productID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,11 @@ class productplan extends control
|
||||
{
|
||||
$changes = $this->productplan->update($planID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('productplan', $planID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('productplan', $planID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "planID=$planID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -362,8 +362,11 @@ class project extends control
|
||||
{
|
||||
$changes = $this->project->update($projectID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate($this->createLink('project', 'view', "projectID=$projectID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,11 @@ class release extends control
|
||||
{
|
||||
$changes = $this->release->update($releaseID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('release', $releaseID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('release', $releaseID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "releaseID=$releaseID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -150,8 +150,11 @@ class testtask extends control
|
||||
{
|
||||
$changes = $this->testtask->update($taskID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('testtask', $taskID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::locate(inlink('view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user