* Fix get dynamic error.
This commit is contained in:
@@ -640,7 +640,7 @@ class actionModel extends model
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string|int $productID all|int(like 123)|notzero all => include zero, notzero, greater than 0
|
||||
* @param string|int $executionID same as productID
|
||||
* @param string|int $projectID same as productID
|
||||
* @param string $date
|
||||
* @param string $direction
|
||||
* @access public
|
||||
@@ -657,14 +657,14 @@ class actionModel extends model
|
||||
if($productID == 'all') $products = $this->app->user->view->products;
|
||||
if($projectID == 'all') $projects = $this->app->user->view->projects;
|
||||
|
||||
if($productID == 'all' or $executionID == 'all')
|
||||
if($productID == 'all' or $projectID == 'all')
|
||||
{
|
||||
$projectCondition = $projectID == 'all' ? "project " . helper::dbIN($projects) : '';
|
||||
$projectCondition = $projectID == 'all' ? "execution " . helper::dbIN($projects) : '';
|
||||
$productCondition = $productID == 'all' ? "INSTR('," . $products . ",', product) > 0" : '';
|
||||
if(is_numeric($productID)) $productCondition = "product like'%,$productID,%' or product='$productID'";
|
||||
if(is_numeric($projectID)) $projectCondition = "project='$projectID'";
|
||||
if(is_numeric($projectID)) $projectCondition = "execution='$projectID'";
|
||||
|
||||
$condition = "(product =',0,' AND project = '0')";
|
||||
$condition = "(product =',0,' AND execution = '0')";
|
||||
if($projectCondition) $condition .= ' OR ' . $projectCondition;
|
||||
if($productCondition) $condition .= ' OR ' . $productCondition;
|
||||
if($this->app->user->admin) $condition = 1;
|
||||
|
||||
Reference in New Issue
Block a user