* Remove useless query conditions.

This commit is contained in:
liumengyi
2023-07-21 15:32:28 +08:00
parent 6484827e0d
commit 1f3d90ccb0
-2
View File
@@ -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();