* add prompt audit session state.
This commit is contained in:
@@ -391,6 +391,12 @@ class ai extends control
|
||||
$location = $this->ai->getTargetFormLocation($prompt, $objectId);
|
||||
if(empty($location)) return $this->send(array('result' => 'fail', 'message' => $this->lang->ai->execute->fail));
|
||||
|
||||
if($prompt->status == 'draft')
|
||||
{
|
||||
$_SESSION['auditPrompt']['time'] = time();
|
||||
$_SESSION['auditPrompt']['prompt'] = $prompt;
|
||||
}
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->ai->execute->success, 'locate' => $location));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
js::set('injectData', $injectData);
|
||||
unset($_SESSION['aiInjectData'][$module][$method]);
|
||||
$this->app->loadLang('ai');
|
||||
if(isset($_SESSION['auditPrompt']))
|
||||
{
|
||||
if(time() - $_SESSION['auditPrompt']['time'] > 30 * 60) unset($_SESSION['auditPrompt']);
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
$(function()
|
||||
|
||||
Reference in New Issue
Block a user