From d57b26f2547b3cf2933fd2efbbd2a461e885f76d Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 4 Jan 2024 16:17:07 +0800 Subject: [PATCH] * Fix unit test error. --- module/bug/control.php | 2 +- module/transfer/model.php | 2 +- module/transfer/tao.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index c53dc879c5..bbcdfe2b1f 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -626,7 +626,7 @@ class bug extends control { $object = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch(); $projectID = $object->type == 'project' ? $object->id : $object->parent; - $this->config->bug->dtable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairsByIdList', 'params' => $projectID); + $this->config->bug->dtable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairsByIdList', 'params' => array('projectIdList' => array($projectID))); $this->config->bug->dtable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' => 'getPairs', 'params' => $projectID); } } diff --git a/module/transfer/model.php b/module/transfer/model.php index e4809f3fbd..d5dd3665b9 100644 --- a/module/transfer/model.php +++ b/module/transfer/model.php @@ -195,7 +195,7 @@ class transferModel extends model public function initValues(string $model, string $field, array $object, bool $withKey = true) { $values = $object['values']; - if(!$object['dataSource'] || $this->config->edition == 'open') return $values; + if(!$object['dataSource']) return $values; /* 解析dataSource。*/ /* Parse dataSource. */ diff --git a/module/transfer/tao.php b/module/transfer/tao.php index 0ceecd68a7..f6a19f7aca 100644 --- a/module/transfer/tao.php +++ b/module/transfer/tao.php @@ -19,12 +19,12 @@ class transferTao extends transferModel * @param string $module * @param string $callModule * @param string $method - * @param string|array $params - * @param string|array $pairs + * @param string|array|int $params + * @param string|array $pairs * @access protected * @return array */ - protected function getSourceByModuleMethod(string $module, string $callModule, string $method, string|array $params = '', string|array $pairs = ''): array + protected function getSourceByModuleMethod(string $module, string $callModule, string $method, string|array|int $params = '', string|array $pairs = ''): array { /* 获取模块传递的参数。 */ /* Get params. */