From 4f49235511df0ecaf3078af427d13ad4a6438096 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 28 Oct 2020 15:51:45 +0100 Subject: [PATCH] add created_at to field list --- src/Controller/MainController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index d91a11f..ae3462e 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -221,7 +221,8 @@ class MainController extends AppController { // find more claims for the publisher $moreClaimsQuery = $this->Claims->find()->select([ 'claim_id', 'bid_state', 'fee', 'fee_currency', 'is_nsfw', 'claim_type', 'name', - 'title', 'description', 'content_type', 'language', 'author', 'license', 'content_type' + 'title', 'description', 'content_type', 'language', 'author', 'license', 'content_type', + 'created_at' ])->select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_type' => 1, 'Claims.id <>' => $claim->id, 'Claims.publisher_id' => isset($claim->publisher) ? $claim->publisher_id : $claim->claim_id])->limit(9); if (isset($claim->publisher) && $claim->publisher_id !== 'f2cf43b86b9d70175dc22dbb9ff7806241d90780') { // prevent ORDER BY for this particular claim $moreClaimsQuery = $moreClaimsQuery->order(['Claims.fee' => 'DESC', 'RAND()' => 'DESC']);