Fixed an issue where two branch fields.

This commit is contained in:
tianshujie
2024-01-26 11:27:51 +08:00
parent bcfe8d4f72
commit 5210e6cce9
+3 -2
View File
@@ -138,14 +138,15 @@ class datatable extends control
if(($module == 'productplan' && $method == 'browse') || ($module == 'project' && $method == 'bug'))
{
$branchField = $module == 'productplan' ? 'branchName' : 'branch';
if($this->session->currentProductType == 'normal')
{
unset($cols['branchName'], $cols['branch']);
unset($cols[$branchField]);
}
else
{
$this->app->loadLang('product');
$cols['branch']['title'] = $cols['branchName']['title'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$this->session->currentProductType]);
$cols[$branchField]['title'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$this->session->currentProductType]);
}
}