* Remove useless query conditions.
This commit is contained in:
@@ -2641,9 +2641,7 @@ class blockZen extends block
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t2.shadow')->eq(0)
|
||||
->andWhere('t1.product')->eq($productID)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->orderBy('t1.id desc')
|
||||
->beginIF($this->viewType != 'json')->limit((int)$block->params->count)->fi()
|
||||
->fetchAll();
|
||||
|
||||
Reference in New Issue
Block a user