* Finish task#41216.

This commit is contained in:
qiyu-xie
2021-08-13 09:18:58 +08:00
parent e12c8606ca
commit fd8f131829
2 changed files with 2 additions and 10 deletions
+1 -9
View File
@@ -138,13 +138,6 @@ class doc extends control
if($objectType == 'execution' and $this->post->execution) $objectID = $this->post->execution;
if($objectType == 'custom' or $objectType == 'book') $objectID = 0;
if($objectType == 'execution' and $this->config->systemMode == 'new' and $this->app->openApp == 'doc')
{
$execution = $this->execution->getByID($this->post->execution);
$objectType = 'project';
$objectID = $execution->project;
}
$this->action->create('docLib', $libID, 'Created');
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID));
@@ -298,8 +291,7 @@ class doc extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID));
$objectID = zget($lib, $lib->type, '');
$libType = ($lib->type == 'execution' and $this->app->openApp != 'execution') ? 'project' : $lib->type;
$params = "type={$libType}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
$params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
$link = $this->createLink('doc', 'objectLibs', $params);
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
}