* [task#137135,done,1h] Create convertToNew action.
This commit is contained in:
@@ -292,6 +292,7 @@ $lang->action->desc->managedteam = '$date, by <strong>$actor</strong> m
|
||||
$lang->action->desc->syncexecutionteam = '$date, synchronise members when execution adds members.' . "\n";
|
||||
$lang->action->desc->syncprojectteam = '$date, synchronise members when project removes members' . "\n";
|
||||
$lang->action->desc->syncbycase = '$date, running the testcase sets the request status as Doing.' . "\n";
|
||||
$lang->action->desc->converttonewdoc = '$date, <strong>$actor</strong> completed the conversion.';
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -292,6 +292,7 @@ $lang->action->desc->managedteam = '$date, by <strong>$actor</strong> m
|
||||
$lang->action->desc->syncexecutionteam = '$date, synchronise members when execution adds members.' . "\n";
|
||||
$lang->action->desc->syncprojectteam = '$date, synchronise members when project removes members' . "\n";
|
||||
$lang->action->desc->syncbycase = '$date, running the testcase sets the request status as Doing.' . "\n";
|
||||
$lang->action->desc->converttonewdoc = '$date, <strong>$actor</strong> completed the conversion.';
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -292,6 +292,7 @@ $lang->action->desc->managedteam = '$date, by <strong>$actor</strong> m
|
||||
$lang->action->desc->syncexecutionteam = '$date, synchronise members when execution adds members.' . "\n";
|
||||
$lang->action->desc->syncprojectteam = '$date, synchronise members when project removes members' . "\n";
|
||||
$lang->action->desc->syncbycase = '$date, running the testcase sets the request status as Doing.' . "\n";
|
||||
$lang->action->desc->converttonewdoc = '$date, <strong>$actor</strong> completed the conversion.';
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> a créé un sous-tâche <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -292,6 +292,7 @@ $lang->action->desc->managedteam = '$date, 由 <strong>$actor</strong>
|
||||
$lang->action->desc->syncexecutionteam = '$date, 同步更新执行增加的团队成员。' . "\n";
|
||||
$lang->action->desc->syncprojectteam = '$date, 同步更新项目删除的团队成员。' . "\n";
|
||||
$lang->action->desc->syncbycase = '$date, 系统判断由于执行了用例,将测试单状态置为进行中。' . "\n";
|
||||
$lang->action->desc->converttonewdoc = '$date, 由 <strong>$actor</strong> 完成了文档转换。';
|
||||
|
||||
/* 用来描述和父子任务相关的操作历史记录。*/
|
||||
$lang->action->desc->createchildren = '$date, 由 <strong>$actor</strong> 创建子任务 <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -1764,10 +1764,8 @@ class docModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
unset($doc->contentType);
|
||||
unset($doc->rawContent);
|
||||
$doc->draft = isset($doc->content) ? $doc->content : '';
|
||||
$this->dao->update(TABLE_DOC)->data($doc, 'content')
|
||||
$this->dao->update(TABLE_DOC)->data($doc, 'content,rawContent,contentType')
|
||||
->autoCheck()
|
||||
->batchCheck($requiredFields, 'notempty')
|
||||
->where('id')->eq($docID)
|
||||
@@ -1775,6 +1773,12 @@ class docModel extends model
|
||||
|
||||
if(dao::isError()) return false;
|
||||
$this->file->updateObjectID($this->post->uid, $docID, 'doc');
|
||||
|
||||
if(in_array($oldDoc->contentType, array('html', 'attachment', 'markdown')) && !in_array($doc->contentType, array('html', 'attachment', 'markdown')))
|
||||
{
|
||||
$objectType = !empty($doc->templateType) ? 'doctemplate' : 'doc';
|
||||
$this->loadModel('action')->create($objectType, $docID, 'convertToNewDoc');
|
||||
}
|
||||
return array('changes' => $changes, 'files' => $files);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user