* Fix importing demo data.

This commit is contained in:
朱金勇
2023-04-08 15:01:22 +00:00
parent 941bcc94aa
commit 6e27c59147
6 changed files with 146 additions and 141 deletions
+7 -5
View File
@@ -776,11 +776,13 @@ class apiModel extends model
/* Insert doclib. */
$lib = new stdclass();
$lib->type = 'api';
$lib->name = $name;
$lib->baseUrl = $baseUrl;
$lib->acl = 'open';
$lib->users = ',' . $currentAccount . ',';
$lib->type = 'api';
$lib->name = $name;
$lib->baseUrl = $baseUrl;
$lib->acl = 'open';
$lib->users = ',' . $currentAccount . ',';
$lib->addedBy = $currentAccount;
$lib->addedDate = helper::now();
$this->dao->insert(TABLE_DOCLIB)->data($lib)->autoCheck()
->batchCheck($this->config->api->createlib->requiredFields, 'notempty')
->check('name', 'unique', "`type` = 'api'")