From 94a9cb1c8f20ffaf92cf49285ff6a66e1f1373d2 Mon Sep 17 00:00:00 2001 From: Chenjianyu Date: Fri, 4 Aug 2023 09:33:19 +0800 Subject: [PATCH] * adjust prompt audit to exit. --- module/ai/control.php | 15 +++++++++++---- module/ai/view/inputinject.html.php | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/module/ai/control.php b/module/ai/control.php index cd2162aaa5..8cca7670f3 100644 --- a/module/ai/control.php +++ b/module/ai/control.php @@ -495,13 +495,20 @@ class ai extends control /** * Audit prompt modal. * - * @param int $promptId - * @param int $objectId + * @param int $promptId + * @param int $objectId + * @param bool $exit * @access public - * @return void + * @return void|int */ - public function promptAudit($promptId, $objectId) + public function promptAudit($promptId, $objectId, $exit) { + if(!empty($exit)) + { + unset($_SESSION['auditPrompt']); + return $this->send(array('result' => 'success', 'locate' => $this->inlink('promptview', "promptID=$promptId"))); + } + $prompt = $this->ai->getPromptByID($promptId); if($_POST) diff --git a/module/ai/view/inputinject.html.php b/module/ai/view/inputinject.html.php index 52d7bd87f5..bb2f18d73c 100644 --- a/module/ai/view/inputinject.html.php +++ b/module/ai/view/inputinject.html.php @@ -124,6 +124,7 @@