diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 69c77d2..056c958 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -171,8 +171,7 @@ class MainController extends AppController { $this->set('currentPage', $page); $this->set('claims', $claims); } else { - $claim = $this->Claims->find()->select($this->Claims)->select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_id' => $id])->order(['Claims.created_at' => 'DESC'])->first(); - + $claim = $this->Claims->find()->select($this->Claims)->select(['Claims__publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_id' => $id])->order(['Claims.created_at' => 'DESC'])->first(); if (!$claim) { return $this->redirect('/'); } diff --git a/src/Template/Main/claims.ctp b/src/Template/Main/claims.ctp index 4a17312..182112c 100644 --- a/src/Template/Main/claims.ctp +++ b/src/Template/Main/claims.ctp @@ -75,7 +75,7 @@ if (strlen(trim($desc)) == 0) {