From b3f5ba68b5ebff2efe9ba877ff9f472265df7836 Mon Sep 17 00:00:00 2001 From: liwenrui Date: Tue, 25 Jul 2023 14:39:19 +0800 Subject: [PATCH] * fix data source is my (which is no longer usable) by default. --- module/ai/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ai/control.php b/module/ai/control.php index 34522200dd..6056bc456f 100644 --- a/module/ai/control.php +++ b/module/ai/control.php @@ -302,7 +302,7 @@ class ai extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('promptSelectDataSource', "promptID=$promptID") . '#app=admin')); } - $this->view->activeDataSource = empty($prompt->module) ? 'my' : $prompt->module; + $this->view->activeDataSource = empty($prompt->module) ? current(array_keys($this->config->ai->dataSource)) : $prompt->module; $this->view->dataSource = $this->config->ai->dataSource; $this->view->prompt = $prompt; $this->view->promptID = $promptID;