Merge branch 'sprint/231_liumengyi_fixbug' into 'master'
* Fix bug for no execution view. See merge request easycorp/zentaopms!5053
This commit is contained in:
@@ -996,10 +996,10 @@ class actionModel extends model
|
||||
{
|
||||
$productCondition = '';
|
||||
foreach(explode(',', $authedProducts) as $product) $productCondition = empty($productCondition) ? "(execution = '0' and project = '0' and (product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
$productCondition .= '))';
|
||||
if(!empty($productCondition)) $productCondition .= '))';
|
||||
|
||||
$projectCondition = "(execution = '0' and project != '0' and project " . helper::dbIN($authedProjects) . ')';
|
||||
$executionCondition = isset($authedExecutions) ? "(execution != 0 and execution " . helper::dbIN($authedExecutions) . ')' : '';
|
||||
$executionCondition = isset($authedExecutions) ? "(execution != 0 and execution " . helper::dbIN($authedExecutions) . ')' : "(execution != 0 and execution = '$executionID')";
|
||||
}
|
||||
elseif($productID == 'all' and is_numeric($projectID))
|
||||
{
|
||||
@@ -1010,7 +1010,7 @@ class actionModel extends model
|
||||
|
||||
$productCondition = '';
|
||||
foreach(array_keys($products) as $product) $productCondition = empty($productCondition) ? "(execution = '0' and project = '0' and (product LIKE '%,$product,%'" : "$productCondition OR product LIKE '%,$product,%'";
|
||||
$productCondition .= '))';
|
||||
if(!empty($productCondition)) $productCondition .= '))';
|
||||
|
||||
$projectCondition = "(execution = '0' and project = '$projectID')";
|
||||
$executionCondition = "(execution != '0' and execution " . helper::dbIN($authedExecutions) . ')';
|
||||
|
||||
Reference in New Issue
Block a user