* Fix bug #42203.
This commit is contained in:
@@ -184,6 +184,19 @@ class releaseModel extends model
|
||||
*/
|
||||
public function create($productID = 0, $branch = 0, $projectID = 0)
|
||||
{
|
||||
if(empty($projectID))
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
if($product->shadow)
|
||||
{
|
||||
$projectID = $this->dao->select('t2.id')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')
|
||||
->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->fetch('id');
|
||||
}
|
||||
}
|
||||
/* Init vars. */
|
||||
$productID = $this->post->product ? $this->post->product : (int)$productID;
|
||||
$branch = $this->post->branch ? $this->post->branch : (int)$branch;
|
||||
|
||||
Reference in New Issue
Block a user