* Rollback version, the modification of the data source in the general version has been resolved to avoid conflicts

This commit is contained in:
liuhong
2023-01-06 00:52:01 +00:00
parent 5e26183cbb
commit 212debf30f
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -3711,11 +3711,10 @@ class bugModel extends model
*
* @param int $object
* @param string $pairs
* @param int $productID
* @access public
* @return void
*/
public function getRelatedObjects($object, $pairs = '', $productID = 0)
public function getRelatedObjects($object, $pairs = '')
{
/* Get bugs. */
$bugs = $this->loadModel('transfer')->getQueryDatas('bug');
@@ -3731,12 +3730,8 @@ class bugModel extends model
/* Get related objects title or names. */
$table = $this->config->objectTables[$object];
if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs();
if($object == 'branch' and $this->session->currentProductType != 'normal')
{
$relatedObjects = $this->dao->select($pairs)->from($table)->where('product')->eq($productID)->fetchPairs();
}
if(in_array($object, array('build','resolvedBuild','branch'))) $relatedObjects = array('trunk' => $this->lang->trunk) + $relatedObjects;
if(in_array($object, array('build','resolvedBuild'))) $relatedObjects = array('trunk' => $this->lang->trunk) + $relatedObjects;
return array('' => '', 0 => '') + $relatedObjects;
}