From 5e1b253d5802819d26fd07e24ea980d03271ed0f Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 25 Jan 2021 13:54:18 +0800 Subject: [PATCH] * Finish task#9101. Change PRJEdit return. --- module/my/control.php | 1 - module/program/control.php | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index d9bc9078ef..cf2d0b6f46 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -468,7 +468,6 @@ class my extends control $this->app->session->set('programList', $this->app->getURI(true)); $this->app->session->set('PRJBrowse', $this->app->getURI(true)); - $this->app->session->set('PRJEdit', $this->app->getURI(true)); $this->app->session->set('whitelist', $this->app->getURI(true)); $this->app->session->set('PRJManageProducts', $this->app->getURI(true)); diff --git a/module/program/control.php b/module/program/control.php index a313bc5e9b..56aaabe291 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -63,7 +63,6 @@ class program extends control if(common::hasPriv('program', 'pgmcreate')) $this->lang->pageActions = html::a($this->createLink('program', 'pgmcreate'), " " . $this->lang->program->PGMCreate, '', "class='btn btn-secondary'"); $this->app->session->set('programList', $this->app->getURI(true)); - $this->app->session->set('PRJEdit', $this->app->getURI(true)); $this->app->session->set('whitelist', $this->app->getURI(true)); $this->app->session->set('PRJManageProducts', $this->app->getURI(true)); @@ -416,7 +415,7 @@ class program extends control if(!$programID) $this->locate($this->createLink('program', 'PGMbrowse')); setCookie("lastPGM", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true); - $this->app->session->set('PRJEdit', $this->app->getURI(true)); + $this->app->session->set('PGMProject', $this->app->getURI(true)); $this->app->session->set('whitelist', $this->app->getURI(true)); $this->app->session->set('PRJManageProducts', $this->app->getURI(true)); @@ -798,7 +797,6 @@ class program extends control $this->lang->program->menu = $this->lang->PRJ->menu; $this->lang->program->mainMenuAction = html::a('javascript:history.go(-1);', ' ' . $this->lang->goback, '', "class='btn btn-link'"); $this->app->session->set('PRJBrowse', $this->app->getURI(true)); - $this->app->session->set('PRJEdit', $this->app->getURI(true)); $this->app->session->set('whitelist', $this->app->getURI(true)); $this->app->session->set('PRJManageProducts', $this->app->getURI(true)); $this->loadModel('datatable'); @@ -994,7 +992,9 @@ class program extends control $this->action->logHistory($actionID, $changes); } - $locateLink = $this->session->PRJEdit ? $this->session->PRJEdit : inLink('PRJView', "projectID=$projectID"); + $locateLink = $this->session->PRJBrowse ? $this->session->PRJBrowse : inLink('PRJView', "projectID=$projectID"); + if($from == 'pgmbrowse') $locateLink = inLink('PGMBrowse'); + if($from == 'pgmproject') $locateLink = $this->session->PGMProject ? $this->session->PGMProject : inLink('PGMProject', "programID=$programID"); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink)); } @@ -1066,7 +1066,7 @@ class program extends control $moduleIndex = array_search('program', $this->lang->noMenuModule); if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]); - $this->app->session->set('PRJEdit', $this->app->getURI(true)); + $this->app->session->set('PRJBrowse', $this->app->getURI(true)); $products = $this->loadModel('product')->getProductsByProject($projectID);; $linkedBranches = array();