* fix for testcase select fields.

This commit is contained in:
z
2020-06-23 08:48:58 +08:00
parent 3a391ea836
commit 35b544d4e1
2 changed files with 7 additions and 4 deletions
+5 -3
View File
@@ -1067,9 +1067,11 @@ class baseDAO
{
$table = strtolower($this->table);
}
$fieldLabel = isset($lang->$table->$fieldName) ? $lang->$table->$fieldName : $fieldName;
$selectFields = isset($config->$table->selectFields) ? $config->$table->selectFields : '';
$value = isset($this->sqlobj->data->$fieldName) ? $this->sqlobj->data->$fieldName : null;
$fieldLabel = isset($lang->$table->$fieldName) ? $lang->$table->$fieldName : $fieldName;
$value = isset($this->sqlobj->data->$fieldName) ? $this->sqlobj->data->$fieldName : null;
$moduleName = $table == 'case' ? 'testcase' : $table;
$selectFields = isset($config->$moduleName->selectFields) ? $config->$moduleName->selectFields : '';
/*
* 检查唯一性。
+2 -1
View File
@@ -331,8 +331,9 @@ class baseValidater
*/
public static function checkNotEmpty($var, $fieldName = '')
{
$var = trim($var);
if($fieldName) return !empty($var);
return strlen(trim($var)) != 0;
return strlen($var) != 0;
}
/**