* finish task #3088.
This commit is contained in:
@@ -25,6 +25,7 @@ $config->dev->group['testreport'] = 'qa';
|
||||
$config->dev->group['testsuite'] = 'qa';
|
||||
$config->dev->group['testresult'] = 'qa';
|
||||
$config->dev->group['testrun'] = 'qa';
|
||||
$config->dev->group['suitecase'] = 'qa';
|
||||
$config->dev->group['doc'] = 'doc';
|
||||
$config->dev->group['doccontent'] = 'doc';
|
||||
$config->dev->group['doclib'] = 'doc';
|
||||
@@ -48,3 +49,28 @@ $config->dev->group['mail'] = 'admin';
|
||||
$config->dev->group['backup'] = 'admin';
|
||||
$config->dev->group['cron'] = 'admin';
|
||||
$config->dev->group['dev'] = 'admin';
|
||||
|
||||
$config->dev->tableMap['storyspec'] = 'story';
|
||||
$config->dev->tableMap['storystage'] = 'story';
|
||||
$config->dev->tableMap['burn'] = 'task';
|
||||
$config->dev->tableMap['projectproduct'] = 'project';
|
||||
$config->dev->tableMap['projectstory'] = 'story';
|
||||
$config->dev->tableMap['taskestimate'] = 'task';
|
||||
$config->dev->tableMap['team'] = 'project';
|
||||
$config->dev->tableMap['case'] = 'testcase';
|
||||
$config->dev->tableMap['casestep'] = 'testcase';
|
||||
$config->dev->tableMap['testresult'] = 'testtask';
|
||||
$config->dev->tableMap['testrun'] = 'testtask';
|
||||
$config->dev->tableMap['doccontent'] = 'doc';
|
||||
$config->dev->tableMap['doclib'] = 'doc';
|
||||
$config->dev->tableMap['grouppriv'] = 'group';
|
||||
$config->dev->tableMap['usercontact'] = 'user-contacts';
|
||||
$config->dev->tableMap['usergroup'] = 'user';
|
||||
$config->dev->tableMap['userquery'] = 'search';
|
||||
$config->dev->tableMap['usertpl'] = 'user-tpl';
|
||||
$config->dev->tableMap['history'] = 'action-history';
|
||||
$config->dev->tableMap['lang'] = 'custom';
|
||||
$config->dev->tableMap['config'] = 'custom';
|
||||
$config->dev->tableMap['mailqueue'] = 'mail';
|
||||
$config->dev->tableMap['module'] = 'tree';
|
||||
$config->dev->tableMap['suitecase'] = 'testcase';
|
||||
|
||||
@@ -89,6 +89,7 @@ $lang->dev->tableList['branch'] = 'Branch';
|
||||
$lang->dev->tableList['doccontent'] = 'Doc Content';
|
||||
$lang->dev->tableList['storystage'] = 'Story Stage';
|
||||
$lang->dev->tableList['tutorial'] = 'Tutorial';
|
||||
$lang->dev->tableList['suitecase'] = 'Suite Case';
|
||||
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
|
||||
@@ -89,6 +89,7 @@ $lang->dev->tableList['branch'] = '平台/分支';
|
||||
$lang->dev->tableList['doccontent'] = '文档内容';
|
||||
$lang->dev->tableList['storystage'] = '需求阶段';
|
||||
$lang->dev->tableList['tutorial'] = '新手教程';
|
||||
$lang->dev->tableList['suitecase'] = '套件用例';
|
||||
|
||||
$lang->dev->groupList['my'] = '我的地盘';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
|
||||
@@ -35,11 +35,13 @@ class devModel extends model
|
||||
*/
|
||||
public function getFields($table)
|
||||
{
|
||||
$module = substr($table, strpos($table, '_') + 1);
|
||||
$module = substr($table, strpos($table, '_') + 1);
|
||||
$aliasModule = $subLang = '';
|
||||
try
|
||||
{
|
||||
if($module == 'case') $module = 'testcase';
|
||||
$this->app->loadLang($module);
|
||||
if(isset($this->config->dev->tableMap[$module])) $aliasModule = $this->config->dev->tableMap[$module];
|
||||
if(strpos($aliasModule, '-') !== false) list($aliasModule, $subLang) = explode('-', $aliasModule);
|
||||
$this->app->loadLang($aliasModule ? $aliasModule : $module);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
@@ -57,6 +59,7 @@ class devModel extends model
|
||||
{
|
||||
$this->sqlError($e);
|
||||
}
|
||||
|
||||
foreach($rawFields as $rawField)
|
||||
{
|
||||
$firstPOS = strpos($rawField->type, '(');
|
||||
@@ -64,6 +67,9 @@ class devModel extends model
|
||||
$type = str_replace(array('big', 'small', 'medium', 'tiny'), '', $type);
|
||||
$field = array();
|
||||
$field['name'] = isset($this->lang->$module->{$rawField->field}) ? $this->lang->$module->{$rawField->field} : '';
|
||||
if(empty($field['name']) and $aliasModule) $field['name'] = isset($this->lang->$aliasModule->{$rawField->field}) ? $this->lang->$aliasModule->{$rawField->field} : '';
|
||||
if($subLang) $field['name'] = isset($this->lang->$aliasModule->$subLang->{$rawField->field}) ? $this->lang->$aliasModule->$subLang->{$rawField->field} : $field['name'];
|
||||
if(!is_string($field['name'])) $field['name'] = '';
|
||||
$field['null'] = $rawField->null;
|
||||
|
||||
if($type == 'enum' or $type == 'set')
|
||||
|
||||
Reference in New Issue
Block a user