From fd8f1318298b99a628e7ea5fbdd72bfea87edda6 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 13 Aug 2021 09:18:34 +0800 Subject: [PATCH] * Finish task#41216. --- module/doc/control.php | 10 +--------- module/execution/model.php | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index bcde440ca1..2fad8659f9 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -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)); } diff --git a/module/execution/model.php b/module/execution/model.php index 57ea0117eb..04a66ddbb0 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -240,7 +240,7 @@ class executionModel extends model return $this->session->execution; } - if($executionID > 0) $this->session->set('execution', (int)$executionID); + if($executionID > 0) $this->session->set('execution', (int)$executionID, $this->app->openApp); if($executionID == 0 and $this->cookie->lastExecution) { /* Execution link is execution-task. */