* Fix bug #28091,28092.
This commit is contained in:
@@ -173,6 +173,23 @@ class projectModel extends model
|
||||
return $project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a project by its shadow product.
|
||||
*
|
||||
* @param int $product
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByShadowProduct($product)
|
||||
{
|
||||
return $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($product)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->limit(1)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project info.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user