* adjust for required.

This commit is contained in:
wangyidong
2017-11-06 17:46:57 +08:00
parent f406d38aed
commit 49909d01c1
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -53,5 +53,5 @@ $config->custom->fieldList['testcase']['createcase'] = 'lib,type,stage,title,pri
$config->custom->fieldList['testreport'] = 'begin,end,owner,members,title,report';
$config->custom->fieldList['testtask'] = 'project,build,,owner,pri,begin,end,status,name,desc';
$config->custom->fieldList['doc'] = 'title,keywords,content';
$config->custom->fieldList['user']['create'] = 'dept,account,realname,password,password1,password2,role,email,commiter,join';
$config->custom->fieldList['user']['edit'] = 'dept,account,realname,role,email,commiter,join,skype,qq,mobile,phone,address,zipcode,wangwang,gtalk';
$config->custom->fieldList['user']['create'] = 'dept,account,realname,password,password1,password2,role,email,commiter';
$config->custom->fieldList['user']['edit'] = 'dept,account,realname,role,email,commiter,skype,qq,mobile,phone,address,zipcode,wangwang,gtalk';
+2 -4
View File
@@ -414,12 +414,11 @@ class docModel extends model
$docContent->type = $doc->contentType;
$docContent->version = 1;
if($doc->contentType == 'markdown') $docContent->content = str_replace('>', '>', $docContent->content);
unset($doc->content);
unset($doc->contentMarkdown);
unset($doc->contentType);
unset($doc->url);
$this->dao->insert(TABLE_DOC)->data($doc)->autoCheck()
$this->dao->insert(TABLE_DOC)->data($doc, 'content')->autoCheck()
->batchCheck($this->config->doc->create->requiredFields, 'notempty')
->exec();
if(!dao::isError())
@@ -501,10 +500,9 @@ class docModel extends model
$docContent->files = trim($docContent->files, ',');
$this->dao->insert(TABLE_DOCCONTENT)->data($docContent)->exec();
}
unset($doc->content);
unset($doc->contentType);
$this->dao->update(TABLE_DOC)->data($doc)
$this->dao->update(TABLE_DOC)->data($doc, 'content')
->autoCheck()
->batchCheck($this->config->doc->edit->requiredFields, 'notempty')
->where('id')->eq((int)$docID)