- id; ?> - title'>" . $MR->title . '') : html::a($this->createLink('mr', 'view', 'MR=' . $MR->id), $MR->title); ?> - - arrow . $lang->mr->approval; ?> - -
-+
diff --git a/module/mr/control.php b/module/mr/control.php index 888867b042..1517717ec2 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -290,8 +290,8 @@ class mr extends control /** * Approval for this MR. * - * @param mixed $MRID - * @param mixed $action + * @param int $MRID + * @param string $action * @return void */ public function approval($MRID, $action = 'approve') @@ -307,6 +307,15 @@ class mr extends control return $this->send($result); } + $showCompileResult = false; + if(!empty($MR->compileStatus)) + { + $showCompileResult = true; + $this->app->loadLang('compile'); /* Import lang. */ + $this->view->compileUrl = $this->createLink('job', 'view', "jobID={$MR->jobID}&compileID={$MR->compileID}"); + } + $this->view->showCompileResult = $showCompileResult; + $this->view->MR = $MR; $this->view->action = $action; $this->view->actions = $this->loadModel('action')->getList('mrapproval', $MRID); diff --git a/module/mr/model.php b/module/mr/model.php index fa4afccc88..1a13a1c2e6 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -697,9 +697,7 @@ class mrModel extends model ->exec(); if (dao::isError()) return array('result' => 'fail', 'message' => dao::getError()); - /* Force reload when locate to the url. */ - $random = uniqid(); - return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => helper::createLink('mr', 'view', "mr={$MR->id}&random={$random}")); + return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => 'parent.refresh()'); } } return array('result' => 'fail', 'message' => $this->lang->mr->repeatedOperation, 'locate' => helper::createLink('mr', 'view', "mr={$MR->id}")); diff --git a/module/mr/view/approval.html.php b/module/mr/view/approval.html.php index f219666027..bcaceddd75 100644 --- a/module/mr/view/approval.html.php +++ b/module/mr/view/approval.html.php @@ -1,5 +1,4 @@